juxscript 1.1.144 → 1.1.145

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.
@@ -321,7 +321,7 @@ html {
321
321
  .jux-button {
322
322
  /* Colors */
323
323
  background: var(--jux-brand-bg);
324
- color: #fff;
324
+ color: var(--jux-surface-from); /* ✅ Fixed - button text uses surface color (inverts with theme) */
325
325
  border: var(--jux-stroke) solid var(--jux-border-color);
326
326
 
327
327
  /* Shape */
@@ -1,80 +1,132 @@
1
- /* ═══════════════════════════════════════════════════════════════════
2
- * STACK LAYOUT COMPONENTS
3
- * Pure layout structure - no animations, no modifiers
4
- * ═══════════════════════════════════════════════════════════════════ */
1
+ /* ══════════════════════════════════════════════════════════════════
2
+ JUX STACKS - Layout System
3
+ Uses foundation tokens for spacing, auto-adapts to themes
4
+ ══════════════════════════════════════════════════════════════════ */
5
5
 
6
- /* Vertical Stack */
7
- .jux-vstack {
6
+ /* ═════════════════════════════════════════════════════════════════
7
+ * BASE STACK STYLES
8
+ * ═════════════════════════════════════════════════════════════════ */
9
+
10
+ .jux-vstack,
11
+ .jux-hstack,
12
+ .jux-zstack {
8
13
  display: flex;
14
+
15
+ /* ✅ Use CSS variables from foundation/theme */
16
+ gap: var(--jux-gap);
17
+ padding: var(--jux-pad);
18
+
19
+ /* Default alignment */
20
+ align-items: var(--jux-align, flex-start);
21
+ }
22
+
23
+ /* ═════════════════════════════════════════════════════════════════
24
+ * VERTICAL STACK (Column)
25
+ * ═════════════════════════════════════════════════════════════════ */
26
+
27
+ .jux-vstack {
9
28
  flex-direction: column;
10
29
  }
11
30
 
12
- .jux-vstack-tight { gap: 0.5rem; }
13
- .jux-vstack-loose { gap: 1.5rem; }
14
- .jux-vstack-none { gap: 0; }
31
+ /* ═════════════════════════════════════════════════════════════════
32
+ * HORIZONTAL STACK (Row)
33
+ * ═════════════════════════════════════════════════════════════════ */
15
34
 
16
- /* Horizontal Stack */
17
35
  .jux-hstack {
18
- display: flex;
19
36
  flex-direction: row;
20
- align-items: center;
37
+ flex-wrap: wrap; /* Allow wrapping on mobile */
21
38
  }
22
39
 
23
- .jux-hstack-tight { gap: 0.5rem; }
24
- .jux-hstack-loose { gap: 1.5rem; }
25
- .jux-hstack-none { gap: 0; }
40
+ /* ═════════════════════════════════════════════════════════════════
41
+ * Z-STACK (Layered)
42
+ * ═════════════════════════════════════════════════════════════════ */
26
43
 
27
- /* Z-Stack (Layered/Overlapping) */
28
44
  .jux-zstack {
29
- display: grid;
30
- grid-template-columns: 1fr;
31
- grid-template-rows: 1fr;
32
45
  position: relative;
46
+ flex-direction: column;
33
47
  }
34
48
 
35
49
  .jux-zstack > * {
36
- grid-column: 1;
37
- grid-row: 1;
50
+ position: absolute;
51
+ top: 0;
52
+ left: 0;
38
53
  }
39
54
 
40
- .jux-zstack-tight > * { margin: 0.25rem; }
41
- .jux-zstack-loose > * { margin: 0.75rem; }
42
- .jux-zstack-none > * { margin: 0; }
43
-
44
- /* Stack Alignment Options */
45
- .jux-stack-start { align-items: flex-start; }
46
- .jux-stack-center { align-items: center; }
47
- .jux-stack-end { align-items: flex-end; }
48
- .jux-stack-stretch { align-items: stretch; }
49
-
50
- /* Stack Justification Options */
51
- .jux-stack-justify-start { justify-content: flex-start; }
52
- .jux-stack-justify-center { justify-content: center; }
53
- .jux-stack-justify-end { justify-content: flex-end; }
54
- .jux-stack-justify-between { justify-content: space-between; }
55
- .jux-stack-justify-around { justify-content: space-around; }
56
- .jux-stack-justify-evenly { justify-content: space-evenly; }
57
-
58
- /* Responsive Stacks */
55
+ /* ═════════════════════════════════════════════════════════════════
56
+ * ALIGNMENT UTILITIES (Via CSS Variables)
57
+ * Applied via .align-* descriptor classes
58
+ * ═════════════════════════════════════════════════════════════════ */
59
+
60
+ .align-start { --jux-align: flex-start; }
61
+ .align-center { --jux-align: center; }
62
+ .align-end { --jux-align: flex-end; }
63
+ .align-stretch { --jux-align: stretch; }
64
+ .align-baseline { --jux-align: baseline; }
65
+
66
+ /* ═════════════════════════════════════════════════════════════════
67
+ * JUSTIFY CONTENT (For HStack distribution)
68
+ * ═════════════════════════════════════════════════════════════════ */
69
+
70
+ .justify-start { justify-content: flex-start; }
71
+ .justify-center { justify-content: center; }
72
+ .justify-end { justify-content: flex-end; }
73
+ .justify-between { justify-content: space-between; }
74
+ .justify-around { justify-content: space-around; }
75
+ .justify-evenly { justify-content: space-evenly; }
76
+
77
+ /* ═════════════════════════════════════════════════════════════════
78
+ * RESPONSIVE BEHAVIOR
79
+ * HStack becomes VStack on mobile for better UX
80
+ * ═════════════════════════════════════════════════════════════════ */
81
+
59
82
  @media (max-width: 768px) {
60
- .jux-hstack-responsive {
83
+ .jux-hstack {
61
84
  flex-direction: column;
85
+ /* Gap remains consistent via CSS variables */
86
+ }
87
+
88
+ /* Optional: Force HStack to stay horizontal on mobile */
89
+ .jux-hstack.stay-horizontal {
90
+ flex-direction: row;
62
91
  }
63
92
  }
64
93
 
65
- /* Stack with Dividers */
66
- .jux-vstack-divider > *:not(:last-child) {
67
- padding-bottom: 1rem;
68
- border-bottom: 1px solid #e4e4e7;
69
- margin-bottom: 1rem;
94
+ /* ═════════════════════════════════════════════════════════════════
95
+ * FULL WIDTH/HEIGHT UTILITIES
96
+ * ═════════════════════════════════════════════════════════════════ */
97
+
98
+ .full-width {
99
+ width: 100%;
100
+ }
101
+
102
+ .full-height {
103
+ height: 100%;
104
+ min-height: 100vh;
105
+ }
106
+
107
+ /* ═════════════════════════════════════════════════════════════════
108
+ * CENTERED CONTENT (Common Layout Pattern)
109
+ * ═════════════════════════════════════════════════════════════════ */
110
+
111
+ .center-content {
112
+ justify-content: center;
113
+ align-items: center;
114
+ }
115
+
116
+ /* ═════════════════════════════════════════════════════════════════
117
+ * SCROLL BEHAVIOR
118
+ * ═════════════════════════════════════════════════════════════════ */
119
+
120
+ .scroll-x {
121
+ overflow-x: auto;
122
+ overflow-y: hidden;
70
123
  }
71
124
 
72
- .jux-hstack-divider > *:not(:last-child) {
73
- padding-right: 1rem;
74
- border-right: 1px solid #e4e4e7;
75
- margin-right: 1rem;
125
+ .scroll-y {
126
+ overflow-y: auto;
127
+ overflow-x: hidden;
76
128
  }
77
129
 
78
- .jux-zstack-divider > * {
79
- border: 1px solid #e4e4e7;
130
+ .scroll-both {
131
+ overflow: auto;
80
132
  }
@@ -63,6 +63,10 @@
63
63
  --jux-burn-active: 0.08;
64
64
  --jux-burn-muted: 0.3;
65
65
  --jux-burn-strong: 0.6;
66
+
67
+ /* ✅ DEFAULT STACK SPACING */
68
+ --jux-gap-token: var(--jux-space-lg);
69
+ --jux-pad-token: var(--jux-space-xl);
66
70
  }
67
71
 
68
72
  [data-swag="apple"][data-mode="dark"] {
@@ -80,7 +84,9 @@
80
84
  --jux-border-from: #38383a;
81
85
  --jux-border-to: #545456;
82
86
 
83
- /* Radius, spacing, typography inherited from light mode */
87
+ /* DEFAULT STACK SPACING */
88
+ --jux-gap-token: var(--jux-space-lg);
89
+ --jux-pad-token: var(--jux-space-xl);
84
90
  }
85
91
 
86
92
  /* ══════════════════════════════════════════════════════════════════
@@ -133,6 +139,10 @@
133
139
  --jux-burn-active: 0.15;
134
140
  --jux-burn-muted: 0.25;
135
141
  --jux-burn-strong: 0.5;
142
+
143
+ /* ✅ DEFAULT STACK SPACING */
144
+ --jux-gap-token: var(--jux-space-md);
145
+ --jux-pad-token: var(--jux-space-lg);
136
146
  }
137
147
 
138
148
  [data-swag="google"][data-mode="dark"] {
@@ -149,6 +159,10 @@
149
159
 
150
160
  --jux-border-from: #3c4043;
151
161
  --jux-border-to: #5f6368;
162
+
163
+ /* ✅ DEFAULT STACK SPACING */
164
+ --jux-gap-token: var(--jux-space-md);
165
+ --jux-pad-token: var(--jux-space-lg);
152
166
  }
153
167
 
154
168
  /* ══════════════════════════════════════════════════════════════════
@@ -201,6 +215,10 @@
201
215
  --jux-burn-active: 0.08;
202
216
  --jux-burn-muted: 0.3;
203
217
  --jux-burn-strong: 0.5;
218
+
219
+ /* ✅ DEFAULT STACK SPACING */
220
+ --jux-gap-token: var(--jux-space-md);
221
+ --jux-pad-token: var(--jux-space-md);
204
222
  }
205
223
 
206
224
  [data-swag="stripe"][data-mode="dark"] {
@@ -217,6 +235,10 @@
217
235
 
218
236
  --jux-border-from: #1a365d;
219
237
  --jux-border-to: #2d4a6f;
238
+
239
+ /* ✅ DEFAULT STACK SPACING */
240
+ --jux-gap-token: var(--jux-space-md);
241
+ --jux-pad-token: var(--jux-space-md);
220
242
  }
221
243
 
222
244
  /* ══════════════════════════════════════════════════════════════════
@@ -269,6 +291,10 @@
269
291
  --jux-burn-active: 0.15;
270
292
  --jux-burn-muted: 0.25;
271
293
  --jux-burn-strong: 0.4;
294
+
295
+ /* ✅ DEFAULT STACK SPACING */
296
+ --jux-gap-token: var(--jux-space-xl);
297
+ --jux-pad-token: var(--jux-space-2xl);
272
298
  }
273
299
 
274
300
  [data-swag="gumroad"][data-mode="dark"] {
@@ -285,6 +311,10 @@
285
311
 
286
312
  --jux-border-from: #333333;
287
313
  --jux-border-to: #666666;
314
+
315
+ /* ✅ DEFAULT STACK SPACING */
316
+ --jux-gap-token: var(--jux-space-xl);
317
+ --jux-pad-token: var(--jux-space-2xl);
288
318
  }
289
319
 
290
320
  /* ══════════════════════════════════════════════════════════════════
@@ -337,6 +367,10 @@
337
367
  --jux-burn-active: 0.12;
338
368
  --jux-burn-muted: 0.25;
339
369
  --jux-burn-strong: 0.5;
370
+
371
+ /* ✅ DEFAULT STACK SPACING */
372
+ --jux-gap-token: var(--jux-space-md);
373
+ --jux-pad-token: var(--jux-space-lg);
340
374
  }
341
375
 
342
376
  [data-swag="meta"][data-mode="dark"] {
@@ -353,6 +387,10 @@
353
387
 
354
388
  --jux-border-from: #3a3b3c;
355
389
  --jux-border-to: #4e4f50;
390
+
391
+ /* ✅ DEFAULT STACK SPACING */
392
+ --jux-gap-token: var(--jux-space-md);
393
+ --jux-pad-token: var(--jux-space-lg);
356
394
  }
357
395
 
358
396
  /* ══════════════════════════════════════════════════════════════════
@@ -405,6 +443,10 @@
405
443
  --jux-burn-active: 0.08;
406
444
  --jux-burn-muted: 0.35;
407
445
  --jux-burn-strong: 0.6;
446
+
447
+ /* ✅ DEFAULT STACK SPACING */
448
+ --jux-gap-token: var(--jux-space-sm);
449
+ --jux-pad-token: var(--jux-space-md);
408
450
  }
409
451
 
410
452
  [data-swag="notion"][data-mode="dark"] {
@@ -421,6 +463,10 @@
421
463
 
422
464
  --jux-border-from: #373737;
423
465
  --jux-border-to: #4a4a4a;
466
+
467
+ /* ✅ DEFAULT STACK SPACING */
468
+ --jux-gap-token: var(--jux-space-sm);
469
+ --jux-pad-token: var(--jux-space-md);
424
470
  }
425
471
 
426
472
  /* ══════════════════════════════════════════════════════════════════
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "juxscript",
3
- "version": "1.1.144",
3
+ "version": "1.1.145",
4
4
  "type": "module",
5
5
  "description": "A JavaScript UX authorship platform",
6
6
  "main": "index.js",