@l.x/mycelium 1.0.2 → 1.0.4

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/.depcheckrc ADDED
@@ -0,0 +1,9 @@
1
+ ignores: [
2
+ # Standard ignores
3
+ "typescript",
4
+ "@typescript/native-preview",
5
+ "depcheck",
6
+
7
+ # Internal packages / workspaces
8
+ "@universe/mycelium",
9
+ ]
package/.eslintrc.js ADDED
@@ -0,0 +1,10 @@
1
+ module.exports = {
2
+ extends: ['@luxamm/eslint-config/lib'],
3
+ parserOptions: {
4
+ tsconfigRootDir: __dirname,
5
+ },
6
+ // Note: no-relative-import-paths is disabled for mycelium because
7
+ // this package uses `exports` in package.json (required for ./tailwind CSS export).
8
+ // Packages with `exports` cannot use absolute internal imports like
9
+ // '@luxexchange/mycelium/src/types' since they're blocked by the exports restriction.
10
+ }
package/LICENSE ADDED
@@ -0,0 +1,122 @@
1
+ Lux Ecosystem License
2
+ Version 1.2, December 2025
3
+
4
+ Copyright (c) 2020-2025 Lux Industries Inc.
5
+ All rights reserved.
6
+
7
+ TECHNOLOGY PORTFOLIO - PATENT APPLICATIONS PLANNED
8
+ Contact: licensing@lux.network
9
+
10
+ ================================================================================
11
+ TERMS AND CONDITIONS
12
+ ================================================================================
13
+
14
+ 1. DEFINITIONS
15
+
16
+ "Lux Primary Network" means the official Lux blockchain with Network ID=1
17
+ and EVM Chain ID=96369.
18
+
19
+ "Authorized Network" means the Lux Primary Network, official testnets/devnets,
20
+ and any L1/L2/L3 chain descending from the Lux Primary Network.
21
+
22
+ "Descending Chain" means an L1/L2/L3 chain built on, anchored to, or deriving
23
+ security from the Lux Primary Network or its authorized testnets.
24
+
25
+ "Research Use" means non-commercial academic research, education, personal
26
+ study, or evaluation purposes.
27
+
28
+ "Commercial Use" means any use in connection with a product or service
29
+ offered for sale or fee, internal use by a for-profit entity, or any use
30
+ to generate revenue.
31
+
32
+ 2. GRANT OF LICENSE
33
+
34
+ Subject to these terms, Lux Industries Inc grants you a non-exclusive,
35
+ royalty-free license to:
36
+
37
+ (a) Use for Research Use without restriction;
38
+
39
+ (b) Operate on the Lux Primary Network (Network ID=1, EVM Chain ID=96369);
40
+
41
+ (c) Operate on official Lux testnets and devnets;
42
+
43
+ (d) Operate L1/L2/L3 chains descending from the Lux Primary Network;
44
+
45
+ (e) Build applications within the Lux ecosystem;
46
+
47
+ (f) Contribute improvements back to the original repositories.
48
+
49
+ 3. RESTRICTIONS
50
+
51
+ Without a commercial license from Lux Industries Inc, you may NOT:
52
+
53
+ (a) Fork the Lux Network or any Lux software;
54
+
55
+ (b) Create competing networks not descending from Lux Primary Network;
56
+
57
+ (c) Use for Commercial Use outside the Lux ecosystem;
58
+
59
+ (d) Sublicense or transfer rights outside the Lux ecosystem;
60
+
61
+ (e) Use to create competing blockchain networks, exchanges, custody
62
+ services, or cryptographic systems outside the Lux ecosystem.
63
+
64
+ 4. NO FORKS POLICY
65
+
66
+ Lux Industries Inc maintains ZERO TOLERANCE for unauthorized forks.
67
+ Any fork or deployment on an unauthorized network constitutes:
68
+
69
+ (a) Breach of this license;
70
+ (b) Grounds for immediate legal action.
71
+
72
+ 5. RIGHTS RESERVATION
73
+
74
+ All rights not explicitly granted are reserved by Lux Industries Inc.
75
+
76
+ We plan to apply for patent protection for the technology in this
77
+ repository. Any implementation outside the Lux ecosystem may require
78
+ a separate commercial license.
79
+
80
+ 6. DISCLAIMER OF WARRANTY
81
+
82
+ THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
83
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
84
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
85
+
86
+ 7. LIMITATION OF LIABILITY
87
+
88
+ IN NO EVENT SHALL LUX INDUSTRIES INC BE LIABLE FOR ANY CLAIM, DAMAGES
89
+ OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
90
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE.
91
+
92
+ 8. TERMINATION
93
+
94
+ This license terminates immediately upon any breach, including but not
95
+ limited to deployment on unauthorized networks or creation of forks.
96
+
97
+ 9. GOVERNING LAW
98
+
99
+ This License shall be governed by the laws of the State of Delaware.
100
+
101
+ 10. COMMERCIAL LICENSING
102
+
103
+ For commercial use outside the Lux ecosystem:
104
+
105
+ Lux Industries Inc.
106
+ Email: licensing@lux.network
107
+ Subject: Commercial License Request
108
+
109
+ ================================================================================
110
+ TL;DR
111
+ ================================================================================
112
+
113
+ - Research/academic use = OK
114
+ - Lux Primary Network (Network ID=1, Chain ID=96369) = OK
115
+ - L1/L2/L3 chains descending from Lux Primary Network = OK
116
+ - Commercial products outside Lux ecosystem = Contact licensing@lux.network
117
+ - Forks = Absolutely not
118
+
119
+ ================================================================================
120
+
121
+ See LP-0012 for full licensing documentation:
122
+ https://github.com/luxfi/lps/blob/main/LPs/lp-0012-ecosystem-licensing.md
package/README.md ADDED
@@ -0,0 +1,53 @@
1
+ # @universe/mycelium
2
+
3
+ Mycelium is Uniswap's shared Tailwind CSS design system for Tailwind v4.
4
+
5
+ ## Usage
6
+
7
+ ### CSS (in your app's main CSS file)
8
+
9
+ ```css
10
+ @import "tailwindcss";
11
+ @import "@universe/mycelium/tailwind";
12
+ @import "@universe/mycelium/fonts"; /* Optional: for web apps */
13
+ ```
14
+
15
+ `@universe/mycelium/tailwind` imports:
16
+ - Theme tokens (colors, typography, breakpoints, border radius)
17
+ - CSS variables (shadows, dark mode)
18
+ - Base styles
19
+ - Animations
20
+
21
+ `@universe/mycelium/fonts` imports:
22
+ - Basel Grotesk font faces (bundled, no CORS issues)
23
+
24
+ ### JavaScript (for the cn utility)
25
+
26
+ ```typescript
27
+ import { cn } from '@universe/mycelium'
28
+
29
+ // Merge class names with Tailwind conflict resolution
30
+ cn('text-sm', 'text-body-1') // => 'text-body-1'
31
+ cn('bg-red-500', isActive && 'bg-blue-500') // => conditional classes
32
+ ```
33
+
34
+ ## What's Included
35
+
36
+ ### Typography Scale
37
+ - `text-heading-1`, `text-heading-2`, `text-heading-3`
38
+ - `text-subheading-1`, `text-subheading-2`
39
+ - `text-body-1`, `text-body-2`, `text-body-3`, `text-body-4`
40
+ - `text-button-1`, `text-button-2`, `text-button-3`, `text-button-4`
41
+
42
+ ### Color Tokens
43
+ - Semantic: `neutral1-3`, `surface1-5`, `accent1-4`
44
+ - Status: `success`, `warning`, `critical`
45
+ - Network: `network-ethereum`, `network-optimism`, etc.
46
+ - Full palettes: gray, pink, red, yellow, green, blue, gold, magenta, purple
47
+
48
+ ### Animations
49
+ - View transitions
50
+ - Dialog animations
51
+ - Button loading states
52
+ - Console terminal effects
53
+ - Logo carousel
@@ -0,0 +1,280 @@
1
+ /* Keyframe Animations */
2
+
3
+ /* View Transitions */
4
+ ::view-transition-old(crossfade) {
5
+ animation: hide 200ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
6
+ }
7
+
8
+ ::view-transition-new(crossfade) {
9
+ opacity: 0;
10
+ animation: appear 300ms cubic-bezier(0.4, 0, 0.2, 1) 80ms forwards;
11
+ }
12
+
13
+ @keyframes hide {
14
+ 0% {
15
+ opacity: 1;
16
+ transform: translateY(0);
17
+ filter: blur(0);
18
+ }
19
+ 100% {
20
+ opacity: 0;
21
+ transform: translateY(8px);
22
+ filter: blur(4px);
23
+ }
24
+ }
25
+
26
+ @keyframes appear {
27
+ 0% {
28
+ opacity: 0;
29
+ transform: translateY(5px);
30
+ filter: blur(4px);
31
+ }
32
+ 100% {
33
+ opacity: 1;
34
+ transform: translateY(0);
35
+ filter: blur(0);
36
+ }
37
+ }
38
+
39
+ /* Dialog Animation - Subtle crossfade style */
40
+ @keyframes dialog-appear {
41
+ 0% {
42
+ opacity: 0;
43
+ transform: translate(-50%, calc(-50% + 4px));
44
+ }
45
+ 100% {
46
+ opacity: 1;
47
+ transform: translate(-50%, -50%);
48
+ }
49
+ }
50
+
51
+ @keyframes dialog-hide {
52
+ 0% {
53
+ opacity: 1;
54
+ transform: translate(-50%, -50%);
55
+ }
56
+ 100% {
57
+ opacity: 0;
58
+ transform: translate(-50%, calc(-50% + 4px));
59
+ }
60
+ }
61
+
62
+ .dialog-content[data-state="open"] {
63
+ animation: dialog-appear 200ms cubic-bezier(0.6, 0, 0.8, 1) forwards;
64
+ }
65
+
66
+ .dialog-content[data-state="closed"] {
67
+ animation: dialog-hide 150ms cubic-bezier(0.6, 0, 0.8, 1) forwards;
68
+ }
69
+
70
+ /* Blur Fade Animations */
71
+ @keyframes blur-fade-in {
72
+ 0% {
73
+ opacity: 0;
74
+ filter: blur(4px);
75
+ }
76
+ 100% {
77
+ opacity: 1;
78
+ filter: blur(0);
79
+ }
80
+ }
81
+
82
+ @keyframes blur-fade-out {
83
+ 0% {
84
+ opacity: 1;
85
+ filter: blur(0);
86
+ }
87
+ 100% {
88
+ opacity: 0;
89
+ filter: blur(4px);
90
+ }
91
+ }
92
+
93
+ /* No entrance animation - just show immediately */
94
+ .animate-entrance {
95
+ opacity: 1;
96
+ }
97
+
98
+ /* Blur fade in with translate - for elements that appear on mount */
99
+ .animate-blur-fade-in {
100
+ animation: blur-fade-in-translate 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
101
+ }
102
+
103
+ @keyframes blur-fade-in-translate {
104
+ 0% {
105
+ opacity: 0;
106
+ transform: translateY(-4px);
107
+ filter: blur(4px);
108
+ }
109
+ 100% {
110
+ opacity: 1;
111
+ transform: translateY(0);
112
+ filter: blur(0);
113
+ }
114
+ }
115
+
116
+ /* Blur fade out with translate and height collapse - for elements that exit */
117
+ .animate-blur-fade-out {
118
+ animation: blur-fade-out-translate 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
119
+ overflow: hidden;
120
+ }
121
+
122
+ @keyframes blur-fade-out-translate {
123
+ 0% {
124
+ opacity: 1;
125
+ transform: translateY(0);
126
+ filter: blur(0);
127
+ max-height: 500px;
128
+ margin-bottom: 0;
129
+ }
130
+ 50% {
131
+ opacity: 0;
132
+ transform: translateY(4px);
133
+ filter: blur(4px);
134
+ }
135
+ 100% {
136
+ opacity: 0;
137
+ transform: translateY(4px);
138
+ filter: blur(4px);
139
+ max-height: 0;
140
+ margin-bottom: -40px;
141
+ }
142
+ }
143
+
144
+ /* State-driven blur fade for elements inside stateful containers */
145
+ [data-state="open"] .blur-fade-item {
146
+ animation: blur-fade-in 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
147
+ }
148
+
149
+ [data-state="closed"] .blur-fade-item {
150
+ animation: blur-fade-out 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
151
+ pointer-events: none;
152
+ }
153
+
154
+ /* Button Loading Crossfade - Pure CSS Transitions */
155
+ .button-loading-text {
156
+ opacity: 1;
157
+ transform: translateY(0);
158
+ filter: blur(0);
159
+ transition:
160
+ opacity 200ms cubic-bezier(0.4, 0, 0.2, 1),
161
+ transform 200ms cubic-bezier(0.4, 0, 0.2, 1),
162
+ filter 200ms cubic-bezier(0.4, 0, 0.2, 1);
163
+ }
164
+
165
+ .button-loading-text[data-loading="true"] {
166
+ opacity: 0;
167
+ transform: translateY(4px);
168
+ filter: blur(4px);
169
+ }
170
+
171
+ .button-loading-spinner {
172
+ opacity: 0;
173
+ transform: translateY(-4px);
174
+ filter: blur(4px);
175
+ pointer-events: none;
176
+ transition:
177
+ opacity 200ms cubic-bezier(0.4, 0, 0.2, 1) 50ms,
178
+ transform 200ms cubic-bezier(0.4, 0, 0.2, 1) 50ms,
179
+ filter 200ms cubic-bezier(0.4, 0, 0.2, 1) 50ms;
180
+ }
181
+
182
+ .button-loading-spinner[data-loading="true"] {
183
+ opacity: 1;
184
+ transform: translateY(0);
185
+ filter: blur(0);
186
+ pointer-events: auto;
187
+ }
188
+
189
+ /* Button State Icons - Crossfade between spinner and success checkmark */
190
+ .button-state-spinner,
191
+ .button-state-success {
192
+ opacity: 0;
193
+ transform: translateY(-4px);
194
+ filter: blur(4px);
195
+ pointer-events: none;
196
+ transition:
197
+ opacity 200ms cubic-bezier(0.4, 0, 0.2, 1),
198
+ transform 200ms cubic-bezier(0.4, 0, 0.2, 1),
199
+ filter 200ms cubic-bezier(0.4, 0, 0.2, 1);
200
+ }
201
+
202
+ .button-state-spinner[data-visible="true"],
203
+ .button-state-success[data-visible="true"] {
204
+ opacity: 1;
205
+ transform: translateY(0);
206
+ filter: blur(0);
207
+ pointer-events: auto;
208
+ }
209
+
210
+ /* Console Terminal Animations */
211
+ @keyframes blink {
212
+ 0%,
213
+ 50% {
214
+ opacity: 1;
215
+ }
216
+ 51%,
217
+ 100% {
218
+ opacity: 0;
219
+ }
220
+ }
221
+
222
+ .console-cursor {
223
+ animation: blink 1s step-end infinite;
224
+ }
225
+
226
+ @keyframes console-fade-in {
227
+ 0% {
228
+ opacity: 0;
229
+ transform: translateY(10px);
230
+ }
231
+ 100% {
232
+ opacity: 1;
233
+ transform: translateY(0);
234
+ }
235
+ }
236
+
237
+ .console-fade-in {
238
+ animation: console-fade-in 400ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
239
+ }
240
+
241
+ /* Logo Carousel Animation - scrolls through one third of content for 3x duplicated logos */
242
+ @keyframes logo-scroll {
243
+ 0% {
244
+ transform: translateX(0) translateZ(0);
245
+ }
246
+ 100% {
247
+ transform: translateX(calc(-33.333%)) translateZ(0);
248
+ }
249
+ }
250
+
251
+ /* Overlay Animations - matches view transition timings */
252
+ @keyframes overlay-hide {
253
+ 0% {
254
+ opacity: 1;
255
+ backdrop-filter: blur(4px);
256
+ }
257
+ 100% {
258
+ opacity: 0;
259
+ backdrop-filter: blur(0);
260
+ }
261
+ }
262
+
263
+ @keyframes overlay-appear {
264
+ 0% {
265
+ opacity: 0;
266
+ backdrop-filter: blur(0);
267
+ }
268
+ 100% {
269
+ opacity: 1;
270
+ backdrop-filter: blur(4px);
271
+ }
272
+ }
273
+
274
+ .overlay-backdrop[data-state="open"] {
275
+ animation: overlay-appear 300ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
276
+ }
277
+
278
+ .overlay-backdrop[data-state="closed"] {
279
+ animation: overlay-hide 200ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
280
+ }
package/css/base.css ADDED
@@ -0,0 +1,13 @@
1
+ /* Base Layer Styles */
2
+
3
+ @custom-variant dark (&:is(.dark *));
4
+
5
+ @layer base {
6
+ html,
7
+ body {
8
+ @apply bg-background text-foreground font-basel;
9
+ }
10
+ * {
11
+ @apply border-border outline-ring/50;
12
+ }
13
+ }
package/css/fonts.css ADDED
@@ -0,0 +1,25 @@
1
+ /* Basel Grotesk Font Faces */
2
+
3
+ @font-face {
4
+ font-family: "Basel Grotesk";
5
+ src:
6
+ url("../fonts/Basel-Grotesk-Book.woff2") format("woff2"),
7
+ url("../fonts/Basel-Grotesk-Book.woff") format("woff");
8
+ font-weight: 485;
9
+ font-style: normal;
10
+ font-display: swap;
11
+ -webkit-font-smoothing: antialiased;
12
+ text-rendering: optimizeLegibility;
13
+ }
14
+
15
+ @font-face {
16
+ font-family: "Basel Grotesk";
17
+ src:
18
+ url("../fonts/Basel-Grotesk-Medium.woff2") format("woff2"),
19
+ url("../fonts/Basel-Grotesk-Medium.woff") format("woff");
20
+ font-weight: 535;
21
+ font-style: normal;
22
+ font-display: swap;
23
+ -webkit-font-smoothing: antialiased;
24
+ text-rendering: optimizeLegibility;
25
+ }