@principal-ade/industry-theme 0.1.2
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/dist/cjs/ThemeProvider.d.ts +19 -0
- package/dist/cjs/ThemeProvider.d.ts.map +1 -0
- package/dist/cjs/ThemeShowcase.d.ts +24 -0
- package/dist/cjs/ThemeShowcase.d.ts.map +1 -0
- package/dist/cjs/defaultThemes.d.ts +8 -0
- package/dist/cjs/defaultThemes.d.ts.map +1 -0
- package/dist/cjs/glassmorphismTheme.d.ts +7 -0
- package/dist/cjs/glassmorphismTheme.d.ts.map +1 -0
- package/dist/cjs/index.d.ts +130 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +1798 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/themeHelpers.d.ts +30 -0
- package/dist/cjs/themeHelpers.d.ts.map +1 -0
- package/dist/cjs/themes.d.ts +12 -0
- package/dist/cjs/themes.d.ts.map +1 -0
- package/dist/cjs/utils.d.ts +32 -0
- package/dist/cjs/utils.d.ts.map +1 -0
- package/dist/esm/ThemeProvider.d.ts +19 -0
- package/dist/esm/ThemeProvider.d.ts.map +1 -0
- package/dist/esm/ThemeShowcase.d.ts +24 -0
- package/dist/esm/ThemeShowcase.d.ts.map +1 -0
- package/dist/esm/defaultThemes.d.ts +8 -0
- package/dist/esm/defaultThemes.d.ts.map +1 -0
- package/dist/esm/glassmorphismTheme.d.ts +7 -0
- package/dist/esm/glassmorphismTheme.d.ts.map +1 -0
- package/dist/esm/index.d.ts +130 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +1753 -0
- package/dist/esm/package.json +1 -0
- package/dist/esm/themeHelpers.d.ts +30 -0
- package/dist/esm/themeHelpers.d.ts.map +1 -0
- package/dist/esm/themes.d.ts +12 -0
- package/dist/esm/themes.d.ts.map +1 -0
- package/dist/esm/utils.d.ts +32 -0
- package/dist/esm/utils.d.ts.map +1 -0
- package/package.json +64 -0
- package/src/README.md +134 -0
- package/src/ThemeProvider.tsx +117 -0
- package/src/ThemeShowcase.tsx +442 -0
- package/src/defaultThemes.ts +369 -0
- package/src/glassmorphismTheme.ts +213 -0
- package/src/index.ts +230 -0
- package/src/themeHelpers.ts +106 -0
- package/src/themes.ts +746 -0
- package/src/utils.ts +135 -0
|
@@ -0,0 +1,1798 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
8
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
9
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
10
|
+
for (let key of __getOwnPropNames(mod))
|
|
11
|
+
if (!__hasOwnProp.call(to, key))
|
|
12
|
+
__defProp(to, key, {
|
|
13
|
+
get: () => mod[key],
|
|
14
|
+
enumerable: true
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __moduleCache = /* @__PURE__ */ new WeakMap;
|
|
19
|
+
var __toCommonJS = (from) => {
|
|
20
|
+
var entry = __moduleCache.get(from), desc;
|
|
21
|
+
if (entry)
|
|
22
|
+
return entry;
|
|
23
|
+
entry = __defProp({}, "__esModule", { value: true });
|
|
24
|
+
if (from && typeof from === "object" || typeof from === "function")
|
|
25
|
+
__getOwnPropNames(from).map((key) => !__hasOwnProp.call(entry, key) && __defProp(entry, key, {
|
|
26
|
+
get: () => from[key],
|
|
27
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
28
|
+
}));
|
|
29
|
+
__moduleCache.set(from, entry);
|
|
30
|
+
return entry;
|
|
31
|
+
};
|
|
32
|
+
var __export = (target, all) => {
|
|
33
|
+
for (var name in all)
|
|
34
|
+
__defProp(target, name, {
|
|
35
|
+
get: all[name],
|
|
36
|
+
enumerable: true,
|
|
37
|
+
configurable: true,
|
|
38
|
+
set: (newValue) => all[name] = () => newValue
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
// src/index.ts
|
|
43
|
+
var exports_src = {};
|
|
44
|
+
__export(exports_src, {
|
|
45
|
+
withTheme: () => withTheme,
|
|
46
|
+
useTheme: () => useTheme,
|
|
47
|
+
theme: () => theme,
|
|
48
|
+
terminalTheme: () => terminalTheme,
|
|
49
|
+
sx: () => sx,
|
|
50
|
+
slateTheme: () => slateTheme,
|
|
51
|
+
scaleThemeFonts: () => scaleThemeFonts,
|
|
52
|
+
responsive: () => responsive,
|
|
53
|
+
resetFontScale: () => resetFontScale,
|
|
54
|
+
regalTheme: () => regalTheme,
|
|
55
|
+
overrideColors: () => overrideColors,
|
|
56
|
+
mergeThemes: () => mergeThemes,
|
|
57
|
+
matrixTheme: () => matrixTheme,
|
|
58
|
+
matrixMinimalTheme: () => matrixMinimalTheme,
|
|
59
|
+
makeTheme: () => makeTheme,
|
|
60
|
+
increaseFontScale: () => increaseFontScale,
|
|
61
|
+
glassmorphismTheme: () => glassmorphismTheme,
|
|
62
|
+
getZIndex: () => getZIndex,
|
|
63
|
+
getSpace: () => getSpace,
|
|
64
|
+
getShadow: () => getShadow,
|
|
65
|
+
getRadius: () => getRadius,
|
|
66
|
+
getMode: () => getMode,
|
|
67
|
+
getFontSize: () => getFontSize,
|
|
68
|
+
getColor: () => getColor,
|
|
69
|
+
defaultTerminalTheme: () => defaultTerminalTheme,
|
|
70
|
+
defaultMarkdownTheme: () => defaultMarkdownTheme,
|
|
71
|
+
defaultEditorTheme: () => defaultEditorTheme,
|
|
72
|
+
default: () => src_default,
|
|
73
|
+
decreaseFontScale: () => decreaseFontScale,
|
|
74
|
+
createStyle: () => createStyle,
|
|
75
|
+
addMode: () => addMode,
|
|
76
|
+
ThemeShowcase: () => ThemeShowcase,
|
|
77
|
+
ThemeProvider: () => ThemeProvider
|
|
78
|
+
});
|
|
79
|
+
module.exports = __toCommonJS(exports_src);
|
|
80
|
+
|
|
81
|
+
// src/glassmorphismTheme.ts
|
|
82
|
+
var glassmorphismTheme = {
|
|
83
|
+
space: [0, 4, 8, 16, 32, 64, 128, 256, 512],
|
|
84
|
+
fonts: {
|
|
85
|
+
body: '"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
|
|
86
|
+
heading: '"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
|
|
87
|
+
monospace: '"Fira Code", "SF Mono", Monaco, Inconsolata, monospace'
|
|
88
|
+
},
|
|
89
|
+
fontSizes: [12, 14, 16, 18, 20, 24, 32, 48, 64, 96],
|
|
90
|
+
fontScale: 1,
|
|
91
|
+
fontWeights: {
|
|
92
|
+
body: 400,
|
|
93
|
+
heading: 600,
|
|
94
|
+
bold: 700,
|
|
95
|
+
light: 300,
|
|
96
|
+
medium: 500,
|
|
97
|
+
semibold: 600
|
|
98
|
+
},
|
|
99
|
+
lineHeights: {
|
|
100
|
+
body: 1.6,
|
|
101
|
+
heading: 1.3,
|
|
102
|
+
tight: 1.4,
|
|
103
|
+
relaxed: 1.8
|
|
104
|
+
},
|
|
105
|
+
breakpoints: ["640px", "768px", "1024px", "1280px"],
|
|
106
|
+
sizes: [16, 32, 64, 128, 256, 512, 768, 1024, 1536],
|
|
107
|
+
radii: [0, 8, 12, 16, 20, 24, 32, 40],
|
|
108
|
+
shadows: [
|
|
109
|
+
"none",
|
|
110
|
+
"0 8px 32px 0 rgba(31, 38, 135, 0.15)",
|
|
111
|
+
"0 12px 40px 0 rgba(31, 38, 135, 0.2)",
|
|
112
|
+
"0 16px 48px 0 rgba(31, 38, 135, 0.25)",
|
|
113
|
+
"0 20px 56px 0 rgba(31, 38, 135, 0.3)",
|
|
114
|
+
"0 24px 64px 0 rgba(31, 38, 135, 0.35)"
|
|
115
|
+
],
|
|
116
|
+
zIndices: [0, 1, 10, 20, 30, 40, 50],
|
|
117
|
+
colors: {
|
|
118
|
+
text: "rgba(255, 255, 255, 0.95)",
|
|
119
|
+
background: "rgba(255, 255, 255, 0.1)",
|
|
120
|
+
primary: "rgba(99, 102, 241, 0.9)",
|
|
121
|
+
secondary: "rgba(139, 92, 246, 0.9)",
|
|
122
|
+
accent: "rgba(236, 72, 153, 0.9)",
|
|
123
|
+
highlight: "rgba(99, 102, 241, 0.2)",
|
|
124
|
+
muted: "rgba(255, 255, 255, 0.05)",
|
|
125
|
+
success: "rgba(34, 197, 94, 0.9)",
|
|
126
|
+
warning: "rgba(251, 146, 60, 0.9)",
|
|
127
|
+
error: "rgba(239, 68, 68, 0.9)",
|
|
128
|
+
info: "rgba(59, 130, 246, 0.9)",
|
|
129
|
+
border: "rgba(255, 255, 255, 0.18)",
|
|
130
|
+
backgroundSecondary: "rgba(255, 255, 255, 0.15)",
|
|
131
|
+
backgroundTertiary: "rgba(255, 255, 255, 0.2)",
|
|
132
|
+
backgroundLight: "rgba(255, 255, 255, 0.08)",
|
|
133
|
+
backgroundHover: "rgba(255, 255, 255, 0.25)",
|
|
134
|
+
surface: "rgba(255, 255, 255, 0.12)",
|
|
135
|
+
textSecondary: "rgba(255, 255, 255, 0.8)",
|
|
136
|
+
textTertiary: "rgba(255, 255, 255, 0.6)",
|
|
137
|
+
textMuted: "rgba(255, 255, 255, 0.5)",
|
|
138
|
+
highlightBg: "rgba(251, 191, 36, 0.3)",
|
|
139
|
+
highlightBorder: "rgba(251, 191, 36, 0.5)"
|
|
140
|
+
},
|
|
141
|
+
modes: {
|
|
142
|
+
dark: {
|
|
143
|
+
text: "rgba(255, 255, 255, 0.95)",
|
|
144
|
+
background: "rgba(0, 0, 0, 0.3)",
|
|
145
|
+
primary: "rgba(129, 140, 248, 0.9)",
|
|
146
|
+
secondary: "rgba(167, 139, 250, 0.9)",
|
|
147
|
+
accent: "rgba(244, 114, 182, 0.9)",
|
|
148
|
+
highlight: "rgba(129, 140, 248, 0.25)",
|
|
149
|
+
muted: "rgba(0, 0, 0, 0.15)",
|
|
150
|
+
success: "rgba(74, 222, 128, 0.9)",
|
|
151
|
+
warning: "rgba(251, 191, 36, 0.9)",
|
|
152
|
+
error: "rgba(248, 113, 113, 0.9)",
|
|
153
|
+
info: "rgba(96, 165, 250, 0.9)",
|
|
154
|
+
border: "rgba(255, 255, 255, 0.15)",
|
|
155
|
+
backgroundSecondary: "rgba(0, 0, 0, 0.4)",
|
|
156
|
+
backgroundTertiary: "rgba(0, 0, 0, 0.5)",
|
|
157
|
+
backgroundLight: "rgba(0, 0, 0, 0.2)",
|
|
158
|
+
backgroundHover: "rgba(255, 255, 255, 0.1)",
|
|
159
|
+
surface: "rgba(0, 0, 0, 0.35)",
|
|
160
|
+
textSecondary: "rgba(255, 255, 255, 0.8)",
|
|
161
|
+
textTertiary: "rgba(255, 255, 255, 0.6)",
|
|
162
|
+
textMuted: "rgba(255, 255, 255, 0.4)",
|
|
163
|
+
highlightBg: "rgba(251, 191, 36, 0.35)",
|
|
164
|
+
highlightBorder: "rgba(251, 191, 36, 0.6)"
|
|
165
|
+
},
|
|
166
|
+
frosted: {
|
|
167
|
+
text: "rgba(31, 41, 55, 0.95)",
|
|
168
|
+
background: "rgba(255, 255, 255, 0.3)",
|
|
169
|
+
primary: "rgba(79, 70, 229, 0.95)",
|
|
170
|
+
secondary: "rgba(124, 58, 237, 0.95)",
|
|
171
|
+
accent: "rgba(219, 39, 119, 0.95)",
|
|
172
|
+
highlight: "rgba(79, 70, 229, 0.15)",
|
|
173
|
+
muted: "rgba(255, 255, 255, 0.4)",
|
|
174
|
+
success: "rgba(16, 185, 129, 0.95)",
|
|
175
|
+
warning: "rgba(245, 158, 11, 0.95)",
|
|
176
|
+
error: "rgba(220, 38, 38, 0.95)",
|
|
177
|
+
info: "rgba(37, 99, 235, 0.95)",
|
|
178
|
+
border: "rgba(255, 255, 255, 0.5)",
|
|
179
|
+
backgroundSecondary: "rgba(255, 255, 255, 0.4)",
|
|
180
|
+
backgroundTertiary: "rgba(255, 255, 255, 0.5)",
|
|
181
|
+
backgroundLight: "rgba(255, 255, 255, 0.25)",
|
|
182
|
+
backgroundHover: "rgba(255, 255, 255, 0.6)",
|
|
183
|
+
surface: "rgba(255, 255, 255, 0.35)",
|
|
184
|
+
textSecondary: "rgba(31, 41, 55, 0.8)",
|
|
185
|
+
textTertiary: "rgba(31, 41, 55, 0.6)",
|
|
186
|
+
textMuted: "rgba(31, 41, 55, 0.5)",
|
|
187
|
+
highlightBg: "rgba(251, 191, 36, 0.4)",
|
|
188
|
+
highlightBorder: "rgba(251, 191, 36, 0.7)"
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
buttons: {
|
|
192
|
+
primary: {
|
|
193
|
+
color: "white",
|
|
194
|
+
bg: "primary",
|
|
195
|
+
borderWidth: 1,
|
|
196
|
+
borderStyle: "solid",
|
|
197
|
+
borderColor: "rgba(255, 255, 255, 0.2)",
|
|
198
|
+
"&:hover": {
|
|
199
|
+
bg: "secondary"
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
secondary: {
|
|
203
|
+
color: "text",
|
|
204
|
+
bg: "rgba(255, 255, 255, 0.1)",
|
|
205
|
+
borderWidth: 1,
|
|
206
|
+
borderStyle: "solid",
|
|
207
|
+
borderColor: "rgba(255, 255, 255, 0.2)",
|
|
208
|
+
"&:hover": {
|
|
209
|
+
bg: "rgba(255, 255, 255, 0.2)"
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
ghost: {
|
|
213
|
+
color: "text",
|
|
214
|
+
bg: "transparent",
|
|
215
|
+
borderWidth: 1,
|
|
216
|
+
borderStyle: "solid",
|
|
217
|
+
borderColor: "transparent",
|
|
218
|
+
"&:hover": {
|
|
219
|
+
borderColor: "rgba(255, 255, 255, 0.2)",
|
|
220
|
+
bg: "rgba(255, 255, 255, 0.05)"
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
text: {
|
|
225
|
+
heading: {
|
|
226
|
+
fontFamily: "heading",
|
|
227
|
+
fontWeight: "heading",
|
|
228
|
+
lineHeight: "heading"
|
|
229
|
+
},
|
|
230
|
+
body: {
|
|
231
|
+
fontFamily: "body",
|
|
232
|
+
fontWeight: "body",
|
|
233
|
+
lineHeight: "body"
|
|
234
|
+
},
|
|
235
|
+
caption: {
|
|
236
|
+
fontSize: 1,
|
|
237
|
+
color: "textSecondary"
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
cards: {
|
|
241
|
+
primary: {
|
|
242
|
+
bg: "surface",
|
|
243
|
+
border: "1px solid",
|
|
244
|
+
borderColor: "border",
|
|
245
|
+
borderRadius: 3
|
|
246
|
+
},
|
|
247
|
+
secondary: {
|
|
248
|
+
bg: "backgroundSecondary",
|
|
249
|
+
border: "1px solid",
|
|
250
|
+
borderColor: "border",
|
|
251
|
+
borderRadius: 3
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
};
|
|
255
|
+
// src/defaultThemes.ts
|
|
256
|
+
var defaultMarkdownTheme = {
|
|
257
|
+
space: [0, 4, 8, 16, 32, 64, 128, 256, 512],
|
|
258
|
+
fonts: {
|
|
259
|
+
body: '"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
|
|
260
|
+
heading: '"Crimson Text", "Georgia", "Times New Roman", serif',
|
|
261
|
+
monospace: '"Fira Code", "SF Mono", Monaco, Inconsolata, monospace'
|
|
262
|
+
},
|
|
263
|
+
fontSizes: [12, 14, 16, 18, 20, 24, 32, 48, 64, 96],
|
|
264
|
+
fontScale: 1,
|
|
265
|
+
fontWeights: {
|
|
266
|
+
body: 400,
|
|
267
|
+
heading: 600,
|
|
268
|
+
bold: 700,
|
|
269
|
+
light: 300,
|
|
270
|
+
medium: 500,
|
|
271
|
+
semibold: 600
|
|
272
|
+
},
|
|
273
|
+
lineHeights: {
|
|
274
|
+
body: 1.6,
|
|
275
|
+
heading: 1.3,
|
|
276
|
+
tight: 1.25,
|
|
277
|
+
relaxed: 1.75
|
|
278
|
+
},
|
|
279
|
+
breakpoints: ["640px", "768px", "1024px", "1280px"],
|
|
280
|
+
sizes: [16, 32, 64, 128, 256, 512, 768, 1024, 1536],
|
|
281
|
+
radii: [0, 2, 4, 6, 8, 12, 16, 24],
|
|
282
|
+
shadows: [
|
|
283
|
+
"none",
|
|
284
|
+
"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",
|
|
285
|
+
"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",
|
|
286
|
+
"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",
|
|
287
|
+
"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",
|
|
288
|
+
"0 25px 50px -12px rgba(0, 0, 0, 0.25)"
|
|
289
|
+
],
|
|
290
|
+
zIndices: [0, 1, 10, 20, 30, 40, 50],
|
|
291
|
+
colors: {
|
|
292
|
+
text: "#1a1a1a",
|
|
293
|
+
background: "#ffffff",
|
|
294
|
+
primary: "#007acc",
|
|
295
|
+
secondary: "#005a9e",
|
|
296
|
+
accent: "#1a1a1a",
|
|
297
|
+
highlight: "rgba(0, 122, 204, 0.1)",
|
|
298
|
+
muted: "#f0f0f0",
|
|
299
|
+
success: "#28a745",
|
|
300
|
+
warning: "#ffc107",
|
|
301
|
+
error: "#dc3545",
|
|
302
|
+
info: "#17a2b8",
|
|
303
|
+
border: "rgba(0, 0, 0, 0.1)",
|
|
304
|
+
backgroundSecondary: "#f8f9fa",
|
|
305
|
+
backgroundTertiary: "#e9ecef",
|
|
306
|
+
backgroundLight: "rgba(0, 0, 0, 0.03)",
|
|
307
|
+
backgroundHover: "rgba(0, 0, 0, 0.05)",
|
|
308
|
+
surface: "#ffffff",
|
|
309
|
+
textSecondary: "#555555",
|
|
310
|
+
textTertiary: "#888888",
|
|
311
|
+
textMuted: "#aaaaaa",
|
|
312
|
+
highlightBg: "rgba(255, 235, 59, 0.3)",
|
|
313
|
+
highlightBorder: "rgba(255, 235, 59, 0.6)"
|
|
314
|
+
},
|
|
315
|
+
buttons: {
|
|
316
|
+
primary: {
|
|
317
|
+
color: "white",
|
|
318
|
+
bg: "primary",
|
|
319
|
+
"&:hover": { bg: "secondary" }
|
|
320
|
+
},
|
|
321
|
+
secondary: {
|
|
322
|
+
color: "primary",
|
|
323
|
+
bg: "transparent",
|
|
324
|
+
borderWidth: 1,
|
|
325
|
+
borderStyle: "solid",
|
|
326
|
+
borderColor: "primary",
|
|
327
|
+
"&:hover": { bg: "highlight" }
|
|
328
|
+
},
|
|
329
|
+
ghost: {
|
|
330
|
+
color: "text",
|
|
331
|
+
bg: "transparent",
|
|
332
|
+
"&:hover": { bg: "backgroundHover" }
|
|
333
|
+
}
|
|
334
|
+
},
|
|
335
|
+
text: {
|
|
336
|
+
heading: {
|
|
337
|
+
fontFamily: "heading",
|
|
338
|
+
fontWeight: "heading",
|
|
339
|
+
lineHeight: "heading"
|
|
340
|
+
},
|
|
341
|
+
body: {
|
|
342
|
+
fontFamily: "body",
|
|
343
|
+
fontWeight: "body",
|
|
344
|
+
lineHeight: "body"
|
|
345
|
+
},
|
|
346
|
+
caption: {
|
|
347
|
+
fontSize: 1,
|
|
348
|
+
color: "textSecondary"
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
cards: {
|
|
352
|
+
primary: {
|
|
353
|
+
bg: "surface",
|
|
354
|
+
border: "1px solid",
|
|
355
|
+
borderColor: "border",
|
|
356
|
+
borderRadius: 2
|
|
357
|
+
},
|
|
358
|
+
secondary: {
|
|
359
|
+
bg: "backgroundSecondary",
|
|
360
|
+
border: "1px solid",
|
|
361
|
+
borderColor: "border",
|
|
362
|
+
borderRadius: 2
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
};
|
|
366
|
+
var defaultTerminalTheme = {
|
|
367
|
+
space: [0, 4, 8, 16, 32, 64, 128, 256, 512],
|
|
368
|
+
fonts: {
|
|
369
|
+
body: '"Courier New", Courier, monospace',
|
|
370
|
+
heading: '"Courier New", Courier, monospace',
|
|
371
|
+
monospace: '"Courier New", Courier, monospace'
|
|
372
|
+
},
|
|
373
|
+
fontSizes: [12, 14, 16, 18, 20, 24, 32, 48, 64, 96],
|
|
374
|
+
fontScale: 1,
|
|
375
|
+
fontWeights: {
|
|
376
|
+
body: 400,
|
|
377
|
+
heading: 500,
|
|
378
|
+
bold: 600,
|
|
379
|
+
light: 300,
|
|
380
|
+
medium: 500,
|
|
381
|
+
semibold: 600
|
|
382
|
+
},
|
|
383
|
+
lineHeights: {
|
|
384
|
+
body: 1.4,
|
|
385
|
+
heading: 1.2,
|
|
386
|
+
tight: 1.3,
|
|
387
|
+
relaxed: 1.6
|
|
388
|
+
},
|
|
389
|
+
breakpoints: ["640px", "768px", "1024px", "1280px"],
|
|
390
|
+
sizes: [16, 32, 64, 128, 256, 512, 768, 1024, 1536],
|
|
391
|
+
radii: [0, 2, 4, 6, 8, 12, 16, 24],
|
|
392
|
+
shadows: [
|
|
393
|
+
"none",
|
|
394
|
+
"0 0 5px rgba(255, 193, 7, 0.1)",
|
|
395
|
+
"0 0 10px rgba(255, 193, 7, 0.15)",
|
|
396
|
+
"0 0 15px rgba(255, 193, 7, 0.2)",
|
|
397
|
+
"0 0 20px rgba(255, 193, 7, 0.25)",
|
|
398
|
+
"0 0 30px rgba(255, 193, 7, 0.3)"
|
|
399
|
+
],
|
|
400
|
+
zIndices: [0, 1, 10, 20, 30, 40, 50],
|
|
401
|
+
colors: {
|
|
402
|
+
text: "#ffc107",
|
|
403
|
+
background: "#000000",
|
|
404
|
+
primary: "#ffc107",
|
|
405
|
+
secondary: "#ffb300",
|
|
406
|
+
accent: "#ffffff",
|
|
407
|
+
highlight: "rgba(255, 193, 7, 0.1)",
|
|
408
|
+
muted: "#1a1a1a",
|
|
409
|
+
success: "#4caf50",
|
|
410
|
+
warning: "#ff9800",
|
|
411
|
+
error: "#f44336",
|
|
412
|
+
info: "#2196f3",
|
|
413
|
+
border: "rgba(255, 193, 7, 0.2)",
|
|
414
|
+
backgroundSecondary: "#0a0a0a",
|
|
415
|
+
backgroundTertiary: "#111111",
|
|
416
|
+
backgroundLight: "rgba(255, 193, 7, 0.03)",
|
|
417
|
+
backgroundHover: "rgba(255, 193, 7, 0.05)",
|
|
418
|
+
surface: "#050505",
|
|
419
|
+
textSecondary: "#e0e0e0",
|
|
420
|
+
textTertiary: "#b0b0b0",
|
|
421
|
+
textMuted: "#808080",
|
|
422
|
+
highlightBg: "rgba(255, 193, 7, 0.2)",
|
|
423
|
+
highlightBorder: "rgba(255, 193, 7, 0.4)"
|
|
424
|
+
},
|
|
425
|
+
buttons: {
|
|
426
|
+
primary: {
|
|
427
|
+
color: "black",
|
|
428
|
+
bg: "primary",
|
|
429
|
+
borderWidth: 0,
|
|
430
|
+
"&:hover": { bg: "secondary" }
|
|
431
|
+
},
|
|
432
|
+
secondary: {
|
|
433
|
+
color: "primary",
|
|
434
|
+
bg: "transparent",
|
|
435
|
+
borderWidth: 1,
|
|
436
|
+
borderStyle: "solid",
|
|
437
|
+
borderColor: "primary",
|
|
438
|
+
"&:hover": { bg: "highlight" }
|
|
439
|
+
},
|
|
440
|
+
ghost: {
|
|
441
|
+
color: "text",
|
|
442
|
+
bg: "transparent",
|
|
443
|
+
"&:hover": { bg: "backgroundHover" }
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
text: {
|
|
447
|
+
heading: {
|
|
448
|
+
fontFamily: "heading",
|
|
449
|
+
fontWeight: "heading",
|
|
450
|
+
lineHeight: "heading"
|
|
451
|
+
},
|
|
452
|
+
body: {
|
|
453
|
+
fontFamily: "body",
|
|
454
|
+
fontWeight: "body",
|
|
455
|
+
lineHeight: "body"
|
|
456
|
+
},
|
|
457
|
+
caption: {
|
|
458
|
+
fontSize: 1,
|
|
459
|
+
color: "textSecondary"
|
|
460
|
+
}
|
|
461
|
+
},
|
|
462
|
+
cards: {
|
|
463
|
+
primary: {
|
|
464
|
+
bg: "surface",
|
|
465
|
+
border: "1px solid",
|
|
466
|
+
borderColor: "border",
|
|
467
|
+
borderRadius: 0
|
|
468
|
+
},
|
|
469
|
+
secondary: {
|
|
470
|
+
bg: "backgroundSecondary",
|
|
471
|
+
border: "1px solid",
|
|
472
|
+
borderColor: "border",
|
|
473
|
+
borderRadius: 0
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
};
|
|
477
|
+
var defaultEditorTheme = {
|
|
478
|
+
space: [0, 4, 8, 16, 32, 64, 128, 256, 512],
|
|
479
|
+
fonts: {
|
|
480
|
+
body: '"Fira Code", "SF Mono", Monaco, Inconsolata, monospace',
|
|
481
|
+
heading: '"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
|
|
482
|
+
monospace: '"Fira Code", "SF Mono", Monaco, Inconsolata, monospace'
|
|
483
|
+
},
|
|
484
|
+
fontSizes: [12, 14, 16, 18, 20, 24, 32, 48, 64, 96],
|
|
485
|
+
fontScale: 1,
|
|
486
|
+
fontWeights: {
|
|
487
|
+
body: 400,
|
|
488
|
+
heading: 600,
|
|
489
|
+
bold: 700,
|
|
490
|
+
light: 300,
|
|
491
|
+
medium: 500,
|
|
492
|
+
semibold: 600
|
|
493
|
+
},
|
|
494
|
+
lineHeights: {
|
|
495
|
+
body: 1.5,
|
|
496
|
+
heading: 1.2,
|
|
497
|
+
tight: 1.3,
|
|
498
|
+
relaxed: 1.7
|
|
499
|
+
},
|
|
500
|
+
breakpoints: ["640px", "768px", "1024px", "1280px"],
|
|
501
|
+
sizes: [16, 32, 64, 128, 256, 512, 768, 1024, 1536],
|
|
502
|
+
radii: [0, 2, 4, 6, 8, 12, 16, 24],
|
|
503
|
+
shadows: [
|
|
504
|
+
"none",
|
|
505
|
+
"0 1px 2px rgba(0, 0, 0, 0.05)",
|
|
506
|
+
"0 2px 4px rgba(0, 0, 0, 0.1)",
|
|
507
|
+
"0 4px 8px rgba(0, 0, 0, 0.15)",
|
|
508
|
+
"0 8px 16px rgba(0, 0, 0, 0.2)",
|
|
509
|
+
"0 12px 24px rgba(0, 0, 0, 0.25)"
|
|
510
|
+
],
|
|
511
|
+
zIndices: [0, 1, 10, 20, 30, 40, 50],
|
|
512
|
+
colors: {
|
|
513
|
+
text: "#d4d4d4",
|
|
514
|
+
background: "#1e1e1e",
|
|
515
|
+
primary: "#569cd6",
|
|
516
|
+
secondary: "#408ac9",
|
|
517
|
+
accent: "#c586c0",
|
|
518
|
+
highlight: "rgba(86, 156, 214, 0.1)",
|
|
519
|
+
muted: "#2a2a2a",
|
|
520
|
+
success: "#6a9955",
|
|
521
|
+
warning: "#d18616",
|
|
522
|
+
error: "#f44747",
|
|
523
|
+
info: "#569cd6",
|
|
524
|
+
border: "rgba(255, 255, 255, 0.1)",
|
|
525
|
+
backgroundSecondary: "#252526",
|
|
526
|
+
backgroundTertiary: "#333333",
|
|
527
|
+
backgroundLight: "rgba(255, 255, 255, 0.03)",
|
|
528
|
+
backgroundHover: "rgba(255, 255, 255, 0.05)",
|
|
529
|
+
surface: "#252526",
|
|
530
|
+
textSecondary: "#cccccc",
|
|
531
|
+
textTertiary: "#999999",
|
|
532
|
+
textMuted: "#666666",
|
|
533
|
+
highlightBg: "rgba(255, 235, 59, 0.2)",
|
|
534
|
+
highlightBorder: "rgba(255, 235, 59, 0.4)"
|
|
535
|
+
},
|
|
536
|
+
buttons: {
|
|
537
|
+
primary: {
|
|
538
|
+
color: "white",
|
|
539
|
+
bg: "primary",
|
|
540
|
+
"&:hover": { bg: "secondary" }
|
|
541
|
+
},
|
|
542
|
+
secondary: {
|
|
543
|
+
color: "primary",
|
|
544
|
+
bg: "transparent",
|
|
545
|
+
borderWidth: 1,
|
|
546
|
+
borderStyle: "solid",
|
|
547
|
+
borderColor: "primary",
|
|
548
|
+
"&:hover": { bg: "highlight" }
|
|
549
|
+
},
|
|
550
|
+
ghost: {
|
|
551
|
+
color: "text",
|
|
552
|
+
bg: "transparent",
|
|
553
|
+
"&:hover": { bg: "backgroundHover" }
|
|
554
|
+
}
|
|
555
|
+
},
|
|
556
|
+
text: {
|
|
557
|
+
heading: {
|
|
558
|
+
fontFamily: "heading",
|
|
559
|
+
fontWeight: "heading",
|
|
560
|
+
lineHeight: "heading"
|
|
561
|
+
},
|
|
562
|
+
body: {
|
|
563
|
+
fontFamily: "body",
|
|
564
|
+
fontWeight: "body",
|
|
565
|
+
lineHeight: "body"
|
|
566
|
+
},
|
|
567
|
+
caption: {
|
|
568
|
+
fontSize: 1,
|
|
569
|
+
color: "textSecondary"
|
|
570
|
+
}
|
|
571
|
+
},
|
|
572
|
+
cards: {
|
|
573
|
+
primary: {
|
|
574
|
+
bg: "surface",
|
|
575
|
+
border: "1px solid",
|
|
576
|
+
borderColor: "border",
|
|
577
|
+
borderRadius: 1
|
|
578
|
+
},
|
|
579
|
+
secondary: {
|
|
580
|
+
bg: "backgroundSecondary",
|
|
581
|
+
border: "1px solid",
|
|
582
|
+
borderColor: "border",
|
|
583
|
+
borderRadius: 1
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
};
|
|
587
|
+
|
|
588
|
+
// src/themes.ts
|
|
589
|
+
var regalTheme = {
|
|
590
|
+
space: [0, 4, 8, 16, 32, 64, 128, 256, 512],
|
|
591
|
+
fonts: {
|
|
592
|
+
body: '"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
|
|
593
|
+
heading: '"Crimson Text", "Georgia", "Times New Roman", serif',
|
|
594
|
+
monospace: '"Fira Code", "SF Mono", Monaco, Inconsolata, monospace'
|
|
595
|
+
},
|
|
596
|
+
fontSizes: [12, 14, 16, 18, 20, 24, 32, 48, 64, 96],
|
|
597
|
+
fontScale: 1,
|
|
598
|
+
fontWeights: {
|
|
599
|
+
body: 400,
|
|
600
|
+
heading: 600,
|
|
601
|
+
bold: 700,
|
|
602
|
+
light: 300,
|
|
603
|
+
medium: 500,
|
|
604
|
+
semibold: 600
|
|
605
|
+
},
|
|
606
|
+
lineHeights: {
|
|
607
|
+
body: 1.5,
|
|
608
|
+
heading: 1.2,
|
|
609
|
+
tight: 1.25,
|
|
610
|
+
relaxed: 1.75
|
|
611
|
+
},
|
|
612
|
+
breakpoints: ["640px", "768px", "1024px", "1280px"],
|
|
613
|
+
sizes: [16, 32, 64, 128, 256, 512, 768, 1024, 1536],
|
|
614
|
+
radii: [0, 2, 4, 6, 8, 12, 16, 24],
|
|
615
|
+
shadows: [
|
|
616
|
+
"none",
|
|
617
|
+
"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",
|
|
618
|
+
"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",
|
|
619
|
+
"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",
|
|
620
|
+
"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",
|
|
621
|
+
"0 25px 50px -12px rgba(0, 0, 0, 0.25)"
|
|
622
|
+
],
|
|
623
|
+
zIndices: [0, 1, 10, 20, 30, 40, 50],
|
|
624
|
+
colors: {
|
|
625
|
+
text: "#f1e8dc",
|
|
626
|
+
background: "#1a1f2e",
|
|
627
|
+
primary: "#d4a574",
|
|
628
|
+
secondary: "#e0b584",
|
|
629
|
+
accent: "#c9b8a3",
|
|
630
|
+
highlight: "rgba(212, 165, 116, 0.15)",
|
|
631
|
+
muted: "#8b7968",
|
|
632
|
+
success: "#5c8a72",
|
|
633
|
+
warning: "#d4a574",
|
|
634
|
+
error: "#a85751",
|
|
635
|
+
info: "#d4a574",
|
|
636
|
+
border: "rgba(212, 165, 116, 0.2)",
|
|
637
|
+
backgroundSecondary: "#212738",
|
|
638
|
+
backgroundTertiary: "#2d3446",
|
|
639
|
+
backgroundLight: "rgba(212, 165, 116, 0.08)",
|
|
640
|
+
backgroundHover: "rgba(212, 165, 116, 0.15)",
|
|
641
|
+
surface: "#212738",
|
|
642
|
+
textSecondary: "#c9b8a3",
|
|
643
|
+
textTertiary: "#8b7968",
|
|
644
|
+
textMuted: "#8b7968",
|
|
645
|
+
highlightBg: "rgba(255, 193, 7, 0.25)",
|
|
646
|
+
highlightBorder: "rgba(255, 193, 7, 0.5)"
|
|
647
|
+
},
|
|
648
|
+
buttons: {
|
|
649
|
+
primary: {
|
|
650
|
+
color: "background",
|
|
651
|
+
bg: "primary",
|
|
652
|
+
"&:hover": {
|
|
653
|
+
bg: "secondary"
|
|
654
|
+
}
|
|
655
|
+
},
|
|
656
|
+
secondary: {
|
|
657
|
+
color: "text",
|
|
658
|
+
bg: "muted",
|
|
659
|
+
"&:hover": {
|
|
660
|
+
bg: "backgroundSecondary"
|
|
661
|
+
}
|
|
662
|
+
},
|
|
663
|
+
ghost: {
|
|
664
|
+
color: "primary",
|
|
665
|
+
bg: "transparent",
|
|
666
|
+
"&:hover": {
|
|
667
|
+
bg: "muted"
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
},
|
|
671
|
+
text: {
|
|
672
|
+
heading: {
|
|
673
|
+
fontFamily: "heading",
|
|
674
|
+
fontWeight: "heading",
|
|
675
|
+
lineHeight: "heading"
|
|
676
|
+
},
|
|
677
|
+
body: {
|
|
678
|
+
fontFamily: "body",
|
|
679
|
+
fontWeight: "body",
|
|
680
|
+
lineHeight: "body"
|
|
681
|
+
},
|
|
682
|
+
caption: {
|
|
683
|
+
fontSize: 1,
|
|
684
|
+
color: "textSecondary"
|
|
685
|
+
}
|
|
686
|
+
},
|
|
687
|
+
cards: {
|
|
688
|
+
primary: {
|
|
689
|
+
bg: "background",
|
|
690
|
+
border: "1px solid",
|
|
691
|
+
borderColor: "border",
|
|
692
|
+
borderRadius: 2
|
|
693
|
+
},
|
|
694
|
+
secondary: {
|
|
695
|
+
bg: "backgroundSecondary",
|
|
696
|
+
border: "1px solid",
|
|
697
|
+
borderColor: "border",
|
|
698
|
+
borderRadius: 2
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
};
|
|
702
|
+
var terminalTheme = {
|
|
703
|
+
space: [0, 4, 8, 16, 32, 64, 128, 256, 512],
|
|
704
|
+
fonts: {
|
|
705
|
+
body: '"SF Mono", "Monaco", "Inconsolata", "Fira Code", monospace',
|
|
706
|
+
heading: '"SF Mono", "Monaco", "Inconsolata", "Fira Code", monospace',
|
|
707
|
+
monospace: '"SF Mono", "Monaco", "Inconsolata", "Fira Code", monospace'
|
|
708
|
+
},
|
|
709
|
+
fontSizes: [12, 14, 16, 18, 20, 24, 32, 48, 64, 96],
|
|
710
|
+
fontScale: 1,
|
|
711
|
+
fontWeights: {
|
|
712
|
+
body: 400,
|
|
713
|
+
heading: 500,
|
|
714
|
+
bold: 600,
|
|
715
|
+
light: 300,
|
|
716
|
+
medium: 500,
|
|
717
|
+
semibold: 600
|
|
718
|
+
},
|
|
719
|
+
lineHeights: {
|
|
720
|
+
body: 1.6,
|
|
721
|
+
heading: 1.3,
|
|
722
|
+
tight: 1.4,
|
|
723
|
+
relaxed: 1.8
|
|
724
|
+
},
|
|
725
|
+
breakpoints: ["640px", "768px", "1024px", "1280px"],
|
|
726
|
+
sizes: [16, 32, 64, 128, 256, 512, 768, 1024, 1536],
|
|
727
|
+
radii: [0, 2, 4, 6, 8, 12, 16, 24],
|
|
728
|
+
shadows: [
|
|
729
|
+
"none",
|
|
730
|
+
"0 1px 2px 0 rgba(0, 0, 0, 0.05)",
|
|
731
|
+
"0 2px 4px 0 rgba(0, 0, 0, 0.06)",
|
|
732
|
+
"0 4px 6px 0 rgba(0, 0, 0, 0.07)",
|
|
733
|
+
"0 8px 12px 0 rgba(0, 0, 0, 0.08)",
|
|
734
|
+
"0 16px 24px 0 rgba(0, 0, 0, 0.10)"
|
|
735
|
+
],
|
|
736
|
+
zIndices: [0, 1, 10, 20, 30, 40, 50],
|
|
737
|
+
colors: {
|
|
738
|
+
text: "#e4e4e4",
|
|
739
|
+
background: "rgba(10, 10, 10, 0.85)",
|
|
740
|
+
primary: "#66b3ff",
|
|
741
|
+
secondary: "#80c4ff",
|
|
742
|
+
accent: "#66ff99",
|
|
743
|
+
highlight: "rgba(102, 179, 255, 0.15)",
|
|
744
|
+
muted: "rgba(26, 26, 26, 0.8)",
|
|
745
|
+
success: "#66ff99",
|
|
746
|
+
warning: "#ffcc66",
|
|
747
|
+
error: "#ff6666",
|
|
748
|
+
info: "#66b3ff",
|
|
749
|
+
border: "rgba(255, 255, 255, 0.1)",
|
|
750
|
+
backgroundSecondary: "rgba(15, 15, 15, 0.9)",
|
|
751
|
+
backgroundTertiary: "rgba(20, 20, 20, 0.9)",
|
|
752
|
+
backgroundLight: "rgba(255, 255, 255, 0.05)",
|
|
753
|
+
backgroundHover: "rgba(102, 179, 255, 0.08)",
|
|
754
|
+
surface: "rgba(15, 15, 15, 0.95)",
|
|
755
|
+
textSecondary: "rgba(255, 255, 255, 0.7)",
|
|
756
|
+
textTertiary: "rgba(255, 255, 255, 0.5)",
|
|
757
|
+
textMuted: "rgba(255, 255, 255, 0.4)",
|
|
758
|
+
highlightBg: "rgba(255, 235, 59, 0.25)",
|
|
759
|
+
highlightBorder: "rgba(255, 235, 59, 0.5)"
|
|
760
|
+
},
|
|
761
|
+
modes: {
|
|
762
|
+
light: {
|
|
763
|
+
text: "#1a1a1a",
|
|
764
|
+
background: "rgba(255, 255, 255, 0.9)",
|
|
765
|
+
primary: "#0066cc",
|
|
766
|
+
secondary: "#0052a3",
|
|
767
|
+
accent: "#00cc88",
|
|
768
|
+
highlight: "rgba(0, 102, 204, 0.08)",
|
|
769
|
+
muted: "rgba(245, 245, 245, 0.8)",
|
|
770
|
+
success: "#00cc88",
|
|
771
|
+
warning: "#ffaa00",
|
|
772
|
+
error: "#ff3333",
|
|
773
|
+
info: "#0066cc",
|
|
774
|
+
border: "rgba(0, 0, 0, 0.1)",
|
|
775
|
+
backgroundSecondary: "rgba(250, 250, 250, 0.9)",
|
|
776
|
+
backgroundTertiary: "rgba(245, 245, 245, 0.9)",
|
|
777
|
+
backgroundLight: "rgba(0, 0, 0, 0.02)",
|
|
778
|
+
backgroundHover: "rgba(0, 102, 204, 0.04)",
|
|
779
|
+
surface: "rgba(255, 255, 255, 0.95)",
|
|
780
|
+
textSecondary: "rgba(0, 0, 0, 0.6)",
|
|
781
|
+
textTertiary: "rgba(0, 0, 0, 0.4)",
|
|
782
|
+
textMuted: "rgba(0, 0, 0, 0.3)",
|
|
783
|
+
highlightBg: "rgba(255, 235, 59, 0.3)",
|
|
784
|
+
highlightBorder: "rgba(255, 235, 59, 0.6)"
|
|
785
|
+
}
|
|
786
|
+
},
|
|
787
|
+
buttons: {
|
|
788
|
+
primary: {
|
|
789
|
+
color: "white",
|
|
790
|
+
bg: "primary",
|
|
791
|
+
borderWidth: 0,
|
|
792
|
+
"&:hover": {
|
|
793
|
+
bg: "secondary"
|
|
794
|
+
}
|
|
795
|
+
},
|
|
796
|
+
secondary: {
|
|
797
|
+
color: "primary",
|
|
798
|
+
bg: "transparent",
|
|
799
|
+
borderWidth: 1,
|
|
800
|
+
borderStyle: "solid",
|
|
801
|
+
borderColor: "primary",
|
|
802
|
+
"&:hover": {
|
|
803
|
+
bg: "highlight"
|
|
804
|
+
}
|
|
805
|
+
},
|
|
806
|
+
ghost: {
|
|
807
|
+
color: "text",
|
|
808
|
+
bg: "transparent",
|
|
809
|
+
"&:hover": {
|
|
810
|
+
bg: "backgroundHover"
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
},
|
|
814
|
+
text: {
|
|
815
|
+
heading: {
|
|
816
|
+
fontFamily: "heading",
|
|
817
|
+
fontWeight: "heading",
|
|
818
|
+
lineHeight: "heading"
|
|
819
|
+
},
|
|
820
|
+
body: {
|
|
821
|
+
fontFamily: "body",
|
|
822
|
+
fontWeight: "body",
|
|
823
|
+
lineHeight: "body"
|
|
824
|
+
},
|
|
825
|
+
caption: {
|
|
826
|
+
fontSize: 1,
|
|
827
|
+
color: "textSecondary"
|
|
828
|
+
}
|
|
829
|
+
},
|
|
830
|
+
cards: {
|
|
831
|
+
primary: {
|
|
832
|
+
bg: "surface",
|
|
833
|
+
border: "1px solid",
|
|
834
|
+
borderColor: "border",
|
|
835
|
+
borderRadius: 1
|
|
836
|
+
},
|
|
837
|
+
secondary: {
|
|
838
|
+
bg: "backgroundSecondary",
|
|
839
|
+
border: "1px solid",
|
|
840
|
+
borderColor: "border",
|
|
841
|
+
borderRadius: 1
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
};
|
|
845
|
+
var matrixTheme = {
|
|
846
|
+
space: [0, 4, 8, 16, 32, 64, 128, 256, 512],
|
|
847
|
+
fonts: {
|
|
848
|
+
body: '"Courier New", "Courier", "Lucida Console", "Monaco", monospace',
|
|
849
|
+
heading: '"Courier New", "Courier", "Lucida Console", "Monaco", monospace',
|
|
850
|
+
monospace: '"Courier New", "Courier", "Lucida Console", "Monaco", monospace'
|
|
851
|
+
},
|
|
852
|
+
fontSizes: [12, 14, 16, 18, 20, 24, 32, 48, 64, 96],
|
|
853
|
+
fontScale: 1,
|
|
854
|
+
fontWeights: {
|
|
855
|
+
body: 400,
|
|
856
|
+
heading: 500,
|
|
857
|
+
bold: 600,
|
|
858
|
+
light: 300,
|
|
859
|
+
medium: 500,
|
|
860
|
+
semibold: 600
|
|
861
|
+
},
|
|
862
|
+
lineHeights: {
|
|
863
|
+
body: 1.5,
|
|
864
|
+
heading: 1.2,
|
|
865
|
+
tight: 1.3,
|
|
866
|
+
relaxed: 1.7
|
|
867
|
+
},
|
|
868
|
+
breakpoints: ["640px", "768px", "1024px", "1280px"],
|
|
869
|
+
sizes: [16, 32, 64, 128, 256, 512, 768, 1024, 1536],
|
|
870
|
+
radii: [0, 2, 4, 6, 8, 12, 16, 24],
|
|
871
|
+
shadows: [
|
|
872
|
+
"none",
|
|
873
|
+
"0 0 5px rgba(0, 216, 53, 0.15)",
|
|
874
|
+
"0 0 10px rgba(0, 216, 53, 0.2)",
|
|
875
|
+
"0 0 15px rgba(0, 216, 53, 0.25)",
|
|
876
|
+
"0 0 20px rgba(0, 216, 53, 0.3)",
|
|
877
|
+
"0 0 30px rgba(0, 216, 53, 0.4)"
|
|
878
|
+
],
|
|
879
|
+
zIndices: [0, 1, 10, 20, 30, 40, 50],
|
|
880
|
+
colors: {
|
|
881
|
+
text: "#a8a8a8",
|
|
882
|
+
background: "#000000",
|
|
883
|
+
primary: "#00d835",
|
|
884
|
+
secondary: "#00a828",
|
|
885
|
+
accent: "#00d835",
|
|
886
|
+
highlight: "rgba(0, 216, 53, 0.15)",
|
|
887
|
+
muted: "#0a0a0a",
|
|
888
|
+
success: "#00d835",
|
|
889
|
+
warning: "#d4a000",
|
|
890
|
+
error: "#d63333",
|
|
891
|
+
info: "#00a8d6",
|
|
892
|
+
border: "rgba(0, 216, 53, 0.2)",
|
|
893
|
+
backgroundSecondary: "#0a0a0a",
|
|
894
|
+
backgroundTertiary: "#111111",
|
|
895
|
+
backgroundLight: "rgba(0, 216, 53, 0.03)",
|
|
896
|
+
backgroundHover: "rgba(0, 216, 53, 0.08)",
|
|
897
|
+
surface: "#050505",
|
|
898
|
+
textSecondary: "#808080",
|
|
899
|
+
textTertiary: "#606060",
|
|
900
|
+
textMuted: "#484848",
|
|
901
|
+
highlightBg: "rgba(0, 216, 53, 0.25)",
|
|
902
|
+
highlightBorder: "rgba(0, 216, 53, 0.5)"
|
|
903
|
+
},
|
|
904
|
+
buttons: {
|
|
905
|
+
primary: {
|
|
906
|
+
color: "black",
|
|
907
|
+
bg: "primary",
|
|
908
|
+
borderWidth: 0,
|
|
909
|
+
"&:hover": {
|
|
910
|
+
bg: "secondary"
|
|
911
|
+
}
|
|
912
|
+
},
|
|
913
|
+
secondary: {
|
|
914
|
+
color: "primary",
|
|
915
|
+
bg: "transparent",
|
|
916
|
+
borderWidth: 1,
|
|
917
|
+
borderStyle: "solid",
|
|
918
|
+
borderColor: "primary",
|
|
919
|
+
"&:hover": {
|
|
920
|
+
bg: "highlight"
|
|
921
|
+
}
|
|
922
|
+
},
|
|
923
|
+
ghost: {
|
|
924
|
+
color: "text",
|
|
925
|
+
bg: "transparent",
|
|
926
|
+
"&:hover": {
|
|
927
|
+
bg: "backgroundHover"
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
},
|
|
931
|
+
text: {
|
|
932
|
+
heading: {
|
|
933
|
+
fontFamily: "heading",
|
|
934
|
+
fontWeight: "heading",
|
|
935
|
+
lineHeight: "heading"
|
|
936
|
+
},
|
|
937
|
+
body: {
|
|
938
|
+
fontFamily: "body",
|
|
939
|
+
fontWeight: "body",
|
|
940
|
+
lineHeight: "body"
|
|
941
|
+
},
|
|
942
|
+
caption: {
|
|
943
|
+
fontSize: 1,
|
|
944
|
+
color: "textSecondary"
|
|
945
|
+
}
|
|
946
|
+
},
|
|
947
|
+
cards: {
|
|
948
|
+
primary: {
|
|
949
|
+
bg: "surface",
|
|
950
|
+
border: "1px solid",
|
|
951
|
+
borderColor: "border",
|
|
952
|
+
borderRadius: 0
|
|
953
|
+
},
|
|
954
|
+
secondary: {
|
|
955
|
+
bg: "backgroundSecondary",
|
|
956
|
+
border: "1px solid",
|
|
957
|
+
borderColor: "border",
|
|
958
|
+
borderRadius: 0
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
};
|
|
962
|
+
var matrixMinimalTheme = {
|
|
963
|
+
space: [0, 4, 8, 16, 32, 64, 128, 256, 512],
|
|
964
|
+
fonts: {
|
|
965
|
+
body: '"Courier New", "Courier", "Lucida Console", "Monaco", monospace',
|
|
966
|
+
heading: '"Courier New", "Courier", "Lucida Console", "Monaco", monospace',
|
|
967
|
+
monospace: '"Courier New", "Courier", "Lucida Console", "Monaco", monospace'
|
|
968
|
+
},
|
|
969
|
+
fontSizes: [12, 14, 16, 18, 20, 24, 32, 48, 64, 96],
|
|
970
|
+
fontScale: 1,
|
|
971
|
+
fontWeights: {
|
|
972
|
+
body: 400,
|
|
973
|
+
heading: 500,
|
|
974
|
+
bold: 600,
|
|
975
|
+
light: 300,
|
|
976
|
+
medium: 500,
|
|
977
|
+
semibold: 600
|
|
978
|
+
},
|
|
979
|
+
lineHeights: {
|
|
980
|
+
body: 1.5,
|
|
981
|
+
heading: 1.2,
|
|
982
|
+
tight: 1.3,
|
|
983
|
+
relaxed: 1.7
|
|
984
|
+
},
|
|
985
|
+
breakpoints: ["640px", "768px", "1024px", "1280px"],
|
|
986
|
+
sizes: [16, 32, 64, 128, 256, 512, 768, 1024, 1536],
|
|
987
|
+
radii: [0, 2, 4, 6, 8, 12, 16, 24],
|
|
988
|
+
shadows: [
|
|
989
|
+
"none",
|
|
990
|
+
"0 1px 2px rgba(0, 0, 0, 0.05)",
|
|
991
|
+
"0 2px 4px rgba(0, 0, 0, 0.1)",
|
|
992
|
+
"0 4px 8px rgba(0, 0, 0, 0.15)",
|
|
993
|
+
"0 8px 16px rgba(0, 0, 0, 0.2)",
|
|
994
|
+
"0 0 20px rgba(0, 216, 53, 0.1)"
|
|
995
|
+
],
|
|
996
|
+
zIndices: [0, 1, 10, 20, 30, 40, 50],
|
|
997
|
+
colors: {
|
|
998
|
+
text: "#a8a8a8",
|
|
999
|
+
background: "#000000",
|
|
1000
|
+
primary: "#b8b8b8",
|
|
1001
|
+
secondary: "#909090",
|
|
1002
|
+
accent: "#00d835",
|
|
1003
|
+
highlight: "rgba(0, 216, 53, 0.1)",
|
|
1004
|
+
muted: "#0a0a0a",
|
|
1005
|
+
success: "#00d835",
|
|
1006
|
+
warning: "#d4a000",
|
|
1007
|
+
error: "#d63333",
|
|
1008
|
+
info: "#00a8d6",
|
|
1009
|
+
border: "rgba(184, 184, 184, 0.1)",
|
|
1010
|
+
backgroundSecondary: "#0a0a0a",
|
|
1011
|
+
backgroundTertiary: "#111111",
|
|
1012
|
+
backgroundLight: "rgba(184, 184, 184, 0.02)",
|
|
1013
|
+
backgroundHover: "rgba(0, 216, 53, 0.05)",
|
|
1014
|
+
surface: "#050505",
|
|
1015
|
+
textSecondary: "#808080",
|
|
1016
|
+
textTertiary: "#606060",
|
|
1017
|
+
textMuted: "#484848",
|
|
1018
|
+
highlightBg: "rgba(0, 216, 53, 0.2)",
|
|
1019
|
+
highlightBorder: "rgba(0, 216, 53, 0.4)"
|
|
1020
|
+
},
|
|
1021
|
+
buttons: {
|
|
1022
|
+
primary: {
|
|
1023
|
+
color: "black",
|
|
1024
|
+
bg: "primary",
|
|
1025
|
+
borderWidth: 0,
|
|
1026
|
+
"&:hover": {
|
|
1027
|
+
bg: "secondary"
|
|
1028
|
+
}
|
|
1029
|
+
},
|
|
1030
|
+
secondary: {
|
|
1031
|
+
color: "primary",
|
|
1032
|
+
bg: "transparent",
|
|
1033
|
+
borderWidth: 1,
|
|
1034
|
+
borderStyle: "solid",
|
|
1035
|
+
borderColor: "primary",
|
|
1036
|
+
"&:hover": {
|
|
1037
|
+
bg: "backgroundHover"
|
|
1038
|
+
}
|
|
1039
|
+
},
|
|
1040
|
+
ghost: {
|
|
1041
|
+
color: "text",
|
|
1042
|
+
bg: "transparent",
|
|
1043
|
+
"&:hover": {
|
|
1044
|
+
bg: "backgroundHover"
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
},
|
|
1048
|
+
text: {
|
|
1049
|
+
heading: {
|
|
1050
|
+
fontFamily: "heading",
|
|
1051
|
+
fontWeight: "heading",
|
|
1052
|
+
lineHeight: "heading"
|
|
1053
|
+
},
|
|
1054
|
+
body: {
|
|
1055
|
+
fontFamily: "body",
|
|
1056
|
+
fontWeight: "body",
|
|
1057
|
+
lineHeight: "body"
|
|
1058
|
+
},
|
|
1059
|
+
caption: {
|
|
1060
|
+
fontSize: 1,
|
|
1061
|
+
color: "textSecondary"
|
|
1062
|
+
}
|
|
1063
|
+
},
|
|
1064
|
+
cards: {
|
|
1065
|
+
primary: {
|
|
1066
|
+
bg: "surface",
|
|
1067
|
+
border: "1px solid",
|
|
1068
|
+
borderColor: "border",
|
|
1069
|
+
borderRadius: 0
|
|
1070
|
+
},
|
|
1071
|
+
secondary: {
|
|
1072
|
+
bg: "backgroundSecondary",
|
|
1073
|
+
border: "1px solid",
|
|
1074
|
+
borderColor: "border",
|
|
1075
|
+
borderRadius: 0
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
};
|
|
1079
|
+
var slateTheme = {
|
|
1080
|
+
space: [0, 4, 8, 16, 32, 64, 128, 256, 512],
|
|
1081
|
+
fonts: {
|
|
1082
|
+
body: '"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
|
|
1083
|
+
heading: '"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
|
|
1084
|
+
monospace: '"Fira Code", "SF Mono", Monaco, Inconsolata, monospace'
|
|
1085
|
+
},
|
|
1086
|
+
fontSizes: [12, 14, 16, 18, 20, 24, 32, 48, 64, 96],
|
|
1087
|
+
fontScale: 1,
|
|
1088
|
+
fontWeights: {
|
|
1089
|
+
body: 400,
|
|
1090
|
+
heading: 600,
|
|
1091
|
+
bold: 700,
|
|
1092
|
+
light: 300,
|
|
1093
|
+
medium: 500,
|
|
1094
|
+
semibold: 600
|
|
1095
|
+
},
|
|
1096
|
+
lineHeights: {
|
|
1097
|
+
body: 1.6,
|
|
1098
|
+
heading: 1.3,
|
|
1099
|
+
tight: 1.25,
|
|
1100
|
+
relaxed: 1.75
|
|
1101
|
+
},
|
|
1102
|
+
breakpoints: ["640px", "768px", "1024px", "1280px"],
|
|
1103
|
+
sizes: [16, 32, 64, 128, 256, 512, 768, 1024, 1536],
|
|
1104
|
+
radii: [0, 2, 4, 6, 8, 12, 16, 24],
|
|
1105
|
+
shadows: [
|
|
1106
|
+
"none",
|
|
1107
|
+
"0 1px 3px 0 rgba(0, 0, 0, 0.2)",
|
|
1108
|
+
"0 4px 6px -1px rgba(0, 0, 0, 0.2)",
|
|
1109
|
+
"0 10px 15px -3px rgba(0, 0, 0, 0.2)",
|
|
1110
|
+
"0 20px 25px -5px rgba(0, 0, 0, 0.25)",
|
|
1111
|
+
"0 25px 50px -12px rgba(0, 0, 0, 0.3)"
|
|
1112
|
+
],
|
|
1113
|
+
zIndices: [0, 1, 10, 20, 30, 40, 50],
|
|
1114
|
+
colors: {
|
|
1115
|
+
text: "#9ca3af",
|
|
1116
|
+
background: "#1a1c1e",
|
|
1117
|
+
primary: "#d1d5db",
|
|
1118
|
+
secondary: "#6b7280",
|
|
1119
|
+
accent: "#f59e0b",
|
|
1120
|
+
highlight: "rgba(209, 213, 219, 0.15)",
|
|
1121
|
+
muted: "#2d3134",
|
|
1122
|
+
success: "#10b981",
|
|
1123
|
+
warning: "#f59e0b",
|
|
1124
|
+
error: "#ef4444",
|
|
1125
|
+
info: "#3b82f6",
|
|
1126
|
+
border: "rgba(156, 163, 175, 0.15)",
|
|
1127
|
+
backgroundSecondary: "#22252a",
|
|
1128
|
+
backgroundTertiary: "#2d3134",
|
|
1129
|
+
backgroundLight: "rgba(156, 163, 175, 0.05)",
|
|
1130
|
+
backgroundHover: "rgba(156, 163, 175, 0.1)",
|
|
1131
|
+
surface: "#1f2124",
|
|
1132
|
+
textSecondary: "#e5e7eb",
|
|
1133
|
+
textTertiary: "#6b7280",
|
|
1134
|
+
textMuted: "#4b5563",
|
|
1135
|
+
highlightBg: "rgba(245, 158, 11, 0.25)",
|
|
1136
|
+
highlightBorder: "rgba(245, 158, 11, 0.5)"
|
|
1137
|
+
},
|
|
1138
|
+
buttons: {
|
|
1139
|
+
primary: {
|
|
1140
|
+
color: "#1a1c1e",
|
|
1141
|
+
bg: "primary",
|
|
1142
|
+
borderWidth: 0,
|
|
1143
|
+
"&:hover": {
|
|
1144
|
+
bg: "#9ca3af"
|
|
1145
|
+
}
|
|
1146
|
+
},
|
|
1147
|
+
secondary: {
|
|
1148
|
+
color: "#e5e7eb",
|
|
1149
|
+
bg: "secondary",
|
|
1150
|
+
borderWidth: 0,
|
|
1151
|
+
"&:hover": {
|
|
1152
|
+
bg: "#4b5563"
|
|
1153
|
+
}
|
|
1154
|
+
},
|
|
1155
|
+
ghost: {
|
|
1156
|
+
color: "textSecondary",
|
|
1157
|
+
bg: "transparent",
|
|
1158
|
+
"&:hover": {
|
|
1159
|
+
bg: "backgroundHover"
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
},
|
|
1163
|
+
text: {
|
|
1164
|
+
heading: {
|
|
1165
|
+
fontFamily: "heading",
|
|
1166
|
+
fontWeight: "heading",
|
|
1167
|
+
lineHeight: "heading",
|
|
1168
|
+
color: "textSecondary"
|
|
1169
|
+
},
|
|
1170
|
+
body: {
|
|
1171
|
+
fontFamily: "body",
|
|
1172
|
+
fontWeight: "body",
|
|
1173
|
+
lineHeight: "body"
|
|
1174
|
+
},
|
|
1175
|
+
caption: {
|
|
1176
|
+
fontSize: 1,
|
|
1177
|
+
color: "textTertiary"
|
|
1178
|
+
}
|
|
1179
|
+
},
|
|
1180
|
+
cards: {
|
|
1181
|
+
primary: {
|
|
1182
|
+
bg: "surface",
|
|
1183
|
+
border: "1px solid",
|
|
1184
|
+
borderColor: "border",
|
|
1185
|
+
borderRadius: 3
|
|
1186
|
+
},
|
|
1187
|
+
secondary: {
|
|
1188
|
+
bg: "backgroundSecondary",
|
|
1189
|
+
border: "1px solid",
|
|
1190
|
+
borderColor: "border",
|
|
1191
|
+
borderRadius: 3
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
};
|
|
1195
|
+
// src/ThemeProvider.tsx
|
|
1196
|
+
var import_react = __toESM(require("react"));
|
|
1197
|
+
|
|
1198
|
+
// src/themeHelpers.ts
|
|
1199
|
+
function overrideColors(theme, colors) {
|
|
1200
|
+
return {
|
|
1201
|
+
...theme,
|
|
1202
|
+
colors: {
|
|
1203
|
+
...theme.colors,
|
|
1204
|
+
...colors
|
|
1205
|
+
}
|
|
1206
|
+
};
|
|
1207
|
+
}
|
|
1208
|
+
function makeTheme(baseTheme, overrides) {
|
|
1209
|
+
return {
|
|
1210
|
+
...baseTheme,
|
|
1211
|
+
...overrides,
|
|
1212
|
+
colors: {
|
|
1213
|
+
...baseTheme.colors,
|
|
1214
|
+
...overrides.colors
|
|
1215
|
+
},
|
|
1216
|
+
fonts: {
|
|
1217
|
+
...baseTheme.fonts,
|
|
1218
|
+
...overrides.fonts
|
|
1219
|
+
}
|
|
1220
|
+
};
|
|
1221
|
+
}
|
|
1222
|
+
function addMode(theme, modeName, colors, baseMode) {
|
|
1223
|
+
let baseColors;
|
|
1224
|
+
if (baseMode && theme.modes && theme.modes[baseMode]) {
|
|
1225
|
+
baseColors = {
|
|
1226
|
+
...theme.colors,
|
|
1227
|
+
...theme.modes[baseMode]
|
|
1228
|
+
};
|
|
1229
|
+
} else {
|
|
1230
|
+
baseColors = theme.colors;
|
|
1231
|
+
}
|
|
1232
|
+
const newMode = {
|
|
1233
|
+
...baseColors,
|
|
1234
|
+
...colors
|
|
1235
|
+
};
|
|
1236
|
+
return {
|
|
1237
|
+
...theme,
|
|
1238
|
+
modes: {
|
|
1239
|
+
...theme.modes,
|
|
1240
|
+
[modeName]: newMode
|
|
1241
|
+
}
|
|
1242
|
+
};
|
|
1243
|
+
}
|
|
1244
|
+
function getMode(theme, mode) {
|
|
1245
|
+
if (!mode || !theme.modes || !theme.modes[mode]) {
|
|
1246
|
+
return theme.colors;
|
|
1247
|
+
}
|
|
1248
|
+
return {
|
|
1249
|
+
...theme.colors,
|
|
1250
|
+
...theme.modes[mode]
|
|
1251
|
+
};
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
// src/ThemeProvider.tsx
|
|
1255
|
+
var ThemeContext;
|
|
1256
|
+
var getThemeContext = () => {
|
|
1257
|
+
if (typeof window !== "undefined") {
|
|
1258
|
+
const globalWindow = window;
|
|
1259
|
+
if (!globalWindow.__principlemd_theme_context__) {
|
|
1260
|
+
globalWindow.__principlemd_theme_context__ = import_react.createContext(undefined);
|
|
1261
|
+
}
|
|
1262
|
+
return globalWindow.__principlemd_theme_context__;
|
|
1263
|
+
} else {
|
|
1264
|
+
if (!ThemeContext) {
|
|
1265
|
+
ThemeContext = import_react.createContext(undefined);
|
|
1266
|
+
}
|
|
1267
|
+
return ThemeContext;
|
|
1268
|
+
}
|
|
1269
|
+
};
|
|
1270
|
+
var ThemeContextSingleton = getThemeContext();
|
|
1271
|
+
var useTheme = () => {
|
|
1272
|
+
const context = import_react.useContext(ThemeContextSingleton);
|
|
1273
|
+
if (!context) {
|
|
1274
|
+
throw new Error("useTheme must be used within a ThemeProvider");
|
|
1275
|
+
}
|
|
1276
|
+
return context;
|
|
1277
|
+
};
|
|
1278
|
+
var ThemeProvider = ({
|
|
1279
|
+
children,
|
|
1280
|
+
theme: customTheme = theme,
|
|
1281
|
+
initialMode
|
|
1282
|
+
}) => {
|
|
1283
|
+
const [mode, setMode] = import_react.useState(initialMode);
|
|
1284
|
+
const activeTheme = import_react.default.useMemo(() => {
|
|
1285
|
+
if (!mode || !customTheme.modes || !customTheme.modes[mode]) {
|
|
1286
|
+
return customTheme;
|
|
1287
|
+
}
|
|
1288
|
+
return {
|
|
1289
|
+
...customTheme,
|
|
1290
|
+
colors: getMode(customTheme, mode)
|
|
1291
|
+
};
|
|
1292
|
+
}, [customTheme, mode]);
|
|
1293
|
+
import_react.useEffect(() => {
|
|
1294
|
+
if (!initialMode) {
|
|
1295
|
+
const savedMode = localStorage.getItem("principlemd-theme-mode");
|
|
1296
|
+
if (savedMode) {
|
|
1297
|
+
setMode(savedMode);
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
}, [initialMode]);
|
|
1301
|
+
import_react.useEffect(() => {
|
|
1302
|
+
if (mode) {
|
|
1303
|
+
localStorage.setItem("principlemd-theme-mode", mode);
|
|
1304
|
+
} else {
|
|
1305
|
+
localStorage.removeItem("principlemd-theme-mode");
|
|
1306
|
+
}
|
|
1307
|
+
}, [mode]);
|
|
1308
|
+
const value = {
|
|
1309
|
+
theme: activeTheme,
|
|
1310
|
+
mode,
|
|
1311
|
+
setMode
|
|
1312
|
+
};
|
|
1313
|
+
return /* @__PURE__ */ import_react.default.createElement(ThemeContextSingleton.Provider, {
|
|
1314
|
+
value
|
|
1315
|
+
}, children);
|
|
1316
|
+
};
|
|
1317
|
+
var withTheme = (Component) => {
|
|
1318
|
+
return (props) => {
|
|
1319
|
+
const { theme: theme2 } = useTheme();
|
|
1320
|
+
return /* @__PURE__ */ import_react.default.createElement(Component, {
|
|
1321
|
+
...props,
|
|
1322
|
+
theme: theme2
|
|
1323
|
+
});
|
|
1324
|
+
};
|
|
1325
|
+
};
|
|
1326
|
+
// src/utils.ts
|
|
1327
|
+
var getColor = (theme2, colorKey) => {
|
|
1328
|
+
const colors = theme2.colors;
|
|
1329
|
+
const value = colors[colorKey];
|
|
1330
|
+
return typeof value === "string" ? value : colorKey;
|
|
1331
|
+
};
|
|
1332
|
+
var getSpace = (theme2, index) => {
|
|
1333
|
+
return theme2.space[index] || 0;
|
|
1334
|
+
};
|
|
1335
|
+
var getFontSize = (theme2, index) => {
|
|
1336
|
+
return theme2.fontSizes[index] || theme2.fontSizes[2];
|
|
1337
|
+
};
|
|
1338
|
+
var getRadius = (theme2, index) => {
|
|
1339
|
+
return theme2.radii[index] || 0;
|
|
1340
|
+
};
|
|
1341
|
+
var getShadow = (theme2, index) => {
|
|
1342
|
+
return theme2.shadows[index] || "none";
|
|
1343
|
+
};
|
|
1344
|
+
var getZIndex = (theme2, index) => {
|
|
1345
|
+
return theme2.zIndices[index] || 0;
|
|
1346
|
+
};
|
|
1347
|
+
var responsive = (values) => {
|
|
1348
|
+
return values.reduce((acc, value, index) => {
|
|
1349
|
+
if (index === 0) {
|
|
1350
|
+
return value;
|
|
1351
|
+
}
|
|
1352
|
+
return {
|
|
1353
|
+
...acc,
|
|
1354
|
+
[`@media screen and (min-width: ${values[index - 1]})`]: value
|
|
1355
|
+
};
|
|
1356
|
+
}, {});
|
|
1357
|
+
};
|
|
1358
|
+
var sx = (styles) => styles;
|
|
1359
|
+
var createStyle = (theme2, styleObj) => {
|
|
1360
|
+
const processValue = (value) => {
|
|
1361
|
+
if (typeof value === "string") {
|
|
1362
|
+
if (value in theme2.colors) {
|
|
1363
|
+
return getColor(theme2, value);
|
|
1364
|
+
}
|
|
1365
|
+
return value;
|
|
1366
|
+
}
|
|
1367
|
+
if (typeof value === "number") {
|
|
1368
|
+
return value;
|
|
1369
|
+
}
|
|
1370
|
+
if (Array.isArray(value)) {
|
|
1371
|
+
return value.map(processValue);
|
|
1372
|
+
}
|
|
1373
|
+
if (typeof value === "object" && value !== null) {
|
|
1374
|
+
const processed2 = {};
|
|
1375
|
+
for (const [key, val] of Object.entries(value)) {
|
|
1376
|
+
processed2[key] = processValue(val);
|
|
1377
|
+
}
|
|
1378
|
+
return processed2;
|
|
1379
|
+
}
|
|
1380
|
+
return value;
|
|
1381
|
+
};
|
|
1382
|
+
const processed = {};
|
|
1383
|
+
for (const [key, val] of Object.entries(styleObj)) {
|
|
1384
|
+
processed[key] = processValue(val);
|
|
1385
|
+
}
|
|
1386
|
+
return processed;
|
|
1387
|
+
};
|
|
1388
|
+
var mergeThemes = (baseTheme, ...overrides) => {
|
|
1389
|
+
return overrides.reduce((theme2, override) => ({
|
|
1390
|
+
space: override.space || theme2.space,
|
|
1391
|
+
fonts: { ...theme2.fonts, ...override.fonts || {} },
|
|
1392
|
+
fontSizes: override.fontSizes || theme2.fontSizes,
|
|
1393
|
+
fontWeights: { ...theme2.fontWeights, ...override.fontWeights || {} },
|
|
1394
|
+
lineHeights: { ...theme2.lineHeights, ...override.lineHeights || {} },
|
|
1395
|
+
breakpoints: override.breakpoints || theme2.breakpoints,
|
|
1396
|
+
sizes: override.sizes || theme2.sizes,
|
|
1397
|
+
radii: override.radii || theme2.radii,
|
|
1398
|
+
shadows: override.shadows || theme2.shadows,
|
|
1399
|
+
zIndices: override.zIndices || theme2.zIndices,
|
|
1400
|
+
colors: {
|
|
1401
|
+
...theme2.colors,
|
|
1402
|
+
...override.colors || {}
|
|
1403
|
+
},
|
|
1404
|
+
buttons: { ...theme2.buttons, ...override.buttons || {} },
|
|
1405
|
+
text: { ...theme2.text, ...override.text || {} },
|
|
1406
|
+
cards: { ...theme2.cards, ...override.cards || {} }
|
|
1407
|
+
}), baseTheme);
|
|
1408
|
+
};
|
|
1409
|
+
// src/ThemeShowcase.tsx
|
|
1410
|
+
var import_react2 = __toESM(require("react"));
|
|
1411
|
+
var ThemeShowcase = ({
|
|
1412
|
+
theme: theme2,
|
|
1413
|
+
title,
|
|
1414
|
+
showValues = true,
|
|
1415
|
+
sections = ["colors", "typography", "spacing", "shadows", "radii"]
|
|
1416
|
+
}) => {
|
|
1417
|
+
const containerStyle = {
|
|
1418
|
+
fontFamily: theme2.fonts.body,
|
|
1419
|
+
color: theme2.colors.text,
|
|
1420
|
+
backgroundColor: theme2.colors.background,
|
|
1421
|
+
padding: theme2.space[4],
|
|
1422
|
+
minHeight: "100vh"
|
|
1423
|
+
};
|
|
1424
|
+
const sectionStyle = {
|
|
1425
|
+
marginBottom: theme2.space[5],
|
|
1426
|
+
padding: theme2.space[4],
|
|
1427
|
+
backgroundColor: theme2.colors.surface || theme2.colors.backgroundSecondary,
|
|
1428
|
+
borderRadius: theme2.radii[2],
|
|
1429
|
+
border: `1px solid ${theme2.colors.border}`
|
|
1430
|
+
};
|
|
1431
|
+
const headingStyle = {
|
|
1432
|
+
fontFamily: theme2.fonts.heading,
|
|
1433
|
+
fontSize: theme2.fontSizes[5],
|
|
1434
|
+
fontWeight: theme2.fontWeights.heading,
|
|
1435
|
+
marginBottom: theme2.space[3],
|
|
1436
|
+
color: theme2.colors.primary
|
|
1437
|
+
};
|
|
1438
|
+
const subheadingStyle = {
|
|
1439
|
+
fontFamily: theme2.fonts.heading,
|
|
1440
|
+
fontSize: theme2.fontSizes[3],
|
|
1441
|
+
fontWeight: theme2.fontWeights.medium,
|
|
1442
|
+
marginBottom: theme2.space[2],
|
|
1443
|
+
marginTop: theme2.space[3],
|
|
1444
|
+
color: theme2.colors.text
|
|
1445
|
+
};
|
|
1446
|
+
return /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1447
|
+
style: containerStyle
|
|
1448
|
+
}, title && /* @__PURE__ */ import_react2.default.createElement("h1", {
|
|
1449
|
+
style: {
|
|
1450
|
+
...headingStyle,
|
|
1451
|
+
fontSize: theme2.fontSizes[6],
|
|
1452
|
+
marginBottom: theme2.space[4]
|
|
1453
|
+
}
|
|
1454
|
+
}, title), sections.includes("colors") && /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1455
|
+
style: sectionStyle
|
|
1456
|
+
}, /* @__PURE__ */ import_react2.default.createElement("h2", {
|
|
1457
|
+
style: headingStyle
|
|
1458
|
+
}, "Colors"), /* @__PURE__ */ import_react2.default.createElement("h3", {
|
|
1459
|
+
style: subheadingStyle
|
|
1460
|
+
}, "Primary Colors"), /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1461
|
+
style: {
|
|
1462
|
+
display: "grid",
|
|
1463
|
+
gridTemplateColumns: "repeat(auto-fill, minmax(200px, 1fr))",
|
|
1464
|
+
gap: theme2.space[3],
|
|
1465
|
+
marginBottom: theme2.space[3]
|
|
1466
|
+
}
|
|
1467
|
+
}, ["text", "background", "primary", "secondary", "accent", "muted"].map((key) => {
|
|
1468
|
+
const color = theme2.colors[key];
|
|
1469
|
+
if (!color)
|
|
1470
|
+
return null;
|
|
1471
|
+
return /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1472
|
+
key,
|
|
1473
|
+
style: {
|
|
1474
|
+
display: "flex",
|
|
1475
|
+
alignItems: "center",
|
|
1476
|
+
padding: theme2.space[2],
|
|
1477
|
+
backgroundColor: theme2.colors.backgroundLight || theme2.colors.backgroundTertiary,
|
|
1478
|
+
borderRadius: theme2.radii[1]
|
|
1479
|
+
}
|
|
1480
|
+
}, /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1481
|
+
style: {
|
|
1482
|
+
width: 40,
|
|
1483
|
+
height: 40,
|
|
1484
|
+
backgroundColor: color,
|
|
1485
|
+
border: `1px solid ${theme2.colors.border}`,
|
|
1486
|
+
borderRadius: theme2.radii[1],
|
|
1487
|
+
marginRight: theme2.space[2]
|
|
1488
|
+
}
|
|
1489
|
+
}), /* @__PURE__ */ import_react2.default.createElement("div", null, /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1490
|
+
style: {
|
|
1491
|
+
fontFamily: theme2.fonts.monospace,
|
|
1492
|
+
fontSize: theme2.fontSizes[1],
|
|
1493
|
+
fontWeight: theme2.fontWeights.medium
|
|
1494
|
+
}
|
|
1495
|
+
}, key), showValues && /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1496
|
+
style: {
|
|
1497
|
+
fontFamily: theme2.fonts.monospace,
|
|
1498
|
+
fontSize: theme2.fontSizes[0],
|
|
1499
|
+
color: theme2.colors.textSecondary
|
|
1500
|
+
}
|
|
1501
|
+
}, color)));
|
|
1502
|
+
})), /* @__PURE__ */ import_react2.default.createElement("h3", {
|
|
1503
|
+
style: subheadingStyle
|
|
1504
|
+
}, "Status Colors"), /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1505
|
+
style: {
|
|
1506
|
+
display: "grid",
|
|
1507
|
+
gridTemplateColumns: "repeat(auto-fill, minmax(200px, 1fr))",
|
|
1508
|
+
gap: theme2.space[3],
|
|
1509
|
+
marginBottom: theme2.space[3]
|
|
1510
|
+
}
|
|
1511
|
+
}, ["success", "warning", "error", "info"].map((key) => {
|
|
1512
|
+
const color = theme2.colors[key];
|
|
1513
|
+
if (!color)
|
|
1514
|
+
return null;
|
|
1515
|
+
return /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1516
|
+
key,
|
|
1517
|
+
style: {
|
|
1518
|
+
display: "flex",
|
|
1519
|
+
alignItems: "center",
|
|
1520
|
+
padding: theme2.space[2],
|
|
1521
|
+
backgroundColor: theme2.colors.backgroundLight || theme2.colors.backgroundTertiary,
|
|
1522
|
+
borderRadius: theme2.radii[1]
|
|
1523
|
+
}
|
|
1524
|
+
}, /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1525
|
+
style: {
|
|
1526
|
+
width: 40,
|
|
1527
|
+
height: 40,
|
|
1528
|
+
backgroundColor: color,
|
|
1529
|
+
border: `1px solid ${theme2.colors.border}`,
|
|
1530
|
+
borderRadius: theme2.radii[1],
|
|
1531
|
+
marginRight: theme2.space[2]
|
|
1532
|
+
}
|
|
1533
|
+
}), /* @__PURE__ */ import_react2.default.createElement("div", null, /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1534
|
+
style: {
|
|
1535
|
+
fontFamily: theme2.fonts.monospace,
|
|
1536
|
+
fontSize: theme2.fontSizes[1],
|
|
1537
|
+
fontWeight: theme2.fontWeights.medium
|
|
1538
|
+
}
|
|
1539
|
+
}, key), showValues && /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1540
|
+
style: {
|
|
1541
|
+
fontFamily: theme2.fonts.monospace,
|
|
1542
|
+
fontSize: theme2.fontSizes[0],
|
|
1543
|
+
color: theme2.colors.textSecondary
|
|
1544
|
+
}
|
|
1545
|
+
}, color)));
|
|
1546
|
+
})), /* @__PURE__ */ import_react2.default.createElement("h3", {
|
|
1547
|
+
style: subheadingStyle
|
|
1548
|
+
}, "Background Colors"), /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1549
|
+
style: {
|
|
1550
|
+
display: "grid",
|
|
1551
|
+
gridTemplateColumns: "repeat(auto-fill, minmax(200px, 1fr))",
|
|
1552
|
+
gap: theme2.space[3]
|
|
1553
|
+
}
|
|
1554
|
+
}, ["backgroundSecondary", "backgroundTertiary", "backgroundLight", "backgroundHover", "surface"].map((key) => {
|
|
1555
|
+
const color = theme2.colors[key];
|
|
1556
|
+
if (!color)
|
|
1557
|
+
return null;
|
|
1558
|
+
return /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1559
|
+
key,
|
|
1560
|
+
style: {
|
|
1561
|
+
padding: theme2.space[3],
|
|
1562
|
+
backgroundColor: color,
|
|
1563
|
+
border: `1px solid ${theme2.colors.border}`,
|
|
1564
|
+
borderRadius: theme2.radii[1]
|
|
1565
|
+
}
|
|
1566
|
+
}, /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1567
|
+
style: {
|
|
1568
|
+
fontFamily: theme2.fonts.monospace,
|
|
1569
|
+
fontSize: theme2.fontSizes[1],
|
|
1570
|
+
fontWeight: theme2.fontWeights.medium
|
|
1571
|
+
}
|
|
1572
|
+
}, key), showValues && /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1573
|
+
style: {
|
|
1574
|
+
fontFamily: theme2.fonts.monospace,
|
|
1575
|
+
fontSize: theme2.fontSizes[0],
|
|
1576
|
+
color: theme2.colors.textSecondary,
|
|
1577
|
+
marginTop: theme2.space[1]
|
|
1578
|
+
}
|
|
1579
|
+
}, color));
|
|
1580
|
+
}))), sections.includes("typography") && /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1581
|
+
style: sectionStyle
|
|
1582
|
+
}, /* @__PURE__ */ import_react2.default.createElement("h2", {
|
|
1583
|
+
style: headingStyle
|
|
1584
|
+
}, "Typography"), /* @__PURE__ */ import_react2.default.createElement("h3", {
|
|
1585
|
+
style: subheadingStyle
|
|
1586
|
+
}, "Font Families"), /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1587
|
+
style: { marginBottom: theme2.space[4] }
|
|
1588
|
+
}, /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1589
|
+
style: {
|
|
1590
|
+
fontFamily: theme2.fonts.heading,
|
|
1591
|
+
fontSize: theme2.fontSizes[4],
|
|
1592
|
+
marginBottom: theme2.space[2]
|
|
1593
|
+
}
|
|
1594
|
+
}, "Heading Font: ", showValues && /* @__PURE__ */ import_react2.default.createElement("span", {
|
|
1595
|
+
style: {
|
|
1596
|
+
fontFamily: theme2.fonts.monospace,
|
|
1597
|
+
fontSize: theme2.fontSizes[1],
|
|
1598
|
+
color: theme2.colors.textSecondary
|
|
1599
|
+
}
|
|
1600
|
+
}, " ", theme2.fonts.heading)), /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1601
|
+
style: {
|
|
1602
|
+
fontFamily: theme2.fonts.body,
|
|
1603
|
+
fontSize: theme2.fontSizes[2],
|
|
1604
|
+
marginBottom: theme2.space[2]
|
|
1605
|
+
}
|
|
1606
|
+
}, "Body Font: ", showValues && /* @__PURE__ */ import_react2.default.createElement("span", {
|
|
1607
|
+
style: {
|
|
1608
|
+
fontFamily: theme2.fonts.monospace,
|
|
1609
|
+
fontSize: theme2.fontSizes[1],
|
|
1610
|
+
color: theme2.colors.textSecondary
|
|
1611
|
+
}
|
|
1612
|
+
}, " ", theme2.fonts.body)), /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1613
|
+
style: {
|
|
1614
|
+
fontFamily: theme2.fonts.monospace,
|
|
1615
|
+
fontSize: theme2.fontSizes[2]
|
|
1616
|
+
}
|
|
1617
|
+
}, "Monospace Font: ", showValues && /* @__PURE__ */ import_react2.default.createElement("span", {
|
|
1618
|
+
style: {
|
|
1619
|
+
fontSize: theme2.fontSizes[1],
|
|
1620
|
+
color: theme2.colors.textSecondary
|
|
1621
|
+
}
|
|
1622
|
+
}, " ", theme2.fonts.monospace))), /* @__PURE__ */ import_react2.default.createElement("h3", {
|
|
1623
|
+
style: subheadingStyle
|
|
1624
|
+
}, "Font Sizes"), /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1625
|
+
style: { marginBottom: theme2.space[4] }
|
|
1626
|
+
}, theme2.fontSizes.map((size, index) => /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1627
|
+
key: index,
|
|
1628
|
+
style: {
|
|
1629
|
+
fontSize: size,
|
|
1630
|
+
lineHeight: theme2.lineHeights.body,
|
|
1631
|
+
marginBottom: theme2.space[1]
|
|
1632
|
+
}
|
|
1633
|
+
}, "Size ", index, ": Sample Text ", showValues && `(${size}px)`))), /* @__PURE__ */ import_react2.default.createElement("h3", {
|
|
1634
|
+
style: subheadingStyle
|
|
1635
|
+
}, "Font Weights"), /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1636
|
+
style: {
|
|
1637
|
+
display: "grid",
|
|
1638
|
+
gridTemplateColumns: "repeat(auto-fit, minmax(150px, 1fr))",
|
|
1639
|
+
gap: theme2.space[2]
|
|
1640
|
+
}
|
|
1641
|
+
}, Object.entries(theme2.fontWeights).map(([name, weight]) => /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1642
|
+
key: name,
|
|
1643
|
+
style: {
|
|
1644
|
+
fontWeight: weight,
|
|
1645
|
+
fontSize: theme2.fontSizes[2]
|
|
1646
|
+
}
|
|
1647
|
+
}, name, " ", showValues && `(${weight})`)))), sections.includes("spacing") && /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1648
|
+
style: sectionStyle
|
|
1649
|
+
}, /* @__PURE__ */ import_react2.default.createElement("h2", {
|
|
1650
|
+
style: headingStyle
|
|
1651
|
+
}, "Spacing"), /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1652
|
+
style: { display: "flex", flexDirection: "column", gap: theme2.space[2] }
|
|
1653
|
+
}, theme2.space.map((space, index) => /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1654
|
+
key: index,
|
|
1655
|
+
style: { display: "flex", alignItems: "center" }
|
|
1656
|
+
}, /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1657
|
+
style: {
|
|
1658
|
+
width: 60,
|
|
1659
|
+
fontFamily: theme2.fonts.monospace,
|
|
1660
|
+
fontSize: theme2.fontSizes[1],
|
|
1661
|
+
color: theme2.colors.textSecondary
|
|
1662
|
+
}
|
|
1663
|
+
}, "[", index, "]"), /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1664
|
+
style: {
|
|
1665
|
+
height: 24,
|
|
1666
|
+
width: space,
|
|
1667
|
+
backgroundColor: theme2.colors.primary,
|
|
1668
|
+
borderRadius: theme2.radii[1]
|
|
1669
|
+
}
|
|
1670
|
+
}), showValues && /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1671
|
+
style: {
|
|
1672
|
+
marginLeft: theme2.space[2],
|
|
1673
|
+
fontFamily: theme2.fonts.monospace,
|
|
1674
|
+
fontSize: theme2.fontSizes[1],
|
|
1675
|
+
color: theme2.colors.textSecondary
|
|
1676
|
+
}
|
|
1677
|
+
}, space, "px"))))), sections.includes("radii") && /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1678
|
+
style: sectionStyle
|
|
1679
|
+
}, /* @__PURE__ */ import_react2.default.createElement("h2", {
|
|
1680
|
+
style: headingStyle
|
|
1681
|
+
}, "Border Radii"), /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1682
|
+
style: {
|
|
1683
|
+
display: "grid",
|
|
1684
|
+
gridTemplateColumns: "repeat(auto-fill, minmax(100px, 1fr))",
|
|
1685
|
+
gap: theme2.space[3]
|
|
1686
|
+
}
|
|
1687
|
+
}, theme2.radii.map((radius, index) => /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1688
|
+
key: index,
|
|
1689
|
+
style: { textAlign: "center" }
|
|
1690
|
+
}, /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1691
|
+
style: {
|
|
1692
|
+
width: 80,
|
|
1693
|
+
height: 80,
|
|
1694
|
+
backgroundColor: theme2.colors.primary,
|
|
1695
|
+
borderRadius: radius,
|
|
1696
|
+
marginBottom: theme2.space[1],
|
|
1697
|
+
margin: "0 auto"
|
|
1698
|
+
}
|
|
1699
|
+
}), /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1700
|
+
style: {
|
|
1701
|
+
fontFamily: theme2.fonts.monospace,
|
|
1702
|
+
fontSize: theme2.fontSizes[0],
|
|
1703
|
+
color: theme2.colors.textSecondary
|
|
1704
|
+
}
|
|
1705
|
+
}, "[", index, "] ", showValues && `${radius}px`))))), sections.includes("shadows") && /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1706
|
+
style: sectionStyle
|
|
1707
|
+
}, /* @__PURE__ */ import_react2.default.createElement("h2", {
|
|
1708
|
+
style: headingStyle
|
|
1709
|
+
}, "Shadows"), /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1710
|
+
style: {
|
|
1711
|
+
display: "grid",
|
|
1712
|
+
gridTemplateColumns: "repeat(auto-fill, minmax(150px, 1fr))",
|
|
1713
|
+
gap: theme2.space[4]
|
|
1714
|
+
}
|
|
1715
|
+
}, theme2.shadows.map((shadow, index) => /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1716
|
+
key: index,
|
|
1717
|
+
style: { textAlign: "center" }
|
|
1718
|
+
}, /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1719
|
+
style: {
|
|
1720
|
+
width: 100,
|
|
1721
|
+
height: 100,
|
|
1722
|
+
backgroundColor: theme2.colors.background,
|
|
1723
|
+
boxShadow: shadow,
|
|
1724
|
+
borderRadius: theme2.radii[2],
|
|
1725
|
+
margin: "0 auto",
|
|
1726
|
+
marginBottom: theme2.space[2],
|
|
1727
|
+
border: `1px solid ${theme2.colors.border}`
|
|
1728
|
+
}
|
|
1729
|
+
}), /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1730
|
+
style: {
|
|
1731
|
+
fontFamily: theme2.fonts.monospace,
|
|
1732
|
+
fontSize: theme2.fontSizes[0],
|
|
1733
|
+
color: theme2.colors.textSecondary
|
|
1734
|
+
}
|
|
1735
|
+
}, "Shadow [", index, "]"), showValues && /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1736
|
+
style: {
|
|
1737
|
+
fontFamily: theme2.fonts.monospace,
|
|
1738
|
+
fontSize: theme2.fontSizes[0],
|
|
1739
|
+
color: theme2.colors.textMuted,
|
|
1740
|
+
marginTop: theme2.space[1]
|
|
1741
|
+
}
|
|
1742
|
+
}, shadow === "none" ? "none" : "..."))))), theme2.modes && Object.keys(theme2.modes).length > 0 && /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1743
|
+
style: sectionStyle
|
|
1744
|
+
}, /* @__PURE__ */ import_react2.default.createElement("h2", {
|
|
1745
|
+
style: headingStyle
|
|
1746
|
+
}, "Available Modes"), /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1747
|
+
style: {
|
|
1748
|
+
display: "flex",
|
|
1749
|
+
gap: theme2.space[2],
|
|
1750
|
+
flexWrap: "wrap"
|
|
1751
|
+
}
|
|
1752
|
+
}, /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1753
|
+
style: {
|
|
1754
|
+
padding: `${theme2.space[2]}px ${theme2.space[3]}px`,
|
|
1755
|
+
backgroundColor: theme2.colors.primary,
|
|
1756
|
+
color: "#ffffff",
|
|
1757
|
+
borderRadius: theme2.radii[2],
|
|
1758
|
+
fontFamily: theme2.fonts.body,
|
|
1759
|
+
fontSize: theme2.fontSizes[1]
|
|
1760
|
+
}
|
|
1761
|
+
}, "default"), Object.keys(theme2.modes).map((modeName) => /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
1762
|
+
key: modeName,
|
|
1763
|
+
style: {
|
|
1764
|
+
padding: `${theme2.space[2]}px ${theme2.space[3]}px`,
|
|
1765
|
+
backgroundColor: theme2.colors.secondary,
|
|
1766
|
+
color: theme2.colors.text,
|
|
1767
|
+
borderRadius: theme2.radii[2],
|
|
1768
|
+
fontFamily: theme2.fonts.body,
|
|
1769
|
+
fontSize: theme2.fontSizes[1]
|
|
1770
|
+
}
|
|
1771
|
+
}, modeName)))));
|
|
1772
|
+
};
|
|
1773
|
+
|
|
1774
|
+
// src/index.ts
|
|
1775
|
+
var theme = terminalTheme;
|
|
1776
|
+
function scaleThemeFonts(theme2, scale) {
|
|
1777
|
+
const currentScale = theme2.fontScale || 1;
|
|
1778
|
+
const effectiveScale = scale / currentScale;
|
|
1779
|
+
return {
|
|
1780
|
+
...theme2,
|
|
1781
|
+
fontSizes: theme2.fontSizes.map((size) => Math.round(size * effectiveScale)),
|
|
1782
|
+
fontScale: scale
|
|
1783
|
+
};
|
|
1784
|
+
}
|
|
1785
|
+
function increaseFontScale(theme2) {
|
|
1786
|
+
const currentScale = theme2.fontScale || 1;
|
|
1787
|
+
const newScale = Math.min(currentScale * 1.1, 2);
|
|
1788
|
+
return scaleThemeFonts(theme2, newScale);
|
|
1789
|
+
}
|
|
1790
|
+
function decreaseFontScale(theme2) {
|
|
1791
|
+
const currentScale = theme2.fontScale || 1;
|
|
1792
|
+
const newScale = Math.max(currentScale * 0.9, 0.5);
|
|
1793
|
+
return scaleThemeFonts(theme2, newScale);
|
|
1794
|
+
}
|
|
1795
|
+
function resetFontScale(theme2) {
|
|
1796
|
+
return scaleThemeFonts(theme2, 1);
|
|
1797
|
+
}
|
|
1798
|
+
var src_default = theme;
|