@stackvibe-studio/themes 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +10 -1
- package/dist/index.js +10 -1
- package/package.json +16 -1
package/dist/index.cjs
CHANGED
|
@@ -155,13 +155,22 @@ function getThemeCSSVariables(theme = "aurora") {
|
|
|
155
155
|
"--accent": tokens.accent,
|
|
156
156
|
"--surface": tokens.surface,
|
|
157
157
|
"--radius": tokens.radius,
|
|
158
|
-
"--glow": tokens.glow
|
|
158
|
+
"--glow": tokens.glow,
|
|
159
|
+
"--sv-background": tokens.background,
|
|
160
|
+
"--sv-foreground": tokens.foreground,
|
|
161
|
+
"--sv-primary": tokens.primary,
|
|
162
|
+
"--sv-secondary": tokens.secondary,
|
|
163
|
+
"--sv-accent": tokens.accent,
|
|
164
|
+
"--sv-surface": tokens.surface,
|
|
165
|
+
"--sv-radius": tokens.radius,
|
|
166
|
+
"--sv-glow": tokens.glow
|
|
159
167
|
};
|
|
160
168
|
}
|
|
161
169
|
function applyTheme(theme = "aurora") {
|
|
162
170
|
if (typeof document === "undefined") return;
|
|
163
171
|
const vars = getThemeCSSVariables(theme);
|
|
164
172
|
const root = document.documentElement;
|
|
173
|
+
root.setAttribute("data-theme", theme);
|
|
165
174
|
Object.entries(vars).forEach(([key, value]) => {
|
|
166
175
|
root.style.setProperty(key, value);
|
|
167
176
|
});
|
package/dist/index.js
CHANGED
|
@@ -127,13 +127,22 @@ function getThemeCSSVariables(theme = "aurora") {
|
|
|
127
127
|
"--accent": tokens.accent,
|
|
128
128
|
"--surface": tokens.surface,
|
|
129
129
|
"--radius": tokens.radius,
|
|
130
|
-
"--glow": tokens.glow
|
|
130
|
+
"--glow": tokens.glow,
|
|
131
|
+
"--sv-background": tokens.background,
|
|
132
|
+
"--sv-foreground": tokens.foreground,
|
|
133
|
+
"--sv-primary": tokens.primary,
|
|
134
|
+
"--sv-secondary": tokens.secondary,
|
|
135
|
+
"--sv-accent": tokens.accent,
|
|
136
|
+
"--sv-surface": tokens.surface,
|
|
137
|
+
"--sv-radius": tokens.radius,
|
|
138
|
+
"--sv-glow": tokens.glow
|
|
131
139
|
};
|
|
132
140
|
}
|
|
133
141
|
function applyTheme(theme = "aurora") {
|
|
134
142
|
if (typeof document === "undefined") return;
|
|
135
143
|
const vars = getThemeCSSVariables(theme);
|
|
136
144
|
const root = document.documentElement;
|
|
145
|
+
root.setAttribute("data-theme", theme);
|
|
137
146
|
Object.entries(vars).forEach(([key, value]) => {
|
|
138
147
|
root.style.setProperty(key, value);
|
|
139
148
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackvibe-studio/themes",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Theme tokens and presets for StackVibe UI.",
|
|
6
6
|
"repository": {
|
|
@@ -12,6 +12,21 @@
|
|
|
12
12
|
"url": "https://github.com/StackVibe-Studio/stackvibe-ui/issues"
|
|
13
13
|
},
|
|
14
14
|
"license": "MIT",
|
|
15
|
+
"keywords": [
|
|
16
|
+
"themes",
|
|
17
|
+
"design-tokens",
|
|
18
|
+
"token-system",
|
|
19
|
+
"color-palettes",
|
|
20
|
+
"dark-mode",
|
|
21
|
+
"aurora",
|
|
22
|
+
"obsidian",
|
|
23
|
+
"cyberpunk",
|
|
24
|
+
"matrix",
|
|
25
|
+
"tokyo-night",
|
|
26
|
+
"css-variables",
|
|
27
|
+
"theme-switcher",
|
|
28
|
+
"stackvibe"
|
|
29
|
+
],
|
|
15
30
|
"main": "./dist/index.js",
|
|
16
31
|
"types": "./dist/index.d.ts",
|
|
17
32
|
"exports": {
|