@vueless/nuxt 0.0.9-beta.22 → 0.0.9-beta.24

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.22",
7
+ "version": "0.0.9-beta.24",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "0.8.4",
10
10
  "unbuild": "2.0.0"
package/dist/module.mjs CHANGED
@@ -5,7 +5,7 @@ import { defineNuxtModule, createResolver, addPlugin, addComponent, addImportsDi
5
5
  import { TailwindCSS, Vueless } from 'vueless/plugin-vite.js';
6
6
  import { getNuxtDirs } from 'vueless/utils/node/helper.js';
7
7
  import { createTailwindSafelist } from 'vueless/utils/node/tailwindSafelist.js';
8
- import { COMPONENTS, VUELESS_CONFIG_FILE_NAME } from 'vueless/constants.js';
8
+ import { NUXT_MODULE_ENV, COMPONENTS, VUELESS_CONFIG_FILE_NAME } from 'vueless/constants.js';
9
9
 
10
10
 
11
11
 
@@ -38,7 +38,7 @@ const module = defineNuxtModule({
38
38
  config.plugins = config.plugins || [];
39
39
  config.plugins.push(
40
40
  TailwindCSS(),
41
- Vueless({ mode: "nuxt-module", mirrorCacheDir, debug })
41
+ Vueless({ env: NUXT_MODULE_ENV, mirrorCacheDir, debug })
42
42
  );
43
43
  });
44
44
  if (_nuxt.options.dev) {
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vueless/nuxt",
3
- "version": "0.0.9-beta.22",
3
+ "version": "0.0.9-beta.24",
4
4
  "license": "MIT",
5
5
  "description": "Nuxt Styleless UI Component Library, powered by Tailwind CSS.",
6
6
  "keywords": [
@@ -57,8 +57,8 @@
57
57
  "dependencies": {
58
58
  "@nuxt/kit": "^3.13.1",
59
59
  "@tailwindcss/vite": "^4.0.14",
60
- "tailwindcss": "^4.0.14",
61
- "vueless": "^0.0.825-beta.65"
60
+ "tailwindcss": "^4.1.6",
61
+ "vueless": "^0.0.825-beta.151"
62
62
  },
63
63
  "devDependencies": {
64
64
  "@material-symbols/svg-500": "^0.29.1",
@@ -1,5 +1,16 @@
1
1
  import { createVueless, setTheme } from "vueless";
2
- import { COLOR_MODE_KEY, AUTO_MODE_KEY, LIGHT_MODE_SELECTOR, DARK_MODE_SELECTOR, PRIMARY_COLOR_KEY, NEUTRAL_COLOR_KEY, ROUNDING_KEY } from "vueless/constants";
2
+ import {
3
+ TEXT,
4
+ OUTLINE,
5
+ ROUNDING,
6
+ PRIMARY_COLOR,
7
+ NEUTRAL_COLOR,
8
+ AUTO_MODE_KEY,
9
+ COLOR_MODE_KEY,
10
+ DARK_MODE_CLASS,
11
+ LIGHT_MODE_CLASS,
12
+ DISABLED_OPACITY
13
+ } from "vueless/constants";
3
14
  import { ColorMode } from "vueless/types";
4
15
  import vClickOutside from "vueless/directives/clickOutside/vClickOutside";
5
16
  import vTooltip from "vueless/directives/tooltip/vTooltip";
@@ -15,20 +26,36 @@ function parseCookies(cookieHeader) {
15
26
  }
16
27
  export default defineNuxtPlugin((_nuxtApp) => {
17
28
  const config = useRuntimeConfig().public.vueless;
18
- const vueless = createVueless(config);
29
+ const vueless = createVueless({ config });
19
30
  _nuxtApp.vueApp.use(vueless, []);
20
31
  _nuxtApp.vueApp.directive("clickOutside", vClickOutside);
21
32
  _nuxtApp.vueApp.directive("tooltip", vTooltip);
22
33
  if (import.meta.server) {
23
34
  const event = _nuxtApp.ssrContext?.event;
24
35
  const cookies = parseCookies(event?.node.req.headers.cookie);
25
- const primary = cookies?.[PRIMARY_COLOR_KEY];
26
- const neutral = cookies?.[NEUTRAL_COLOR_KEY];
27
- const rounding = cookies?.[ROUNDING_KEY];
36
+ const primary = cookies?.[`vl-${PRIMARY_COLOR}`];
37
+ const neutral = cookies?.[`vl-${NEUTRAL_COLOR}`];
38
+ const text = {
39
+ xs: cookies?.[`vl-${TEXT}-xs`],
40
+ sm: cookies?.[`vl-${TEXT}-sm`],
41
+ md: cookies?.[`vl-${TEXT}-md`],
42
+ lg: cookies?.[`vl-${TEXT}-lg`]
43
+ };
44
+ const outline = {
45
+ sm: cookies?.[`vl-${OUTLINE}-sm`],
46
+ md: cookies?.[`vl-${OUTLINE}-md`],
47
+ lg: cookies?.[`vl-${OUTLINE}-lg`]
48
+ };
49
+ const rounding = {
50
+ sm: cookies?.[`vl-${ROUNDING}-sm`],
51
+ md: cookies?.[`vl-${ROUNDING}-md`],
52
+ lg: cookies?.[`vl-${ROUNDING}-lg`]
53
+ };
54
+ const disabledOpacity = cookies?.[`vl-${DISABLED_OPACITY}`];
28
55
  const colorMode = cookies?.[COLOR_MODE_KEY];
29
56
  const isCachedAutoMode = Boolean(Number(cookies?.[AUTO_MODE_KEY]));
30
- const themeRootVariables = setTheme({ primary, neutral, rounding, colorMode }, isCachedAutoMode);
31
- const colorModeClass = colorMode === ColorMode.Dark ? DARK_MODE_SELECTOR : LIGHT_MODE_SELECTOR;
57
+ const themeRootVariables = setTheme({ primary, neutral, text, outline, rounding, disabledOpacity, colorMode }, isCachedAutoMode);
58
+ const colorModeClass = colorMode === ColorMode.Dark ? DARK_MODE_CLASS : LIGHT_MODE_CLASS;
32
59
  _nuxtApp.ssrContext?.head.push({
33
60
  style: [{ innerHTML: themeRootVariables }],
34
61
  htmlAttrs: { class: colorModeClass }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vueless/nuxt",
3
- "version": "0.0.9-beta.22",
3
+ "version": "0.0.9-beta.24",
4
4
  "license": "MIT",
5
5
  "description": "Nuxt Styleless UI Component Library, powered by Tailwind CSS.",
6
6
  "keywords": [
@@ -57,8 +57,8 @@
57
57
  "dependencies": {
58
58
  "@nuxt/kit": "^3.13.1",
59
59
  "@tailwindcss/vite": "^4.0.14",
60
- "tailwindcss": "^4.0.14",
61
- "vueless": "^0.0.825-beta.65"
60
+ "tailwindcss": "^4.1.6",
61
+ "vueless": "^0.0.825-beta.151"
62
62
  },
63
63
  "devDependencies": {
64
64
  "@material-symbols/svg-500": "^0.29.1",