@mictonode/widget 0.3.16 → 0.3.17

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 (69) hide show
  1. package/.github/FUNDING.yml +3 -3
  2. package/.github/workflows/npm-publish.yml +34 -34
  3. package/.prettierrc.json +9 -9
  4. package/.vscode/extensions.json +3 -3
  5. package/LICENSE +674 -674
  6. package/README.md +41 -41
  7. package/dist/{main-d0e5d1e4.js → main-465ae991.js} +151 -149
  8. package/dist/ping-widget.js +2 -2
  9. package/dist/ping-widget.umd.cjs +17 -17
  10. package/dist/{query.lcd-3d4d3495.js → query.lcd-d9c6163c.js} +1 -1
  11. package/dist/{query.rpc.Query-b7807c29.js → query.rpc.Query-a479e6f9.js} +1 -1
  12. package/dist/{tx.rpc.msg-59c3408a.js → tx.rpc.msg-7444045d.js} +1 -1
  13. package/example/.vscode/extensions.json +3 -3
  14. package/example/README.md +7 -7
  15. package/example/index.html +12 -12
  16. package/example/package.json +19 -19
  17. package/example/pnpm-lock.yaml +465 -465
  18. package/example/public/cdn.html +19 -19
  19. package/example/src/App.vue +73 -73
  20. package/example/src/main.js +4 -4
  21. package/example/vite.config.js +7 -7
  22. package/index.html +12 -12
  23. package/lib/components/ConnectWallet/index.vue +262 -262
  24. package/lib/components/TokenConvert/index.vue +1033 -1033
  25. package/lib/components/TokenConvert/tokens.ts +36 -36
  26. package/lib/components/TxDialog/index.vue +8 -8
  27. package/lib/components/TxDialog/messages/Delegate.vue +174 -174
  28. package/lib/components/TxDialog/messages/Deposit.vue +96 -96
  29. package/lib/components/TxDialog/messages/Redelegate.vue +160 -160
  30. package/lib/components/TxDialog/messages/Send.vue +142 -142
  31. package/lib/components/TxDialog/messages/Transfer.vue +248 -248
  32. package/lib/components/TxDialog/messages/Unbond.vue +103 -103
  33. package/lib/components/TxDialog/messages/Vote.vue +62 -62
  34. package/lib/components/TxDialog/messages/Withdraw.vue +55 -55
  35. package/lib/components/TxDialog/messages/WithdrawCommission.vue +74 -74
  36. package/lib/components/TxDialog/wasm/ClearAdmin.vue +55 -55
  37. package/lib/components/TxDialog/wasm/ExecuteContract.vue +98 -98
  38. package/lib/components/TxDialog/wasm/InstantiateContract.vue +108 -108
  39. package/lib/components/TxDialog/wasm/MigrateContract.vue +76 -76
  40. package/lib/components/TxDialog/wasm/MigrateContract2.vue +76 -76
  41. package/lib/components/TxDialog/wasm/StoreCode.vue +100 -100
  42. package/lib/components/TxDialog/wasm/UpdateAdmin.vue +74 -74
  43. package/lib/main.css +132 -7
  44. package/lib/main.ts +23 -23
  45. package/lib/utils/TokenUnitConverter.ts +44 -44
  46. package/lib/utils/format.ts +16 -16
  47. package/lib/utils/http.ts +154 -154
  48. package/lib/utils/type.ts +56 -56
  49. package/lib/wallet/EthermintMessageAdapter.ts +135 -135
  50. package/lib/wallet/UniClient.ts +144 -144
  51. package/lib/wallet/Wallet.ts +142 -142
  52. package/lib/wallet/wallets/KeplerWallet.ts +141 -141
  53. package/lib/wallet/wallets/LeapWallet.ts +141 -141
  54. package/lib/wallet/wallets/LedgerWallet.ts +202 -202
  55. package/lib/wallet/wallets/MetamaskSnapWallet.ts +105 -105
  56. package/lib/wallet/wallets/MetamaskWallet.ts +173 -173
  57. package/lib/wallet/wallets/OKXWallet.ts +202 -202
  58. package/lib/wallet/wallets/UnisatWallet.ts +198 -198
  59. package/package.json +3 -3
  60. package/postcss.config.js +6 -6
  61. package/src/App.vue +225 -225
  62. package/src/main.ts +7 -4
  63. package/src/styles/design-system.css +150 -0
  64. package/src/vite-env.d.ts +1 -1
  65. package/tailwind.config.js +211 -34
  66. package/tsconfig.json +25 -25
  67. package/tsconfig.node.json +10 -10
  68. package/vite.config.ts +62 -62
  69. package/vue-shim.d.ts +6 -6
@@ -1,34 +1,211 @@
1
- /** @type {import('tailwindcss').Config} */
2
- export default {
3
- darkMode: ['class'],
4
- content: [
5
- './index.html',
6
- './src/**/*.{vue,js,ts,jsx,tsx}',
7
- './lib/**/*.{vue,js,ts,jsx,tsx}',
8
- ],
9
- theme: {
10
- extend: {},
11
- },
12
- plugins: [require('daisyui')],
13
- daisyui: {
14
- themes: [
15
- {
16
- light: {
17
- ...require('daisyui/src/theming/themes')[
18
- '[data-theme=light]'
19
- ],
20
- primary: '#666cff',
21
- },
22
- },
23
- {
24
- dark: {
25
- ...require('daisyui/src/theming/themes')[
26
- '[data-theme=dark]'
27
- ],
28
- primary: '#1c1f2e',
29
- 'base-100': '#1c1f2e',
30
- },
31
- },
32
- ],
33
- },
34
- };
1
+ /**
2
+ * Widget Tailwind Configuration
3
+ * Aligned with MictoNode Explorer Design System (Phase 7)
4
+ *
5
+ * Design System: "The Data Cathedral"
6
+ * - LCH Color Space Integration (future)
7
+ * - Protected Primary: #0066ff (synced with explorer)
8
+ * - Protected Dark Base: #0f1419 (synced with explorer)
9
+ * - 8-Point Grid System
10
+ * - Glassmorphism Aesthetic
11
+ */
12
+ /** @type {import('tailwindcss').Config} */
13
+ export default {
14
+ darkMode: ['class'],
15
+ content: [
16
+ './index.html',
17
+ './src/**/*.{vue,js,ts,jsx,tsx}',
18
+ './lib/**/*.{vue,js,ts,jsx,tsx}',
19
+ ],
20
+ theme: {
21
+ extend: {
22
+ colors: {
23
+ /* Legacy colors for backward compatibility */
24
+ yes: '#3fb68b',
25
+ no: '#ff5353',
26
+ info: '#00b2ff',
27
+ main: 'var(--text-main)',
28
+ secondary: 'var(--text-secondary)',
29
+ active: '#2d75f6',
30
+
31
+ /* Design Token Integration (LCH Color Space) */
32
+ primary: {
33
+ 50: 'var(--color-primary-50)',
34
+ 100: 'var(--color-primary-100)',
35
+ 200: 'var(--color-primary-200)',
36
+ 300: 'var(--color-primary-300)',
37
+ 400: 'var(--color-primary-400)',
38
+ 500: 'var(--color-primary-500)',
39
+ 600: 'var(--color-primary-600)',
40
+ 700: 'var(--color-primary-700)',
41
+ 800: 'var(--color-primary-800)',
42
+ 900: 'var(--color-primary-900)',
43
+ 950: 'var(--color-primary-950)',
44
+ },
45
+ accent: {
46
+ 50: 'var(--color-accent-50)',
47
+ 100: 'var(--color-accent-100)',
48
+ 200: 'var(--color-accent-200)',
49
+ 300: 'var(--color-accent-300)',
50
+ 400: 'var(--color-accent-400)',
51
+ 500: 'var(--color-accent-500)',
52
+ 600: 'var(--color-accent-600)',
53
+ 700: 'var(--color-accent-700)',
54
+ 800: 'var(--color-accent-800)',
55
+ 900: 'var(--color-accent-900)',
56
+ 950: 'var(--color-accent-950)',
57
+ },
58
+ neutral: {
59
+ 50: 'var(--color-neutral-50)',
60
+ 100: 'var(--color-neutral-100)',
61
+ 200: 'var(--color-neutral-200)',
62
+ 300: 'var(--color-neutral-300)',
63
+ 400: 'var(--color-neutral-400)',
64
+ 500: 'var(--color-neutral-500)',
65
+ 600: 'var(--color-neutral-600)',
66
+ 700: 'var(--color-neutral-700)',
67
+ 800: 'var(--color-neutral-800)',
68
+ 900: 'var(--color-neutral-900)',
69
+ 950: 'var(--color-neutral-950)',
70
+ },
71
+ success: 'var(--color-success)',
72
+ warning: 'var(--color-warning)',
73
+ error: 'var(--color-error)',
74
+
75
+ /* Semantic Aliases (resolve to scale tokens, light/dark auto) */
76
+ surface: {
77
+ DEFAULT: 'var(--color-surface)',
78
+ raised: 'var(--color-surface-raised)',
79
+ overlay: 'var(--color-surface-overlay)',
80
+ },
81
+ 'border-s': {
82
+ subtle: 'var(--color-border-subtle)',
83
+ DEFAULT: 'var(--color-border-default)',
84
+ },
85
+ },
86
+ spacing: {
87
+ /* Design token spacing integration (8-Point Grid) */
88
+ '1': 'var(--space-1)',
89
+ '2': 'var(--space-2)',
90
+ '3': 'var(--space-3)',
91
+ '4': 'var(--space-4)',
92
+ '5': 'var(--space-5)',
93
+ '6': 'var(--space-6)',
94
+ '8': 'var(--space-8)',
95
+ '10': 'var(--space-10)',
96
+ '12': 'var(--space-12)',
97
+ '16': 'var(--space-16)',
98
+ '20': 'var(--space-20)',
99
+ '24': 'var(--space-24)',
100
+ },
101
+ borderRadius: {
102
+ /* Design token radius integration */
103
+ 'none': 'var(--radius-none)',
104
+ 'sm': 'var(--radius-sm)',
105
+ 'md': 'var(--radius-md)',
106
+ 'lg': 'var(--radius-lg)',
107
+ 'xl': 'var(--radius-xl)',
108
+ '2xl': 'var(--radius-2xl)',
109
+ 'full': 'var(--radius-full)',
110
+ },
111
+ boxShadow: {
112
+ /* Design token shadow integration (Multi-layer for depth) */
113
+ 'sm': 'var(--shadow-sm)',
114
+ 'md': 'var(--shadow-md)',
115
+ 'lg': 'var(--shadow-lg)',
116
+ 'xl': 'var(--shadow-xl)',
117
+ '2xl': 'var(--shadow-2xl)',
118
+ 'inner': 'var(--shadow-inner)',
119
+ 'glow-primary': 'var(--shadow-glow-primary)',
120
+ 'glow-accent': 'var(--shadow-glow-accent)',
121
+ },
122
+ zIndex: {
123
+ /* Design token z-index integration */
124
+ 'base': 'var(--z-base)',
125
+ 'above': 'var(--z-above)',
126
+ 'dropdown': 'var(--z-dropdown)',
127
+ 'sticky': 'var(--z-sticky)',
128
+ 'fixed': 'var(--z-fixed)',
129
+ 'modal-backdrop': 'var(--z-modal-backdrop)',
130
+ 'modal': 'var(--z-modal)',
131
+ 'popover': 'var(--z-popover)',
132
+ 'tooltip': 'var(--z-tooltip)',
133
+ },
134
+ transitionDuration: {
135
+ /* Design token duration integration */
136
+ 'fast': 'var(--duration-fast)',
137
+ 'base': 'var(--duration-base)',
138
+ 'slow': 'var(--duration-slow)',
139
+ 'slower': 'var(--duration-slower)',
140
+ },
141
+ transitionTimingFunction: {
142
+ /* Design token easing integration (Physics-based) */
143
+ 'default': 'var(--ease-default)',
144
+ 'in': 'var(--ease-in)',
145
+ 'out': 'var(--ease-out)',
146
+ 'in-out': 'var(--ease-in-out)',
147
+ 'spring': 'var(--ease-spring)',
148
+ },
149
+ fontFamily: {
150
+ /* Design token font integration */
151
+ 'display': 'var(--font-display)',
152
+ 'body': 'var(--font-body)',
153
+ 'mono': 'var(--font-mono)',
154
+ },
155
+ },
156
+ },
157
+ plugins: [require('daisyui')],
158
+ daisyui: {
159
+ themes: [
160
+ {
161
+ light: {
162
+ ...require('daisyui/src/theming/themes')['[data-theme=light]'],
163
+ // PROTECTED: Primary color #0066ff (synced with explorer)
164
+ primary: '#0066ff',
165
+ 'primary-focus': '#0052cc',
166
+ 'primary-content': '#ffffff',
167
+ secondary: '#1e40af',
168
+ 'secondary-focus': '#1e3a8a',
169
+ 'secondary-content': '#ffffff',
170
+ accent: '#3b82f6',
171
+ 'accent-focus': '#2563eb',
172
+ 'accent-content': '#ffffff',
173
+ info: '#0066ff',
174
+ success: '#3fb68b',
175
+ warning: '#f59e0b',
176
+ error: '#ff5353',
177
+ neutral: '#1e40af',
178
+ 'neutral-focus': '#1e3a8a',
179
+ 'neutral-content': '#ffffff',
180
+ },
181
+ },
182
+ {
183
+ dark: {
184
+ ...require('daisyui/src/theming/themes')['[data-theme=dark]'],
185
+ // PROTECTED: Primary color #0066ff (synced with explorer)
186
+ primary: '#0066ff',
187
+ 'primary-focus': '#0052cc',
188
+ 'primary-content': '#ffffff',
189
+ secondary: '#1e40af',
190
+ 'secondary-focus': '#1e3a8a',
191
+ 'secondary-content': '#ffffff',
192
+ accent: '#3b82f6',
193
+ 'accent-focus': '#2563eb',
194
+ 'accent-content': '#ffffff',
195
+ info: '#0066ff',
196
+ success: '#3fb68b',
197
+ warning: '#f59e0b',
198
+ error: '#ff5353',
199
+ neutral: '#1e40af',
200
+ 'neutral-focus': '#1e3a8a',
201
+ 'neutral-content': '#ffffff',
202
+ // Explorer DS overrides (S4 4.20)
203
+ 'base-100': '#0f1419',
204
+ 'base-200': '#1a1f2e',
205
+ 'base-300': '#232a3a',
206
+ 'base-content': '#e5e7eb',
207
+ },
208
+ },
209
+ ],
210
+ },
211
+ };
package/tsconfig.json CHANGED
@@ -1,25 +1,25 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2020",
4
- "useDefineForClassFields": true,
5
- "module": "ESNext",
6
- "lib": ["ES2020", "DOM", "DOM.Iterable"],
7
- "skipLibCheck": true,
8
-
9
- /* Bundler mode */
10
- "moduleResolution": "bundler",
11
- "allowImportingTsExtensions": true,
12
- "resolveJsonModule": true,
13
- "isolatedModules": true,
14
- "noEmit": true,
15
- "jsx": "preserve",
16
-
17
- /* Linting */
18
- "strict": true,
19
- "noUnusedLocals": true,
20
- "noUnusedParameters": true,
21
- "noFallthroughCasesInSwitch": true
22
- },
23
- "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
24
- "references": [{ "path": "./tsconfig.node.json" }]
25
- }
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "useDefineForClassFields": true,
5
+ "module": "ESNext",
6
+ "lib": ["ES2020", "DOM", "DOM.Iterable"],
7
+ "skipLibCheck": true,
8
+
9
+ /* Bundler mode */
10
+ "moduleResolution": "bundler",
11
+ "allowImportingTsExtensions": true,
12
+ "resolveJsonModule": true,
13
+ "isolatedModules": true,
14
+ "noEmit": true,
15
+ "jsx": "preserve",
16
+
17
+ /* Linting */
18
+ "strict": true,
19
+ "noUnusedLocals": true,
20
+ "noUnusedParameters": true,
21
+ "noFallthroughCasesInSwitch": true
22
+ },
23
+ "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
24
+ "references": [{ "path": "./tsconfig.node.json" }]
25
+ }
@@ -1,10 +1,10 @@
1
- {
2
- "compilerOptions": {
3
- "composite": true,
4
- "skipLibCheck": true,
5
- "module": "ESNext",
6
- "moduleResolution": "bundler",
7
- "allowSyntheticDefaultImports": true
8
- },
9
- "include": ["vite.config.ts"]
10
- }
1
+ {
2
+ "compilerOptions": {
3
+ "composite": true,
4
+ "skipLibCheck": true,
5
+ "module": "ESNext",
6
+ "moduleResolution": "bundler",
7
+ "allowSyntheticDefaultImports": true
8
+ },
9
+ "include": ["vite.config.ts"]
10
+ }
package/vite.config.ts CHANGED
@@ -1,62 +1,62 @@
1
- // @ts-nocheck
2
- import { resolve } from 'path';
3
- import { defineConfig } from 'vite';
4
- import vue from '@vitejs/plugin-vue';
5
- import cssInjectedByJsPlugin from 'vite-plugin-css-injected-by-js';
6
- import { NodeGlobalsPolyfillPlugin } from '@esbuild-plugins/node-globals-polyfill';
7
- import nodePolyfills from 'rollup-plugin-polyfill-node';
8
- import inject from '@rollup/plugin-inject';
9
-
10
- // https://vitejs.dev/config/
11
- export default defineConfig({
12
- plugins: [vue(), cssInjectedByJsPlugin()],
13
- resolve: {
14
- preserveSymlinks: true,
15
- alias: {
16
- path: 'path-browserify',
17
- stream: 'stream-browserify',
18
- crypto: 'crypto-browserify',
19
- assert: 'assert-browserify',
20
- },
21
- },
22
- optimizeDeps: {
23
- force: true,
24
-
25
- esbuildOptions: {
26
- target: ['es2020'],
27
- define: {
28
- global: 'globalThis',
29
- },
30
- plugins: [
31
- NodeGlobalsPolyfillPlugin({
32
- process: true,
33
- buffer: true,
34
- }),
35
- ],
36
- },
37
- },
38
- build: {
39
- lib: {
40
- // Could also be a dictionary or array of multiple entry points
41
- entry: resolve(__dirname, 'lib/main.ts'),
42
- name: 'ping-widget',
43
- // the proper extensions will be added
44
- fileName: 'ping-widget',
45
- },
46
- commonjsOptions: {
47
- transformMixedEsModules: true,
48
- },
49
- rollupOptions: {
50
- output: {
51
- manualChunks: undefined,
52
- },
53
- plugins: [
54
- nodePolyfills({
55
- process: true,
56
- buffer: true,
57
- }),
58
- inject({ Buffer: ['buffer', 'Buffer'] }),
59
- ],
60
- },
61
- },
62
- });
1
+ // @ts-nocheck
2
+ import { resolve } from 'path';
3
+ import { defineConfig } from 'vite';
4
+ import vue from '@vitejs/plugin-vue';
5
+ import cssInjectedByJsPlugin from 'vite-plugin-css-injected-by-js';
6
+ import { NodeGlobalsPolyfillPlugin } from '@esbuild-plugins/node-globals-polyfill';
7
+ import nodePolyfills from 'rollup-plugin-polyfill-node';
8
+ import inject from '@rollup/plugin-inject';
9
+
10
+ // https://vitejs.dev/config/
11
+ export default defineConfig({
12
+ plugins: [vue(), cssInjectedByJsPlugin()],
13
+ resolve: {
14
+ preserveSymlinks: true,
15
+ alias: {
16
+ path: 'path-browserify',
17
+ stream: 'stream-browserify',
18
+ crypto: 'crypto-browserify',
19
+ assert: 'assert-browserify',
20
+ },
21
+ },
22
+ optimizeDeps: {
23
+ force: true,
24
+
25
+ esbuildOptions: {
26
+ target: ['es2020'],
27
+ define: {
28
+ global: 'globalThis',
29
+ },
30
+ plugins: [
31
+ NodeGlobalsPolyfillPlugin({
32
+ process: true,
33
+ buffer: true,
34
+ }),
35
+ ],
36
+ },
37
+ },
38
+ build: {
39
+ lib: {
40
+ // Could also be a dictionary or array of multiple entry points
41
+ entry: resolve(__dirname, 'lib/main.ts'),
42
+ name: 'ping-widget',
43
+ // the proper extensions will be added
44
+ fileName: 'ping-widget',
45
+ },
46
+ commonjsOptions: {
47
+ transformMixedEsModules: true,
48
+ },
49
+ rollupOptions: {
50
+ output: {
51
+ manualChunks: undefined,
52
+ },
53
+ plugins: [
54
+ nodePolyfills({
55
+ process: true,
56
+ buffer: true,
57
+ }),
58
+ inject({ Buffer: ['buffer', 'Buffer'] }),
59
+ ],
60
+ },
61
+ },
62
+ });
package/vue-shim.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- declare module "*.vue" {
2
- import { ComponentOptions } from "vue"
3
-
4
- const comp: ComponentOptions
5
- export default comp
6
- }
1
+ declare module "*.vue" {
2
+ import { ComponentOptions } from "vue"
3
+
4
+ const comp: ComponentOptions
5
+ export default comp
6
+ }