@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
package/tsconfig.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "lib": ["ES2022", "DOM"],
5
+ "module": "ESNext",
6
+ "moduleResolution": "bundler",
7
+ "allowSyntheticDefaultImports": true,
8
+ "esModuleInterop": true,
9
+ "forceConsistentCasingInFileNames": true,
10
+ "strict": true,
11
+ "skipLibCheck": true,
12
+ "outDir": "./dist",
13
+ "rootDir": "./src",
14
+ "declaration": true,
15
+ "declarationMap": true,
16
+ "sourceMap": true,
17
+ "experimentalDecorators": true,
18
+ "useDefineForClassFields": false
19
+ },
20
+ "include": ["src/**/*"],
21
+ "exclude": ["dist", "node_modules"]
22
+ }
package/tsup.config.ts ADDED
@@ -0,0 +1,90 @@
1
+ import autoprefixer from 'autoprefixer'
2
+ import { readFileSync } from 'fs'
3
+ import { dirname, resolve } from 'path'
4
+ import postcss from 'postcss'
5
+ import postcssImport from 'postcss-import'
6
+ import tailwindcss from 'tailwindcss'
7
+ import { defineConfig } from 'tsup'
8
+
9
+ export default defineConfig({
10
+ entry: ['src/index.ts', 'src/shared/index.ts', 'src/styles/index.ts'],
11
+ format: ['esm', 'cjs'],
12
+ dts: true,
13
+ clean: false, // Don't clean in watch mode - causes Storybook resolution failures
14
+ splitting: false,
15
+ sourcemap: true,
16
+ minify: false,
17
+ outDir: 'dist',
18
+ ignoreWatch: [
19
+ 'dist/**',
20
+ 'node_modules/**',
21
+ '**/.turbo/**',
22
+ '**/*.test.*',
23
+ '**/*.spec.*',
24
+ '**/__tests__/**',
25
+ '**/README.md',
26
+ '**/.git/**',
27
+ ],
28
+ esbuildPlugins: [
29
+ {
30
+ name: 'postcss-raw-loader',
31
+ setup(build) {
32
+ // Intercept ?raw CSS imports
33
+ build.onResolve({ filter: /\.css\?raw$/ }, (args) => {
34
+ const pathWithoutQuery = args.path.replace(/\?raw$/, '')
35
+ const resolvedPath = resolve(args.resolveDir, pathWithoutQuery)
36
+
37
+ // Return with a special virtual path marker that the onLoad hook can recognize
38
+ // Use 'file' namespace to ensure esbuild calls our onLoad handler
39
+ return {
40
+ path: resolvedPath + '?__raw__',
41
+ namespace: 'file',
42
+ }
43
+ })
44
+
45
+ // Load and process CSS files marked with ?__raw__
46
+ build.onLoad({ filter: /\.css\?__raw__$/ }, async (args) => {
47
+ const realPath = args.path.replace(/\?__raw__$/, '')
48
+
49
+ try {
50
+ const css = readFileSync(realPath, 'utf8')
51
+
52
+ // Process with PostCSS and Tailwind
53
+ const result = await postcss([
54
+ postcssImport(),
55
+ tailwindcss({
56
+ config: resolve(dirname(realPath), '../../tailwind.config.cjs'),
57
+ }),
58
+ autoprefixer(),
59
+ ]).process(css, { from: realPath })
60
+
61
+ // Return processed CSS as a JavaScript module
62
+ return {
63
+ contents: `export default ${JSON.stringify(result.css)};`,
64
+ loader: 'js',
65
+ }
66
+ } catch (error) {
67
+ console.error('PostCSS processing error:', error)
68
+ return {
69
+ contents: 'export default ""',
70
+ loader: 'js',
71
+ errors: [
72
+ {
73
+ text: error instanceof Error ? error.message : String(error),
74
+ },
75
+ ],
76
+ }
77
+ }
78
+ })
79
+ },
80
+ },
81
+ ],
82
+ external: [
83
+ '@lukso/transaction-view-headless',
84
+ '@lukso/transaction-decoder',
85
+ '@lukso/web-components',
86
+ '@preact/signals-core',
87
+ 'lit',
88
+ '@lit/task',
89
+ ],
90
+ })