@nuxtify/pages 0.1.0 → 0.2.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.
Files changed (34) hide show
  1. package/dist/module.json +4 -4
  2. package/dist/module.mjs +1 -1
  3. package/dist/runtime/components/EmailSubscribeForm.vue +67 -90
  4. package/dist/runtime/components/EmailSubscribeForm.vue.d.ts +94 -0
  5. package/dist/runtime/components/FooterCallToAction.vue +3 -5
  6. package/dist/runtime/components/FooterCallToAction.vue.d.ts +2 -0
  7. package/dist/runtime/components/app/AppAnnouncementBar.vue +11 -15
  8. package/dist/runtime/components/app/AppAnnouncementBar.vue.d.ts +2 -0
  9. package/dist/runtime/components/app/AppBar.vue +14 -18
  10. package/dist/runtime/components/app/AppBar.vue.d.ts +2 -0
  11. package/dist/runtime/components/app/AppDialog.vue +3 -5
  12. package/dist/runtime/components/app/AppDialog.vue.d.ts +2 -0
  13. package/dist/runtime/components/app/AppFooter.vue +10 -16
  14. package/dist/runtime/components/app/AppFooter.vue.d.ts +2 -0
  15. package/dist/runtime/components/app/AppLoading.vue.d.ts +2 -0
  16. package/dist/runtime/components/app/AppLogo.vue +14 -28
  17. package/dist/runtime/components/app/AppLogo.vue.d.ts +23 -0
  18. package/dist/runtime/components/app/AppNavigationDrawer.vue +14 -18
  19. package/dist/runtime/components/app/AppNavigationDrawer.vue.d.ts +2 -0
  20. package/dist/runtime/components/app/AppToast.vue +4 -6
  21. package/dist/runtime/components/app/AppToast.vue.d.ts +2 -0
  22. package/dist/runtime/layouts/DefaultLayout.vue +4 -6
  23. package/dist/runtime/layouts/DefaultLayout.vue.d.ts +12 -0
  24. package/dist/runtime/pages/DynamicSlug.vue +4 -6
  25. package/dist/runtime/pages/DynamicSlug.vue.d.ts +2 -0
  26. package/dist/runtime/pages/IndexPage.vue +6 -10
  27. package/dist/runtime/pages/IndexPage.vue.d.ts +2 -0
  28. package/dist/runtime/utils/formRules.d.ts +1 -0
  29. package/dist/runtime/utils/formRules.js +1 -0
  30. package/dist/types.d.mts +2 -2
  31. package/package.json +21 -16
  32. package/dist/module.cjs +0 -5
  33. package/dist/module.d.ts +0 -139
  34. package/dist/types.d.ts +0 -7
package/dist/module.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "nuxtify-pages",
3
- "configKey": "nuxtify",
3
+ "configKey": "nuxtifyPages",
4
4
  "compatibility": {
5
5
  "nuxt": ">=3.16.0",
6
6
  "bridge": false
7
7
  },
8
- "version": "0.1.0",
8
+ "version": "0.2.0",
9
9
  "builder": {
10
- "@nuxt/module-builder": "0.8.4",
11
- "unbuild": "2.0.0"
10
+ "@nuxt/module-builder": "1.0.1",
11
+ "unbuild": "3.5.0"
12
12
  }
13
13
  }
package/dist/module.mjs CHANGED
@@ -4,7 +4,7 @@ import { defu } from 'defu';
4
4
  const module = defineNuxtModule({
5
5
  meta: {
6
6
  name: "nuxtify-pages",
7
- configKey: "nuxtify",
7
+ configKey: "nuxtifyPages",
8
8
  compatibility: {
9
9
  nuxt: ">=3.16.0",
10
10
  bridge: false
@@ -1,137 +1,118 @@
1
- <script setup lang="ts">
2
- // Types
3
- import type { VForm } from 'vuetify/lib/components/VForm/index.mjs'
4
-
5
- import { useId, navigateTo, useDisplay, ref, useNuxtifyConfig, getUtmParams, getBaseUrl, submitFormData, formRules, isExternalUrl,
6
- } from '#imports'
7
-
8
- // Props
1
+ <script setup>
2
+ import {
3
+ useId,
4
+ navigateTo,
5
+ useDisplay,
6
+ ref,
7
+ useNuxtifyConfig,
8
+ getUtmParams,
9
+ getBaseUrl,
10
+ submitFormData,
11
+ formRules,
12
+ isExternalUrl
13
+ } from "#imports";
9
14
  const props = defineProps({
10
15
  submitUrl: {
11
16
  type: String,
12
- required: true,
17
+ required: true
13
18
  },
14
19
  buttonText: {
15
20
  type: String,
16
- default: 'Subscribe',
21
+ default: "Subscribe"
17
22
  },
18
23
  emailPlaceholder: {
19
24
  type: String,
20
- default: 'Enter your best email',
25
+ default: "Enter your best email"
21
26
  },
22
27
  marketingConsentText: {
23
28
  type: String,
24
- default: 'Unsubscribe any time.',
29
+ default: "Unsubscribe any time."
25
30
  },
26
31
  showPrivacy: {
27
32
  type: Boolean,
28
- default: false,
33
+ default: false
29
34
  },
30
35
  redirectUrl: {
31
36
  type: String,
32
- default: '',
37
+ default: ""
33
38
  },
34
39
  thankYouMessage: {
35
40
  type: String,
36
- default: 'Thanks for signing up!',
41
+ default: "Thanks for signing up!"
37
42
  },
38
43
  dark: {
39
44
  type: Boolean,
40
- default: false,
45
+ default: false
41
46
  },
42
47
  appendButtonIcon: {
43
48
  type: String,
44
- default: '',
49
+ default: ""
45
50
  },
46
51
  prependButtonIcon: {
47
52
  type: String,
48
- default: '',
49
- },
50
- })
51
-
52
- // App state
53
- const id = useId()
54
- const nuxtifyConfig = useNuxtifyConfig()
55
- const { xs } = useDisplay()
56
-
57
- // Form state
58
- const form = ref<VForm>()
59
- const isSubmitted = ref(false)
60
- const isError = ref(false)
61
- const errorMessage = ref('')
62
- const loading = ref(false)
53
+ default: ""
54
+ }
55
+ });
56
+ const id = useId();
57
+ const nuxtifyConfig = useNuxtifyConfig();
58
+ const { xs } = useDisplay();
59
+ const form = ref();
60
+ const isSubmitted = ref(false);
61
+ const isError = ref(false);
62
+ const errorMessage = ref("");
63
+ const loading = ref(false);
63
64
  const formInput = ref({
64
- email: '',
65
- })
66
-
67
- // Button style
65
+ email: ""
66
+ });
68
67
  const rounded = () => {
69
68
  if (nuxtifyConfig.style?.btn?.rounded) {
70
- return xs.value ? 'lg' : '0 e-lg'
69
+ return xs.value ? "lg" : "0 e-lg";
70
+ } else {
71
+ return 0;
71
72
  }
72
- else {
73
- return 0
74
- }
75
- }
76
-
73
+ };
77
74
  async function handleSubmit() {
78
- loading.value = true
79
- const res = await form.value?.validate()
75
+ loading.value = true;
76
+ const res = await form.value?.validate();
80
77
  if (res?.valid) {
81
- const formData = new FormData()
82
-
83
- // Get UTM params
84
- const { utmSource, utmMedium, utmCampaign, utmTerm, utmContent }
85
- = getUtmParams(window.location.href)
86
-
87
- // Set form field keys
88
- // Default
89
- let fieldPrepend = ''
90
- let fieldAppend = ''
91
-
92
- // Mailerlite
93
- if (props.submitUrl.includes('mailerlite')) {
94
- fieldPrepend = 'fields['
95
- fieldAppend = ']'
78
+ const formData = new FormData();
79
+ const { utmSource, utmMedium, utmCampaign, utmTerm, utmContent } = getUtmParams(window.location.href);
80
+ let fieldPrepend = "";
81
+ let fieldAppend = "";
82
+ if (props.submitUrl.includes("mailerlite")) {
83
+ fieldPrepend = "fields[";
84
+ fieldAppend = "]";
96
85
  }
97
-
98
- // Set form field values
99
86
  formData.append(
100
87
  `${fieldPrepend}email${fieldAppend}`,
101
- formInput.value.email,
102
- )
88
+ formInput.value.email
89
+ );
103
90
  formData.append(
104
91
  `${fieldPrepend}referrer${fieldAppend}`,
105
- getBaseUrl(window.location.href),
106
- )
107
-
92
+ getBaseUrl(window.location.href)
93
+ );
108
94
  if (utmSource)
109
- formData.append(`${fieldPrepend}utm_source${fieldAppend}`, utmSource)
95
+ formData.append(`${fieldPrepend}utm_source${fieldAppend}`, utmSource);
110
96
  if (utmMedium)
111
- formData.append(`${fieldPrepend}utm_medium${fieldAppend}`, utmMedium)
97
+ formData.append(`${fieldPrepend}utm_medium${fieldAppend}`, utmMedium);
112
98
  if (utmCampaign)
113
- formData.append(`${fieldPrepend}utm_campaign${fieldAppend}`, utmCampaign)
99
+ formData.append(`${fieldPrepend}utm_campaign${fieldAppend}`, utmCampaign);
114
100
  if (utmTerm)
115
- formData.append(`${fieldPrepend}utm_term${fieldAppend}`, utmTerm)
101
+ formData.append(`${fieldPrepend}utm_term${fieldAppend}`, utmTerm);
116
102
  if (utmContent)
117
- formData.append(`${fieldPrepend}utm_content${fieldAppend}`, utmContent)
118
-
119
- // Send to email provider
120
- const providerResponse = await submitFormData(props.submitUrl, formData)
121
- isError.value = providerResponse.isError
122
- errorMessage.value = providerResponse.errorMessage
123
-
124
- // Redirect
103
+ formData.append(`${fieldPrepend}utm_content${fieldAppend}`, utmContent);
104
+ const providerResponse = await submitFormData(props.submitUrl, formData);
105
+ isError.value = providerResponse.isError;
106
+ errorMessage.value = providerResponse.errorMessage;
125
107
  if (!isError.value && props.redirectUrl) {
126
108
  await navigateTo(props.redirectUrl, {
127
- external: isExternalUrl(props.redirectUrl, nuxtifyConfig.brand?.domain ?? ''),
128
- })
129
- }
130
- else {
131
- isSubmitted.value = providerResponse.isSubmitted
109
+ external: isExternalUrl(props.redirectUrl, nuxtifyConfig.brand?.domain ?? "")
110
+ });
111
+ } else {
112
+ isSubmitted.value = providerResponse.isSubmitted;
132
113
  }
133
114
  }
134
- loading.value = false
115
+ loading.value = false;
135
116
  }
136
117
  </script>
137
118
 
@@ -181,9 +162,7 @@ async function handleSubmit() {
181
162
  <!-- Supporting Text -->
182
163
  <div
183
164
  v-if="showPrivacy || marketingConsentText"
184
- :class="`text-body-2 ${
185
- dark ? 'text-grey-lighten-2' : 'text-medium-emphasis'
186
- } mt-2`"
165
+ :class="`text-body-2 ${dark ? 'text-grey-lighten-2' : 'text-medium-emphasis'} mt-2`"
187
166
  >
188
167
  <span v-if="marketingConsentText">
189
168
  {{ marketingConsentText }}
@@ -192,9 +171,7 @@ async function handleSubmit() {
192
171
  By signing up you agree to the
193
172
  <NuxtLink
194
173
  :to="nuxtifyConfig.pages?.policies?.privacyUrl"
195
- :class="`text-decoration-none ${
196
- dark ? 'text-grey-lighten-2' : 'text-medium-emphasis'
197
- }`"
174
+ :class="`text-decoration-none ${dark ? 'text-grey-lighten-2' : 'text-medium-emphasis'}`"
198
175
  >
199
176
  Privacy Policy</NuxtLink>.
200
177
  </span>
@@ -0,0 +1,94 @@
1
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ submitUrl: {
3
+ type: StringConstructor;
4
+ required: true;
5
+ };
6
+ buttonText: {
7
+ type: StringConstructor;
8
+ default: string;
9
+ };
10
+ emailPlaceholder: {
11
+ type: StringConstructor;
12
+ default: string;
13
+ };
14
+ marketingConsentText: {
15
+ type: StringConstructor;
16
+ default: string;
17
+ };
18
+ showPrivacy: {
19
+ type: BooleanConstructor;
20
+ default: boolean;
21
+ };
22
+ redirectUrl: {
23
+ type: StringConstructor;
24
+ default: string;
25
+ };
26
+ thankYouMessage: {
27
+ type: StringConstructor;
28
+ default: string;
29
+ };
30
+ dark: {
31
+ type: BooleanConstructor;
32
+ default: boolean;
33
+ };
34
+ appendButtonIcon: {
35
+ type: StringConstructor;
36
+ default: string;
37
+ };
38
+ prependButtonIcon: {
39
+ type: StringConstructor;
40
+ default: string;
41
+ };
42
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
43
+ submitUrl: {
44
+ type: StringConstructor;
45
+ required: true;
46
+ };
47
+ buttonText: {
48
+ type: StringConstructor;
49
+ default: string;
50
+ };
51
+ emailPlaceholder: {
52
+ type: StringConstructor;
53
+ default: string;
54
+ };
55
+ marketingConsentText: {
56
+ type: StringConstructor;
57
+ default: string;
58
+ };
59
+ showPrivacy: {
60
+ type: BooleanConstructor;
61
+ default: boolean;
62
+ };
63
+ redirectUrl: {
64
+ type: StringConstructor;
65
+ default: string;
66
+ };
67
+ thankYouMessage: {
68
+ type: StringConstructor;
69
+ default: string;
70
+ };
71
+ dark: {
72
+ type: BooleanConstructor;
73
+ default: boolean;
74
+ };
75
+ appendButtonIcon: {
76
+ type: StringConstructor;
77
+ default: string;
78
+ };
79
+ prependButtonIcon: {
80
+ type: StringConstructor;
81
+ default: string;
82
+ };
83
+ }>> & Readonly<{}>, {
84
+ buttonText: string;
85
+ emailPlaceholder: string;
86
+ marketingConsentText: string;
87
+ showPrivacy: boolean;
88
+ redirectUrl: string;
89
+ thankYouMessage: string;
90
+ dark: boolean;
91
+ appendButtonIcon: string;
92
+ prependButtonIcon: string;
93
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
94
+ export default _default;
@@ -1,8 +1,6 @@
1
- <script setup lang="ts">
2
- import { useNuxtifyConfig } from '#imports'
3
-
4
- // App state
5
- const nuxtifyConfig = useNuxtifyConfig()
1
+ <script setup>
2
+ import { useNuxtifyConfig } from "#imports";
3
+ const nuxtifyConfig = useNuxtifyConfig();
6
4
  </script>
7
5
 
8
6
  <template>
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -1,14 +1,10 @@
1
- <script setup lang="ts">
2
- import { useDisplay, computed, useNuxtifyConfig, isExternalUrl } from '#imports'
3
-
4
- // App state
5
- const nuxtifyConfig = useNuxtifyConfig()
6
- const { xs } = useDisplay()
7
-
8
- // Component state
9
- const isExternalLink = computed(() =>
10
- isExternalUrl(nuxtifyConfig.announcement?.buttonUrl ?? '', nuxtifyConfig.brand?.domain ?? ''),
11
- )
1
+ <script setup>
2
+ import { useDisplay, computed, useNuxtifyConfig, isExternalUrl } from "#imports";
3
+ const nuxtifyConfig = useNuxtifyConfig();
4
+ const { xs } = useDisplay();
5
+ const isExternalLink = computed(
6
+ () => isExternalUrl(nuxtifyConfig.announcement?.buttonUrl ?? "", nuxtifyConfig.brand?.domain ?? "")
7
+ );
12
8
  </script>
13
9
 
14
10
  <template>
@@ -26,10 +22,10 @@ const isExternalLink = computed(() =>
26
22
  </div>
27
23
  <v-btn
28
24
  v-if="
29
- nuxtifyConfig.announcement?.buttonText && nuxtifyConfig.announcement.buttonUrl
30
- "
31
- :to="!isExternalLink ? nuxtifyConfig.announcement.buttonUrl : undefined"
32
- :href="isExternalLink ? nuxtifyConfig.announcement.buttonUrl : undefined"
25
+ nuxtifyConfig.announcement?.buttonText && nuxtifyConfig.announcement.buttonUrl
26
+ "
27
+ :to="!isExternalLink ? nuxtifyConfig.announcement.buttonUrl : void 0"
28
+ :href="isExternalLink ? nuxtifyConfig.announcement.buttonUrl : void 0"
33
29
  size="small"
34
30
  variant="flat"
35
31
  color="secondary"
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -1,15 +1,11 @@
1
- <script setup lang="ts">
2
- import { useDisplay, useDrawer, useNuxtifyConfig, mdiArrowTopRight, mdiClose, mdiMenu } from '#imports'
3
-
4
- // App state
5
- const { smAndDown } = useDisplay()
6
- const nuxtifyConfig = useNuxtifyConfig()
7
- const drawer = useDrawer()
8
-
9
- // Navigation
10
- const primaryNavLinks = nuxtifyConfig.navigation?.primary
11
- const secondaryNavLinks = nuxtifyConfig.navigation?.secondary
12
- const featuredSecondaryLink = secondaryNavLinks?.slice(0, 1)[0] // first link gets featured
1
+ <script setup>
2
+ import { useDisplay, useDrawer, useNuxtifyConfig, mdiArrowTopRight, mdiClose, mdiMenu } from "#imports";
3
+ const { smAndDown } = useDisplay();
4
+ const nuxtifyConfig = useNuxtifyConfig();
5
+ const drawer = useDrawer();
6
+ const primaryNavLinks = nuxtifyConfig.navigation?.primary;
7
+ const secondaryNavLinks = nuxtifyConfig.navigation?.secondary;
8
+ const featuredSecondaryLink = secondaryNavLinks?.slice(0, 1)[0];
13
9
  </script>
14
10
 
15
11
  <template>
@@ -43,8 +39,8 @@ const featuredSecondaryLink = secondaryNavLinks?.slice(0, 1)[0] // first link ge
43
39
  :ripple="false"
44
40
  size="large"
45
41
  color="unset"
46
- :target="link.openInNew ? '_blank' : undefined"
47
- :rel="link.openInNew ? 'noopener nofollow' : undefined"
42
+ :target="link.openInNew ? '_blank' : void 0"
43
+ :rel="link.openInNew ? 'noopener nofollow' : void 0"
48
44
  class="nav-items mx-2"
49
45
  >
50
46
  {{ link.text }}
@@ -83,8 +79,8 @@ const featuredSecondaryLink = secondaryNavLinks?.slice(0, 1)[0] // first link ge
83
79
  :active="false"
84
80
  size="large"
85
81
  color="unset"
86
- :target="link.openInNew ? '_blank' : undefined"
87
- :rel="link.openInNew ? 'noopener nofollow' : undefined"
82
+ :target="link.openInNew ? '_blank' : void 0"
83
+ :rel="link.openInNew ? 'noopener nofollow' : void 0"
88
84
  class="nav-items mx-2"
89
85
  >
90
86
  {{ link.text }}
@@ -106,8 +102,8 @@ const featuredSecondaryLink = secondaryNavLinks?.slice(0, 1)[0] // first link ge
106
102
  :active="false"
107
103
  variant="flat"
108
104
  size="large"
109
- :target="featuredSecondaryLink.openInNew ? '_blank' : undefined"
110
- :rel="featuredSecondaryLink.openInNew ? 'noopener nofollow' : undefined"
105
+ :target="featuredSecondaryLink.openInNew ? '_blank' : void 0"
106
+ :rel="featuredSecondaryLink.openInNew ? 'noopener nofollow' : void 0"
111
107
  class="mx-2"
112
108
  >
113
109
  {{ featuredSecondaryLink.text }}
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -1,8 +1,6 @@
1
- <script setup lang="ts">
2
- import { useDialog } from '#imports'
3
-
4
- // App state
5
- const dialog = useDialog()
1
+ <script setup>
2
+ import { useDialog } from "#imports";
3
+ const dialog = useDialog();
6
4
  </script>
7
5
 
8
6
  <template>
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -1,12 +1,8 @@
1
- <script setup lang="ts">
2
- import { useNuxtifyConfig, mdiArrowTopRight } from '#imports'
3
-
4
- // App state
5
- const nuxtifyConfig = useNuxtifyConfig()
6
-
7
- // Navigation
8
- const footerPrimaryLinks = nuxtifyConfig.navigation?.footerPrimary
9
- const footerSecondaryLinks = nuxtifyConfig.navigation?.footerSecondary
1
+ <script setup>
2
+ import { useNuxtifyConfig, mdiArrowTopRight } from "#imports";
3
+ const nuxtifyConfig = useNuxtifyConfig();
4
+ const footerPrimaryLinks = nuxtifyConfig.navigation?.footerPrimary;
5
+ const footerSecondaryLinks = nuxtifyConfig.navigation?.footerSecondary;
10
6
  </script>
11
7
 
12
8
  <template>
@@ -55,8 +51,8 @@ const footerSecondaryLinks = nuxtifyConfig.navigation?.footerSecondary
55
51
  variant="text"
56
52
  :active="false"
57
53
  :ripple="false"
58
- :target="link.openInNew ? '_blank' : undefined"
59
- :rel="link.openInNew ? 'noopener nofollow' : undefined"
54
+ :target="link.openInNew ? '_blank' : void 0"
55
+ :rel="link.openInNew ? 'noopener nofollow' : void 0"
60
56
  class="px-0"
61
57
  >
62
58
  {{ link.text }}
@@ -81,9 +77,7 @@ const footerSecondaryLinks = nuxtifyConfig.navigation?.footerSecondary
81
77
  <!-- Copyright -->
82
78
  ©
83
79
  {{
84
- nuxtifyConfig.footer?.copyright
85
- || nuxtifyConfig.brand?.name
86
- || nuxtifyConfig.brand?.domain
80
+ nuxtifyConfig.footer?.copyright || nuxtifyConfig.brand?.name || nuxtifyConfig.brand?.domain
87
81
  }}.
88
82
 
89
83
  <!-- Credits -->
@@ -126,8 +120,8 @@ const footerSecondaryLinks = nuxtifyConfig.navigation?.footerSecondary
126
120
  variant="plain"
127
121
  size="small"
128
122
  :ripple="false"
129
- :target="link.openInNew ? '_blank' : undefined"
130
- :rel="link.openInNew ? 'noopener nofollow' : undefined"
123
+ :target="link.openInNew ? '_blank' : void 0"
124
+ :rel="link.openInNew ? 'noopener nofollow' : void 0"
131
125
  class="text-capitalize pl-0 mb-2"
132
126
  >
133
127
  {{ link.text }}
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -1,42 +1,28 @@
1
- <script setup lang="ts">
2
- import { useAppConfig, useDisplay, computed } from '#imports'
3
-
4
- // Props
1
+ <script setup>
2
+ import { useAppConfig, useDisplay, computed } from "#imports";
5
3
  const props = defineProps({
6
4
  dark: {
7
5
  type: Boolean,
8
- default: false,
6
+ default: false
9
7
  },
10
8
  width: {
11
9
  type: Number,
12
- default: undefined,
13
- },
14
- })
15
-
16
- // App state
17
- const nuxtifyConfig = useAppConfig().nuxtify
18
- const { smAndDown } = useDisplay()
19
-
20
- // Image URL logic
21
- // Set default to the light image url
22
- let imageUrl = nuxtifyConfig.brand.logo.lightUrl
23
-
24
- // If it's dark theme logo and there's a dark image url, use that
10
+ default: void 0
11
+ }
12
+ });
13
+ const nuxtifyConfig = useAppConfig().nuxtify;
14
+ const { smAndDown } = useDisplay();
15
+ let imageUrl = nuxtifyConfig.brand.logo.lightUrl;
25
16
  if (props.dark && nuxtifyConfig.brand.logo.darkUrl) {
26
- imageUrl = nuxtifyConfig.brand.logo.darkUrl
17
+ imageUrl = nuxtifyConfig.brand.logo.darkUrl;
27
18
  }
28
-
29
- // Image width logic
30
19
  const width = computed(() => {
31
20
  if (props.width) {
32
- return props.width
33
- }
34
- else {
35
- return smAndDown.value
36
- ? nuxtifyConfig.brand.logo.mobileWidth
37
- : nuxtifyConfig.brand.logo.width
21
+ return props.width;
22
+ } else {
23
+ return smAndDown.value ? nuxtifyConfig.brand.logo.mobileWidth : nuxtifyConfig.brand.logo.width;
38
24
  }
39
- })
25
+ });
40
26
  </script>
41
27
 
42
28
  <template>
@@ -0,0 +1,23 @@
1
+ declare const _default: 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
+ dark: boolean;
21
+ width: number;
22
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
23
+ export default _default;
@@ -1,15 +1,11 @@
1
- <script setup lang="ts">
2
- import { useDisplay, useDrawer, useNuxtifyConfig, mdiArrowTopRight } from '#imports'
3
-
4
- // App state
5
- const { smAndDown } = useDisplay()
6
- const nuxtifyConfig = useNuxtifyConfig()
7
- const drawer = useDrawer()
8
-
9
- // Navigation
10
- const primaryNavLinks = nuxtifyConfig.navigation?.primary
11
- const secondaryNavLinks = nuxtifyConfig.navigation?.secondary
12
- const featuredSecondaryLink = secondaryNavLinks?.slice(0, 1)[0] // first link gets featured
1
+ <script setup>
2
+ import { useDisplay, useDrawer, useNuxtifyConfig, mdiArrowTopRight } from "#imports";
3
+ const { smAndDown } = useDisplay();
4
+ const nuxtifyConfig = useNuxtifyConfig();
5
+ const drawer = useDrawer();
6
+ const primaryNavLinks = nuxtifyConfig.navigation?.primary;
7
+ const secondaryNavLinks = nuxtifyConfig.navigation?.secondary;
8
+ const featuredSecondaryLink = secondaryNavLinks?.slice(0, 1)[0];
13
9
  </script>
14
10
 
15
11
  <template>
@@ -28,8 +24,8 @@ const featuredSecondaryLink = secondaryNavLinks?.slice(0, 1)[0] // first link ge
28
24
  :href="link.href"
29
25
  :prepend-icon="link.icon"
30
26
  color="primary"
31
- :target="link.openInNew ? '_blank' : undefined"
32
- :rel="link.openInNew ? 'noopener nofollow' : undefined"
27
+ :target="link.openInNew ? '_blank' : void 0"
28
+ :rel="link.openInNew ? 'noopener nofollow' : void 0"
33
29
  slim
34
30
  exact
35
31
  >
@@ -52,8 +48,8 @@ const featuredSecondaryLink = secondaryNavLinks?.slice(0, 1)[0] // first link ge
52
48
  :to="link.to"
53
49
  :href="link.href"
54
50
  :prepend-icon="link.icon"
55
- :target="link.openInNew ? '_blank' : undefined"
56
- :rel="link.openInNew ? 'noopener nofollow' : undefined"
51
+ :target="link.openInNew ? '_blank' : void 0"
52
+ :rel="link.openInNew ? 'noopener nofollow' : void 0"
57
53
  slim
58
54
  exact
59
55
  >
@@ -83,8 +79,8 @@ const featuredSecondaryLink = secondaryNavLinks?.slice(0, 1)[0] // first link ge
83
79
  :prepend-icon="featuredSecondaryLink.icon"
84
80
  variant="flat"
85
81
  size="large"
86
- :target="featuredSecondaryLink.openInNew ? '_blank' : undefined"
87
- :rel="featuredSecondaryLink.openInNew ? 'noopener nofollow' : undefined"
82
+ :target="featuredSecondaryLink.openInNew ? '_blank' : void 0"
83
+ :rel="featuredSecondaryLink.openInNew ? 'noopener nofollow' : void 0"
88
84
  block
89
85
  >
90
86
  {{ featuredSecondaryLink.text }}
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -1,14 +1,12 @@
1
- <script setup lang="ts">
2
- import { useToast } from '#imports'
3
-
4
- // App state
5
- const toast = useToast()
1
+ <script setup>
2
+ import { useToast } from "#imports";
3
+ const toast = useToast();
6
4
  </script>
7
5
 
8
6
  <template>
9
7
  <v-snackbar
10
8
  v-model="toast.show"
11
- :timeout="5000"
9
+ :timeout="5e3"
12
10
  color="info"
13
11
  :min-width="0"
14
12
  close-on-content-click
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -1,9 +1,7 @@
1
- <script setup lang="ts">
2
- import { useDisplay, useNuxtifyConfig } from '#imports'
3
-
4
- // App state
5
- const nuxtifyConfig = useNuxtifyConfig()
6
- const { mdAndUp } = useDisplay()
1
+ <script setup>
2
+ import { useDisplay, useNuxtifyConfig } from "#imports";
3
+ const nuxtifyConfig = useNuxtifyConfig();
4
+ const { mdAndUp } = useDisplay();
7
5
  </script>
8
6
 
9
7
  <template>
@@ -0,0 +1,12 @@
1
+ declare var __VLS_26: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_26) => any;
4
+ };
5
+ declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
7
+ export default _default;
8
+ type __VLS_WithSlots<T, S> = T & {
9
+ new (): {
10
+ $slots: S;
11
+ };
12
+ };
@@ -1,8 +1,6 @@
1
- <script setup lang="ts">
2
- import { useRoute, capitalizeFirstLetter } from '#imports'
3
-
4
- // Page info
5
- const route = useRoute()
1
+ <script setup>
2
+ import { useRoute, capitalizeFirstLetter } from "#imports";
3
+ const route = useRoute();
6
4
  </script>
7
5
 
8
6
  <template>
@@ -15,7 +13,7 @@ const route = useRoute()
15
13
  xl="6"
16
14
  >
17
15
  <h1 class="text-h5 mt-4">
18
- {{ capitalizeFirstLetter(route.params.slug as string) }}
16
+ {{ capitalizeFirstLetter(route.params.slug) }}
19
17
  </h1>
20
18
  </v-col>
21
19
  </v-row>
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -1,14 +1,10 @@
1
- <script setup lang="ts">
2
- import { useServerSeoMeta, useNuxtifyConfig } from '#imports'
3
-
4
- // Page info
1
+ <script setup>
2
+ import { useServerSeoMeta, useNuxtifyConfig } from "#imports";
5
3
  useServerSeoMeta({
6
- title: '@nuxtify/pages',
7
- description: 'This is the @nuxtify/pages homepage.',
8
- })
9
-
10
- // App state
11
- const nuxtifyConfig = useNuxtifyConfig()
4
+ title: "@nuxtify/pages",
5
+ description: "This is the @nuxtify/pages homepage."
6
+ });
7
+ const nuxtifyConfig = useNuxtifyConfig();
12
8
  </script>
13
9
 
14
10
  <template>
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -10,6 +10,7 @@ export declare const formRules: {
10
10
  maxLength200: (v: string) => true | "Must not be longer than 200 characters";
11
11
  maxLength300: (v: string) => true | "Must not be longer than 300 characters";
12
12
  maxLength600: (v: string) => true | "Must not be longer than 600 characters";
13
+ maxLength1200: (v: string) => true | "Must not be longer than 1200 characters";
13
14
  isInteger: (v: string) => true | "Must be an integer";
14
15
  gt0: (v: string) => true | "Must be greater than 0";
15
16
  gte6: (v: string) => true | "Must be greater than or equal to 6";
@@ -13,6 +13,7 @@ export const formRules = {
13
13
  maxLength200: (v) => v ? v.length <= 200 || "Must not be longer than 200 characters" : true,
14
14
  maxLength300: (v) => v ? v.length <= 300 || "Must not be longer than 300 characters" : true,
15
15
  maxLength600: (v) => v ? v.length <= 600 || "Must not be longer than 600 characters" : true,
16
+ maxLength1200: (v) => v ? v.length <= 1200 || "Must not be longer than 1200 characters" : true,
16
17
  // Number
17
18
  isInteger: (v) => Number.isInteger(+v) || "Must be an integer",
18
19
  gt0: (v) => Number.parseFloat(v) > 0 || "Must be greater than 0",
package/dist/types.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import type { NuxtModule } from '@nuxt/schema'
2
2
 
3
- import type { default as Module } from './module.js'
3
+ import type { default as Module } from './module.mjs'
4
4
 
5
5
  export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
6
6
 
7
- export { default } from './module.js'
7
+ export { default } from './module.mjs'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxtify/pages",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Nuxtify pages module powered by Nuxt and Vuetify.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://nuxtify.dev/",
@@ -16,13 +16,18 @@
16
16
  "type": "module",
17
17
  "exports": {
18
18
  ".": {
19
- "types": "./dist/types.d.ts",
20
- "import": "./dist/module.mjs",
21
- "require": "./dist/module.cjs"
19
+ "types": "./dist/types.d.mts",
20
+ "import": "./dist/module.mjs"
21
+ }
22
+ },
23
+ "main": "./dist/module.mjs",
24
+ "typesVersions": {
25
+ "*": {
26
+ ".": [
27
+ "./dist/types.d.mts"
28
+ ]
22
29
  }
23
30
  },
24
- "main": "./dist/module.cjs",
25
- "types": "./dist/types.d.ts",
26
31
  "files": [
27
32
  "dist"
28
33
  ],
@@ -40,21 +45,21 @@
40
45
  "dependencies": {
41
46
  "@mdi/js": "^7.4.47",
42
47
  "defu": "^6.1.4",
43
- "vuetify-nuxt-module": "^0.18.5"
48
+ "vuetify-nuxt-module": "^0.18.6"
44
49
  },
45
50
  "devDependencies": {
46
- "@nuxt/devtools": "^2.3.2",
51
+ "@nuxt/devtools": "^2.4.0",
47
52
  "@nuxt/eslint-config": "^1.3.0",
48
- "@nuxt/kit": "^3.16.2",
49
- "@nuxt/module-builder": "^0.8.4",
50
- "@nuxt/schema": "^3.16.2",
53
+ "@nuxt/kit": "^3.17.1",
54
+ "@nuxt/module-builder": "^1.0.1",
55
+ "@nuxt/schema": "^3.17.1",
51
56
  "@nuxt/test-utils": "^3.17.2",
52
- "@types/node": "^20.17.30",
57
+ "@types/node": "^20.17.32",
53
58
  "changelogen": "^0.6.1",
54
- "eslint": "^9.23.0",
55
- "nuxt": "^3.16.2",
59
+ "eslint": "^9.25.1",
60
+ "nuxt": "^3.17.1",
56
61
  "typescript": "~5.8.2",
57
- "vitest": "^3.1.1",
58
- "vue-tsc": "^2.2.8"
62
+ "vitest": "^3.1.2",
63
+ "vue-tsc": "^2.2.10"
59
64
  }
60
65
  }
package/dist/module.cjs DELETED
@@ -1,5 +0,0 @@
1
- module.exports = function(...args) {
2
- return import('./module.mjs').then(m => m.default.call(this, ...args))
3
- }
4
- const _meta = module.exports.meta = require('./module.json')
5
- module.exports.getMeta = () => Promise.resolve(_meta)
package/dist/module.d.ts DELETED
@@ -1,139 +0,0 @@
1
- import * as _nuxt_schema from '@nuxt/schema';
2
-
3
- interface Link {
4
- text: string;
5
- to?: string;
6
- href?: string;
7
- icon?: string;
8
- openInNew?: boolean;
9
- }
10
- interface FooterLinks {
11
- title: string;
12
- links: Link[];
13
- }
14
- interface BrandOptions {
15
- /**
16
- * The name of the brand.
17
- *
18
- * @default "nuxtify-pages"
19
- */
20
- name?: string;
21
- /**
22
- * The domain of the brand.
23
- *
24
- * @default ""
25
- */
26
- domain?: string;
27
- /**
28
- * The tagline of the brand.
29
- *
30
- * @default ""
31
- */
32
- tagline?: string;
33
- /**
34
- * The logo of the brand.
35
- */
36
- logo?: {
37
- /**
38
- * The URL of the light logo. Recommended 5:1 aspect ratio (e.g. 400 x 80 px).
39
- *
40
- * @default ""
41
- */
42
- lightUrl?: string;
43
- /**
44
- * The URL of the dark logo. Recommended 5:1 aspect ratio (e.g. 400 x 80 px).
45
- *
46
- * @default ""
47
- */
48
- darkUrl?: string;
49
- /**
50
- * The width of the logo.
51
- *
52
- * @default 200
53
- */
54
- width?: number;
55
- /**
56
- * The width of the logo on mobile.
57
- *
58
- * @default 150
59
- */
60
- mobileWidth?: number;
61
- };
62
- }
63
- interface PagesOptions {
64
- policies: {
65
- privacyUrl: string;
66
- termsUrl: string;
67
- };
68
- }
69
- interface ModuleOptions {
70
- /**
71
- * Brand options
72
- */
73
- brand?: BrandOptions;
74
- /**
75
- * Pages options
76
- */
77
- pages?: PagesOptions;
78
- /**
79
- * Announcement banner options
80
- */
81
- announcement?: {
82
- show?: boolean;
83
- message?: string;
84
- buttonText?: string;
85
- buttonUrl?: string;
86
- };
87
- /**
88
- * Navigation options
89
- */
90
- navigation?: {
91
- primary?: Link[];
92
- secondary?: Link[];
93
- footerPrimary?: FooterLinks[];
94
- footerSecondary?: Link[];
95
- };
96
- /**
97
- * Footer options
98
- */
99
- footer?: {
100
- copyright?: string;
101
- credits?: {
102
- creator?: {
103
- name?: string;
104
- domain?: string;
105
- };
106
- prependText?: string;
107
- appendText?: string;
108
- showPoweredBy?: boolean;
109
- };
110
- cta?: {
111
- show?: boolean;
112
- title?: string;
113
- subtitle?: string;
114
- color?: string;
115
- };
116
- };
117
- /**
118
- * Email options
119
- */
120
- email?: {
121
- general?: string;
122
- support?: string;
123
- provider?: {
124
- defaultSubmitUrl?: string;
125
- };
126
- };
127
- /**
128
- * Style options
129
- */
130
- style?: {
131
- btn?: {
132
- rounded?: boolean;
133
- };
134
- };
135
- }
136
-
137
- declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
138
-
139
- export { _default as default };
package/dist/types.d.ts DELETED
@@ -1,7 +0,0 @@
1
- import type { NuxtModule } from '@nuxt/schema'
2
-
3
- import type { default as Module } from './module'
4
-
5
- export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
6
-
7
- export { default } from './module'