@nuxtify/pages 0.3.1 → 0.3.2

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 CHANGED
@@ -1,4 +1,5 @@
1
1
  import * as _nuxt_schema from '@nuxt/schema';
2
+ import { ModuleOptions as ModuleOptions$1 } from '@nuxtify/core';
2
3
 
3
4
  interface Link {
4
5
  text: string;
@@ -11,7 +12,7 @@ interface FooterLinks {
11
12
  title: string;
12
13
  links: Link[];
13
14
  }
14
- interface ModuleOptions {
15
+ interface PageModuleOptions {
15
16
  /**
16
17
  * Navigation options
17
18
  */
@@ -50,6 +51,7 @@ interface ModuleOptions {
50
51
  };
51
52
  };
52
53
  }
54
+ type ModuleOptions = Omit<ModuleOptions$1, keyof PageModuleOptions> & PageModuleOptions;
53
55
 
54
56
  declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
55
57
 
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxtify/pages",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "configKey": "nuxtifyPages",
5
5
  "compatibility": {
6
6
  "nuxt": ">=3.16.0",
package/dist/module.mjs CHANGED
@@ -2,7 +2,7 @@ import { defineNuxtModule, createResolver, installModule, addLayout, addComponen
2
2
  import { defu } from 'defu';
3
3
 
4
4
  const name = "@nuxtify/pages";
5
- const version = "0.3.1";
5
+ const version = "0.3.2";
6
6
 
7
7
  const module = defineNuxtModule({
8
8
  meta: {
@@ -15,6 +15,10 @@ const module = defineNuxtModule({
15
15
  }
16
16
  },
17
17
  defaults: {
18
+ // Brand
19
+ brand: {
20
+ name: "@nuxtify/pages"
21
+ },
18
22
  // Navigation
19
23
  navigation: {
20
24
  primary: [],
@@ -47,14 +51,12 @@ const module = defineNuxtModule({
47
51
  },
48
52
  async setup(_options, _nuxt) {
49
53
  const resolver = createResolver(import.meta.url);
50
- await installModule("@nuxtify/core", {
51
- brand: {
52
- name: "@nuxtify/pages"
53
- }
54
- });
55
54
  _nuxt.options.appConfig.nuxtify = defu(_nuxt.options.appConfig.nuxtify, {
56
55
  ..._options
57
56
  });
57
+ await installModule("@nuxtify/core", {
58
+ verboseLogs: _options.verboseLogs
59
+ });
58
60
  addLayout({
59
61
  src: resolver.resolve("./runtime/layouts/DefaultLayout.vue")
60
62
  }, "default");
@@ -75,6 +77,17 @@ const module = defineNuxtModule({
75
77
  file: resolver.resolve("./runtime/pages/DynamicSlug.vue")
76
78
  });
77
79
  });
80
+ _nuxt.hook("imports:extend", (imports) => {
81
+ const coreImportIndex = imports.findIndex(
82
+ (imp) => {
83
+ return (imp.as || imp.name) === "useNuxtifyConfig" && imp.from.includes("@nuxtify/core");
84
+ }
85
+ );
86
+ if (coreImportIndex > -1) {
87
+ imports.splice(coreImportIndex, 1);
88
+ if (_options.verboseLogs) console.log("[nuxtify-pages] Intentionally overriding useNuxtifyConfig from @nuxtify/core.");
89
+ }
90
+ });
78
91
  }
79
92
  });
80
93
 
@@ -170,7 +170,7 @@ async function handleSubmit() {
170
170
  <span v-if="showPrivacy">
171
171
  By signing up you agree to the
172
172
  <NuxtLink
173
- :to="nuxtifyConfig.pages?.policies?.privacyUrl"
173
+ :to="nuxtifyConfig.policies?.privacyUrl"
174
174
  :class="`text-decoration-none ${dark ? 'text-grey-lighten-2' : 'text-medium-emphasis'}`"
175
175
  >
176
176
  Privacy Policy</NuxtLink>.
@@ -81,22 +81,22 @@ const footerSecondaryLinks = nuxtifyConfig.navigation?.footerSecondary;
81
81
  }}.
82
82
 
83
83
  <!-- Credits -->
84
- {{ nuxtifyConfig.footer?.credits?.prependText }}
85
- <span v-if="nuxtifyConfig.footer?.credits?.creator?.name">
84
+ {{ nuxtifyConfig.credits?.prependText }}
85
+ <span v-if="nuxtifyConfig.credits?.creator?.name">
86
86
  <a
87
- v-if="nuxtifyConfig.footer.credits.creator.domain"
88
- :href="`https://${nuxtifyConfig.footer.credits.creator.domain}/?utm_source=${nuxtifyConfig.brand?.domain}&utm_medium=referral&utm_campaign=createdby`"
87
+ v-if="nuxtifyConfig.credits.creator.domain"
88
+ :href="`https://${nuxtifyConfig.credits.creator.domain}/?utm_source=${nuxtifyConfig.brand?.domain}&utm_medium=referral&utm_campaign=createdby`"
89
89
  target="_blank"
90
90
  rel="noopener nofollow"
91
91
  class="font-weight-bold"
92
- >{{ nuxtifyConfig.footer?.credits?.creator?.name }}</a><span v-else>{{ nuxtifyConfig.footer?.credits?.creator?.name }}</span>.
92
+ >{{ nuxtifyConfig.credits?.creator?.name }}</a><span v-else>{{ nuxtifyConfig.credits?.creator?.name }}</span>.
93
93
  </span>
94
94
 
95
95
  <!-- Message -->
96
- {{ nuxtifyConfig.footer?.credits?.appendText }}
96
+ {{ nuxtifyConfig.credits?.appendText }}
97
97
 
98
98
  <!-- Powered By -->
99
- <span v-if="nuxtifyConfig.footer?.credits?.showPoweredBy">
99
+ <span v-if="nuxtifyConfig.credits?.showPoweredBy">
100
100
  <a
101
101
  :href="`https://nuxtify.dev/?utm_source=${nuxtifyConfig.brand?.domain}&utm_medium=referral&utm_campaign=poweredby`"
102
102
  target="_blank"
@@ -0,0 +1,2 @@
1
+ import type { ModuleOptions } from '../../types.js';
2
+ export declare const useNuxtifyConfig: () => ModuleOptions;
@@ -0,0 +1,2 @@
1
+ import { useAppConfig } from "#imports";
2
+ export const useNuxtifyConfig = () => useAppConfig().nuxtify;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxtify/pages",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Nuxtify pages module powered by Nuxt and Vuetify.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://nuxtify.dev",
@@ -43,7 +43,7 @@
43
43
  "test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit"
44
44
  },
45
45
  "dependencies": {
46
- "@nuxtify/core": "^0.1.0",
46
+ "@nuxtify/core": "^0.1.2",
47
47
  "defu": "^6.1.4"
48
48
  },
49
49
  "devDependencies": {