@vueless/nuxt 0.0.9-beta.6 → 0.0.9-beta.7

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/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=3.13.0"
6
6
  },
7
- "version": "0.0.9-beta.6",
7
+ "version": "0.0.9-beta.7",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "0.8.4",
10
10
  "unbuild": "2.0.0"
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vueless/nuxt",
3
- "version": "0.0.9-beta.6",
3
+ "version": "0.0.9-beta.7",
4
4
  "license": "MIT",
5
5
  "description": "Nuxt Styleless UI Component Library, powered by Tailwind CSS.",
6
6
  "keywords": [
@@ -58,7 +58,7 @@
58
58
  "@nuxt/kit": "^3.13.1",
59
59
  "@tailwindcss/vite": "^4.0.14",
60
60
  "tailwindcss": "^4.0.14",
61
- "vueless": "^0.0.825-beta.38"
61
+ "vueless": "^0.0.825-beta.42"
62
62
  },
63
63
  "devDependencies": {
64
64
  "@material-symbols/svg-500": "^0.29.1",
@@ -20,21 +20,13 @@ export default defineNuxtPlugin((_nuxtApp) => {
20
20
  if (import.meta.server) {
21
21
  const event = _nuxtApp.ssrContext?.event;
22
22
  const cookies = parseCookies(event?.node.req.headers.cookie);
23
- const colorModeCookie = cookies?.[COLOR_MODE_KEY];
24
- const isAutoModeCookie = cookies?.[AUTO_MODE_KEY];
25
- const primaryColorCookie = cookies?.[PRIMARY_COLOR_KEY];
26
- const neutralColorCookie = cookies?.[NEUTRAL_COLOR_KEY];
27
- const roundingCookie = cookies?.[ROUNDING_KEY];
28
- const themeRootVariables = setTheme(
29
- {
30
- primary: primaryColorCookie,
31
- neutral: neutralColorCookie,
32
- rounding: Number(roundingCookie),
33
- colorMode: colorModeCookie
34
- },
35
- Boolean(Number(isAutoModeCookie))
36
- );
37
- const colorModeClass = colorModeCookie === ColorMode.Dark ? DARK_MODE_SELECTOR : LIGHT_MODE_SELECTOR;
23
+ const primary = cookies?.[PRIMARY_COLOR_KEY];
24
+ const neutral = cookies?.[NEUTRAL_COLOR_KEY];
25
+ const rounding = Number(cookies?.[ROUNDING_KEY]);
26
+ const colorMode = cookies?.[COLOR_MODE_KEY];
27
+ const isCachedAutoMode = Boolean(Number(cookies?.[AUTO_MODE_KEY]));
28
+ const themeRootVariables = setTheme({ primary, neutral, rounding, colorMode }, isCachedAutoMode);
29
+ const colorModeClass = colorMode === ColorMode.Dark ? DARK_MODE_SELECTOR : LIGHT_MODE_SELECTOR;
38
30
  _nuxtApp.ssrContext?.head.push({
39
31
  style: [{ innerHTML: themeRootVariables }],
40
32
  htmlAttrs: { class: colorModeClass }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vueless/nuxt",
3
- "version": "0.0.9-beta.6",
3
+ "version": "0.0.9-beta.7",
4
4
  "license": "MIT",
5
5
  "description": "Nuxt Styleless UI Component Library, powered by Tailwind CSS.",
6
6
  "keywords": [
@@ -58,7 +58,7 @@
58
58
  "@nuxt/kit": "^3.13.1",
59
59
  "@tailwindcss/vite": "^4.0.14",
60
60
  "tailwindcss": "^4.0.14",
61
- "vueless": "^0.0.825-beta.38"
61
+ "vueless": "^0.0.825-beta.42"
62
62
  },
63
63
  "devDependencies": {
64
64
  "@material-symbols/svg-500": "^0.29.1",