@nuxt/ui 3.0.0-alpha.12 → 3.0.0-alpha.13
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/.nuxt/ui/accordion.ts +2 -2
- package/.nuxt/ui/alert.ts +46 -36
- package/.nuxt/ui/avatar-group.ts +1 -1
- package/.nuxt/ui/avatar.ts +3 -3
- package/.nuxt/ui/badge.ts +37 -28
- package/.nuxt/ui/breadcrumb.ts +5 -5
- package/.nuxt/ui/button.ts +42 -42
- package/.nuxt/ui/calendar.ts +15 -15
- package/.nuxt/ui/card.ts +27 -1
- package/.nuxt/ui/carousel.ts +2 -2
- package/.nuxt/ui/checkbox.ts +18 -18
- package/.nuxt/ui/chip.ts +8 -8
- package/.nuxt/ui/color-picker.ts +2 -2
- package/.nuxt/ui/command-palette.ts +12 -12
- package/.nuxt/ui/container.ts +1 -1
- package/.nuxt/ui/context-menu.ts +32 -32
- package/.nuxt/ui/drawer.ts +72 -11
- package/.nuxt/ui/dropdown-menu.ts +33 -33
- package/.nuxt/ui/form-field.ts +6 -6
- package/.nuxt/ui/input-menu.ts +41 -41
- package/.nuxt/ui/input-number.ts +20 -20
- package/.nuxt/ui/input.ts +23 -23
- package/.nuxt/ui/kbd.ts +4 -4
- package/.nuxt/ui/link.ts +3 -3
- package/.nuxt/ui/modal.ts +5 -5
- package/.nuxt/ui/navigation-menu.ts +77 -78
- package/.nuxt/ui/pin-input.ts +20 -20
- package/.nuxt/ui/popover.ts +2 -2
- package/.nuxt/ui/progress.ts +17 -17
- package/.nuxt/ui/radio-group.ts +20 -20
- package/.nuxt/ui/select-menu.ts +33 -32
- package/.nuxt/ui/select.ts +31 -31
- package/.nuxt/ui/separator.ts +8 -8
- package/.nuxt/ui/skeleton.ts +1 -1
- package/.nuxt/ui/slideover.ts +4 -4
- package/.nuxt/ui/slider.ts +16 -16
- package/.nuxt/ui/stepper.ts +18 -18
- package/.nuxt/ui/switch.ts +20 -20
- package/.nuxt/ui/table.ts +16 -16
- package/.nuxt/ui/tabs.ts +33 -33
- package/.nuxt/ui/textarea.ts +23 -23
- package/.nuxt/ui/toast.ts +42 -32
- package/.nuxt/ui/toaster.ts +4 -4
- package/.nuxt/ui/tooltip.ts +2 -2
- package/.nuxt/ui.css +90 -0
- package/README.md +2 -2
- package/cli/package.json +1 -1
- package/cli/templates.mjs +1 -1
- package/dist/client/devtools/200.html +1 -1
- package/dist/client/devtools/404.html +1 -1
- package/dist/client/devtools/_nuxt/CG6Dc4jp.js +1 -0
- package/dist/client/devtools/_nuxt/{DYuJNiSW.js → DrNJgD08.js} +1 -1
- package/dist/client/devtools/_nuxt/{DLmPhbaq.js → ElqrUh1r.js} +1 -1
- package/dist/client/devtools/_nuxt/builds/latest.json +1 -1
- package/dist/client/devtools/_nuxt/builds/meta/255c8d0b-7281-4d74-b4b6-ec96e6721aa0.json +1 -0
- package/dist/client/devtools/_nuxt/entry.Hn8drx4g.css +1 -0
- package/dist/client/devtools/_nuxt/error-404.Dew7w9Ee.css +1 -0
- package/dist/client/devtools/_nuxt/error-500.Dep59i31.css +1 -0
- package/dist/client/devtools/_nuxt/mC2e7kOs.js +57 -0
- package/dist/client/devtools/index.html +1 -1
- package/dist/devtools/runtime/examples/CardExample.vue +3 -3
- package/dist/devtools/runtime/examples/CollapsibleExample.vue +1 -1
- package/dist/devtools/runtime/examples/ContainerExample.vue +1 -1
- package/dist/devtools/runtime/examples/ContextMenuExample.vue +1 -1
- package/dist/devtools/runtime/examples/PopoverExample.vue +1 -1
- package/dist/devtools/runtime/examples/TooltipExample.vue +1 -1
- package/dist/module.cjs +2 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +2 -1
- package/dist/runtime/components/Alert.vue +13 -10
- package/dist/runtime/components/App.vue +3 -3
- package/dist/runtime/components/Avatar.vue +1 -1
- package/dist/runtime/components/Badge.vue +5 -1
- package/dist/runtime/components/Calendar.vue +2 -1
- package/dist/runtime/components/Card.vue +6 -2
- package/dist/runtime/components/CommandPalette.vue +46 -39
- package/dist/runtime/components/ContextMenu.vue +8 -0
- package/dist/runtime/components/ContextMenuContent.vue +4 -2
- package/dist/runtime/components/Drawer.vue +7 -1
- package/dist/runtime/components/DropdownMenu.vue +8 -0
- package/dist/runtime/components/DropdownMenuContent.vue +4 -2
- package/dist/runtime/components/InputNumber.vue +3 -2
- package/dist/runtime/components/Modal.vue +15 -1
- package/dist/runtime/components/NavigationMenu.vue +31 -11
- package/dist/runtime/components/SelectMenu.vue +62 -60
- package/dist/runtime/components/Slideover.vue +15 -1
- package/dist/runtime/components/Stepper.vue +1 -1
- package/dist/runtime/components/Table.vue +94 -16
- package/dist/runtime/components/Textarea.vue +2 -1
- package/dist/runtime/components/Toast.vue +26 -14
- package/dist/runtime/components/Toaster.vue +2 -2
- package/dist/runtime/composables/useToast.d.ts +5 -4
- package/dist/runtime/composables/useToast.js +2 -2
- package/dist/runtime/index.css +1 -1
- package/dist/runtime/locale/az.d.ts +2 -0
- package/dist/runtime/locale/az.js +54 -0
- package/dist/runtime/locale/bn.d.ts +2 -0
- package/dist/runtime/locale/bn.js +54 -0
- package/dist/runtime/locale/index.d.ts +3 -0
- package/dist/runtime/locale/index.js +3 -0
- package/dist/runtime/plugins/colors.js +1 -1
- package/dist/runtime/types/index.d.ts +1 -0
- package/dist/runtime/types/index.js +1 -0
- package/dist/runtime/types/utils.d.ts +5 -0
- package/dist/runtime/vue/components/Link.vue +75 -16
- package/dist/shared/{ui.ClMXjgLK.cjs → ui.C5FzRWM5.cjs} +471 -364
- package/dist/shared/{ui.CENZ17mM.mjs → ui.DCZM2pl8.mjs} +467 -364
- package/dist/unplugin.cjs +44 -20
- package/dist/unplugin.d.cts +10 -0
- package/dist/unplugin.d.mts +10 -0
- package/dist/unplugin.d.ts +10 -0
- package/dist/unplugin.mjs +43 -19
- package/dist/vite.cjs +3 -2
- package/dist/vite.d.cts +2 -0
- package/dist/vite.d.mts +2 -0
- package/dist/vite.d.ts +2 -0
- package/dist/vite.mjs +3 -2
- package/package.json +60 -33
- package/dist/client/devtools/_nuxt/CgoQwOTV.js +0 -57
- package/dist/client/devtools/_nuxt/builds/meta/3184ffe2-7577-4441-af98-fe6e81c30e3a.json +0 -1
- package/dist/client/devtools/_nuxt/entry.ChJczkiN.css +0 -1
- package/dist/client/devtools/_nuxt/error-404.DyY3rYaL.css +0 -1
- package/dist/client/devtools/_nuxt/error-500.D_1PCaJh.css +0 -1
package/dist/unplugin.cjs
CHANGED
|
@@ -3,26 +3,27 @@
|
|
|
3
3
|
const node_url = require('node:url');
|
|
4
4
|
const pathe = require('pathe');
|
|
5
5
|
const unplugin = require('unplugin');
|
|
6
|
-
const AutoImport = require('unplugin-auto-import');
|
|
7
6
|
const defu = require('defu');
|
|
8
7
|
const tailwind = require('@tailwindcss/vite');
|
|
9
|
-
const templates = require('./shared/ui.
|
|
8
|
+
const templates = require('./shared/ui.C5FzRWM5.cjs');
|
|
10
9
|
const tinyglobby = require('tinyglobby');
|
|
11
10
|
const knitwork = require('knitwork');
|
|
12
11
|
const MagicString = require('magic-string');
|
|
13
12
|
const mlly = require('mlly');
|
|
14
13
|
const AutoImportComponents = require('unplugin-vue-components');
|
|
14
|
+
const AutoImport = require('unplugin-auto-import');
|
|
15
15
|
require('../dist/runtime/utils/index.js');
|
|
16
16
|
require('scule');
|
|
17
17
|
require('@nuxt/kit');
|
|
18
|
+
require('tailwindcss/colors');
|
|
18
19
|
|
|
19
20
|
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
20
21
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
|
|
21
22
|
|
|
22
|
-
const AutoImport__default = /*#__PURE__*/_interopDefaultCompat(AutoImport);
|
|
23
23
|
const tailwind__default = /*#__PURE__*/_interopDefaultCompat(tailwind);
|
|
24
24
|
const MagicString__default = /*#__PURE__*/_interopDefaultCompat(MagicString);
|
|
25
25
|
const AutoImportComponents__default = /*#__PURE__*/_interopDefaultCompat(AutoImportComponents);
|
|
26
|
+
const AutoImport__default = /*#__PURE__*/_interopDefaultCompat(AutoImport);
|
|
26
27
|
|
|
27
28
|
function TemplatePlugin(options, appConfig) {
|
|
28
29
|
const templates$1 = templates.getTemplates(options, appConfig.ui);
|
|
@@ -101,11 +102,23 @@ function AppConfigPlugin(options, appConfig) {
|
|
|
101
102
|
};
|
|
102
103
|
}
|
|
103
104
|
|
|
104
|
-
function ComponentImportPlugin(
|
|
105
|
+
function ComponentImportPlugin(options, meta) {
|
|
105
106
|
const components = tinyglobby.globSync("**/*.vue", { cwd: pathe.join(runtimeDir, "components") });
|
|
106
107
|
const componentNames = new Set(components.map((c) => `${options.prefix}${c.replace(/\.vue$/, "")}`));
|
|
107
108
|
const overrides = tinyglobby.globSync("**/*.vue", { cwd: pathe.join(runtimeDir, "vue/components") });
|
|
108
109
|
const overrideNames = new Set(overrides.map((c) => `${options.prefix}${c.replace(/\.vue$/, "")}`));
|
|
110
|
+
const pluginOptions = defu.defu(options.components, {
|
|
111
|
+
dts: options.dts ?? true,
|
|
112
|
+
exclude: [/[\\/]node_modules[\\/](?!\.pnpm|@nuxt\/ui)/, /[\\/]\.git[\\/]/, /[\\/]\.nuxt[\\/]/],
|
|
113
|
+
resolvers: [
|
|
114
|
+
(componentName) => {
|
|
115
|
+
if (overrideNames.has(componentName))
|
|
116
|
+
return { name: "default", from: pathe.join(runtimeDir, "vue/components", `${componentName.slice(options.prefix.length)}.vue`) };
|
|
117
|
+
if (componentNames.has(componentName))
|
|
118
|
+
return { name: "default", from: pathe.join(runtimeDir, "components", `${componentName.slice(options.prefix.length)}.vue`) };
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
});
|
|
109
122
|
return [
|
|
110
123
|
/**
|
|
111
124
|
* This plugin aims to ensure we override certain components with Vue-compatible versions:
|
|
@@ -127,18 +140,7 @@ function ComponentImportPlugin(framework, options) {
|
|
|
127
140
|
}
|
|
128
141
|
}
|
|
129
142
|
},
|
|
130
|
-
AutoImportComponents__default
|
|
131
|
-
dts: options.dts ?? true,
|
|
132
|
-
exclude: [/[\\/]node_modules[\\/](?!\.pnpm|@nuxt\/ui)/, /[\\/]\.git[\\/]/, /[\\/]\.nuxt[\\/]/],
|
|
133
|
-
resolvers: [
|
|
134
|
-
(componentName) => {
|
|
135
|
-
if (overrideNames.has(componentName))
|
|
136
|
-
return { name: "default", from: pathe.join(runtimeDir, "vue/components", `${componentName.slice(options.prefix.length)}.vue`) };
|
|
137
|
-
if (componentNames.has(componentName))
|
|
138
|
-
return { name: "default", from: pathe.join(runtimeDir, "components", `${componentName.slice(options.prefix.length)}.vue`) };
|
|
139
|
-
}
|
|
140
|
-
]
|
|
141
|
-
})
|
|
143
|
+
AutoImportComponents__default.raw(pluginOptions, meta)
|
|
142
144
|
];
|
|
143
145
|
}
|
|
144
146
|
const RELATIVE_IMPORT_RE = /^\.{1,2}\//;
|
|
@@ -171,6 +173,14 @@ function NuxtEnvironmentPlugin() {
|
|
|
171
173
|
};
|
|
172
174
|
}
|
|
173
175
|
|
|
176
|
+
function AutoImportPlugin(options, meta) {
|
|
177
|
+
const pluginOptions = defu.defu(options.autoImport, {
|
|
178
|
+
dts: options.dts ?? true,
|
|
179
|
+
dirs: [pathe.join(runtimeDir, "composables")]
|
|
180
|
+
});
|
|
181
|
+
return AutoImport__default.raw(pluginOptions, meta);
|
|
182
|
+
}
|
|
183
|
+
|
|
174
184
|
const runtimeDir = pathe.normalize(node_url.fileURLToPath(new URL("./runtime", (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('unplugin.cjs', document.baseURI).href)))));
|
|
175
185
|
const NuxtUIPlugin = unplugin.createUnplugin((_options = {}, meta) => {
|
|
176
186
|
const options = defu.defu(_options, { fonts: false, devtools: { enabled: false } }, templates.defaultOptions);
|
|
@@ -179,13 +189,27 @@ const NuxtUIPlugin = unplugin.createUnplugin((_options = {}, meta) => {
|
|
|
179
189
|
const appConfig = defu.defu({ ui: options.ui }, { ui: templates.getDefaultUiConfig(options.theme.colors) });
|
|
180
190
|
return [
|
|
181
191
|
NuxtEnvironmentPlugin(),
|
|
182
|
-
|
|
183
|
-
|
|
192
|
+
ComponentImportPlugin(options, meta),
|
|
193
|
+
AutoImportPlugin(options, meta),
|
|
184
194
|
tailwind__default(),
|
|
185
195
|
PluginsPlugin(options),
|
|
186
196
|
TemplatePlugin(options, appConfig),
|
|
187
|
-
AppConfigPlugin(options, appConfig)
|
|
188
|
-
|
|
197
|
+
AppConfigPlugin(options, appConfig),
|
|
198
|
+
{
|
|
199
|
+
name: "nuxt:ui:plugins-duplication-detection",
|
|
200
|
+
vite: {
|
|
201
|
+
configResolved(config) {
|
|
202
|
+
const plugins = config.plugins || [];
|
|
203
|
+
if (plugins.filter((i) => i.name === "unplugin-auto-import").length > 1) {
|
|
204
|
+
throw new Error("[Nuxt UI] Multiple instances of `unplugin-auto-import` detected. Nuxt UI includes `unplugin-auto-import` already, and you can configure it using `autoImport` option in Nuxt UI module options.");
|
|
205
|
+
}
|
|
206
|
+
if (plugins.filter((i) => i.name === "unplugin-vue-components").length > 1) {
|
|
207
|
+
throw new Error("[Nuxt UI] Multiple instances of `unplugin-vue-components` detected. Nuxt UI includes `unplugin-vue-components` already, and you can configure it using `components` option in Nuxt UI module options.");
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
].flat(1);
|
|
189
213
|
});
|
|
190
214
|
|
|
191
215
|
exports.NuxtUIPlugin = NuxtUIPlugin;
|
package/dist/unplugin.d.cts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import * as unplugin from 'unplugin';
|
|
2
|
+
import { Options } from 'unplugin-auto-import/types';
|
|
3
|
+
import { Options as Options$1 } from 'unplugin-vue-components/types';
|
|
2
4
|
import colors from 'tailwindcss/colors';
|
|
3
5
|
import * as ui from '#build/ui';
|
|
4
6
|
import { ModuleOptions } from './module.cjs';
|
|
@@ -42,6 +44,14 @@ interface NuxtUIOptions extends Omit<ModuleOptions, 'fonts' | 'colorMode'> {
|
|
|
42
44
|
* @defaultValue `true`
|
|
43
45
|
*/
|
|
44
46
|
colorMode?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Override options for `unplugin-auto-import`
|
|
49
|
+
*/
|
|
50
|
+
autoImport?: Partial<Options>;
|
|
51
|
+
/**
|
|
52
|
+
* Override options for `unplugin-vue-components`
|
|
53
|
+
*/
|
|
54
|
+
components?: Partial<Options$1>;
|
|
45
55
|
}
|
|
46
56
|
declare const runtimeDir: string;
|
|
47
57
|
declare const NuxtUIPlugin: unplugin.UnpluginInstance<NuxtUIOptions | undefined, boolean>;
|
package/dist/unplugin.d.mts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import * as unplugin from 'unplugin';
|
|
2
|
+
import { Options } from 'unplugin-auto-import/types';
|
|
3
|
+
import { Options as Options$1 } from 'unplugin-vue-components/types';
|
|
2
4
|
import colors from 'tailwindcss/colors';
|
|
3
5
|
import * as ui from '#build/ui';
|
|
4
6
|
import { ModuleOptions } from './module.mjs';
|
|
@@ -42,6 +44,14 @@ interface NuxtUIOptions extends Omit<ModuleOptions, 'fonts' | 'colorMode'> {
|
|
|
42
44
|
* @defaultValue `true`
|
|
43
45
|
*/
|
|
44
46
|
colorMode?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Override options for `unplugin-auto-import`
|
|
49
|
+
*/
|
|
50
|
+
autoImport?: Partial<Options>;
|
|
51
|
+
/**
|
|
52
|
+
* Override options for `unplugin-vue-components`
|
|
53
|
+
*/
|
|
54
|
+
components?: Partial<Options$1>;
|
|
45
55
|
}
|
|
46
56
|
declare const runtimeDir: string;
|
|
47
57
|
declare const NuxtUIPlugin: unplugin.UnpluginInstance<NuxtUIOptions | undefined, boolean>;
|
package/dist/unplugin.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import * as unplugin from 'unplugin';
|
|
2
|
+
import { Options } from 'unplugin-auto-import/types';
|
|
3
|
+
import { Options as Options$1 } from 'unplugin-vue-components/types';
|
|
2
4
|
import colors from 'tailwindcss/colors';
|
|
3
5
|
import * as ui from '#build/ui';
|
|
4
6
|
import { ModuleOptions } from './module.js';
|
|
@@ -42,6 +44,14 @@ interface NuxtUIOptions extends Omit<ModuleOptions, 'fonts' | 'colorMode'> {
|
|
|
42
44
|
* @defaultValue `true`
|
|
43
45
|
*/
|
|
44
46
|
colorMode?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Override options for `unplugin-auto-import`
|
|
49
|
+
*/
|
|
50
|
+
autoImport?: Partial<Options>;
|
|
51
|
+
/**
|
|
52
|
+
* Override options for `unplugin-vue-components`
|
|
53
|
+
*/
|
|
54
|
+
components?: Partial<Options$1>;
|
|
45
55
|
}
|
|
46
56
|
declare const runtimeDir: string;
|
|
47
57
|
declare const NuxtUIPlugin: unplugin.UnpluginInstance<NuxtUIOptions | undefined, boolean>;
|
package/dist/unplugin.mjs
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { fileURLToPath } from 'node:url';
|
|
2
2
|
import { join, normalize } from 'pathe';
|
|
3
3
|
import { createUnplugin } from 'unplugin';
|
|
4
|
-
import AutoImport from 'unplugin-auto-import';
|
|
5
4
|
import { defu } from 'defu';
|
|
6
5
|
import tailwind from '@tailwindcss/vite';
|
|
7
|
-
import { g as getTemplates, d as defaultOptions, r as resolveColors, a as getDefaultUiConfig } from './shared/ui.
|
|
6
|
+
import { g as getTemplates, d as defaultOptions, r as resolveColors, a as getDefaultUiConfig } from './shared/ui.DCZM2pl8.mjs';
|
|
8
7
|
import { globSync } from 'tinyglobby';
|
|
9
8
|
import { genSafeVariableName } from 'knitwork';
|
|
10
9
|
import MagicString from 'magic-string';
|
|
11
10
|
import { resolvePathSync } from 'mlly';
|
|
12
11
|
import AutoImportComponents from 'unplugin-vue-components';
|
|
12
|
+
import AutoImport from 'unplugin-auto-import';
|
|
13
13
|
import '../dist/runtime/utils/index.js';
|
|
14
14
|
import 'scule';
|
|
15
15
|
import '@nuxt/kit';
|
|
16
|
+
import 'tailwindcss/colors';
|
|
16
17
|
|
|
17
18
|
function TemplatePlugin(options, appConfig) {
|
|
18
19
|
const templates = getTemplates(options, appConfig.ui);
|
|
@@ -91,11 +92,23 @@ function AppConfigPlugin(options, appConfig) {
|
|
|
91
92
|
};
|
|
92
93
|
}
|
|
93
94
|
|
|
94
|
-
function ComponentImportPlugin(
|
|
95
|
+
function ComponentImportPlugin(options, meta) {
|
|
95
96
|
const components = globSync("**/*.vue", { cwd: join(runtimeDir, "components") });
|
|
96
97
|
const componentNames = new Set(components.map((c) => `${options.prefix}${c.replace(/\.vue$/, "")}`));
|
|
97
98
|
const overrides = globSync("**/*.vue", { cwd: join(runtimeDir, "vue/components") });
|
|
98
99
|
const overrideNames = new Set(overrides.map((c) => `${options.prefix}${c.replace(/\.vue$/, "")}`));
|
|
100
|
+
const pluginOptions = defu(options.components, {
|
|
101
|
+
dts: options.dts ?? true,
|
|
102
|
+
exclude: [/[\\/]node_modules[\\/](?!\.pnpm|@nuxt\/ui)/, /[\\/]\.git[\\/]/, /[\\/]\.nuxt[\\/]/],
|
|
103
|
+
resolvers: [
|
|
104
|
+
(componentName) => {
|
|
105
|
+
if (overrideNames.has(componentName))
|
|
106
|
+
return { name: "default", from: join(runtimeDir, "vue/components", `${componentName.slice(options.prefix.length)}.vue`) };
|
|
107
|
+
if (componentNames.has(componentName))
|
|
108
|
+
return { name: "default", from: join(runtimeDir, "components", `${componentName.slice(options.prefix.length)}.vue`) };
|
|
109
|
+
}
|
|
110
|
+
]
|
|
111
|
+
});
|
|
99
112
|
return [
|
|
100
113
|
/**
|
|
101
114
|
* This plugin aims to ensure we override certain components with Vue-compatible versions:
|
|
@@ -117,18 +130,7 @@ function ComponentImportPlugin(framework, options) {
|
|
|
117
130
|
}
|
|
118
131
|
}
|
|
119
132
|
},
|
|
120
|
-
AutoImportComponents
|
|
121
|
-
dts: options.dts ?? true,
|
|
122
|
-
exclude: [/[\\/]node_modules[\\/](?!\.pnpm|@nuxt\/ui)/, /[\\/]\.git[\\/]/, /[\\/]\.nuxt[\\/]/],
|
|
123
|
-
resolvers: [
|
|
124
|
-
(componentName) => {
|
|
125
|
-
if (overrideNames.has(componentName))
|
|
126
|
-
return { name: "default", from: join(runtimeDir, "vue/components", `${componentName.slice(options.prefix.length)}.vue`) };
|
|
127
|
-
if (componentNames.has(componentName))
|
|
128
|
-
return { name: "default", from: join(runtimeDir, "components", `${componentName.slice(options.prefix.length)}.vue`) };
|
|
129
|
-
}
|
|
130
|
-
]
|
|
131
|
-
})
|
|
133
|
+
AutoImportComponents.raw(pluginOptions, meta)
|
|
132
134
|
];
|
|
133
135
|
}
|
|
134
136
|
const RELATIVE_IMPORT_RE = /^\.{1,2}\//;
|
|
@@ -161,6 +163,14 @@ function NuxtEnvironmentPlugin() {
|
|
|
161
163
|
};
|
|
162
164
|
}
|
|
163
165
|
|
|
166
|
+
function AutoImportPlugin(options, meta) {
|
|
167
|
+
const pluginOptions = defu(options.autoImport, {
|
|
168
|
+
dts: options.dts ?? true,
|
|
169
|
+
dirs: [join(runtimeDir, "composables")]
|
|
170
|
+
});
|
|
171
|
+
return AutoImport.raw(pluginOptions, meta);
|
|
172
|
+
}
|
|
173
|
+
|
|
164
174
|
const runtimeDir = normalize(fileURLToPath(new URL("./runtime", import.meta.url)));
|
|
165
175
|
const NuxtUIPlugin = createUnplugin((_options = {}, meta) => {
|
|
166
176
|
const options = defu(_options, { fonts: false, devtools: { enabled: false } }, defaultOptions);
|
|
@@ -169,13 +179,27 @@ const NuxtUIPlugin = createUnplugin((_options = {}, meta) => {
|
|
|
169
179
|
const appConfig = defu({ ui: options.ui }, { ui: getDefaultUiConfig(options.theme.colors) });
|
|
170
180
|
return [
|
|
171
181
|
NuxtEnvironmentPlugin(),
|
|
172
|
-
|
|
173
|
-
|
|
182
|
+
ComponentImportPlugin(options, meta),
|
|
183
|
+
AutoImportPlugin(options, meta),
|
|
174
184
|
tailwind(),
|
|
175
185
|
PluginsPlugin(options),
|
|
176
186
|
TemplatePlugin(options, appConfig),
|
|
177
|
-
AppConfigPlugin(options, appConfig)
|
|
178
|
-
|
|
187
|
+
AppConfigPlugin(options, appConfig),
|
|
188
|
+
{
|
|
189
|
+
name: "nuxt:ui:plugins-duplication-detection",
|
|
190
|
+
vite: {
|
|
191
|
+
configResolved(config) {
|
|
192
|
+
const plugins = config.plugins || [];
|
|
193
|
+
if (plugins.filter((i) => i.name === "unplugin-auto-import").length > 1) {
|
|
194
|
+
throw new Error("[Nuxt UI] Multiple instances of `unplugin-auto-import` detected. Nuxt UI includes `unplugin-auto-import` already, and you can configure it using `autoImport` option in Nuxt UI module options.");
|
|
195
|
+
}
|
|
196
|
+
if (plugins.filter((i) => i.name === "unplugin-vue-components").length > 1) {
|
|
197
|
+
throw new Error("[Nuxt UI] Multiple instances of `unplugin-vue-components` detected. Nuxt UI includes `unplugin-vue-components` already, and you can configure it using `components` option in Nuxt UI module options.");
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
].flat(1);
|
|
179
203
|
});
|
|
180
204
|
|
|
181
205
|
export { NuxtUIPlugin, runtimeDir };
|
package/dist/vite.cjs
CHANGED
|
@@ -4,18 +4,19 @@ const unplugin = require('./unplugin.cjs');
|
|
|
4
4
|
require('node:url');
|
|
5
5
|
require('pathe');
|
|
6
6
|
require('unplugin');
|
|
7
|
-
require('unplugin-auto-import');
|
|
8
7
|
require('defu');
|
|
9
8
|
require('@tailwindcss/vite');
|
|
10
|
-
require('./shared/ui.
|
|
9
|
+
require('./shared/ui.C5FzRWM5.cjs');
|
|
11
10
|
require('../dist/runtime/utils/index.js');
|
|
12
11
|
require('scule');
|
|
13
12
|
require('@nuxt/kit');
|
|
13
|
+
require('tailwindcss/colors');
|
|
14
14
|
require('tinyglobby');
|
|
15
15
|
require('knitwork');
|
|
16
16
|
require('magic-string');
|
|
17
17
|
require('mlly');
|
|
18
18
|
require('unplugin-vue-components');
|
|
19
|
+
require('unplugin-auto-import');
|
|
19
20
|
|
|
20
21
|
const vite = unplugin.NuxtUIPlugin.vite;
|
|
21
22
|
|
package/dist/vite.d.cts
CHANGED
package/dist/vite.d.mts
CHANGED
package/dist/vite.d.ts
CHANGED
package/dist/vite.mjs
CHANGED
|
@@ -2,18 +2,19 @@ import { NuxtUIPlugin } from './unplugin.mjs';
|
|
|
2
2
|
import 'node:url';
|
|
3
3
|
import 'pathe';
|
|
4
4
|
import 'unplugin';
|
|
5
|
-
import 'unplugin-auto-import';
|
|
6
5
|
import 'defu';
|
|
7
6
|
import '@tailwindcss/vite';
|
|
8
|
-
import './shared/ui.
|
|
7
|
+
import './shared/ui.DCZM2pl8.mjs';
|
|
9
8
|
import '../dist/runtime/utils/index.js';
|
|
10
9
|
import 'scule';
|
|
11
10
|
import '@nuxt/kit';
|
|
11
|
+
import 'tailwindcss/colors';
|
|
12
12
|
import 'tinyglobby';
|
|
13
13
|
import 'knitwork';
|
|
14
14
|
import 'magic-string';
|
|
15
15
|
import 'mlly';
|
|
16
16
|
import 'unplugin-vue-components';
|
|
17
|
+
import 'unplugin-auto-import';
|
|
17
18
|
|
|
18
19
|
const vite = NuxtUIPlugin.vite;
|
|
19
20
|
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/ui",
|
|
3
3
|
"description": "A UI Library for Modern Web Apps, powered by Vue & Tailwind CSS.",
|
|
4
|
-
"version": "3.0.0-alpha.
|
|
5
|
-
"packageManager": "pnpm@
|
|
4
|
+
"version": "3.0.0-alpha.13",
|
|
5
|
+
"packageManager": "pnpm@10.4.1",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git+https://github.com/nuxt/ui.git"
|
|
@@ -31,13 +31,18 @@
|
|
|
31
31
|
"types": "./vue-plugin.d.ts"
|
|
32
32
|
},
|
|
33
33
|
"./runtime/*": "./dist/runtime/*",
|
|
34
|
+
"./utils/*": {
|
|
35
|
+
"types": "./dist/runtime/utils/*.d.ts",
|
|
36
|
+
"import": "./dist/runtime/utils/*.js"
|
|
37
|
+
},
|
|
34
38
|
"./locale": {
|
|
35
39
|
"types": "./dist/runtime/locale/index.d.ts",
|
|
36
40
|
"import": "./dist/runtime/locale/index.js"
|
|
37
41
|
}
|
|
38
42
|
},
|
|
39
43
|
"imports": {
|
|
40
|
-
"#build/ui/*": "./.nuxt/ui/*.ts"
|
|
44
|
+
"#build/ui/*": "./.nuxt/ui/*.ts",
|
|
45
|
+
"#build/ui.css": "./.nuxt/ui.css"
|
|
41
46
|
},
|
|
42
47
|
"bin": {
|
|
43
48
|
"nuxt-ui": "./cli/index.mjs"
|
|
@@ -47,6 +52,7 @@
|
|
|
47
52
|
"types": "./dist/types.d.ts",
|
|
48
53
|
"files": [
|
|
49
54
|
".nuxt/ui",
|
|
55
|
+
".nuxt/ui.css",
|
|
50
56
|
"dist",
|
|
51
57
|
"cli",
|
|
52
58
|
"vue-plugin.d.ts"
|
|
@@ -76,18 +82,18 @@
|
|
|
76
82
|
"@iconify/vue": "^4.3.0",
|
|
77
83
|
"@internationalized/date": "^3.7.0",
|
|
78
84
|
"@internationalized/number": "^3.6.0",
|
|
79
|
-
"@nuxt/devtools-kit": "^1.
|
|
85
|
+
"@nuxt/devtools-kit": "^2.1.0",
|
|
80
86
|
"@nuxt/fonts": "^0.10.3",
|
|
81
87
|
"@nuxt/icon": "^1.10.3",
|
|
82
|
-
"@nuxt/kit": "^3.15.
|
|
83
|
-
"@nuxt/schema": "^3.15.
|
|
88
|
+
"@nuxt/kit": "^3.15.4",
|
|
89
|
+
"@nuxt/schema": "^3.15.4",
|
|
84
90
|
"@nuxtjs/color-mode": "^3.5.2",
|
|
85
|
-
"@tailwindcss/postcss": "4.0.
|
|
86
|
-
"@tailwindcss/vite": "4.0.
|
|
87
|
-
"@tanstack/vue-table": "^8.
|
|
88
|
-
"@unhead/vue": "^1.11.
|
|
89
|
-
"@vueuse/core": "^12.
|
|
90
|
-
"@vueuse/integrations": "^12.
|
|
91
|
+
"@tailwindcss/postcss": "^4.0.6",
|
|
92
|
+
"@tailwindcss/vite": "^4.0.6",
|
|
93
|
+
"@tanstack/vue-table": "^8.21.2",
|
|
94
|
+
"@unhead/vue": "^1.11.19",
|
|
95
|
+
"@vueuse/core": "^12.7.0",
|
|
96
|
+
"@vueuse/integrations": "^12.7.0",
|
|
91
97
|
"colortranslator": "^4.1.0",
|
|
92
98
|
"consola": "^3.4.0",
|
|
93
99
|
"defu": "^6.1.4",
|
|
@@ -98,46 +104,46 @@
|
|
|
98
104
|
"embla-carousel-fade": "^8.5.2",
|
|
99
105
|
"embla-carousel-vue": "^8.5.2",
|
|
100
106
|
"embla-carousel-wheel-gestures": "^8.0.1",
|
|
101
|
-
"fuse.js": "^7.
|
|
107
|
+
"fuse.js": "^7.1.0",
|
|
102
108
|
"get-port-please": "^3.1.2",
|
|
103
109
|
"knitwork": "^1.2.0",
|
|
104
110
|
"magic-string": "^0.30.17",
|
|
105
111
|
"mlly": "^1.7.4",
|
|
106
112
|
"ohash": "^1.1.4",
|
|
107
|
-
"pathe": "^2.0.
|
|
108
|
-
"reka-ui": "1.0.0-alpha.
|
|
113
|
+
"pathe": "^2.0.3",
|
|
114
|
+
"reka-ui": "1.0.0-alpha.10",
|
|
109
115
|
"scule": "^1.3.0",
|
|
110
116
|
"sirv": "^3.0.0",
|
|
111
117
|
"tailwind-variants": "^0.3.1",
|
|
112
|
-
"tailwindcss": "4.0.
|
|
118
|
+
"tailwindcss": "^4.0.6",
|
|
113
119
|
"tinyglobby": "^0.2.10",
|
|
114
|
-
"unplugin": "^2.
|
|
115
|
-
"unplugin-auto-import": "^19.
|
|
116
|
-
"unplugin-vue-components": "^28.
|
|
117
|
-
"vaul-vue": "^0.2.
|
|
120
|
+
"unplugin": "^2.2.0",
|
|
121
|
+
"unplugin-auto-import": "^19.1.0",
|
|
122
|
+
"unplugin-vue-components": "^28.1.0",
|
|
123
|
+
"vaul-vue": "^0.2.1"
|
|
118
124
|
},
|
|
119
125
|
"devDependencies": {
|
|
120
|
-
"@nuxt/eslint-config": "^0.
|
|
126
|
+
"@nuxt/eslint-config": "^1.0.1",
|
|
121
127
|
"@nuxt/module-builder": "^0.8.4",
|
|
122
128
|
"@nuxt/test-utils": "^3.15.4",
|
|
123
129
|
"@release-it/conventional-changelog": "^10.0.0",
|
|
124
|
-
"@standard-schema/spec": "1.0.0",
|
|
130
|
+
"@standard-schema/spec": "^1.0.0",
|
|
125
131
|
"@vue/test-utils": "^2.4.6",
|
|
126
132
|
"embla-carousel": "^8.5.2",
|
|
127
|
-
"eslint": "^9.
|
|
128
|
-
"happy-dom": "^
|
|
133
|
+
"eslint": "^9.20.1",
|
|
134
|
+
"happy-dom": "^17.1.0",
|
|
129
135
|
"joi": "^17.13.3",
|
|
130
136
|
"knitwork": "^1.2.0",
|
|
131
|
-
"nuxt": "^3.15.
|
|
137
|
+
"nuxt": "^3.15.4",
|
|
132
138
|
"nuxt-component-meta": "^0.10.0",
|
|
133
139
|
"release-it": "^18.1.2",
|
|
134
140
|
"superstruct": "^2.0.2",
|
|
135
141
|
"valibot": "^0.42.1",
|
|
136
|
-
"vitest": "^3.0.
|
|
142
|
+
"vitest": "^3.0.5",
|
|
137
143
|
"vitest-environment-nuxt": "^1.0.1",
|
|
138
144
|
"vue-tsc": "^2.2.0",
|
|
139
145
|
"yup": "^1.6.1",
|
|
140
|
-
"zod": "^3.24.
|
|
146
|
+
"zod": "^3.24.2"
|
|
141
147
|
},
|
|
142
148
|
"peerDependencies": {
|
|
143
149
|
"typescript": "^5.6.3"
|
|
@@ -146,12 +152,33 @@
|
|
|
146
152
|
"@nuxt/ui": "workspace:*",
|
|
147
153
|
"chokidar": "3.6.0",
|
|
148
154
|
"debug": "4.3.7",
|
|
149
|
-
"
|
|
150
|
-
"rollup": "^4.24.0",
|
|
155
|
+
"rollup": "4.32.1",
|
|
151
156
|
"typescript": "5.6.3",
|
|
152
157
|
"unimport": "3.14.5",
|
|
153
|
-
"unplugin": "^2.
|
|
154
|
-
"vite": "
|
|
155
|
-
"vue
|
|
156
|
-
|
|
158
|
+
"unplugin": "^2.2.0",
|
|
159
|
+
"vite": "6.0.11",
|
|
160
|
+
"vue": "3.5.13",
|
|
161
|
+
"vue-tsc": "2.2.0"
|
|
162
|
+
},
|
|
163
|
+
"pnpm": {
|
|
164
|
+
"onlyBuiltDependencies": [
|
|
165
|
+
"better-sqlite3"
|
|
166
|
+
]
|
|
167
|
+
},
|
|
168
|
+
"keywords": [
|
|
169
|
+
"nuxt-ui",
|
|
170
|
+
"nuxt",
|
|
171
|
+
"vue3",
|
|
172
|
+
"tailwindcss",
|
|
173
|
+
"component library",
|
|
174
|
+
"vue",
|
|
175
|
+
"vuejs",
|
|
176
|
+
"vue.js",
|
|
177
|
+
"typescript",
|
|
178
|
+
"vue-components",
|
|
179
|
+
"ui",
|
|
180
|
+
"tailwind",
|
|
181
|
+
"framework",
|
|
182
|
+
"ui-framework"
|
|
183
|
+
]
|
|
157
184
|
}
|