@vueless/nuxt 0.0.9-beta.27 → 0.0.9-beta.29
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 +1 -1
- package/dist/module.mjs +11 -1
- package/dist/package.json +3 -3
- package/dist/runtime/plugin.js +8 -1
- package/package.json +3 -3
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
2
|
import { cwd } from 'node:process';
|
|
3
3
|
import fs from 'node:fs';
|
|
4
|
-
import { defineNuxtModule, createResolver, addPlugin, addComponent, addImportsDir } from '@nuxt/kit';
|
|
4
|
+
import { defineNuxtModule, createResolver, hasNuxtModule, addPlugin, addComponent, addImportsDir } from '@nuxt/kit';
|
|
5
5
|
import { TailwindCSS, Vueless } from 'vueless/plugin-vite.js';
|
|
6
6
|
import { cacheMergedConfigs, getNuxtDirs } from 'vueless/utils/node/helper.js';
|
|
7
7
|
import { createTailwindSafelist } from 'vueless/utils/node/tailwindSafelist.js';
|
|
@@ -26,6 +26,16 @@ const module = defineNuxtModule({
|
|
|
26
26
|
const { vuelessConfig, dependencies } = await getVuelessConfig();
|
|
27
27
|
_nuxt.options.runtimeConfig.public.vueless = vuelessConfig;
|
|
28
28
|
_nuxt.options.build.transpile.push("vueless");
|
|
29
|
+
if (hasNuxtModule("@nuxtjs/i18n")) {
|
|
30
|
+
_nuxt.hook("i18n:registerModule", (register) => {
|
|
31
|
+
register({
|
|
32
|
+
langDir: resolve("../node_modules/vueless/locales"),
|
|
33
|
+
locales: [
|
|
34
|
+
{ code: "en", name: "English", file: "en.json" }
|
|
35
|
+
]
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
}
|
|
29
39
|
_nuxt.hook("vite:extendConfig", async (config) => {
|
|
30
40
|
config.plugins = config.plugins || [];
|
|
31
41
|
config.plugins.push(
|
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.29",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Nuxt Styleless UI Component Library, powered by Tailwind CSS.",
|
|
6
6
|
"keywords": [
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"dist"
|
|
38
38
|
],
|
|
39
39
|
"scripts": {
|
|
40
|
-
"dev": "nuxi dev playground",
|
|
40
|
+
"dev": "npm run dev:prepare && nuxi dev playground",
|
|
41
41
|
"dev:build": "nuxi build playground",
|
|
42
42
|
"dev:preview": "nuxi preview playground",
|
|
43
43
|
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"@nuxt/kit": "^3.17.4",
|
|
58
|
-
"vueless": "^0.0.825-beta.
|
|
58
|
+
"vueless": "^0.0.825-beta.178"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@material-symbols/svg-500": "^0.31.4",
|
package/dist/runtime/plugin.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createVueless, setTheme } from "vueless";
|
|
2
|
+
import createVueI18nAdapter from "vueless/adapter.locale/vue-i18n";
|
|
2
3
|
import {
|
|
3
4
|
TEXT,
|
|
4
5
|
OUTLINE,
|
|
@@ -26,7 +27,13 @@ function parseCookies(cookieHeader) {
|
|
|
26
27
|
}
|
|
27
28
|
export default defineNuxtPlugin((_nuxtApp) => {
|
|
28
29
|
const config = useRuntimeConfig().public.vueless;
|
|
29
|
-
const
|
|
30
|
+
const vuelessOptions = { config };
|
|
31
|
+
if ("$i18n" in _nuxtApp) {
|
|
32
|
+
vuelessOptions.i18n = {
|
|
33
|
+
adapter: createVueI18nAdapter({ global: _nuxtApp.$i18n })
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
const vueless = createVueless(vuelessOptions);
|
|
30
37
|
_nuxtApp.vueApp.use(vueless, []);
|
|
31
38
|
_nuxtApp.vueApp.directive("clickOutside", vClickOutside);
|
|
32
39
|
_nuxtApp.vueApp.directive("tooltip", vTooltip);
|
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.29",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Nuxt Styleless UI Component Library, powered by Tailwind CSS.",
|
|
6
6
|
"keywords": [
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"dist"
|
|
38
38
|
],
|
|
39
39
|
"scripts": {
|
|
40
|
-
"dev": "nuxi dev playground",
|
|
40
|
+
"dev": "npm run dev:prepare && nuxi dev playground",
|
|
41
41
|
"dev:build": "nuxi build playground",
|
|
42
42
|
"dev:preview": "nuxi preview playground",
|
|
43
43
|
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"@nuxt/kit": "^3.17.4",
|
|
58
|
-
"vueless": "^0.0.825-beta.
|
|
58
|
+
"vueless": "^0.0.825-beta.178"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@material-symbols/svg-500": "^0.31.4",
|