@maz-ui/nuxt 4.0.0-beta.2 → 4.0.0-beta.4
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 +31 -26
- package/dist/module.json +1 -1
- package/dist/module.mjs +35 -26
- package/dist/runtime/plugins/v-click-outside.d.ts +6 -0
- package/dist/runtime/plugins/v-fullscreen-img.d.ts +6 -0
- package/dist/runtime/plugins/v-fullscreen-img.js +3 -1
- package/dist/runtime/plugins/v-lazy-img.d.ts +6 -0
- package/dist/runtime/plugins/v-tooltip.d.ts +6 -0
- package/dist/runtime/plugins/v-zoom-img.d.ts +6 -0
- package/package.json +10 -10
package/dist/module.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ import * as _nuxt_schema from '@nuxt/schema';
|
|
|
2
2
|
import { MazUiThemeOptions } from '@maz-ui/themes';
|
|
3
3
|
import { MazTranslationsOptions } from '@maz-ui/translations';
|
|
4
4
|
import { VLazyImgOptions, VFullscreenImgOptions, VTooltipOptions } from 'maz-ui/directives';
|
|
5
|
-
import { AosOptions,
|
|
5
|
+
import { AosOptions, DialogOptions, ToastOptions } from 'maz-ui/plugins';
|
|
6
6
|
|
|
7
7
|
interface MazUiNuxtThemeOptions extends MazUiThemeOptions {
|
|
8
8
|
/**
|
|
@@ -81,27 +81,15 @@ interface MazUiNuxtOptions {
|
|
|
81
81
|
autoImport?: boolean;
|
|
82
82
|
};
|
|
83
83
|
/**
|
|
84
|
-
*
|
|
84
|
+
* Plugins configuration
|
|
85
85
|
*/
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Enable auto-import of useTranslations composable
|
|
89
|
-
* @description Provides translations functionality from `@maz-ui/translations` package
|
|
90
|
-
* @default true
|
|
91
|
-
*/
|
|
92
|
-
useTranslations?: boolean;
|
|
93
|
-
/**
|
|
94
|
-
* Enable auto-import of useTheme composable
|
|
95
|
-
* @description Provides theme management functionality (toggle dark mode, change themes, etc.) from `@maz-ui/themes` package
|
|
96
|
-
* @default false
|
|
97
|
-
*/
|
|
98
|
-
useTheme?: boolean;
|
|
86
|
+
plugins?: {
|
|
99
87
|
/**
|
|
100
88
|
* Enable auto-import of useAos composable and install AOS plugin
|
|
101
89
|
* @description Animation On Scroll functionality with advanced configuration options
|
|
102
|
-
* @default
|
|
90
|
+
* @default false
|
|
103
91
|
*/
|
|
104
|
-
|
|
92
|
+
aos?: boolean | (Omit<AosOptions, 'router'> & {
|
|
105
93
|
/**
|
|
106
94
|
* Auto inject AOS CSS file
|
|
107
95
|
* @default true
|
|
@@ -113,24 +101,41 @@ interface MazUiNuxtOptions {
|
|
|
113
101
|
*/
|
|
114
102
|
router?: boolean;
|
|
115
103
|
});
|
|
116
|
-
/**
|
|
117
|
-
* Enable auto-import of useToast composable and install Toast plugin
|
|
118
|
-
* @description Toast notifications functionality
|
|
119
|
-
* @default true
|
|
120
|
-
*/
|
|
121
|
-
useToast?: boolean | ToastOptions;
|
|
122
104
|
/**
|
|
123
105
|
* Enable auto-import of useDialog composable and install Dialog plugin
|
|
124
106
|
* @description Modal dialogs functionality
|
|
125
|
-
* @default
|
|
107
|
+
* @default false
|
|
126
108
|
*/
|
|
127
|
-
|
|
109
|
+
dialog?: boolean | DialogOptions;
|
|
110
|
+
/**
|
|
111
|
+
* Enable auto-import of useToast composable and install Toast plugin
|
|
112
|
+
* @description Toast notifications functionality
|
|
113
|
+
* @default false
|
|
114
|
+
*/
|
|
115
|
+
toast?: boolean | ToastOptions;
|
|
128
116
|
/**
|
|
129
117
|
* Enable auto-import of useWait composable and install Wait plugin
|
|
130
118
|
* @description Loading state management functionality
|
|
119
|
+
* @default false
|
|
120
|
+
*/
|
|
121
|
+
wait?: boolean;
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* Composables configuration
|
|
125
|
+
*/
|
|
126
|
+
composables?: {
|
|
127
|
+
/**
|
|
128
|
+
* Enable auto-import of useTranslations composable
|
|
129
|
+
* @description Provides translations functionality from `@maz-ui/translations` package
|
|
131
130
|
* @default true
|
|
132
131
|
*/
|
|
133
|
-
|
|
132
|
+
useTranslations?: boolean;
|
|
133
|
+
/**
|
|
134
|
+
* Enable auto-import of useTheme composable
|
|
135
|
+
* @description Provides theme management functionality (toggle dark mode, change themes, etc.) from `@maz-ui/themes` package
|
|
136
|
+
* @default false
|
|
137
|
+
*/
|
|
138
|
+
useTheme?: boolean;
|
|
134
139
|
/**
|
|
135
140
|
* Enable auto-import of useIdleTimeout composable
|
|
136
141
|
* @description Detect user idle state and execute callbacks
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -85,12 +85,14 @@ const defaults = {
|
|
|
85
85
|
components: {
|
|
86
86
|
autoImport: true
|
|
87
87
|
},
|
|
88
|
+
plugins: {
|
|
89
|
+
aos: false,
|
|
90
|
+
dialog: false,
|
|
91
|
+
toast: false,
|
|
92
|
+
wait: false
|
|
93
|
+
},
|
|
88
94
|
composables: {
|
|
89
95
|
useTheme: true,
|
|
90
|
-
useAos: true,
|
|
91
|
-
useToast: true,
|
|
92
|
-
useDialog: true,
|
|
93
|
-
useWait: true,
|
|
94
96
|
useIdleTimeout: true,
|
|
95
97
|
useReadingTime: true,
|
|
96
98
|
useTranslations: true,
|
|
@@ -119,12 +121,13 @@ const defaults = {
|
|
|
119
121
|
function addComposableImport({
|
|
120
122
|
name,
|
|
121
123
|
from,
|
|
122
|
-
prefix = ""
|
|
124
|
+
prefix = "",
|
|
125
|
+
typed = true
|
|
123
126
|
}) {
|
|
124
127
|
addImports({
|
|
125
128
|
from,
|
|
126
129
|
name,
|
|
127
|
-
|
|
130
|
+
typeFrom: typed ? `maz-ui/dist/types/composables/${name}.d.ts` : void 0,
|
|
128
131
|
as: `use${capitalize(prefix)}${name.replace("use", "")}`
|
|
129
132
|
});
|
|
130
133
|
}
|
|
@@ -156,57 +159,61 @@ const module = defineNuxtModule({
|
|
|
156
159
|
});
|
|
157
160
|
}
|
|
158
161
|
}
|
|
159
|
-
if (moduleOptions.
|
|
162
|
+
if (moduleOptions.plugins.aos) {
|
|
160
163
|
addPlugin(resolve(_dirname, "./runtime/plugins/aos"));
|
|
161
164
|
addComposableImport({
|
|
162
165
|
name: "useAos",
|
|
166
|
+
typed: false,
|
|
163
167
|
from: resolve(_dirname, "./runtime/composables/useAos"),
|
|
164
168
|
prefix: moduleOptions.general?.autoImportPrefix
|
|
165
169
|
});
|
|
166
|
-
const injectAosCSS = typeof moduleOptions.
|
|
170
|
+
const injectAosCSS = typeof moduleOptions.plugins.aos === "object" && typeof moduleOptions.plugins.aos.injectCss === "boolean" ? moduleOptions.plugins.aos.injectCss : true;
|
|
167
171
|
if (injectAosCSS) {
|
|
168
172
|
nuxt.options.css = ["maz-ui/aos-styles", ...nuxt.options.css];
|
|
169
173
|
}
|
|
170
174
|
}
|
|
171
|
-
if (moduleOptions.
|
|
172
|
-
addPlugin(resolve(_dirname, "./runtime/plugins/v-zoom-img"));
|
|
173
|
-
}
|
|
174
|
-
if (moduleOptions.directives.vLazyImg) {
|
|
175
|
-
addPlugin(resolve(_dirname, "./runtime/plugins/v-lazy-img"));
|
|
176
|
-
}
|
|
177
|
-
if (moduleOptions.directives.vClickOutside) {
|
|
178
|
-
addPlugin(resolve(_dirname, "./runtime/plugins/v-click-outside"));
|
|
179
|
-
}
|
|
180
|
-
if (moduleOptions.directives.vFullscreenImg) {
|
|
181
|
-
addPlugin(resolve(_dirname, "./runtime/plugins/v-fullscreen-img"));
|
|
182
|
-
}
|
|
183
|
-
if (moduleOptions.directives.vTooltip) {
|
|
184
|
-
addPlugin(resolve(_dirname, "./runtime/plugins/v-tooltip"));
|
|
185
|
-
}
|
|
186
|
-
if (moduleOptions.composables.useToast) {
|
|
175
|
+
if (moduleOptions.plugins.toast) {
|
|
187
176
|
addPlugin(resolve(_dirname, "./runtime/plugins/toast"));
|
|
188
177
|
addComposableImport({
|
|
189
178
|
name: "useToast",
|
|
179
|
+
typed: false,
|
|
190
180
|
from: resolve(_dirname, "./runtime/composables/useToast"),
|
|
191
181
|
prefix: moduleOptions.general?.autoImportPrefix
|
|
192
182
|
});
|
|
193
183
|
}
|
|
194
|
-
if (moduleOptions.
|
|
184
|
+
if (moduleOptions.plugins.dialog) {
|
|
195
185
|
addPlugin(resolve(_dirname, "./runtime/plugins/dialog"));
|
|
196
186
|
addComposableImport({
|
|
197
187
|
name: "useDialog",
|
|
188
|
+
typed: false,
|
|
198
189
|
from: resolve(_dirname, "./runtime/composables/useDialog"),
|
|
199
190
|
prefix: moduleOptions.general?.autoImportPrefix
|
|
200
191
|
});
|
|
201
192
|
}
|
|
202
|
-
if (moduleOptions.
|
|
193
|
+
if (moduleOptions.plugins.wait) {
|
|
203
194
|
addPlugin(resolve(_dirname, "./runtime/plugins/wait"));
|
|
204
195
|
addComposableImport({
|
|
205
196
|
name: "useWait",
|
|
197
|
+
typed: false,
|
|
206
198
|
from: resolve(_dirname, "./runtime/composables/useWait"),
|
|
207
199
|
prefix: moduleOptions.general?.autoImportPrefix
|
|
208
200
|
});
|
|
209
201
|
}
|
|
202
|
+
if (moduleOptions.directives.vZoomImg) {
|
|
203
|
+
addPlugin(resolve(_dirname, "./runtime/plugins/v-zoom-img"));
|
|
204
|
+
}
|
|
205
|
+
if (moduleOptions.directives.vLazyImg) {
|
|
206
|
+
addPlugin(resolve(_dirname, "./runtime/plugins/v-lazy-img"));
|
|
207
|
+
}
|
|
208
|
+
if (moduleOptions.directives.vClickOutside) {
|
|
209
|
+
addPlugin(resolve(_dirname, "./runtime/plugins/v-click-outside"));
|
|
210
|
+
}
|
|
211
|
+
if (moduleOptions.directives.vFullscreenImg) {
|
|
212
|
+
addPlugin(resolve(_dirname, "./runtime/plugins/v-fullscreen-img"));
|
|
213
|
+
}
|
|
214
|
+
if (moduleOptions.directives.vTooltip) {
|
|
215
|
+
addPlugin(resolve(_dirname, "./runtime/plugins/v-tooltip"));
|
|
216
|
+
}
|
|
210
217
|
if (moduleOptions.composables.useIdleTimeout) {
|
|
211
218
|
addComposableImport({
|
|
212
219
|
name: "useIdleTimeout",
|
|
@@ -315,6 +322,7 @@ const module = defineNuxtModule({
|
|
|
315
322
|
if (moduleOptions.composables.useTheme) {
|
|
316
323
|
addComposableImport({
|
|
317
324
|
name: "useTheme",
|
|
325
|
+
typed: false,
|
|
318
326
|
from: "@maz-ui/themes/composables/useTheme",
|
|
319
327
|
prefix: moduleOptions.general?.autoImportPrefix
|
|
320
328
|
});
|
|
@@ -322,6 +330,7 @@ const module = defineNuxtModule({
|
|
|
322
330
|
if (moduleOptions.composables.useTranslations) {
|
|
323
331
|
addComposableImport({
|
|
324
332
|
name: "useTranslations",
|
|
333
|
+
typed: false,
|
|
325
334
|
from: "@maz-ui/translations",
|
|
326
335
|
prefix: moduleOptions.general?.autoImportPrefix
|
|
327
336
|
});
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
+
import { type VClickOutsideDirective } from 'maz-ui/directives/vClickOutside';
|
|
1
2
|
declare const _default: import("#app").Plugin<Record<string, unknown>> & import("#app").ObjectPlugin<Record<string, unknown>>;
|
|
2
3
|
export default _default;
|
|
4
|
+
declare module 'vue' {
|
|
5
|
+
interface GlobalDirectives {
|
|
6
|
+
vClickOutside: VClickOutsideDirective;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
+
import { type VFullscreenImgDirective } from 'maz-ui/directives/vFullscreenImg';
|
|
1
2
|
declare const _default: import("#app").Plugin<Record<string, unknown>> & import("#app").ObjectPlugin<Record<string, unknown>>;
|
|
2
3
|
export default _default;
|
|
4
|
+
declare module 'vue' {
|
|
5
|
+
interface GlobalDirectives {
|
|
6
|
+
vFullscreenImg: VFullscreenImgDirective;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
vFullscreenImgInstall
|
|
3
|
+
} from "maz-ui/directives/vFullscreenImg";
|
|
2
4
|
import { defineNuxtPlugin } from "nuxt/app";
|
|
3
5
|
export default defineNuxtPlugin(({ vueApp }) => {
|
|
4
6
|
vueApp.use(vFullscreenImgInstall);
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
+
import { type VLazyImgDirective } from 'maz-ui/directives/vLazyImg';
|
|
1
2
|
declare const _default: import("#app").Plugin<Record<string, unknown>> & import("#app").ObjectPlugin<Record<string, unknown>>;
|
|
2
3
|
export default _default;
|
|
4
|
+
declare module 'vue' {
|
|
5
|
+
interface GlobalDirectives {
|
|
6
|
+
vLazyImg: VLazyImgDirective;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
+
import { type VTooltipDirective } from 'maz-ui/directives/vTooltip';
|
|
1
2
|
declare const _default: import("#app").Plugin<Record<string, unknown>> & import("#app").ObjectPlugin<Record<string, unknown>>;
|
|
2
3
|
export default _default;
|
|
4
|
+
declare module 'vue' {
|
|
5
|
+
interface GlobalDirectives {
|
|
6
|
+
vTooltip: VTooltipDirective;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
+
import { type VZoomImgDirective } from 'maz-ui/directives/vZoomImg';
|
|
1
2
|
declare const _default: import("#app").Plugin<Record<string, unknown>> & import("#app").ObjectPlugin<Record<string, unknown>>;
|
|
2
3
|
export default _default;
|
|
4
|
+
declare module 'vue' {
|
|
5
|
+
interface GlobalDirectives {
|
|
6
|
+
vZoomImg: VZoomImgDirective;
|
|
7
|
+
}
|
|
8
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maz-ui/nuxt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.0.0-beta.
|
|
4
|
+
"version": "4.0.0-beta.4",
|
|
5
5
|
"description": "Nuxt module for Maz-UI",
|
|
6
6
|
"author": "Louis Mazel <me@loicmazuel.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -56,25 +56,25 @@
|
|
|
56
56
|
"release": "npm run lint && npm run prepack && changelogen --release && npm publish && git push --follow-tags"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@maz-ui/themes": "4.0.0-beta.
|
|
60
|
-
"@maz-ui/translations": "4.0.0-beta.
|
|
61
|
-
"@nuxt/kit": "
|
|
59
|
+
"@maz-ui/themes": "4.0.0-beta.4",
|
|
60
|
+
"@maz-ui/translations": "4.0.0-beta.4",
|
|
61
|
+
"@nuxt/kit": "^3.17.4",
|
|
62
62
|
"defu": "^6.1.4",
|
|
63
|
-
"maz-ui": "4.0.0-beta.
|
|
63
|
+
"maz-ui": "4.0.0-beta.4"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@nuxt/devtools": "^2.4.1",
|
|
67
67
|
"@nuxt/eslint-config": "^1.4.1",
|
|
68
68
|
"@nuxt/module-builder": "^1.0.1",
|
|
69
|
-
"@nuxt/schema": "
|
|
69
|
+
"@nuxt/schema": "^3.17.4",
|
|
70
70
|
"@nuxt/test-utils": "^3.19.1",
|
|
71
|
-
"nuxt": "
|
|
72
|
-
"typescript": "
|
|
73
|
-
"vitest": "
|
|
71
|
+
"nuxt": "^3.17.4",
|
|
72
|
+
"typescript": "~5.8.3",
|
|
73
|
+
"vitest": "^3.2.4"
|
|
74
74
|
},
|
|
75
75
|
"lint-staged": {
|
|
76
76
|
"*": "prettier -w -u",
|
|
77
77
|
"*.{js,ts,mjs,mts,cjs,md}": "cross-env NODE_ENV=production eslint --fix"
|
|
78
78
|
},
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "72d10dc17b2335002ee2a1cf21a62161554a83bb"
|
|
80
80
|
}
|