@nuxtify/core 0.1.7 → 0.1.9

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
@@ -67,6 +67,14 @@ Provides single and multi-page website building blocks so you can _ship weirdly
67
67
  - Ready to use page components, page templates, and email subscribe form
68
68
  - (coming soon) Robots, sitemaps, schema.org, social share images, broken links, and more powered by [Nuxt SEO](https://nuxtseo.com/)
69
69
 
70
+ ### [Nuxtify App](https://github.com/nuxtify-dev/app)
71
+
72
+ Provides a single page app (SPA) skeleton for building your next SaaS or AI tool.
73
+
74
+ - Admin backend powered by [Firebase](https://firebase.google.com/) and [Vuefire](https://vuefire.vuejs.org/)
75
+ - Sign in and sign up pages powered by [Firebase Authentication](https://firebase.google.com/products/auth)
76
+ - User account page, app style navigation, and more...
77
+
70
78
  ## <a name="features">✨ Features</a>
71
79
 
72
80
  Nuxtify Core builds on the amazing features of [Vue](https://vuejs.org/guide/introduction), [Nuxt](https://nuxt.com/docs/getting-started/introduction), and [Vuetify](https://vuetifyjs.com/en/introduction/why-vuetify/).
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxtify/core",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "configKey": "nuxtifyCore",
5
5
  "compatibility": {
6
6
  "nuxt": ">=3.16.0",
package/dist/module.mjs CHANGED
@@ -2,7 +2,7 @@ import { defineNuxtModule, createResolver, installModule, addComponentsDir, addI
2
2
  import { defu } from 'defu';
3
3
 
4
4
  const name = "@nuxtify/core";
5
- const version = "0.1.7";
5
+ const version = "0.1.9";
6
6
 
7
7
  const module = defineNuxtModule({
8
8
  meta: {
@@ -0,0 +1,48 @@
1
+ <script setup>
2
+ import { useNuxtifyConfig } from "#imports";
3
+ const nuxtifyConfig = useNuxtifyConfig();
4
+ </script>
5
+
6
+ <template>
7
+ <div v-if="nuxtifyConfig.credits?.prependText || nuxtifyConfig.credits?.creator?.name || nuxtifyConfig.credits?.appendText || nuxtifyConfig.credits?.showPoweredBy">
8
+ <small>
9
+ <!-- Prepend text -->
10
+ <span
11
+ v-if="nuxtifyConfig.credits.prependText"
12
+ >
13
+ {{ nuxtifyConfig.credits.prependText + " " }}
14
+ </span>
15
+
16
+ <!-- Creator name -->
17
+ <span v-if="nuxtifyConfig.credits.creator?.name">
18
+ <a
19
+ v-if="nuxtifyConfig.credits.creator.domain"
20
+ :href="`https://${nuxtifyConfig.credits.creator.domain}/?utm_source=${nuxtifyConfig.brand?.domain}&utm_medium=referral`"
21
+ target="_blank"
22
+ rel="noopener noreferrer"
23
+ class="font-weight-bold"
24
+ >{{ nuxtifyConfig.credits.creator.name }}</a><span v-else>{{ nuxtifyConfig.credits.creator.name }}</span>.
25
+ </span>
26
+
27
+ <!-- Append text -->
28
+ <span
29
+ v-if="nuxtifyConfig.credits.appendText"
30
+ >
31
+ {{ nuxtifyConfig.credits.appendText + " " }}
32
+ </span>
33
+
34
+ <!-- Powered by -->
35
+ <span v-if="nuxtifyConfig.credits.showPoweredBy">
36
+ <a
37
+ :href="`https://nuxtify.dev/?utm_source=${nuxtifyConfig.brand?.domain}&utm_medium=referral&utm_campaign=poweredby`"
38
+ target="_blank"
39
+ rel="noopener nofollow"
40
+ >Powered by Nuxtify</a>.
41
+ </span>
42
+ </small>
43
+ </div>
44
+ </template>
45
+
46
+ <style scoped>
47
+ a{color:inherit;justify-content:start;text-decoration:none}.v-btn:hover,a:hover{text-decoration:underline;text-underline-offset:4px}
48
+ </style>
@@ -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,29 @@
1
+ <script setup>
2
+ import { useErrorMessage } from "#imports";
3
+ const errorMessage = useErrorMessage();
4
+ const isDev = import.meta.dev;
5
+ </script>
6
+
7
+ <template>
8
+ <v-alert
9
+ v-if="errorMessage"
10
+ type="error"
11
+ density="compact"
12
+ variant="text"
13
+ :icon="false"
14
+ class="text-body-2 pa-0"
15
+ >
16
+ {{ errorMessage }}
17
+
18
+ <!-- DEBUG -->
19
+ <div
20
+ v-if="isDev"
21
+ class="mt-2"
22
+ >
23
+ <h2 class="text-h6 text-black">
24
+ Debug
25
+ </h2>
26
+ <pre>{{ errorMessage }}</pre>
27
+ </div>
28
+ </v-alert>
29
+ </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,2 +1,6 @@
1
1
  import type { ModuleOptions } from '../../types.js';
2
2
  export declare const useNuxtifyConfig: () => ModuleOptions;
3
+ export declare const useNuxtifySiteTitle: ({ separator, siteName, }?: {
4
+ separator?: string;
5
+ siteName?: string;
6
+ }) => void;
@@ -1,2 +1,18 @@
1
+ import { useHead } from "@unhead/vue";
1
2
  import { useAppConfig } from "#imports";
2
3
  export const useNuxtifyConfig = () => useAppConfig().nuxtify;
4
+ export const useNuxtifySiteTitle = ({
5
+ separator = "|",
6
+ siteName = ""
7
+ } = {}) => {
8
+ const nuxtifyConfig = useNuxtifyConfig();
9
+ useHead({
10
+ titleTemplate: (titleChunk) => {
11
+ return titleChunk ? `${titleChunk} %separator %siteName` : "%siteName";
12
+ },
13
+ templateParams: {
14
+ siteName: siteName || nuxtifyConfig.brand?.name,
15
+ separator
16
+ }
17
+ });
18
+ };
@@ -11,6 +11,8 @@ export declare const formRules: {
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
13
  maxLength1200: (v: string) => true | "Must not be longer than 1200 characters";
14
+ maxLength5000: (v: string) => true | "Must not be longer than 5000 characters";
15
+ maxLength10000: (v: string) => true | "Must not be longer than 10,000 characters";
14
16
  isInteger: (v: string) => true | "Must be an integer";
15
17
  gt0: (v: string) => true | "Must be greater than 0";
16
18
  gte6: (v: string) => true | "Must be greater than or equal to 6";
@@ -14,6 +14,8 @@ export const formRules = {
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
16
  maxLength1200: (v) => v ? v.length <= 1200 || "Must not be longer than 1200 characters" : true,
17
+ maxLength5000: (v) => v ? v.length <= 5e3 || "Must not be longer than 5000 characters" : true,
18
+ maxLength10000: (v) => v ? v.length <= 1e4 || "Must not be longer than 10,000 characters" : true,
17
19
  // Number
18
20
  isInteger: (v) => Number.isInteger(+v) || "Must be an integer",
19
21
  gt0: (v) => Number.parseFloat(v) > 0 || "Must be greater than 0",
@@ -5,3 +5,11 @@ export declare const addOrReplaceArrayItem: (array: {
5
5
  id: string | number;
6
6
  [key: string]: unknown;
7
7
  }) => void;
8
+ /**
9
+ * Returns a random integer between min (inclusive) and max (inclusive).
10
+ * The value is no lower than min (or the next integer greater than min
11
+ * if min isn't an integer) and no greater than max (or the next integer
12
+ * lower than max if max isn't an integer).
13
+ * Using Math.round() will give you a non-uniform distribution!
14
+ */
15
+ export declare const getRandomInt: (min: number, max: number) => number;
@@ -3,3 +3,8 @@ export const addOrReplaceArrayItem = (array, element) => {
3
3
  if (i > -1) array[i] = element;
4
4
  else array.push(element);
5
5
  };
6
+ export const getRandomInt = (min, max) => {
7
+ min = Math.ceil(min);
8
+ max = Math.floor(max);
9
+ return Math.floor(Math.random() * (max - min + 1)) + min;
10
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxtify/core",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
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>",
@@ -44,23 +44,23 @@
44
44
  },
45
45
  "dependencies": {
46
46
  "@mdi/js": "^7.4.47",
47
- "@nuxt/kit": "^3.17.3",
48
47
  "defu": "^6.1.4",
49
- "vuetify-nuxt-module": "^0.18.6"
48
+ "vuetify-nuxt-module": "^0.18.7"
50
49
  },
51
50
  "devDependencies": {
52
- "@nuxt/devtools": "^2.4.0",
51
+ "@nuxt/devtools": "^2.5.0",
53
52
  "@nuxt/eslint": "^1.4.1",
54
53
  "@nuxt/eslint-config": "^1.3.1",
54
+ "@nuxt/kit": "^3.17.5",
55
55
  "@nuxt/module-builder": "^1.0.1",
56
- "@nuxt/schema": "^3.17.3",
57
- "@nuxt/test-utils": "^3.19.0",
58
- "@types/node": "^22.15.19",
56
+ "@nuxt/schema": "^3.17.5",
57
+ "@nuxt/test-utils": "^3.19.1",
58
+ "@types/node": "^22.15.32",
59
59
  "changelogen": "^0.6.1",
60
- "eslint": "^9.27.0",
61
- "nuxt": "^3.17.3",
60
+ "eslint": "^9.29.0",
61
+ "nuxt": "^3.17.5",
62
62
  "typescript": "~5.8.3",
63
- "vitest": "^3.1.4",
63
+ "vitest": "^3.2.3",
64
64
  "vue-tsc": "^2.2.10"
65
65
  }
66
66
  }