@nuxtify/core 0.1.8 → 0.1.10
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 +8 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +6 -3
- package/dist/runtime/components/app/AppCredits.vue +1 -8
- package/dist/runtime/components/app/AppCredits.vue.d.ts +1 -13
- package/dist/runtime/components/app/AppError.vue +29 -0
- package/dist/runtime/components/app/AppError.vue.d.ts +2 -0
- package/dist/runtime/composables/nuxtify.js +2 -1
- package/dist/runtime/utils/text.d.ts +16 -2
- package/dist/runtime/utils/text.js +33 -15
- package/package.json +1 -1
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
package/dist/module.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineNuxtModule, createResolver, installModule, addComponentsDir, addImportsDir, addServerImportsDir, addRouteMiddleware } from '@nuxt/kit';
|
|
1
|
+
import { defineNuxtModule, createResolver, useLogger, installModule, addComponentsDir, addImportsDir, addServerImportsDir, addRouteMiddleware } from '@nuxt/kit';
|
|
2
2
|
import { defu } from 'defu';
|
|
3
3
|
|
|
4
4
|
const name = "@nuxtify/core";
|
|
5
|
-
const version = "0.1.
|
|
5
|
+
const version = "0.1.10";
|
|
6
6
|
|
|
7
7
|
const module = defineNuxtModule({
|
|
8
8
|
meta: {
|
|
@@ -66,7 +66,7 @@ const module = defineNuxtModule({
|
|
|
66
66
|
},
|
|
67
67
|
async setup(_options, _nuxt) {
|
|
68
68
|
const resolver = createResolver(import.meta.url);
|
|
69
|
-
if (_options.verboseLogs)
|
|
69
|
+
if (_options.verboseLogs) useLogger("[nuxtify-core] Verbose logging enabled.");
|
|
70
70
|
await installModule("vuetify-nuxt-module", {
|
|
71
71
|
vuetifyOptions: {
|
|
72
72
|
icons: {
|
|
@@ -90,6 +90,9 @@ const module = defineNuxtModule({
|
|
|
90
90
|
},
|
|
91
91
|
VFooter: {
|
|
92
92
|
VBtn: { color: "inherit" }
|
|
93
|
+
},
|
|
94
|
+
VNumberInput: {
|
|
95
|
+
VBtn: { color: "inherit", variant: "inherit" }
|
|
93
96
|
}
|
|
94
97
|
}
|
|
95
98
|
}
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { useNuxtifyConfig } from "#imports";
|
|
3
|
-
defineProps({
|
|
4
|
-
brandOpacity: {
|
|
5
|
-
type: Number,
|
|
6
|
-
default: 1
|
|
7
|
-
}
|
|
8
|
-
});
|
|
9
3
|
const nuxtifyConfig = useNuxtifyConfig();
|
|
10
4
|
</script>
|
|
11
5
|
|
|
@@ -23,7 +17,6 @@ const nuxtifyConfig = useNuxtifyConfig();
|
|
|
23
17
|
<span v-if="nuxtifyConfig.credits.creator?.name">
|
|
24
18
|
<a
|
|
25
19
|
v-if="nuxtifyConfig.credits.creator.domain"
|
|
26
|
-
id="brand-name"
|
|
27
20
|
:href="`https://${nuxtifyConfig.credits.creator.domain}/?utm_source=${nuxtifyConfig.brand?.domain}&utm_medium=referral`"
|
|
28
21
|
target="_blank"
|
|
29
22
|
rel="noopener noreferrer"
|
|
@@ -51,5 +44,5 @@ const nuxtifyConfig = useNuxtifyConfig();
|
|
|
51
44
|
</template>
|
|
52
45
|
|
|
53
46
|
<style scoped>
|
|
54
|
-
a{color:inherit;justify-content:start;text-decoration:none}.v-btn:hover,a:hover{text-decoration:underline;text-underline-offset:4px}
|
|
47
|
+
a{color:inherit;justify-content:start;text-decoration:none}.v-btn:hover,a:hover{text-decoration:underline;text-underline-offset:4px}
|
|
55
48
|
</style>
|
|
@@ -1,14 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<import("vue").
|
|
2
|
-
brandOpacity: {
|
|
3
|
-
type: NumberConstructor;
|
|
4
|
-
default: number;
|
|
5
|
-
};
|
|
6
|
-
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
7
|
-
brandOpacity: {
|
|
8
|
-
type: NumberConstructor;
|
|
9
|
-
default: number;
|
|
10
|
-
};
|
|
11
|
-
}>> & Readonly<{}>, {
|
|
12
|
-
brandOpacity: number;
|
|
13
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
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>;
|
|
14
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;
|
|
@@ -13,8 +13,22 @@ export declare function getPronouns(gender: string): {
|
|
|
13
13
|
possessivePlural: string;
|
|
14
14
|
};
|
|
15
15
|
export declare const formatPhone: (input: string, separator?: string) => string;
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Formats a date or a date-time using the Intl.DateTimeFormat API.
|
|
18
|
+
*
|
|
19
|
+
* @param date The date to format (number, string, or Date).
|
|
20
|
+
* @param config Optional configuration object.
|
|
21
|
+
* @param config.type The format to use: 'date' (default) or 'datetime'.
|
|
22
|
+
* @param config.locale A string with a BCP 47 language tag (e.g., 'en-US').
|
|
23
|
+
* @param config.options Custom formatting options to override the default.
|
|
24
|
+
* @param config.defaultString The string to return if the date is invalid.
|
|
25
|
+
*/
|
|
26
|
+
export declare function formatDate(date: number | string | Date, { type, locale, options, defaultString, }?: {
|
|
27
|
+
type?: 'date' | 'datetime';
|
|
28
|
+
locale?: string;
|
|
29
|
+
options?: Intl.DateTimeFormatOptions;
|
|
30
|
+
defaultString?: string;
|
|
31
|
+
}): string;
|
|
18
32
|
export declare function booleanToText(bool: boolean): "Yes" | "No";
|
|
19
33
|
export declare const truncate: (text: string, maxLength?: number, ellipses?: boolean) => string;
|
|
20
34
|
export declare const slugify: (text: string) => string;
|
|
@@ -84,21 +84,39 @@ export const formatPhone = (input, separator = "-") => {
|
|
|
84
84
|
}
|
|
85
85
|
return phone;
|
|
86
86
|
};
|
|
87
|
-
export function formatDate(date,
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
87
|
+
export function formatDate(date, {
|
|
88
|
+
type = "date",
|
|
89
|
+
locale = "en-US",
|
|
90
|
+
options,
|
|
91
|
+
defaultString = "-"
|
|
92
|
+
} = {}) {
|
|
93
|
+
if (date === null || date === void 0) {
|
|
94
|
+
return defaultString;
|
|
95
|
+
}
|
|
96
|
+
const dateObj = new Date(date);
|
|
97
|
+
if (Number.isNaN(dateObj.getTime())) {
|
|
98
|
+
return defaultString;
|
|
99
|
+
}
|
|
100
|
+
const defaultOptions = {
|
|
101
|
+
date: {
|
|
102
|
+
year: "numeric",
|
|
103
|
+
month: "long",
|
|
104
|
+
day: "numeric"
|
|
105
|
+
},
|
|
106
|
+
datetime: {
|
|
107
|
+
year: "numeric",
|
|
108
|
+
month: "short",
|
|
109
|
+
day: "numeric",
|
|
110
|
+
hour: "numeric",
|
|
111
|
+
minute: "numeric"
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
const formatOptions = { ...defaultOptions[type], ...options };
|
|
115
|
+
try {
|
|
116
|
+
return new Intl.DateTimeFormat(locale, formatOptions).format(dateObj);
|
|
117
|
+
} catch {
|
|
118
|
+
return defaultString;
|
|
119
|
+
}
|
|
102
120
|
}
|
|
103
121
|
export function booleanToText(bool) {
|
|
104
122
|
return bool ? "Yes" : "No";
|