@vueless/nuxt 0.0.9-beta.23 → 0.0.9-beta.25
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 +3 -3
- package/dist/module.mjs +2 -11
- package/dist/package.json +18 -20
- package/dist/runtime/plugin.js +34 -7
- package/dist/types.d.mts +2 -2
- package/package.json +18 -20
- package/dist/module.cjs +0 -5
- package/dist/module.d.ts +0 -11
- package/dist/types.d.ts +0 -7
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -5,17 +5,8 @@ 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
|
-
|
|
11
|
-
|
|
12
|
-
// -- Unbuild CommonJS Shims --
|
|
13
|
-
import __cjs_url__ from 'url';
|
|
14
|
-
import __cjs_path__ from 'path';
|
|
15
|
-
import __cjs_mod__ from 'module';
|
|
16
|
-
const __filename = __cjs_url__.fileURLToPath(import.meta.url);
|
|
17
|
-
const __dirname = __cjs_path__.dirname(__filename);
|
|
18
|
-
const require = __cjs_mod__.createRequire(import.meta.url);
|
|
19
10
|
const module = defineNuxtModule({
|
|
20
11
|
meta: {
|
|
21
12
|
name: "@vueless/nuxt",
|
|
@@ -38,7 +29,7 @@ const module = defineNuxtModule({
|
|
|
38
29
|
config.plugins = config.plugins || [];
|
|
39
30
|
config.plugins.push(
|
|
40
31
|
TailwindCSS(),
|
|
41
|
-
Vueless({
|
|
32
|
+
Vueless({ env: NUXT_MODULE_ENV, mirrorCacheDir, debug })
|
|
42
33
|
);
|
|
43
34
|
});
|
|
44
35
|
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.
|
|
3
|
+
"version": "0.0.9-beta.25",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Nuxt Styleless UI Component Library, powered by Tailwind CSS.",
|
|
6
6
|
"keywords": [
|
|
@@ -27,13 +27,12 @@
|
|
|
27
27
|
},
|
|
28
28
|
"exports": {
|
|
29
29
|
".": {
|
|
30
|
-
"types": "./dist/types.d.
|
|
30
|
+
"types": "./dist/types.d.mts",
|
|
31
31
|
"import": "./dist/module.mjs",
|
|
32
|
-
"require": "./dist/module.
|
|
32
|
+
"require": "./dist/module.mjs"
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
|
-
"main": "./dist/module.
|
|
36
|
-
"types": "./dist/types.d.ts",
|
|
35
|
+
"main": "./dist/module.mjs",
|
|
37
36
|
"files": [
|
|
38
37
|
"dist"
|
|
39
38
|
],
|
|
@@ -55,26 +54,25 @@
|
|
|
55
54
|
"install": "npx nuxi prepare"
|
|
56
55
|
},
|
|
57
56
|
"dependencies": {
|
|
58
|
-
"@nuxt/kit": "^3.
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"vueless": "^0.0.825-beta.72"
|
|
57
|
+
"@nuxt/kit": "^3.17.4",
|
|
58
|
+
"tailwindcss": "^4.1.7",
|
|
59
|
+
"vueless": "^0.0.825-beta.151"
|
|
62
60
|
},
|
|
63
61
|
"devDependencies": {
|
|
64
|
-
"@material-symbols/svg-500": "^0.
|
|
65
|
-
"@nuxt/devtools": "^
|
|
66
|
-
"@nuxt/eslint-config": "^
|
|
67
|
-
"@nuxt/module-builder": "^0.
|
|
68
|
-
"@nuxt/schema": "^3.
|
|
69
|
-
"@nuxt/test-utils": "^3.
|
|
62
|
+
"@material-symbols/svg-500": "^0.31.4",
|
|
63
|
+
"@nuxt/devtools": "^2.4.1",
|
|
64
|
+
"@nuxt/eslint-config": "^1.4.1",
|
|
65
|
+
"@nuxt/module-builder": "^1.0.1",
|
|
66
|
+
"@nuxt/schema": "^3.17.4",
|
|
67
|
+
"@nuxt/test-utils": "^3.19.1",
|
|
70
68
|
"@types/node": "latest",
|
|
71
69
|
"changelogen": "^0.5.5",
|
|
72
|
-
"eslint": "^9.
|
|
73
|
-
"nuxt": "^3.
|
|
74
|
-
"release-it": "^
|
|
70
|
+
"eslint": "^9.27.0",
|
|
71
|
+
"nuxt": "^3.17.4",
|
|
72
|
+
"release-it": "^19.0.2",
|
|
75
73
|
"typescript": "latest",
|
|
76
|
-
"vitest": "^3.
|
|
77
|
-
"vue-tsc": "^2.
|
|
74
|
+
"vitest": "^3.1.4",
|
|
75
|
+
"vue-tsc": "^2.2.10"
|
|
78
76
|
},
|
|
79
77
|
"repository": {
|
|
80
78
|
"type": "git",
|
package/dist/runtime/plugin.js
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import { createVueless, setTheme } from "vueless";
|
|
2
|
-
import {
|
|
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?.[
|
|
26
|
-
const neutral = cookies?.[
|
|
27
|
-
const
|
|
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 ?
|
|
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/dist/types.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { NuxtModule } from '@nuxt/schema'
|
|
2
2
|
|
|
3
|
-
import type { default as Module } from './module.
|
|
3
|
+
import type { default as Module } from './module.mjs'
|
|
4
4
|
|
|
5
5
|
export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
|
|
6
6
|
|
|
7
|
-
export { default } from './module.
|
|
7
|
+
export { default } from './module.mjs'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vueless/nuxt",
|
|
3
|
-
"version": "0.0.9-beta.
|
|
3
|
+
"version": "0.0.9-beta.25",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Nuxt Styleless UI Component Library, powered by Tailwind CSS.",
|
|
6
6
|
"keywords": [
|
|
@@ -27,13 +27,12 @@
|
|
|
27
27
|
},
|
|
28
28
|
"exports": {
|
|
29
29
|
".": {
|
|
30
|
-
"types": "./dist/types.d.
|
|
30
|
+
"types": "./dist/types.d.mts",
|
|
31
31
|
"import": "./dist/module.mjs",
|
|
32
|
-
"require": "./dist/module.
|
|
32
|
+
"require": "./dist/module.mjs"
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
|
-
"main": "./dist/module.
|
|
36
|
-
"types": "./dist/types.d.ts",
|
|
35
|
+
"main": "./dist/module.mjs",
|
|
37
36
|
"files": [
|
|
38
37
|
"dist"
|
|
39
38
|
],
|
|
@@ -55,26 +54,25 @@
|
|
|
55
54
|
"install": "npx nuxi prepare"
|
|
56
55
|
},
|
|
57
56
|
"dependencies": {
|
|
58
|
-
"@nuxt/kit": "^3.
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"vueless": "^0.0.825-beta.72"
|
|
57
|
+
"@nuxt/kit": "^3.17.4",
|
|
58
|
+
"tailwindcss": "^4.1.7",
|
|
59
|
+
"vueless": "^0.0.825-beta.151"
|
|
62
60
|
},
|
|
63
61
|
"devDependencies": {
|
|
64
|
-
"@material-symbols/svg-500": "^0.
|
|
65
|
-
"@nuxt/devtools": "^
|
|
66
|
-
"@nuxt/eslint-config": "^
|
|
67
|
-
"@nuxt/module-builder": "^0.
|
|
68
|
-
"@nuxt/schema": "^3.
|
|
69
|
-
"@nuxt/test-utils": "^3.
|
|
62
|
+
"@material-symbols/svg-500": "^0.31.4",
|
|
63
|
+
"@nuxt/devtools": "^2.4.1",
|
|
64
|
+
"@nuxt/eslint-config": "^1.4.1",
|
|
65
|
+
"@nuxt/module-builder": "^1.0.1",
|
|
66
|
+
"@nuxt/schema": "^3.17.4",
|
|
67
|
+
"@nuxt/test-utils": "^3.19.1",
|
|
70
68
|
"@types/node": "latest",
|
|
71
69
|
"changelogen": "^0.5.5",
|
|
72
|
-
"eslint": "^9.
|
|
73
|
-
"nuxt": "^3.
|
|
74
|
-
"release-it": "^
|
|
70
|
+
"eslint": "^9.27.0",
|
|
71
|
+
"nuxt": "^3.17.4",
|
|
72
|
+
"release-it": "^19.0.2",
|
|
75
73
|
"typescript": "latest",
|
|
76
|
-
"vitest": "^3.
|
|
77
|
-
"vue-tsc": "^2.
|
|
74
|
+
"vitest": "^3.1.4",
|
|
75
|
+
"vue-tsc": "^2.2.10"
|
|
78
76
|
},
|
|
79
77
|
"repository": {
|
|
80
78
|
"type": "git",
|
package/dist/module.cjs
DELETED
package/dist/module.d.ts
DELETED
package/dist/types.d.ts
DELETED