@lukso/transaction-view-headless 0.2.2-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.
- package/.turbo/turbo-build.log +51 -0
- package/CHANGELOG.md +88 -0
- package/COMPONENT_ARCHITECTURE.md +190 -0
- package/COMPONENT_CONVERSION_ANALYSIS.md +371 -0
- package/CONTEXT_VARIANT_GUIDE.md +425 -0
- package/LAZY_LOADING_GUIDE.md +534 -0
- package/LICENSE +201 -0
- package/PLAYBACK_EXAMPLES.md +658 -0
- package/PLAYBACK_GUIDE.md +402 -0
- package/README.md +43 -0
- package/REGISTRY_SUMMARY.md +638 -0
- package/SUFFERING_ECONOMICS.md +346 -0
- package/SUFFERING_ECONOMICS.zip +0 -0
- package/VIEW_REGISTRATION_GUIDE.md +795 -0
- package/dist/composables/index.cjs +1321 -0
- package/dist/composables/index.cjs.map +1 -0
- package/dist/composables/index.d.cts +6 -0
- package/dist/composables/index.d.ts +6 -0
- package/dist/composables/index.js +1276 -0
- package/dist/composables/index.js.map +1 -0
- package/dist/index-CMLU1hKL.d.ts +374 -0
- package/dist/index-CSDjhiKV.d.cts +374 -0
- package/dist/index.cjs +1534 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +93 -0
- package/dist/index.d.ts +93 -0
- package/dist/index.js +1463 -0
- package/dist/index.js.map +1 -0
- package/dist/registry/index.cjs +522 -0
- package/dist/registry/index.cjs.map +1 -0
- package/dist/registry/index.d.cts +46 -0
- package/dist/registry/index.d.ts +46 -0
- package/dist/registry/index.js +487 -0
- package/dist/registry/index.js.map +1 -0
- package/dist/types/index.cjs +19 -0
- package/dist/types/index.cjs.map +1 -0
- package/dist/types/index.d.cts +203 -0
- package/dist/types/index.d.ts +203 -0
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/index.cjs +217 -0
- package/dist/utils/index.cjs.map +1 -0
- package/dist/utils/index.d.cts +47 -0
- package/dist/utils/index.d.ts +47 -0
- package/dist/utils/index.js +188 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/view-loader-dD86QAlQ.d.cts +121 -0
- package/dist/view-loader-ii8AxiQR.d.ts +121 -0
- package/package.json +64 -0
- package/publish.log +0 -0
- package/src/composables/index.ts +59 -0
- package/src/composables/use-image-loader.ts +315 -0
- package/src/composables/use-transaction-playback.ts +396 -0
- package/src/composables/use-transaction-view.ts +309 -0
- package/src/config/lukso-config.ts +171 -0
- package/src/examples/context-aware-views.ts +300 -0
- package/src/examples/example-views.ts +197 -0
- package/src/examples/lit-plus-rn-strategy.ts +448 -0
- package/src/examples/lsp7-custom-matcher-examples.ts +174 -0
- package/src/examples/opt-in-context-examples.ts +372 -0
- package/src/examples/optimized-view-definitions.ts +408 -0
- package/src/examples/vue-to-lit-compilation.ts +358 -0
- package/src/hooks/useAddressQuery.ts +135 -0
- package/src/hooks/useAddressResolution.ts +437 -0
- package/src/index.ts +36 -0
- package/src/registry/index.ts +13 -0
- package/src/registry/view-loader.ts +305 -0
- package/src/registry/view-registry.ts +135 -0
- package/src/types/index.ts +16 -0
- package/src/types/view-contexts.ts +72 -0
- package/src/types/view-matching.ts +173 -0
- package/src/utils/context-matcher.ts +165 -0
- package/src/utils/index.ts +5 -0
- package/src/utils/view-matcher.ts +338 -0
- package/tsconfig.json +20 -0
- package/tsup.config.ts +34 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
|
|
2
|
+
> @lukso/transaction-view-headless@0.2.2 build /home/runner/work/service-auth-simple/service-auth-simple/packages/transaction-view-headless
|
|
3
|
+
> tsup
|
|
4
|
+
|
|
5
|
+
[34mCLI[39m Building entry: {"index":"src/index.ts","types/index":"src/types/index.ts","composables/index":"src/composables/index.ts","registry/index":"src/registry/index.ts","utils/index":"src/utils/index.ts"}
|
|
6
|
+
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
7
|
+
[34mCLI[39m tsup v8.5.1
|
|
8
|
+
[34mCLI[39m Using tsup config: /home/runner/work/service-auth-simple/service-auth-simple/packages/transaction-view-headless/tsup.config.ts
|
|
9
|
+
[34mCLI[39m Target: es2022
|
|
10
|
+
[34mCLI[39m Cleaning output folder
|
|
11
|
+
[34mESM[39m Build start
|
|
12
|
+
[34mCJS[39m Build start
|
|
13
|
+
[32mCJS[39m [1mdist/index.cjs [22m[32m46.38 KB[39m
|
|
14
|
+
[32mCJS[39m [1mdist/types/index.cjs [22m[32m798.00 B[39m
|
|
15
|
+
[32mCJS[39m [1mdist/composables/index.cjs [22m[32m40.34 KB[39m
|
|
16
|
+
[32mCJS[39m [1mdist/registry/index.cjs [22m[32m14.91 KB[39m
|
|
17
|
+
[32mCJS[39m [1mdist/utils/index.cjs [22m[32m6.80 KB[39m
|
|
18
|
+
[32mCJS[39m [1mdist/index.cjs.map [22m[32m99.34 KB[39m
|
|
19
|
+
[32mCJS[39m [1mdist/types/index.cjs.map [22m[32m450.00 B[39m
|
|
20
|
+
[32mCJS[39m [1mdist/composables/index.cjs.map [22m[32m92.14 KB[39m
|
|
21
|
+
[32mCJS[39m [1mdist/registry/index.cjs.map [22m[32m30.27 KB[39m
|
|
22
|
+
[32mCJS[39m [1mdist/utils/index.cjs.map [22m[32m13.93 KB[39m
|
|
23
|
+
[32mCJS[39m ⚡️ Build success in 192ms
|
|
24
|
+
[32mESM[39m [1mdist/index.js [22m[32m42.80 KB[39m
|
|
25
|
+
[32mESM[39m [1mdist/types/index.js [22m[32m33.00 B[39m
|
|
26
|
+
[32mESM[39m [1mdist/composables/index.js [22m[32m37.87 KB[39m
|
|
27
|
+
[32mESM[39m [1mdist/registry/index.js [22m[32m13.51 KB[39m
|
|
28
|
+
[32mESM[39m [1mdist/utils/index.js [22m[32m5.68 KB[39m
|
|
29
|
+
[32mESM[39m [1mdist/index.js.map [22m[32m99.09 KB[39m
|
|
30
|
+
[32mESM[39m [1mdist/types/index.js.map [22m[32m71.00 B[39m
|
|
31
|
+
[32mESM[39m [1mdist/composables/index.js.map [22m[32m92.01 KB[39m
|
|
32
|
+
[32mESM[39m [1mdist/registry/index.js.map [22m[32m29.88 KB[39m
|
|
33
|
+
[32mESM[39m [1mdist/utils/index.js.map [22m[32m13.75 KB[39m
|
|
34
|
+
[32mESM[39m ⚡️ Build success in 193ms
|
|
35
|
+
📦 Build complete (build mode)
|
|
36
|
+
[34mDTS[39m Build start
|
|
37
|
+
[32mDTS[39m ⚡️ Build success in 20858ms
|
|
38
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m4.15 KB[39m
|
|
39
|
+
[32mDTS[39m [1mdist/types/index.d.ts [22m[32m7.07 KB[39m
|
|
40
|
+
[32mDTS[39m [1mdist/registry/index.d.ts [22m[32m1.62 KB[39m
|
|
41
|
+
[32mDTS[39m [1mdist/utils/index.d.ts [22m[32m1.94 KB[39m
|
|
42
|
+
[32mDTS[39m [1mdist/composables/index.d.ts [22m[32m1.06 KB[39m
|
|
43
|
+
[32mDTS[39m [1mdist/view-loader-ii8AxiQR.d.ts [22m[32m3.73 KB[39m
|
|
44
|
+
[32mDTS[39m [1mdist/index-CMLU1hKL.d.ts [22m[32m13.83 KB[39m
|
|
45
|
+
[32mDTS[39m [1mdist/index.d.cts [22m[32m4.16 KB[39m
|
|
46
|
+
[32mDTS[39m [1mdist/types/index.d.cts [22m[32m7.07 KB[39m
|
|
47
|
+
[32mDTS[39m [1mdist/registry/index.d.cts [22m[32m1.62 KB[39m
|
|
48
|
+
[32mDTS[39m [1mdist/utils/index.d.cts [22m[32m1.94 KB[39m
|
|
49
|
+
[32mDTS[39m [1mdist/composables/index.d.cts [22m[32m1.06 KB[39m
|
|
50
|
+
[32mDTS[39m [1mdist/view-loader-dD86QAlQ.d.cts [22m[32m3.73 KB[39m
|
|
51
|
+
[32mDTS[39m [1mdist/index-CSDjhiKV.d.cts [22m[32m13.83 KB[39m
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.2.2](https://github.com/lukso-network/service-auth-simple/compare/transaction-view-headless-v0.2.1...transaction-view-headless-v0.2.2) (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
|
+
|
|
17
|
+
## [0.2.1](https://github.com/lukso-network/service-auth-simple/compare/transaction-view-headless-v0.2.0...transaction-view-headless-v0.2.1) (2025-12-02)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* 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))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Dependencies
|
|
26
|
+
|
|
27
|
+
* The following workspace dependencies were updated
|
|
28
|
+
* dependencies
|
|
29
|
+
* @lukso/transaction-decoder bumped to 1.0.0
|
|
30
|
+
|
|
31
|
+
## [0.2.0](https://github.com/lukso-network/service-auth-simple/compare/transaction-view-headless-v0.1.0...transaction-view-headless-v0.2.0) (2025-11-25)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Features
|
|
35
|
+
|
|
36
|
+
* Add favicons and update titles (LUKSO Auth / LUKSO Auth Demo) ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### Bug Fixes
|
|
40
|
+
|
|
41
|
+
* Add backup plan ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
|
|
42
|
+
* Add lint-staged ([d77afe6](https://github.com/lukso-network/service-auth-simple/commit/d77afe66d4778fbd85ce2d995cfbabd34eeb3c85))
|
|
43
|
+
* Add Playback views. ([81bd63e](https://github.com/lukso-network/service-auth-simple/commit/81bd63e4b6cb86ec3df45c38cb334c355e2643f8))
|
|
44
|
+
* Additional turbo changes ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
|
|
45
|
+
* Better custom matchers ([efca148](https://github.com/lukso-network/service-auth-simple/commit/efca1488831789e8ee21a2e2197c7dfeeb8777d8))
|
|
46
|
+
* 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))
|
|
47
|
+
* Cleanup some docs ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
|
|
48
|
+
* 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))
|
|
49
|
+
* Correct PR number detection in workflow ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
|
|
50
|
+
* Found some more lint problems ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
|
|
51
|
+
* More deps used to be from base ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
|
|
52
|
+
* More docs on backup ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
|
|
53
|
+
* More work ([be3890c](https://github.com/lukso-network/service-auth-simple/commit/be3890cfd93c868af272fefcfcabb2e544b3a0fc))
|
|
54
|
+
* More work ([7d9c289](https://github.com/lukso-network/service-auth-simple/commit/7d9c289b1a32f3710e36012b2cc52b0a66857eb1))
|
|
55
|
+
* More work ([c0e5d8f](https://github.com/lukso-network/service-auth-simple/commit/c0e5d8fceb9ddb791ad1b54f525ec96c06421e22))
|
|
56
|
+
* More work ([1722f13](https://github.com/lukso-network/service-auth-simple/commit/1722f13101c3a6ce59a12ada8f6433c478ad3daf))
|
|
57
|
+
* More work ([fe60cfb](https://github.com/lukso-network/service-auth-simple/commit/fe60cfb824878dbaa0fe64730a153991c53f7bf6))
|
|
58
|
+
* Move apps ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
|
|
59
|
+
* 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))
|
|
60
|
+
* Refactor complete ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
|
|
61
|
+
* Refactor into two 'apps' ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
|
|
62
|
+
* Refactor keygen into separate package ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
|
|
63
|
+
* 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))
|
|
64
|
+
* Remove weird .dev.vars symlink ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
|
|
65
|
+
* Rename config variable to avoid conflict with wagmi config ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
|
|
66
|
+
* Repair ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
|
|
67
|
+
* Repair build ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
|
|
68
|
+
* Repair build of storybook ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
|
|
69
|
+
* Repair build problem ([799cb39](https://github.com/lukso-network/service-auth-simple/commit/799cb39be1a1f9d86c6e292f47ab0e910f851050))
|
|
70
|
+
* Repair ci build ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
|
|
71
|
+
* Repair deployment. ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
|
|
72
|
+
* Repair lint errors showing up once in a while ([11d06e7](https://github.com/lukso-network/service-auth-simple/commit/11d06e712cdebc365871b18306eedea809b9a61a))
|
|
73
|
+
* Repair lockfile ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
|
|
74
|
+
* Repair nav of storybooks ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
|
|
75
|
+
* Repair sequence of .env/.dev.vars since we're now loading both ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
|
|
76
|
+
* Repair storybook build. ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
|
|
77
|
+
* Repair URL mappings for demo ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
|
|
78
|
+
* Repair workflow ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
|
|
79
|
+
* Update vars ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
|
|
80
|
+
* WIP ([fd6e07c](https://github.com/lukso-network/service-auth-simple/commit/fd6e07cecbc2fdea671714dbe71d2da11f593481))
|
|
81
|
+
* WIP ([967db3b](https://github.com/lukso-network/service-auth-simple/commit/967db3bde9730eaef10ccd303143bade89fe64ee))
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
### Dependencies
|
|
85
|
+
|
|
86
|
+
* The following workspace dependencies were updated
|
|
87
|
+
* dependencies
|
|
88
|
+
* @lukso/transaction-decoder bumped to 1.1.0
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
# Component Architecture: The Full Implementation Reality
|
|
2
|
+
|
|
3
|
+
## The Component Hierarchy Challenge
|
|
4
|
+
|
|
5
|
+
While our "Suffering Economics" strategy reduces framework implementations from 6+ to 2, the reality is that we still need to implement a complete component ecosystem for each target platform.
|
|
6
|
+
|
|
7
|
+
### Lit Web Components (Universal Web)
|
|
8
|
+
|
|
9
|
+
**Transaction Views** (Top-level components)
|
|
10
|
+
- `<lsp7-transfer-view>` - LSP7 token transfers
|
|
11
|
+
- `<lsp8-transfer-view>` - LSP8 NFT transfers
|
|
12
|
+
- `<execute-batch-view>` - Batch execution operations
|
|
13
|
+
- `<set-data-view>` - LSP0 setData operations
|
|
14
|
+
- `<generic-transaction-view>` - Universal fallback
|
|
15
|
+
|
|
16
|
+
**Base/Shared Components** (Building blocks)
|
|
17
|
+
- `<address-display>` - Address with resolved name/profile
|
|
18
|
+
- `<profile-card>` - Universal Profile card display
|
|
19
|
+
- `<contract-card>` - Contract information card
|
|
20
|
+
- `<token-amount>` - Token amount with symbol/decimals
|
|
21
|
+
- `<transaction-status>` - Status indicator (pending/confirmed/failed)
|
|
22
|
+
- `<expandable-section>` - Collapsible content sections
|
|
23
|
+
|
|
24
|
+
**Image Components** (Visual elements)
|
|
25
|
+
- `<profile-image>` - Universal Profile avatar
|
|
26
|
+
- `<contract-image>` - Contract logo/icon
|
|
27
|
+
- `<token-image>` - Token/NFT image
|
|
28
|
+
- `<chain-icon>` - Blockchain network icon
|
|
29
|
+
|
|
30
|
+
### React Native Components (Mobile Native)
|
|
31
|
+
|
|
32
|
+
**The Rewrite Reality**: Every Lit component needs a React Native equivalent.
|
|
33
|
+
|
|
34
|
+
**Transaction Views** (Top-level components)
|
|
35
|
+
- `LSP7Transfer` - React Native version of `<lsp7-transfer-view>`
|
|
36
|
+
- `LSP8Transfer` - React Native version of `<lsp8-transfer-view>`
|
|
37
|
+
- `ExecuteBatch` - React Native version of `<execute-batch-view>`
|
|
38
|
+
- `SetData` - React Native version of `<set-data-view>`
|
|
39
|
+
- `GenericTransaction` - React Native version of `<generic-transaction-view>`
|
|
40
|
+
|
|
41
|
+
**Base/Shared Components** (Building blocks)
|
|
42
|
+
- `AddressDisplay` - Address with TouchableOpacity interaction
|
|
43
|
+
- `ProfileCard` - Native View with proper styling
|
|
44
|
+
- `ContractCard` - Native card with platform-appropriate shadows
|
|
45
|
+
- `TokenAmount` - Text with proper number formatting
|
|
46
|
+
- `TransactionStatus` - Status with native color/icon theming
|
|
47
|
+
- `ExpandableSection` - Animated collapsible using Animated API
|
|
48
|
+
|
|
49
|
+
**Image Components** (Visual elements)
|
|
50
|
+
- `ProfileImage` - React Native Image with caching
|
|
51
|
+
- `ContractImage` - Native Image with fallback handling
|
|
52
|
+
- `TokenImage` - Image with NFT-specific optimizations
|
|
53
|
+
- `ChainIcon` - Vector icon or SVG component
|
|
54
|
+
|
|
55
|
+
## The Implementation Strategy
|
|
56
|
+
|
|
57
|
+
### Phase 1: Lit Ecosystem (Universal Web)
|
|
58
|
+
```
|
|
59
|
+
@lukso/decoder-web-components/
|
|
60
|
+
├── transaction-views/
|
|
61
|
+
│ ├── lsp7-transfer-view.ts
|
|
62
|
+
│ ├── lsp8-transfer-view.ts
|
|
63
|
+
│ ├── execute-batch-view.ts
|
|
64
|
+
│ └── generic-transaction-view.ts
|
|
65
|
+
├── shared/
|
|
66
|
+
│ ├── address-display.ts
|
|
67
|
+
│ ├── profile-card.ts
|
|
68
|
+
│ ├── contract-card.ts
|
|
69
|
+
│ └── token-amount.ts
|
|
70
|
+
└── images/
|
|
71
|
+
├── profile-image.ts
|
|
72
|
+
├── contract-image.ts
|
|
73
|
+
└── token-image.ts
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**Benefits:**
|
|
77
|
+
- ✅ Works in ALL web frameworks (Vue, React, Svelte, Angular, vanilla)
|
|
78
|
+
- ✅ Shadow DOM style encapsulation
|
|
79
|
+
- ✅ Web standards-based (future-proof)
|
|
80
|
+
- ✅ Can be used in WebView fallbacks
|
|
81
|
+
|
|
82
|
+
### Phase 2: React Native Ecosystem (Mobile Native)
|
|
83
|
+
```
|
|
84
|
+
@lukso/decoder-rn-views/
|
|
85
|
+
├── transaction-views/
|
|
86
|
+
│ ├── LSP7Transfer.tsx
|
|
87
|
+
│ ├── LSP8Transfer.tsx
|
|
88
|
+
│ ├── ExecuteBatch.tsx
|
|
89
|
+
│ └── GenericTransaction.tsx
|
|
90
|
+
├── shared/
|
|
91
|
+
│ ├── AddressDisplay.tsx
|
|
92
|
+
│ ├── ProfileCard.tsx
|
|
93
|
+
│ ├── ContractCard.tsx
|
|
94
|
+
│ └── TokenAmount.tsx
|
|
95
|
+
└── images/
|
|
96
|
+
├── ProfileImage.tsx
|
|
97
|
+
├── ContractImage.tsx
|
|
98
|
+
└── TokenImage.tsx
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
**Benefits:**
|
|
102
|
+
- ✅ Native mobile performance
|
|
103
|
+
- ✅ Platform-appropriate styling (iOS/Android)
|
|
104
|
+
- ✅ Native touch interactions
|
|
105
|
+
- ✅ Proper mobile accessibility
|
|
106
|
+
|
|
107
|
+
## The "No Pain, No Gain" Reality
|
|
108
|
+
|
|
109
|
+
### What We Can Share
|
|
110
|
+
- ✅ **Business Logic** - All data fetching, formatting, and state management (via decoder-headless)
|
|
111
|
+
- ✅ **Component Structure** - Same props, events, and component hierarchy
|
|
112
|
+
- ✅ **Design System** - Color tokens, spacing, typography scales
|
|
113
|
+
- ✅ **Test Logic** - Same component behavior expectations
|
|
114
|
+
|
|
115
|
+
### What We Must Rewrite
|
|
116
|
+
- ❌ **Rendering Logic** - `html\`template\`` vs `<View><Text></Text></View>`
|
|
117
|
+
- ❌ **Styling System** - CSS vs StyleSheet
|
|
118
|
+
- ❌ **Event Handling** - `@click` vs `onPress`
|
|
119
|
+
- ❌ **Image Handling** - `<img src="">` vs `<Image source={{uri}}>`
|
|
120
|
+
- ❌ **Touch Interactions** - `:hover` vs `TouchableOpacity`
|
|
121
|
+
- ❌ **Animation** - CSS transitions vs Animated API
|
|
122
|
+
|
|
123
|
+
## The Suffering Economics Math
|
|
124
|
+
|
|
125
|
+
### Traditional Approach (6+ frameworks):
|
|
126
|
+
```
|
|
127
|
+
6 frameworks × 15 components = 90 total implementations
|
|
128
|
+
Suffering Coefficient: 90x
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Our Optimized Approach (2 strategic frameworks):
|
|
132
|
+
```
|
|
133
|
+
Lit Components: 15 implementations (universal web)
|
|
134
|
+
React Native: 15 implementations (mobile native)
|
|
135
|
+
Total: 30 implementations
|
|
136
|
+
Suffering Coefficient: 30x (67% reduction!)
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### The Mitigation Strategies
|
|
140
|
+
|
|
141
|
+
**1. Component Parity Tooling**
|
|
142
|
+
- Shared TypeScript interfaces for props
|
|
143
|
+
- Automated testing to ensure component parity
|
|
144
|
+
- Design system tokens shared between platforms
|
|
145
|
+
|
|
146
|
+
**2. Gradual Implementation**
|
|
147
|
+
- Start with core transaction views
|
|
148
|
+
- Add shared components as needed
|
|
149
|
+
- Images and advanced components last
|
|
150
|
+
|
|
151
|
+
**3. WebView Fallback During Development**
|
|
152
|
+
- Implement Lit components first
|
|
153
|
+
- Use WebView fallback for React Native during development
|
|
154
|
+
- Replace with native components progressively
|
|
155
|
+
|
|
156
|
+
**4. Code Generation Opportunities**
|
|
157
|
+
- Component prop interfaces → generate React wrappers
|
|
158
|
+
- Design tokens → generate StyleSheet equivalents
|
|
159
|
+
- Component structure templates
|
|
160
|
+
|
|
161
|
+
## The Long-Term Vision
|
|
162
|
+
|
|
163
|
+
**Web Ecosystem**: One Lit implementation works everywhere
|
|
164
|
+
```
|
|
165
|
+
Vue App → <lsp7-transfer-view>
|
|
166
|
+
React App → <lsp7-transfer-view> (via @lit-labs/react)
|
|
167
|
+
Svelte App → <lsp7-transfer-view>
|
|
168
|
+
Angular App → <lsp7-transfer-view>
|
|
169
|
+
Vanilla HTML → <lsp7-transfer-view>
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
**Mobile Ecosystem**: Native performance with shared logic
|
|
173
|
+
```
|
|
174
|
+
React Native → <LSP7Transfer> (native components)
|
|
175
|
+
Business Logic → decoder-headless (shared composables)
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
## Conclusion
|
|
179
|
+
|
|
180
|
+
Yes, we still need to write ~30 components instead of ~90, but the key insights are:
|
|
181
|
+
|
|
182
|
+
1. **67% less suffering** through strategic platform targeting
|
|
183
|
+
2. **Universal web compatibility** with single Lit implementation
|
|
184
|
+
3. **Shared business logic** eliminates the hardest part (data handling)
|
|
185
|
+
4. **Progressive implementation** via WebView fallbacks
|
|
186
|
+
5. **Future-proof architecture** that adapts to new frameworks automatically
|
|
187
|
+
|
|
188
|
+
The pain is real, but it's **strategically optimized pain** that delivers maximum value with minimum suffering. 🎯
|
|
189
|
+
|
|
190
|
+
**"Suffer twice, deploy everywhere!"** ✨
|