@maz-ui/nuxt 4.1.7 → 4.1.8-beta.0
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/runtime/composables/useAos.d.ts +2 -0
- package/dist/runtime/composables/useDialog.d.ts +2 -0
- package/dist/runtime/composables/useToast.d.ts +2 -0
- package/dist/runtime/composables/useWait.d.ts +2 -0
- package/dist/runtime/plugins/aos.d.ts +12 -0
- package/dist/runtime/plugins/dialog.d.ts +12 -0
- package/dist/runtime/plugins/maz-icon-path.d.ts +11 -0
- package/dist/runtime/plugins/theme.d.ts +9 -0
- package/dist/runtime/plugins/theme.js +3 -10
- package/dist/runtime/plugins/toast.d.ts +12 -0
- package/dist/runtime/plugins/translations.d.ts +8 -0
- package/dist/runtime/plugins/v-click-outside.d.ts +8 -0
- package/dist/runtime/plugins/v-fullscreen-img.d.ts +8 -0
- package/dist/runtime/plugins/v-lazy-img.d.ts +8 -0
- package/dist/runtime/plugins/v-tooltip.d.ts +8 -0
- package/dist/runtime/plugins/v-zoom-img.d.ts +8 -0
- package/dist/runtime/plugins/wait.d.ts +12 -0
- package/package.json +5 -5
package/dist/module.json
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AosHandler } from 'maz-ui/plugins/aos';
|
|
2
|
+
declare const _default: import("nuxt/app").Plugin<{
|
|
3
|
+
mazAos: AosHandler;
|
|
4
|
+
}> & import("nuxt/app").ObjectPlugin<{
|
|
5
|
+
mazAos: AosHandler;
|
|
6
|
+
}>;
|
|
7
|
+
export default _default;
|
|
8
|
+
declare module 'nuxt/app' {
|
|
9
|
+
interface NuxtApp {
|
|
10
|
+
$mazAos: AosHandler;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DialogHandler } from 'maz-ui/plugins/dialog';
|
|
2
|
+
declare const _default: import("nuxt/app").Plugin<{
|
|
3
|
+
mazDialog: DialogHandler;
|
|
4
|
+
}> & import("nuxt/app").ObjectPlugin<{
|
|
5
|
+
mazDialog: DialogHandler;
|
|
6
|
+
}>;
|
|
7
|
+
export default _default;
|
|
8
|
+
declare module 'nuxt/app' {
|
|
9
|
+
interface NuxtApp {
|
|
10
|
+
$mazDialog: DialogHandler;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ThemeState } from '@maz-ui/themes';
|
|
2
|
+
import type { Ref } from 'vue';
|
|
3
|
+
declare const _default: import("nuxt/app").Plugin<Record<string, unknown>> & import("nuxt/app").ObjectPlugin<Record<string, unknown>>;
|
|
4
|
+
export default _default;
|
|
5
|
+
declare module 'nuxt/app' {
|
|
6
|
+
interface NuxtApp {
|
|
7
|
+
$mazThemeState: Ref<ThemeState>;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -57,12 +57,6 @@ function injectThemeCSS(config) {
|
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
function getInjectCSSStates(config) {
|
|
61
|
-
const isCSSAlreadyInjected = import.meta.client && !!document.getElementById(CSS_ID);
|
|
62
|
-
return {
|
|
63
|
-
shouldInjectCSSOnClient: !!config.injectAllCSSOnServer && import.meta.client && !isCSSAlreadyInjected
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
60
|
export default defineNuxtPlugin(async ({ vueApp, $config }) => {
|
|
67
61
|
const options = $config.public.mazUi.theme;
|
|
68
62
|
let preset = await getPreset(options?.preset);
|
|
@@ -93,13 +87,12 @@ export default defineNuxtPlugin(async ({ vueApp, $config }) => {
|
|
|
93
87
|
if (import.meta.server) {
|
|
94
88
|
injectThemeCSS(config);
|
|
95
89
|
}
|
|
96
|
-
const { shouldInjectCSSOnClient } = getInjectCSSStates(config);
|
|
97
90
|
MazUiTheme.install?.(vueApp, {
|
|
98
91
|
...config,
|
|
99
92
|
colorMode: getSavedColorMode() ?? config.colorMode,
|
|
100
93
|
// @ts-expect-error _isDark is a private property
|
|
101
|
-
_isDark: isDark
|
|
102
|
-
injectFullCSS: !config.injectAllCSSOnServer || shouldInjectCSSOnClient,
|
|
103
|
-
injectCriticalCSS: shouldInjectCSSOnClient
|
|
94
|
+
_isDark: isDark
|
|
95
|
+
// injectFullCSS: !config.injectAllCSSOnServer || shouldInjectCSSOnClient,
|
|
96
|
+
// injectCriticalCSS: shouldInjectCSSOnClient,
|
|
104
97
|
});
|
|
105
98
|
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ToastHandler } from 'maz-ui/plugins/toast';
|
|
2
|
+
declare const _default: import("nuxt/app").Plugin<{
|
|
3
|
+
mazToast: ToastHandler;
|
|
4
|
+
}> & import("nuxt/app").ObjectPlugin<{
|
|
5
|
+
mazToast: ToastHandler;
|
|
6
|
+
}>;
|
|
7
|
+
export default _default;
|
|
8
|
+
declare module 'nuxt/app' {
|
|
9
|
+
interface NuxtApp {
|
|
10
|
+
$mazToast: ToastHandler;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { MazUiTranslationsInstance } from '@maz-ui/translations';
|
|
2
|
+
declare const _default: import("nuxt/app").Plugin<Record<string, unknown>> & import("nuxt/app").ObjectPlugin<Record<string, unknown>>;
|
|
3
|
+
export default _default;
|
|
4
|
+
declare module 'nuxt/app' {
|
|
5
|
+
interface NuxtApp {
|
|
6
|
+
$mazTranslations: MazUiTranslationsInstance;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { VClickOutsideDirective } from 'maz-ui/directives/vClickOutside';
|
|
2
|
+
declare const _default: import("nuxt/app").Plugin<Record<string, unknown>> & import("nuxt/app").ObjectPlugin<Record<string, unknown>>;
|
|
3
|
+
export default _default;
|
|
4
|
+
declare module 'vue' {
|
|
5
|
+
interface GlobalDirectives {
|
|
6
|
+
vClickOutside: VClickOutsideDirective;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { VFullscreenImgDirective } from 'maz-ui/directives/vFullscreenImg';
|
|
2
|
+
declare const _default: import("nuxt/app").Plugin<Record<string, unknown>> & import("nuxt/app").ObjectPlugin<Record<string, unknown>>;
|
|
3
|
+
export default _default;
|
|
4
|
+
declare module 'vue' {
|
|
5
|
+
interface GlobalDirectives {
|
|
6
|
+
vFullscreenImg: VFullscreenImgDirective;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { VLazyImgDirective } from 'maz-ui/directives/vLazyImg';
|
|
2
|
+
declare const _default: import("nuxt/app").Plugin<Record<string, unknown>> & import("nuxt/app").ObjectPlugin<Record<string, unknown>>;
|
|
3
|
+
export default _default;
|
|
4
|
+
declare module 'vue' {
|
|
5
|
+
interface GlobalDirectives {
|
|
6
|
+
vLazyImg: VLazyImgDirective;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { VTooltipDirective } from 'maz-ui/directives/vTooltip';
|
|
2
|
+
declare const _default: import("nuxt/app").Plugin<Record<string, unknown>> & import("nuxt/app").ObjectPlugin<Record<string, unknown>>;
|
|
3
|
+
export default _default;
|
|
4
|
+
declare module 'vue' {
|
|
5
|
+
interface GlobalDirectives {
|
|
6
|
+
vTooltip: VTooltipDirective;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { VZoomImgDirective } from 'maz-ui/directives/vZoomImg';
|
|
2
|
+
declare const _default: import("nuxt/app").Plugin<Record<string, unknown>> & import("nuxt/app").ObjectPlugin<Record<string, unknown>>;
|
|
3
|
+
export default _default;
|
|
4
|
+
declare module 'vue' {
|
|
5
|
+
interface GlobalDirectives {
|
|
6
|
+
vZoomImg: VZoomImgDirective;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { WaitHandler } from 'maz-ui/plugins/wait';
|
|
2
|
+
declare const _default: import("nuxt/app").Plugin<{
|
|
3
|
+
mazWait: WaitHandler;
|
|
4
|
+
}> & import("nuxt/app").ObjectPlugin<{
|
|
5
|
+
mazWait: WaitHandler;
|
|
6
|
+
}>;
|
|
7
|
+
export default _default;
|
|
8
|
+
declare module 'nuxt/app' {
|
|
9
|
+
interface NuxtApp {
|
|
10
|
+
$mazWait: WaitHandler;
|
|
11
|
+
}
|
|
12
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maz-ui/nuxt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.1.
|
|
4
|
+
"version": "4.1.8-beta.0",
|
|
5
5
|
"description": "Nuxt module for Maz-UI",
|
|
6
6
|
"author": "Louis Mazel <me@loicmazuel.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -49,17 +49,17 @@
|
|
|
49
49
|
"dev": "nuxt-module-build build --stub && nuxt-module-build prepare",
|
|
50
50
|
"lint": "cross-env NODE_ENV=production eslint .",
|
|
51
51
|
"lint:fix": "pnpm lint --fix",
|
|
52
|
-
"typecheck": "nuxi typecheck"
|
|
52
|
+
"typecheck": "nuxi typecheck --skipLibCheck"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"nuxt": ">=3.4.0 <5.0.0"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@maz-ui/themes": "4.1.7",
|
|
59
|
-
"@maz-ui/translations": "4.1.
|
|
59
|
+
"@maz-ui/translations": "4.1.8-beta.0",
|
|
60
60
|
"@nuxt/kit": "^4.1.3",
|
|
61
61
|
"defu": "^6.1.4",
|
|
62
|
-
"maz-ui": "4.1.
|
|
62
|
+
"maz-ui": "4.1.8-beta.0"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@nuxt/devtools": "^2.6.5",
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"lint-staged": {
|
|
73
73
|
"*.{js,ts,mjs,mts,cjs,md,yml,json}": "cross-env NODE_ENV=production eslint --fix"
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "58f8dd86786beb0af2571c0435e6c1455ca0b43e"
|
|
76
76
|
}
|