@nuxtify/core 0.1.5 → 0.1.6

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,5 +1,16 @@
1
1
  import * as _nuxt_schema from '@nuxt/schema';
2
2
 
3
+ interface Link {
4
+ text: string;
5
+ to?: string;
6
+ href?: string;
7
+ icon?: string;
8
+ openInNew?: boolean;
9
+ }
10
+ interface TitledLinks {
11
+ title: string;
12
+ links: Link[];
13
+ }
3
14
  interface BrandOptions {
4
15
  /**
5
16
  * The name of the brand.
@@ -75,6 +86,15 @@ interface ModuleOptions {
75
86
  buttonText?: string;
76
87
  buttonUrl?: string;
77
88
  };
89
+ /**
90
+ * Navigation options
91
+ */
92
+ navigation?: {
93
+ primary?: Link[];
94
+ secondary?: Link[];
95
+ altPrimary?: TitledLinks[];
96
+ altSecondary?: Link[];
97
+ };
78
98
  /**
79
99
  * Credits options
80
100
  */
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxtify/core",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
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.5";
5
+ const version = "0.1.6";
6
6
 
7
7
  const module = defineNuxtModule({
8
8
  meta: {
@@ -41,6 +41,13 @@ const module = defineNuxtModule({
41
41
  buttonText: "",
42
42
  buttonUrl: ""
43
43
  },
44
+ // Navigation
45
+ navigation: {
46
+ primary: [],
47
+ secondary: [],
48
+ altPrimary: [],
49
+ altSecondary: []
50
+ },
44
51
  // Credits
45
52
  credits: {
46
53
  creator: {
@@ -21,3 +21,14 @@ export declare const slugify: (text: string) => string;
21
21
  export declare const unslugify: (text: string) => string;
22
22
  export declare function pluralize(value: number, units: string, showValue?: boolean): string;
23
23
  export declare const getLanguageName: (languageCode: string, displayLanguage?: string) => string | undefined;
24
+ /**
25
+ * Determines the correct indefinite article ("a" or "an") for a given string
26
+ * and optionally prepends it to the string.
27
+ *
28
+ * @param text The input string for which to determine the article.
29
+ * @param includeText If true (default), returns the article followed by the original text (e.g., "an apple").
30
+ * If false, returns only the article (e.g., "an").
31
+ * @returns The determined article, optionally with the original text, or an empty string
32
+ * if the input text is empty and includeText is false, or the original text if empty and includeText is true.
33
+ */
34
+ export declare function addArticle(text: string | undefined, includeText?: boolean): string;
@@ -155,3 +155,19 @@ export const getLanguageName = (languageCode, displayLanguage = "en") => {
155
155
  return languageCode;
156
156
  }
157
157
  };
158
+ export function addArticle(text, includeText = true) {
159
+ if (!text) return "";
160
+ const firstLetter = text[0].toLowerCase();
161
+ const vowels = ["a", "e", "i", "o", "u"];
162
+ let article;
163
+ if (vowels.includes(firstLetter)) {
164
+ article = "an";
165
+ } else {
166
+ article = "a";
167
+ }
168
+ if (includeText) {
169
+ return `${article} ${text}`;
170
+ } else {
171
+ return article;
172
+ }
173
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxtify/core",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
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>",