@nuxtify/core 0.4.2 → 0.5.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/README.md CHANGED
@@ -100,7 +100,7 @@ Nuxtify Core builds on the amazing features of [Vue](https://vuejs.org/guide/int
100
100
 
101
101
  - Fully tree shakeable for small bundle sizes
102
102
  - Optimized caching and rendering strategies for each page with [hybrid rendering](https://nuxt.com/docs/guide/concepts/rendering#hybrid-rendering)
103
- - (coming soon) Fast, responsive, optimized images for [20+ image providers](https://image.nuxt.com/get-started/providers) powered by [Nuxt Image](https://image.nuxt.com/)
103
+ - Fast, responsive, optimized images for [30+ image providers](https://image.nuxt.com/get-started/providers) powered by [Nuxt Image](https://image.nuxt.com/)
104
104
  - (coming soon) Load third-party scripts with better performance, privacy, security powered by [Nuxt Scripts](https://scripts.nuxt.com/)
105
105
  - (coming soon) Optimal security patterns and principles powered by [Nuxt Security](https://nuxt.com/modules/security)
106
106
 
package/dist/module.d.mts CHANGED
@@ -55,9 +55,27 @@ interface BrandOptions {
55
55
  /**
56
56
  * The width of the logo on mobile.
57
57
  *
58
- * @default 150
58
+ * @default 160
59
59
  */
60
60
  mobileWidth?: number;
61
+ /**
62
+ * The height of the logo.
63
+ *
64
+ * @default 50
65
+ */
66
+ height?: number;
67
+ /**
68
+ * The height of the logo on mobile.
69
+ *
70
+ * @default 40
71
+ */
72
+ mobileHeight?: number;
73
+ /**
74
+ * The format of the logo.
75
+ *
76
+ * @default "webp"
77
+ */
78
+ format?: 'webp' | 'avif' | 'jpeg' | 'jpg' | 'png' | 'gif' | 'svg';
61
79
  };
62
80
  }
63
81
  interface PoliciesOptions {
@@ -85,6 +103,7 @@ interface ModuleOptions {
85
103
  message?: string;
86
104
  buttonText?: string;
87
105
  buttonUrl?: string;
106
+ exclude?: string[];
88
107
  };
89
108
  /**
90
109
  * Navigation options
@@ -127,6 +146,9 @@ declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, {
127
146
  darkUrl: string;
128
147
  width: number;
129
148
  mobileWidth: number;
149
+ height: number;
150
+ mobileHeight: number;
151
+ format: "webp";
130
152
  };
131
153
  };
132
154
  policies: {
@@ -138,6 +160,7 @@ declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, {
138
160
  message: string;
139
161
  buttonText: string;
140
162
  buttonUrl: string;
163
+ exclude: never[];
141
164
  };
142
165
  navigation: {
143
166
  primary: never[];
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxtify/core",
3
- "version": "0.4.2",
3
+ "version": "0.5.0",
4
4
  "configKey": "nuxtifyCore",
5
5
  "compatibility": {
6
6
  "nuxt": ">=4.0.0"
package/dist/module.mjs CHANGED
@@ -2,7 +2,7 @@ import { defineNuxtModule, createResolver, useLogger, addComponentsDir, addImpor
2
2
  import { defu } from 'defu';
3
3
 
4
4
  const name = "@nuxtify/core";
5
- const version = "0.4.2";
5
+ const version = "0.5.0";
6
6
 
7
7
  const module$1 = defineNuxtModule().with({
8
8
  meta: {
@@ -14,8 +14,11 @@ const module$1 = defineNuxtModule().with({
14
14
  }
15
15
  },
16
16
  moduleDependencies: {
17
+ "@nuxt/image": {
18
+ version: ">=2.0.0"
19
+ },
17
20
  "vuetify-nuxt-module": {
18
- version: ">=0.19.2",
21
+ version: ">=0.19.5",
19
22
  defaults: {
20
23
  vuetifyOptions: {
21
24
  theme: {
@@ -57,7 +60,10 @@ const module$1 = defineNuxtModule().with({
57
60
  lightUrl: "",
58
61
  darkUrl: "",
59
62
  width: 200,
60
- mobileWidth: 150
63
+ mobileWidth: 160,
64
+ height: 50,
65
+ mobileHeight: 40,
66
+ format: "webp"
61
67
  }
62
68
  },
63
69
  // Policies
@@ -70,7 +76,8 @@ const module$1 = defineNuxtModule().with({
70
76
  show: false,
71
77
  message: "",
72
78
  buttonText: "",
73
- buttonUrl: ""
79
+ buttonUrl: "",
80
+ exclude: []
74
81
  },
75
82
  // Navigation
76
83
  navigation: {
@@ -1,17 +1,26 @@
1
1
  <script setup>
2
- import { computed, isExternalUrl, useDisplay, useNuxtifyConfig } from "#imports";
2
+ import { computed, isExternalUrl, useDisplay, useNuxtifyConfig, useRoute } from "#imports";
3
3
  const nuxtifyConfig = useNuxtifyConfig();
4
4
  const { xs } = useDisplay();
5
+ const route = useRoute();
5
6
  const isExternalLink = computed(
6
7
  () => isExternalUrl(nuxtifyConfig.announcement?.buttonUrl ?? "", nuxtifyConfig.brand?.domain ?? "")
7
8
  );
9
+ const shouldShow = computed(() => {
10
+ if (!nuxtifyConfig.announcement?.show) return false;
11
+ const hasContent = nuxtifyConfig.announcement?.message || nuxtifyConfig.announcement?.buttonText && nuxtifyConfig.announcement?.buttonUrl;
12
+ if (!hasContent) return false;
13
+ const exclude = nuxtifyConfig.announcement?.exclude || [];
14
+ return !exclude.includes(route.path);
15
+ });
8
16
  </script>
9
17
 
10
18
  <template>
11
19
  <v-system-bar
20
+ v-if="shouldShow"
12
21
  :height="xs ? 60 : 40"
13
22
  :order="-100"
14
- class="app-announcement justify-center text-start"
23
+ class="app-announcement justify-center text-start d-print-none"
15
24
  >
16
25
  <div
17
26
  v-if="nuxtifyConfig.announcement?.message"
@@ -35,5 +44,5 @@ const isExternalLink = computed(
35
44
  </template>
36
45
 
37
46
  <style scoped>
38
- .app-announcement{background-color:rgb(var(--v-theme-secondary),var(--v-activated-opacity))}
47
+ .app-announcement{background-color:rgb(var(--v-theme-surface));background-image:linear-gradient(rgb(var(--v-theme-secondary),var(--v-activated-opacity)),rgb(var(--v-theme-secondary),var(--v-activated-opacity)))}
39
48
  </style>
@@ -1,14 +1,10 @@
1
1
  <script setup>
2
2
  import { computed, useAppConfig, useDisplay } from "#imports";
3
3
  const props = defineProps({
4
- dark: {
5
- type: Boolean,
6
- default: false
7
- },
8
- width: {
9
- type: Number,
10
- default: void 0
11
- }
4
+ dark: { type: Boolean, required: false, default: false },
5
+ width: { type: Number, required: false },
6
+ height: { type: Number, required: false },
7
+ format: { type: String, required: false, default: "webp" }
12
8
  });
13
9
  const nuxtifyConfig = useAppConfig().nuxtify;
14
10
  const { smAndDown } = useDisplay();
@@ -23,12 +19,21 @@ const width = computed(() => {
23
19
  return smAndDown.value ? nuxtifyConfig.brand.logo.mobileWidth : nuxtifyConfig.brand.logo.width;
24
20
  }
25
21
  });
22
+ const height = computed(() => {
23
+ if (props.height) {
24
+ return props.height;
25
+ } else {
26
+ return smAndDown.value ? nuxtifyConfig.brand.logo.mobileHeight : nuxtifyConfig.brand.logo.height;
27
+ }
28
+ });
26
29
  </script>
27
30
 
28
31
  <template>
29
- <v-img
32
+ <NuxtImg
30
33
  v-if="imageUrl"
31
34
  :width
35
+ :height
36
+ :format
32
37
  :src="imageUrl"
33
38
  :alt="`${nuxtifyConfig.brand.name} logo`"
34
39
  />
@@ -1,24 +1,12 @@
1
- declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
- dark: {
3
- type: BooleanConstructor;
4
- default: boolean;
5
- };
6
- width: {
7
- type: NumberConstructor;
8
- default: undefined;
9
- };
10
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
11
- dark: {
12
- type: BooleanConstructor;
13
- default: boolean;
14
- };
15
- width: {
16
- type: NumberConstructor;
17
- default: undefined;
18
- };
19
- }>> & Readonly<{}>, {
20
- width: number;
1
+ type __VLS_Props = {
2
+ dark?: boolean;
3
+ width?: number;
4
+ height?: number;
5
+ format?: string;
6
+ };
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
21
8
  dark: boolean;
22
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
9
+ format: string;
10
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
23
11
  declare const _default: typeof __VLS_export;
24
12
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxtify/core",
3
- "version": "0.4.2",
3
+ "version": "0.5.0",
4
4
  "description": "Nuxtify core module powered by Nuxt and Vuetify.",
5
5
  "homepage": "https://nuxtify.dev",
6
6
  "author": "Nuxtify.dev <hello@nuxtify.dev>",
@@ -45,22 +45,23 @@
45
45
  },
46
46
  "dependencies": {
47
47
  "defu": "^6.1.4",
48
- "vuetify-nuxt-module": "^0.19.2"
48
+ "vuetify-nuxt-module": "^0.19.5"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@nuxt/devtools": "^3.1.1",
52
- "@nuxt/eslint": "^1.12.1",
53
- "@nuxt/eslint-config": "^1.3.1",
54
- "@nuxt/kit": "^4.2.2",
52
+ "@nuxt/eslint": "^1.14.0",
53
+ "@nuxt/eslint-config": "^1.14.0",
54
+ "@nuxt/image": "^2.0.0",
55
+ "@nuxt/kit": "^4.3.1",
55
56
  "@nuxt/module-builder": "^1.0.2",
56
- "@nuxt/schema": "^4.2.2",
57
+ "@nuxt/schema": "^4.3.1",
57
58
  "@nuxt/test-utils": "^3.23.0",
58
- "@types/node": "^22.19.7",
59
+ "@types/node": "^22.19.9",
59
60
  "changelogen": "^0.6.2",
60
61
  "eslint": "^9.39.2",
61
- "nuxt": "^4.2.2",
62
+ "nuxt": "^4.3.1",
62
63
  "typescript": "^5.9.3",
63
64
  "vitest": "^3.2.4",
64
- "vue-tsc": "^3.2.2"
65
+ "vue-tsc": "^3.2.4"
65
66
  }
66
67
  }