@zpress/ui 0.3.0 → 0.4.0

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 (29) hide show
  1. package/dist/index.d.ts +3 -0
  2. package/dist/index.mjs +45 -4
  3. package/dist/theme/components/nav/layout.tsx +4 -4
  4. package/dist/theme/components/nav/theme-switcher.css +92 -0
  5. package/dist/theme/components/nav/theme-switcher.tsx +135 -0
  6. package/dist/theme/components/shared/browser-window.css +61 -0
  7. package/dist/theme/components/shared/browser-window.tsx +35 -0
  8. package/dist/theme/components/theme-provider.tsx +159 -0
  9. package/dist/theme/index.tsx +7 -0
  10. package/dist/theme/styles/overrides/rspress.css +3 -72
  11. package/dist/theme/styles/overrides/tokens.css +3 -34
  12. package/dist/theme/styles/themes/arcade-fx.css +360 -0
  13. package/dist/theme/styles/themes/arcade.css +96 -0
  14. package/dist/theme/styles/themes/base.css +133 -0
  15. package/dist/theme/styles/themes/midnight.css +96 -0
  16. package/package.json +2 -2
  17. package/src/theme/components/nav/layout.tsx +4 -4
  18. package/src/theme/components/nav/theme-switcher.css +92 -0
  19. package/src/theme/components/nav/theme-switcher.tsx +135 -0
  20. package/src/theme/components/shared/browser-window.css +61 -0
  21. package/src/theme/components/shared/browser-window.tsx +35 -0
  22. package/src/theme/components/theme-provider.tsx +159 -0
  23. package/src/theme/index.tsx +7 -0
  24. package/src/theme/styles/overrides/rspress.css +3 -72
  25. package/src/theme/styles/overrides/tokens.css +3 -34
  26. package/src/theme/styles/themes/arcade-fx.css +360 -0
  27. package/src/theme/styles/themes/arcade.css +96 -0
  28. package/src/theme/styles/themes/base.css +133 -0
  29. package/src/theme/styles/themes/midnight.css +96 -0
@@ -0,0 +1,96 @@
1
+ /**
2
+ * Arcade theme — retro neon gaming palette.
3
+ *
4
+ * Vibrant neon green/cyan brand with deep indigo backgrounds.
5
+ * High-saturation, high-energy visual style.
6
+ */
7
+
8
+ /* ── Light mode (deep indigo) ────────────────────────────── */
9
+ html[data-zp-theme='arcade'] {
10
+ --zp-c-brand-1: #00ff88;
11
+ --zp-c-brand-2: #00cc6a;
12
+ --zp-c-brand-3: #00aa55;
13
+ --zp-c-brand-soft: rgba(0, 255, 136, 0.14);
14
+
15
+ --zp-c-bg: #0d0d1a;
16
+ --zp-c-bg-alt: #10102a;
17
+ --zp-c-bg-elv: #141433;
18
+ --zp-c-bg-soft: #18183d;
19
+ --zp-c-bg-icon: #2a2a55;
20
+
21
+ --zp-c-text-1: #e0ffe0;
22
+ --zp-c-text-2: rgba(224, 255, 224, 0.72);
23
+ --zp-c-text-3: rgba(224, 255, 224, 0.48);
24
+
25
+ --zp-c-divider: #1a1a40;
26
+ --zp-c-border: #252560;
27
+ --zp-c-gutter: #10102a;
28
+
29
+ --zp-code-block-bg: #10102a;
30
+
31
+ --zp-button-brand-bg: #00aa55;
32
+ --zp-button-brand-hover-bg: #00cc6a;
33
+ --zp-button-brand-active-bg: #008844;
34
+ --zp-button-brand-text: #0d0d1a;
35
+
36
+ --rp-c-brand: #00ff88;
37
+ --rp-c-brand-light: #66ffbb;
38
+ --rp-c-brand-lighter: #99ffcc;
39
+ --rp-c-brand-dark: #00cc6a;
40
+ --rp-c-brand-darker: #00aa55;
41
+ --rp-c-brand-tint: rgba(0, 255, 136, 0.14);
42
+
43
+ --rp-c-bg: #0d0d1a;
44
+ --rp-c-bg-soft: #18183d;
45
+ --rp-c-bg-mute: #141433;
46
+
47
+ --rp-c-text-1: #e0ffe0;
48
+ --rp-c-text-2: rgba(224, 255, 224, 0.72);
49
+ --rp-c-text-3: rgba(224, 255, 224, 0.48);
50
+
51
+ --rp-c-divider: #1a1a40;
52
+ --rp-c-link: var(--rp-c-brand-light);
53
+
54
+ --rp-code-block-bg: #10102a;
55
+
56
+ --rp-home-background-bg: #0d0d1a;
57
+ }
58
+
59
+ /* ── Dark mode (deeper indigo) ───────────────────────────── */
60
+ html[data-zp-theme='arcade'].rp-dark {
61
+ --zp-c-bg: #080812;
62
+ --zp-c-bg-alt: #0a0a1a;
63
+ --zp-c-bg-elv: #0d0d22;
64
+ --zp-c-bg-soft: #10102a;
65
+ --zp-c-bg-icon: #222250;
66
+
67
+ --zp-c-text-1: #f0fff0;
68
+ --zp-c-text-2: rgba(240, 255, 240, 0.72);
69
+ --zp-c-text-3: rgba(240, 255, 240, 0.48);
70
+
71
+ --zp-c-divider: #141430;
72
+ --zp-c-border: #1e1e50;
73
+ --zp-c-gutter: #0a0a1a;
74
+
75
+ --zp-code-block-bg: #0a0a1a;
76
+
77
+ --zp-button-brand-bg: #00aa55;
78
+ --zp-button-brand-hover-bg: #00cc6a;
79
+ --zp-button-brand-active-bg: #008844;
80
+ --zp-button-brand-text: #080812;
81
+
82
+ --rp-c-bg: #080812;
83
+ --rp-c-bg-soft: #10102a;
84
+ --rp-c-bg-mute: #0d0d22;
85
+
86
+ --rp-c-text-1: #f0fff0;
87
+ --rp-c-text-2: rgba(240, 255, 240, 0.72);
88
+ --rp-c-text-3: rgba(240, 255, 240, 0.48);
89
+
90
+ --rp-c-divider: #141430;
91
+ --rp-c-link: var(--rp-c-brand-light);
92
+
93
+ --rp-code-block-bg: #0a0a1a;
94
+
95
+ --rp-home-background-bg: #080812;
96
+ }
@@ -0,0 +1,133 @@
1
+ /**
2
+ * Base theme — purple/violet palette.
3
+ *
4
+ * Default zpress theme. `:root` fallback block prevents FOUC
5
+ * by providing colors before ThemeProvider sets [data-zp-theme].
6
+ */
7
+
8
+ /* ── FOUC fallback — loads before JS hydration ───────────── */
9
+ :root {
10
+ --zp-c-brand-1: #a78bfa;
11
+ --zp-c-brand-2: #8b5cf6;
12
+ --zp-c-brand-3: #7c3aed;
13
+ --zp-c-brand-soft: rgba(167, 139, 250, 0.14);
14
+
15
+ --zp-c-bg: #ffffff;
16
+ --zp-c-bg-alt: #f9f9f9;
17
+ --zp-c-bg-elv: #f5f5f5;
18
+ --zp-c-bg-soft: #f0f0f0;
19
+ --zp-c-bg-icon: #cccccc;
20
+
21
+ --zp-c-text-1: #1a1a1a;
22
+ --zp-c-text-2: rgba(26, 26, 26, 0.72);
23
+ --zp-c-text-3: rgba(26, 26, 26, 0.48);
24
+
25
+ --zp-c-divider: #e2e2e2;
26
+ --zp-c-border: #d0d0d0;
27
+ --zp-c-gutter: #f5f5f5;
28
+
29
+ --zp-code-block-bg: #f5f5f5;
30
+
31
+ --zp-button-brand-bg: #7c3aed;
32
+ --zp-button-brand-hover-bg: #8b5cf6;
33
+ --zp-button-brand-active-bg: #6d28d9;
34
+ --zp-button-brand-text: #ffffff;
35
+
36
+ --rp-c-brand: #a78bfa;
37
+ --rp-c-brand-light: #c4b5fd;
38
+ --rp-c-brand-lighter: #ddd6fe;
39
+ --rp-c-brand-dark: #8b5cf6;
40
+ --rp-c-brand-darker: #7c3aed;
41
+ --rp-c-brand-tint: rgba(167, 139, 250, 0.14);
42
+
43
+ --rp-home-background-bg: #fff;
44
+ }
45
+
46
+ /* ── Light mode ──────────────────────────────────────────── */
47
+ html[data-zp-theme='base'] {
48
+ --zp-c-brand-1: #a78bfa;
49
+ --zp-c-brand-2: #8b5cf6;
50
+ --zp-c-brand-3: #7c3aed;
51
+ --zp-c-brand-soft: rgba(167, 139, 250, 0.14);
52
+
53
+ --zp-c-bg: #ffffff;
54
+ --zp-c-bg-alt: #f9f9f9;
55
+ --zp-c-bg-elv: #f5f5f5;
56
+ --zp-c-bg-soft: #f0f0f0;
57
+ --zp-c-bg-icon: #cccccc;
58
+
59
+ --zp-c-text-1: #1a1a1a;
60
+ --zp-c-text-2: rgba(26, 26, 26, 0.72);
61
+ --zp-c-text-3: rgba(26, 26, 26, 0.48);
62
+
63
+ --zp-c-divider: #e2e2e2;
64
+ --zp-c-border: #d0d0d0;
65
+ --zp-c-gutter: #f5f5f5;
66
+
67
+ --zp-code-block-bg: #f5f5f5;
68
+
69
+ --zp-button-brand-bg: #7c3aed;
70
+ --zp-button-brand-hover-bg: #8b5cf6;
71
+ --zp-button-brand-active-bg: #6d28d9;
72
+ --zp-button-brand-text: #ffffff;
73
+
74
+ --rp-c-brand: #a78bfa;
75
+ --rp-c-brand-light: #c4b5fd;
76
+ --rp-c-brand-lighter: #ddd6fe;
77
+ --rp-c-brand-dark: #8b5cf6;
78
+ --rp-c-brand-darker: #7c3aed;
79
+ --rp-c-brand-tint: rgba(167, 139, 250, 0.14);
80
+
81
+ --rp-home-background-bg: #fff;
82
+ }
83
+
84
+ /* ── Dark mode ───────────────────────────────────────────── */
85
+ html[data-zp-theme='base'].rp-dark {
86
+ --zp-c-bg: #141414;
87
+ --zp-c-bg-alt: #1a1a1a;
88
+ --zp-c-bg-elv: #1f1f1f;
89
+ --zp-c-bg-soft: #222222;
90
+ --zp-c-bg-icon: #3d3d3d;
91
+
92
+ --zp-c-text-1: #fbfbfb;
93
+ --zp-c-text-2: rgba(251, 251, 251, 0.72);
94
+ --zp-c-text-3: rgba(251, 251, 251, 0.48);
95
+
96
+ --zp-c-divider: #2e2e2e;
97
+ --zp-c-border: #3a3a3a;
98
+ --zp-c-gutter: #1a1a1a;
99
+
100
+ --zp-c-brand-1: #a78bfa;
101
+ --zp-c-brand-2: #8b5cf6;
102
+ --zp-c-brand-3: #7c3aed;
103
+ --zp-c-brand-soft: rgba(167, 139, 250, 0.14);
104
+
105
+ --zp-code-block-bg: #1a1a1a;
106
+
107
+ --zp-button-brand-bg: #7c3aed;
108
+ --zp-button-brand-hover-bg: #8b5cf6;
109
+ --zp-button-brand-active-bg: #6d28d9;
110
+ --zp-button-brand-text: #fbfbfb;
111
+
112
+ --rp-c-bg: #141414;
113
+ --rp-c-bg-soft: #222222;
114
+ --rp-c-bg-mute: #1f1f1f;
115
+
116
+ --rp-c-text-1: #fbfbfb;
117
+ --rp-c-text-2: rgba(251, 251, 251, 0.72);
118
+ --rp-c-text-3: rgba(251, 251, 251, 0.48);
119
+
120
+ --rp-c-divider: #2e2e2e;
121
+
122
+ --rp-c-brand: #a78bfa;
123
+ --rp-c-brand-light: #c4b5fd;
124
+ --rp-c-brand-lighter: #ddd6fe;
125
+ --rp-c-brand-dark: #8b5cf6;
126
+ --rp-c-brand-darker: #7c3aed;
127
+ --rp-c-brand-tint: rgba(167, 139, 250, 0.14);
128
+ --rp-c-link: var(--rp-c-brand-light);
129
+
130
+ --rp-code-block-bg: #1a1a1a;
131
+
132
+ --rp-home-background-bg: #141414;
133
+ }
@@ -0,0 +1,96 @@
1
+ /**
2
+ * Midnight theme — super dark, blue-tinted brand.
3
+ *
4
+ * Deep black backgrounds with high contrast white text.
5
+ * Both modes are very dark — light is "less dark", dark is "true black."
6
+ */
7
+
8
+ /* ── Light mode (less dark) ──────────────────────────────── */
9
+ html[data-zp-theme='midnight'] {
10
+ --zp-c-brand-1: #60a5fa;
11
+ --zp-c-brand-2: #3b82f6;
12
+ --zp-c-brand-3: #2563eb;
13
+ --zp-c-brand-soft: rgba(96, 165, 250, 0.14);
14
+
15
+ --zp-c-bg: #0f0f0f;
16
+ --zp-c-bg-alt: #121212;
17
+ --zp-c-bg-elv: #161616;
18
+ --zp-c-bg-soft: #1a1a1a;
19
+ --zp-c-bg-icon: #2a2a2a;
20
+
21
+ --zp-c-text-1: #f0f0f0;
22
+ --zp-c-text-2: rgba(240, 240, 240, 0.72);
23
+ --zp-c-text-3: rgba(240, 240, 240, 0.48);
24
+
25
+ --zp-c-divider: #1e1e1e;
26
+ --zp-c-border: #282828;
27
+ --zp-c-gutter: #121212;
28
+
29
+ --zp-code-block-bg: #121212;
30
+
31
+ --zp-button-brand-bg: #2563eb;
32
+ --zp-button-brand-hover-bg: #3b82f6;
33
+ --zp-button-brand-active-bg: #1d4ed8;
34
+ --zp-button-brand-text: #f0f0f0;
35
+
36
+ --rp-c-brand: #60a5fa;
37
+ --rp-c-brand-light: #93c5fd;
38
+ --rp-c-brand-lighter: #bfdbfe;
39
+ --rp-c-brand-dark: #3b82f6;
40
+ --rp-c-brand-darker: #2563eb;
41
+ --rp-c-brand-tint: rgba(96, 165, 250, 0.14);
42
+
43
+ --rp-c-bg: #0f0f0f;
44
+ --rp-c-bg-soft: #1a1a1a;
45
+ --rp-c-bg-mute: #161616;
46
+
47
+ --rp-c-text-1: #f0f0f0;
48
+ --rp-c-text-2: rgba(240, 240, 240, 0.72);
49
+ --rp-c-text-3: rgba(240, 240, 240, 0.48);
50
+
51
+ --rp-c-divider: #1e1e1e;
52
+ --rp-c-link: var(--rp-c-brand-light);
53
+
54
+ --rp-code-block-bg: #121212;
55
+
56
+ --rp-home-background-bg: #0f0f0f;
57
+ }
58
+
59
+ /* ── Dark mode (true black) ──────────────────────────────── */
60
+ html[data-zp-theme='midnight'].rp-dark {
61
+ --zp-c-bg: #050505;
62
+ --zp-c-bg-alt: #0a0a0a;
63
+ --zp-c-bg-elv: #0e0e0e;
64
+ --zp-c-bg-soft: #121212;
65
+ --zp-c-bg-icon: #222222;
66
+
67
+ --zp-c-text-1: #fafafa;
68
+ --zp-c-text-2: rgba(250, 250, 250, 0.72);
69
+ --zp-c-text-3: rgba(250, 250, 250, 0.48);
70
+
71
+ --zp-c-divider: #181818;
72
+ --zp-c-border: #202020;
73
+ --zp-c-gutter: #0a0a0a;
74
+
75
+ --zp-code-block-bg: #0a0a0a;
76
+
77
+ --zp-button-brand-bg: #2563eb;
78
+ --zp-button-brand-hover-bg: #3b82f6;
79
+ --zp-button-brand-active-bg: #1d4ed8;
80
+ --zp-button-brand-text: #fafafa;
81
+
82
+ --rp-c-bg: #050505;
83
+ --rp-c-bg-soft: #121212;
84
+ --rp-c-bg-mute: #0e0e0e;
85
+
86
+ --rp-c-text-1: #fafafa;
87
+ --rp-c-text-2: rgba(250, 250, 250, 0.72);
88
+ --rp-c-text-3: rgba(250, 250, 250, 0.48);
89
+
90
+ --rp-c-divider: #181818;
91
+ --rp-c-link: var(--rp-c-brand-light);
92
+
93
+ --rp-code-block-bg: #0a0a0a;
94
+
95
+ --rp-home-background-bg: #050505;
96
+ }