@monygroupcorp/micro-web3 0.1.0 → 0.1.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monygroupcorp/micro-web3",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "A lean, reusable Web3 toolkit with components for wallet connection, IPFS, and common Web3 UI patterns.",
5
5
  "main": "dist/micro-web3.cjs.js",
6
6
  "module": "dist/micro-web3.esm.js",
package/rollup.config.cjs CHANGED
@@ -29,8 +29,8 @@ module.exports = [
29
29
  plugins: [
30
30
  nodeResolve(),
31
31
  commonjs(),
32
- terser()
32
+ terser({ maxWorkers: 1 })
33
33
  ],
34
34
  external: ['@monygroupcorp/microact']
35
35
  }
36
- ];
36
+ ];
@@ -0,0 +1,227 @@
1
+ /* FloatingWalletButton - Bottom-right floating wallet connection button with power user dropdown */
2
+
3
+ .floating-wallet-button {
4
+ position: fixed;
5
+ bottom: 2rem;
6
+ right: 2rem;
7
+ z-index: 9999; /* Above all content */
8
+ }
9
+
10
+ .floating-wallet-button .wallet-btn {
11
+ display: flex;
12
+ align-items: center;
13
+ gap: 0.5rem;
14
+ padding: 0.75rem 1.25rem;
15
+ background: linear-gradient(135deg, rgba(139, 69, 19, 0.9), rgba(101, 67, 33, 0.9));
16
+ border: 2px solid rgba(218, 165, 32, 0.6);
17
+ border-radius: 50px;
18
+ color: #fff;
19
+ font-family: 'Cinzel', serif;
20
+ font-size: 0.9rem;
21
+ font-weight: 600;
22
+ cursor: pointer;
23
+ transition: all 0.3s ease;
24
+ box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
25
+ backdrop-filter: blur(10px);
26
+ }
27
+
28
+ .floating-wallet-button .wallet-btn:hover {
29
+ transform: translateY(-2px);
30
+ box-shadow: 0 6px 20px rgba(218, 165, 32, 0.4);
31
+ border-color: rgba(218, 165, 32, 0.8);
32
+ background: linear-gradient(135deg, rgba(160, 82, 45, 0.95), rgba(120, 80, 50, 0.95));
33
+ }
34
+
35
+ .floating-wallet-button .wallet-btn:active {
36
+ transform: translateY(0);
37
+ }
38
+
39
+ /* Wallet icon */
40
+ .floating-wallet-button .wallet-icon {
41
+ font-size: 1.2rem;
42
+ line-height: 1;
43
+ }
44
+
45
+ /* Wallet text/address */
46
+ .floating-wallet-button .wallet-text,
47
+ .floating-wallet-button .wallet-address {
48
+ font-size: 0.875rem;
49
+ white-space: nowrap;
50
+ }
51
+
52
+ /* Loading state */
53
+ .floating-wallet-button.loading {
54
+ pointer-events: none;
55
+ }
56
+
57
+ .floating-wallet-button .wallet-spinner {
58
+ width: 40px;
59
+ height: 40px;
60
+ border: 3px solid rgba(218, 165, 32, 0.3);
61
+ border-top-color: rgba(218, 165, 32, 0.9);
62
+ border-radius: 50%;
63
+ animation: wallet-spin 0.8s linear infinite;
64
+ }
65
+
66
+ @keyframes wallet-spin {
67
+ to { transform: rotate(360deg); }
68
+ }
69
+
70
+ /* Dropdown menu */
71
+ .wallet-dropdown-menu {
72
+ position: absolute;
73
+ bottom: calc(100% + 0.5rem);
74
+ right: 0;
75
+ min-width: 240px;
76
+ background: linear-gradient(135deg, rgba(139, 69, 19, 0.98), rgba(101, 67, 33, 0.98));
77
+ border: 2px solid rgba(218, 165, 32, 0.6);
78
+ border-radius: 12px;
79
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
80
+ backdrop-filter: blur(15px);
81
+ overflow: hidden;
82
+ animation: dropdown-slide-up 0.2s ease-out;
83
+ }
84
+
85
+ @keyframes dropdown-slide-up {
86
+ from {
87
+ opacity: 0;
88
+ transform: translateY(10px);
89
+ }
90
+ to {
91
+ opacity: 1;
92
+ transform: translateY(0);
93
+ }
94
+ }
95
+
96
+ /* Dropdown header */
97
+ .wallet-dropdown-menu .dropdown-header {
98
+ padding: 1rem;
99
+ background: rgba(0, 0, 0, 0.3);
100
+ border-bottom: 1px solid rgba(218, 165, 32, 0.3);
101
+ }
102
+
103
+ .wallet-dropdown-menu .dropdown-address {
104
+ font-family: 'Cinzel', serif;
105
+ font-size: 0.875rem;
106
+ font-weight: 600;
107
+ color: rgba(218, 165, 32, 0.95);
108
+ margin-bottom: 0.25rem;
109
+ }
110
+
111
+ .wallet-dropdown-menu .dropdown-balance {
112
+ font-family: 'Lato', sans-serif;
113
+ font-size: 0.75rem;
114
+ color: rgba(255, 255, 255, 0.7);
115
+ }
116
+
117
+ /* Dropdown divider */
118
+ .wallet-dropdown-menu .dropdown-divider {
119
+ height: 1px;
120
+ background: linear-gradient(90deg,
121
+ transparent,
122
+ rgba(218, 165, 32, 0.3) 50%,
123
+ transparent
124
+ );
125
+ margin: 0;
126
+ }
127
+
128
+ /* Dropdown items */
129
+ .wallet-dropdown-menu .dropdown-items {
130
+ padding: 0.5rem;
131
+ }
132
+
133
+ .wallet-dropdown-menu .dropdown-item {
134
+ display: flex;
135
+ align-items: center;
136
+ gap: 0.75rem;
137
+ width: 100%;
138
+ padding: 0.75rem 1rem;
139
+ background: transparent;
140
+ border: none;
141
+ border-radius: 8px;
142
+ color: rgba(255, 255, 255, 0.9);
143
+ font-family: 'Lato', sans-serif;
144
+ font-size: 0.875rem;
145
+ text-align: left;
146
+ cursor: pointer;
147
+ transition: all 0.2s ease;
148
+ }
149
+
150
+ .wallet-dropdown-menu .dropdown-item:hover {
151
+ background: rgba(218, 165, 32, 0.15);
152
+ color: #fff;
153
+ }
154
+
155
+ .wallet-dropdown-menu .dropdown-item:active {
156
+ background: rgba(218, 165, 32, 0.25);
157
+ }
158
+
159
+ .wallet-dropdown-menu .dropdown-item .item-icon {
160
+ font-size: 1.125rem;
161
+ line-height: 1;
162
+ opacity: 0.9;
163
+ }
164
+
165
+ .wallet-dropdown-menu .dropdown-item .item-label {
166
+ flex: 1;
167
+ }
168
+
169
+ /* Disconnect button special styling */
170
+ .wallet-dropdown-menu .dropdown-item.disconnect {
171
+ color: rgba(255, 99, 71, 0.9);
172
+ }
173
+
174
+ .wallet-dropdown-menu .dropdown-item.disconnect:hover {
175
+ background: rgba(255, 99, 71, 0.15);
176
+ color: rgba(255, 99, 71, 1);
177
+ }
178
+
179
+ /* Responsive adjustments */
180
+ @media (max-width: 768px) {
181
+ .floating-wallet-button {
182
+ bottom: 1rem;
183
+ right: 1rem;
184
+ }
185
+
186
+ .floating-wallet-button .wallet-btn {
187
+ padding: 0.625rem 1rem;
188
+ font-size: 0.8rem;
189
+ }
190
+
191
+ .wallet-dropdown-menu {
192
+ min-width: 200px;
193
+ right: 0;
194
+ }
195
+
196
+ .wallet-dropdown-menu .dropdown-item {
197
+ padding: 0.625rem 0.875rem;
198
+ font-size: 0.8rem;
199
+ }
200
+ }
201
+
202
+ /* Small screens - even more compact */
203
+ @media (max-width: 480px) {
204
+ .floating-wallet-button {
205
+ bottom: 0.75rem;
206
+ right: 0.75rem;
207
+ }
208
+
209
+ .floating-wallet-button .wallet-btn {
210
+ padding: 0.5rem 0.875rem;
211
+ font-size: 0.75rem;
212
+ }
213
+
214
+ .floating-wallet-button .wallet-icon {
215
+ font-size: 1rem;
216
+ }
217
+
218
+ .wallet-dropdown-menu {
219
+ min-width: 180px;
220
+ }
221
+ }
222
+
223
+ /* Ensure menu appears above button when open */
224
+ .floating-wallet-button.menu-open .wallet-btn {
225
+ border-color: rgba(218, 165, 32, 0.9);
226
+ background: linear-gradient(135deg, rgba(160, 82, 45, 0.95), rgba(120, 80, 50, 0.95));
227
+ }