@vueless/nuxt 1.0.1-beta.6 → 1.0.1-beta.8
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.d.mts +2 -0
- package/dist/module.json +3 -3
- package/dist/module.mjs +10 -8
- package/dist/package.json +36 -35
- package/dist/runtime/plugin.js +28 -19
- package/package.json +36 -35
package/dist/module.d.mts
CHANGED
|
@@ -4,10 +4,12 @@ declare const _default: _nuxt_schema.NuxtModule<{
|
|
|
4
4
|
include: never[];
|
|
5
5
|
mirrorCacheDir: string;
|
|
6
6
|
debug: boolean;
|
|
7
|
+
postcss: boolean;
|
|
7
8
|
}, {
|
|
8
9
|
include: never[];
|
|
9
10
|
mirrorCacheDir: string;
|
|
10
11
|
debug: boolean;
|
|
12
|
+
postcss: boolean;
|
|
11
13
|
}, false>;
|
|
12
14
|
|
|
13
15
|
export { _default as default };
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -4,9 +4,9 @@ import { cwd } from 'node:process';
|
|
|
4
4
|
import { pathToFileURL } from 'node:url';
|
|
5
5
|
import { createRequire } from 'node:module';
|
|
6
6
|
import { defineNuxtModule, createResolver, hasNuxtModule, addPlugin, addComponent, addImportsDir } from '@nuxt/kit';
|
|
7
|
-
import { TailwindCSS, Vueless } from 'vueless/plugin-vite
|
|
8
|
-
import { cacheMergedConfigs } from 'vueless/utils/node/helper.js';
|
|
9
|
-
import { NUXT_MODULE_ENV, VUELESS_PACKAGE_DIR, COMPONENTS, VUELESS_CONFIG_FILE_NAME } from 'vueless/constants
|
|
7
|
+
import { TailwindCSS, Vueless } from 'vueless/plugin-vite';
|
|
8
|
+
import { autoImportUserConfigs, cacheMergedConfigs } from 'vueless/utils/node/helper.js';
|
|
9
|
+
import { NUXT_MODULE_ENV, VUELESS_PACKAGE_DIR, COMPONENTS, VUELESS_CONFIG_FILE_NAME } from 'vueless/constants';
|
|
10
10
|
|
|
11
11
|
const require = createRequire(import.meta.url);
|
|
12
12
|
const module = defineNuxtModule({
|
|
@@ -20,11 +20,13 @@ const module = defineNuxtModule({
|
|
|
20
20
|
defaults: {
|
|
21
21
|
include: [],
|
|
22
22
|
mirrorCacheDir: "",
|
|
23
|
-
debug: false
|
|
23
|
+
debug: false,
|
|
24
|
+
postcss: false
|
|
24
25
|
},
|
|
25
26
|
async setup(_options, _nuxt) {
|
|
26
|
-
const { include, mirrorCacheDir, debug } = _options;
|
|
27
|
+
const { include, mirrorCacheDir, debug, postcss } = _options;
|
|
27
28
|
const { resolve } = createResolver(import.meta.url);
|
|
29
|
+
await autoImportUserConfigs();
|
|
28
30
|
const { vuelessConfig, dependencies } = await getVuelessConfig();
|
|
29
31
|
_nuxt.options.runtimeConfig.public.vueless = vuelessConfig;
|
|
30
32
|
_nuxt.options.build.transpile.push("vueless");
|
|
@@ -41,7 +43,7 @@ const module = defineNuxtModule({
|
|
|
41
43
|
_nuxt.hook("vite:extendConfig", async (config) => {
|
|
42
44
|
config.plugins = config.plugins || [];
|
|
43
45
|
config.plugins.push(
|
|
44
|
-
TailwindCSS(),
|
|
46
|
+
TailwindCSS({ postcss }),
|
|
45
47
|
Vueless({ env: NUXT_MODULE_ENV, mirrorCacheDir, debug, include })
|
|
46
48
|
);
|
|
47
49
|
});
|
|
@@ -58,10 +60,10 @@ const module = defineNuxtModule({
|
|
|
58
60
|
}
|
|
59
61
|
await cacheMergedConfigs(VUELESS_PACKAGE_DIR);
|
|
60
62
|
addPlugin(resolve("./runtime/plugin"));
|
|
61
|
-
for (const componentName
|
|
63
|
+
for (const [componentName, componentPath] of Object.entries(COMPONENTS)) {
|
|
62
64
|
addComponent({
|
|
63
65
|
name: componentName,
|
|
64
|
-
filePath: `vueless/${
|
|
66
|
+
filePath: `vueless/${componentPath}/${componentName}.vue`
|
|
65
67
|
});
|
|
66
68
|
}
|
|
67
69
|
addImportsDir("vueless/composables");
|
package/dist/package.json
CHANGED
|
@@ -1,26 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vueless/nuxt",
|
|
3
|
-
"version": "1.0.1-beta.
|
|
4
|
-
"license": "MIT",
|
|
3
|
+
"version": "1.0.1-beta.8",
|
|
5
4
|
"description": "Nuxt Styleless UI Component Library, powered by Tailwind CSS.",
|
|
6
|
-
"
|
|
7
|
-
"vueless",
|
|
8
|
-
"nuxt",
|
|
9
|
-
"nuxt.js",
|
|
10
|
-
"nuxt3",
|
|
11
|
-
"ui library",
|
|
12
|
-
"component library",
|
|
13
|
-
"nuxt framework",
|
|
14
|
-
"design system",
|
|
15
|
-
"tailwind",
|
|
16
|
-
"tailwindcss",
|
|
17
|
-
"unstyled",
|
|
18
|
-
"styleless",
|
|
19
|
-
"headlessui",
|
|
20
|
-
"ui"
|
|
21
|
-
],
|
|
5
|
+
"author": "Johnny Grid <hello@vueless.com> (https://vueless.com)",
|
|
22
6
|
"homepage": "https://vueless.com",
|
|
23
|
-
"
|
|
7
|
+
"license": "MIT",
|
|
24
8
|
"type": "module",
|
|
25
9
|
"publishConfig": {
|
|
26
10
|
"access": "public"
|
|
@@ -43,7 +27,7 @@
|
|
|
43
27
|
"dev:preview": "nuxi preview playground",
|
|
44
28
|
"prepack": "nuxi prepare && nuxt-module-build build && cp package.json LICENSE README.md dist/",
|
|
45
29
|
"release:beta": "release-it --ci --npm.publish --preRelease=beta --increment=prerelease",
|
|
46
|
-
"release:patch": "release-it patch --ci --npm.publish",
|
|
30
|
+
"release:patch": "release-it patch --ci --npm.publish --git.tag --github.release",
|
|
47
31
|
"release:minor": "release-it minor --ci --npm.publish --git.tag --github.release",
|
|
48
32
|
"release:major": "release-it major --ci --npm.publish --git.tag --github.release",
|
|
49
33
|
"lint": "eslint . --no-fix",
|
|
@@ -54,24 +38,24 @@
|
|
|
54
38
|
"test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit"
|
|
55
39
|
},
|
|
56
40
|
"dependencies": {
|
|
57
|
-
"
|
|
58
|
-
"vueless": "^1.0.2-beta.9"
|
|
41
|
+
"vueless": "^1.1.1-beta.45"
|
|
59
42
|
},
|
|
60
43
|
"devDependencies": {
|
|
61
|
-
"@material-symbols/svg-500": "^0.
|
|
62
|
-
"@nuxt/devtools": "^2.
|
|
63
|
-
"@nuxt/eslint-config": "^1.
|
|
64
|
-
"@nuxt/
|
|
65
|
-
"@nuxt/
|
|
66
|
-
"@nuxt/
|
|
44
|
+
"@material-symbols/svg-500": "^0.34.1",
|
|
45
|
+
"@nuxt/devtools": "^2.6.2",
|
|
46
|
+
"@nuxt/eslint-config": "^1.8.0",
|
|
47
|
+
"@nuxt/kit": "^4.0.3",
|
|
48
|
+
"@nuxt/module-builder": "^1.0.2",
|
|
49
|
+
"@nuxt/schema": "^4.0.3",
|
|
50
|
+
"@nuxt/test-utils": "^3.19.2",
|
|
67
51
|
"@types/node": "latest",
|
|
68
|
-
"changelogen": "^0.
|
|
69
|
-
"eslint": "^9.
|
|
70
|
-
"nuxt": "^
|
|
71
|
-
"release-it": "^19.0.
|
|
52
|
+
"changelogen": "^0.6.2",
|
|
53
|
+
"eslint": "^9.33.0",
|
|
54
|
+
"nuxt": "^4.0.3",
|
|
55
|
+
"release-it": "^19.0.4",
|
|
72
56
|
"typescript": "latest",
|
|
73
|
-
"vitest": "^3.
|
|
74
|
-
"vue-tsc": "^
|
|
57
|
+
"vitest": "^3.2.4",
|
|
58
|
+
"vue-tsc": "^3.0.5"
|
|
75
59
|
},
|
|
76
60
|
"repository": {
|
|
77
61
|
"type": "git",
|
|
@@ -79,5 +63,22 @@
|
|
|
79
63
|
},
|
|
80
64
|
"bugs": {
|
|
81
65
|
"url": "https://github.com/vuelessjs/vueless-module-nuxt/issues"
|
|
82
|
-
}
|
|
66
|
+
},
|
|
67
|
+
"keywords": [
|
|
68
|
+
"vueless",
|
|
69
|
+
"nuxt",
|
|
70
|
+
"nuxt.js",
|
|
71
|
+
"nuxt3",
|
|
72
|
+
"nuxt4",
|
|
73
|
+
"ui library",
|
|
74
|
+
"component library",
|
|
75
|
+
"nuxt framework",
|
|
76
|
+
"design system",
|
|
77
|
+
"tailwind",
|
|
78
|
+
"tailwindcss",
|
|
79
|
+
"unstyled",
|
|
80
|
+
"styleless",
|
|
81
|
+
"headlessui",
|
|
82
|
+
"ui"
|
|
83
|
+
]
|
|
83
84
|
}
|
package/dist/runtime/plugin.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { createVueless, setTheme } from "vueless";
|
|
2
|
-
import createVueI18nAdapter from "vueless/adapter.locale/vue-i18n";
|
|
1
|
+
import { createVueless, createVueI18nAdapter, setTheme, ColorMode, vClickOutside, vTooltip, vuelessConfig } from "vueless";
|
|
3
2
|
import {
|
|
4
3
|
TEXT,
|
|
5
4
|
OUTLINE,
|
|
@@ -12,17 +11,15 @@ import {
|
|
|
12
11
|
LIGHT_MODE_CLASS,
|
|
13
12
|
DISABLED_OPACITY
|
|
14
13
|
} from "vueless/constants";
|
|
15
|
-
import { ColorMode } from "vueless/types";
|
|
16
|
-
import vClickOutside from "vueless/directives/clickOutside/vClickOutside";
|
|
17
|
-
import vTooltip from "vueless/directives/tooltip/vTooltip";
|
|
18
|
-
import { vuelessConfig } from "vueless/utils/ui";
|
|
19
14
|
import { useRuntimeConfig } from "#imports";
|
|
20
15
|
import { defineNuxtPlugin } from "#app";
|
|
21
16
|
function parseCookies(cookieHeader) {
|
|
22
17
|
if (!cookieHeader) return {};
|
|
23
18
|
return cookieHeader.split(";").reduce((acc, cookie) => {
|
|
24
19
|
const [key, value] = cookie.trim().split("=");
|
|
25
|
-
if (key)
|
|
20
|
+
if (key) {
|
|
21
|
+
acc[key] = value || "";
|
|
22
|
+
}
|
|
26
23
|
return acc;
|
|
27
24
|
}, {});
|
|
28
25
|
}
|
|
@@ -43,25 +40,37 @@ export default defineNuxtPlugin((_nuxtApp) => {
|
|
|
43
40
|
const cookies = parseCookies(event?.node.req.headers.cookie);
|
|
44
41
|
const primary = cookies?.[`vl-${PRIMARY_COLOR}`];
|
|
45
42
|
const neutral = cookies?.[`vl-${NEUTRAL_COLOR}`];
|
|
43
|
+
const textXs = Number(cookies?.[`vl-${TEXT}-xs`]);
|
|
44
|
+
const textSm = Number(cookies?.[`vl-${TEXT}-sm`]);
|
|
45
|
+
const textMd = Number(cookies?.[`vl-${TEXT}-md`]);
|
|
46
|
+
const textLg = Number(cookies?.[`vl-${TEXT}-lg`]);
|
|
46
47
|
const text = {
|
|
47
|
-
xs:
|
|
48
|
-
sm:
|
|
49
|
-
md:
|
|
50
|
-
lg:
|
|
48
|
+
xs: !Number.isNaN(textXs) ? textXs : void 0,
|
|
49
|
+
sm: !Number.isNaN(textSm) ? textSm : void 0,
|
|
50
|
+
md: !Number.isNaN(textMd) ? textMd : void 0,
|
|
51
|
+
lg: !Number.isNaN(textLg) ? textLg : void 0
|
|
51
52
|
};
|
|
53
|
+
const outlineSm = Number(cookies?.[`vl-${OUTLINE}-sm`]);
|
|
54
|
+
const outlineMd = Number(cookies?.[`vl-${OUTLINE}-md`]);
|
|
55
|
+
const outlineLg = Number(cookies?.[`vl-${OUTLINE}-lg`]);
|
|
52
56
|
const outline = {
|
|
53
|
-
sm:
|
|
54
|
-
md:
|
|
55
|
-
lg:
|
|
57
|
+
sm: !Number.isNaN(outlineSm) ? outlineSm : void 0,
|
|
58
|
+
md: !Number.isNaN(outlineMd) ? outlineMd : void 0,
|
|
59
|
+
lg: !Number.isNaN(outlineLg) ? outlineLg : void 0
|
|
56
60
|
};
|
|
61
|
+
const roundingSm = Number(cookies?.[`vl-${ROUNDING}-sm`]);
|
|
62
|
+
const roundingMd = Number(cookies?.[`vl-${ROUNDING}-md`]);
|
|
63
|
+
const roundingLg = Number(cookies?.[`vl-${ROUNDING}-lg`]);
|
|
57
64
|
const rounding = {
|
|
58
|
-
sm:
|
|
59
|
-
md:
|
|
60
|
-
lg:
|
|
65
|
+
sm: !Number.isNaN(roundingSm) ? roundingSm : void 0,
|
|
66
|
+
md: !Number.isNaN(roundingMd) ? roundingMd : void 0,
|
|
67
|
+
lg: !Number.isNaN(roundingLg) ? roundingLg : void 0
|
|
61
68
|
};
|
|
62
|
-
const
|
|
69
|
+
const disabledOpacityValue = Number(cookies?.[`vl-${DISABLED_OPACITY}`]);
|
|
70
|
+
const disabledOpacity = !Number.isNaN(disabledOpacityValue) ? disabledOpacityValue : void 0;
|
|
63
71
|
const colorMode = cookies?.[COLOR_MODE_KEY] || vuelessConfig.colorMode || ColorMode.Light;
|
|
64
|
-
const
|
|
72
|
+
const autoModeValue = Number(cookies?.[AUTO_MODE_KEY]);
|
|
73
|
+
const isCachedAutoMode = Boolean(!Number.isNaN(autoModeValue) ? autoModeValue : void 0);
|
|
65
74
|
const themeRootVariables = setTheme({ primary, neutral, text, outline, rounding, disabledOpacity, colorMode }, isCachedAutoMode);
|
|
66
75
|
const colorModeClass = colorMode === ColorMode.Dark ? DARK_MODE_CLASS : LIGHT_MODE_CLASS;
|
|
67
76
|
_nuxtApp.ssrContext?.head.push({
|
package/package.json
CHANGED
|
@@ -1,26 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vueless/nuxt",
|
|
3
|
-
"version": "1.0.1-beta.
|
|
4
|
-
"license": "MIT",
|
|
3
|
+
"version": "1.0.1-beta.8",
|
|
5
4
|
"description": "Nuxt Styleless UI Component Library, powered by Tailwind CSS.",
|
|
6
|
-
"
|
|
7
|
-
"vueless",
|
|
8
|
-
"nuxt",
|
|
9
|
-
"nuxt.js",
|
|
10
|
-
"nuxt3",
|
|
11
|
-
"ui library",
|
|
12
|
-
"component library",
|
|
13
|
-
"nuxt framework",
|
|
14
|
-
"design system",
|
|
15
|
-
"tailwind",
|
|
16
|
-
"tailwindcss",
|
|
17
|
-
"unstyled",
|
|
18
|
-
"styleless",
|
|
19
|
-
"headlessui",
|
|
20
|
-
"ui"
|
|
21
|
-
],
|
|
5
|
+
"author": "Johnny Grid <hello@vueless.com> (https://vueless.com)",
|
|
22
6
|
"homepage": "https://vueless.com",
|
|
23
|
-
"
|
|
7
|
+
"license": "MIT",
|
|
24
8
|
"type": "module",
|
|
25
9
|
"publishConfig": {
|
|
26
10
|
"access": "public"
|
|
@@ -43,7 +27,7 @@
|
|
|
43
27
|
"dev:preview": "nuxi preview playground",
|
|
44
28
|
"prepack": "nuxi prepare && nuxt-module-build build && cp package.json LICENSE README.md dist/",
|
|
45
29
|
"release:beta": "release-it --ci --npm.publish --preRelease=beta --increment=prerelease",
|
|
46
|
-
"release:patch": "release-it patch --ci --npm.publish",
|
|
30
|
+
"release:patch": "release-it patch --ci --npm.publish --git.tag --github.release",
|
|
47
31
|
"release:minor": "release-it minor --ci --npm.publish --git.tag --github.release",
|
|
48
32
|
"release:major": "release-it major --ci --npm.publish --git.tag --github.release",
|
|
49
33
|
"lint": "eslint . --no-fix",
|
|
@@ -54,24 +38,24 @@
|
|
|
54
38
|
"test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit"
|
|
55
39
|
},
|
|
56
40
|
"dependencies": {
|
|
57
|
-
"
|
|
58
|
-
"vueless": "^1.0.2-beta.9"
|
|
41
|
+
"vueless": "^1.1.1-beta.45"
|
|
59
42
|
},
|
|
60
43
|
"devDependencies": {
|
|
61
|
-
"@material-symbols/svg-500": "^0.
|
|
62
|
-
"@nuxt/devtools": "^2.
|
|
63
|
-
"@nuxt/eslint-config": "^1.
|
|
64
|
-
"@nuxt/
|
|
65
|
-
"@nuxt/
|
|
66
|
-
"@nuxt/
|
|
44
|
+
"@material-symbols/svg-500": "^0.34.1",
|
|
45
|
+
"@nuxt/devtools": "^2.6.2",
|
|
46
|
+
"@nuxt/eslint-config": "^1.8.0",
|
|
47
|
+
"@nuxt/kit": "^4.0.3",
|
|
48
|
+
"@nuxt/module-builder": "^1.0.2",
|
|
49
|
+
"@nuxt/schema": "^4.0.3",
|
|
50
|
+
"@nuxt/test-utils": "^3.19.2",
|
|
67
51
|
"@types/node": "latest",
|
|
68
|
-
"changelogen": "^0.
|
|
69
|
-
"eslint": "^9.
|
|
70
|
-
"nuxt": "^
|
|
71
|
-
"release-it": "^19.0.
|
|
52
|
+
"changelogen": "^0.6.2",
|
|
53
|
+
"eslint": "^9.33.0",
|
|
54
|
+
"nuxt": "^4.0.3",
|
|
55
|
+
"release-it": "^19.0.4",
|
|
72
56
|
"typescript": "latest",
|
|
73
|
-
"vitest": "^3.
|
|
74
|
-
"vue-tsc": "^
|
|
57
|
+
"vitest": "^3.2.4",
|
|
58
|
+
"vue-tsc": "^3.0.5"
|
|
75
59
|
},
|
|
76
60
|
"repository": {
|
|
77
61
|
"type": "git",
|
|
@@ -79,5 +63,22 @@
|
|
|
79
63
|
},
|
|
80
64
|
"bugs": {
|
|
81
65
|
"url": "https://github.com/vuelessjs/vueless-module-nuxt/issues"
|
|
82
|
-
}
|
|
66
|
+
},
|
|
67
|
+
"keywords": [
|
|
68
|
+
"vueless",
|
|
69
|
+
"nuxt",
|
|
70
|
+
"nuxt.js",
|
|
71
|
+
"nuxt3",
|
|
72
|
+
"nuxt4",
|
|
73
|
+
"ui library",
|
|
74
|
+
"component library",
|
|
75
|
+
"nuxt framework",
|
|
76
|
+
"design system",
|
|
77
|
+
"tailwind",
|
|
78
|
+
"tailwindcss",
|
|
79
|
+
"unstyled",
|
|
80
|
+
"styleless",
|
|
81
|
+
"headlessui",
|
|
82
|
+
"ui"
|
|
83
|
+
]
|
|
83
84
|
}
|