@dargmuesli/nuxt-vio 3.3.1 → 3.4.0
Sign up to get free protection for your applications and to get access to all the features.
- package/components/vio/_/VioApp.vue +2 -11
- package/components/vio/layout/VioLayout.vue +11 -0
- package/composables/useAppLayout.ts +18 -14
- package/package.json +13 -15
- package/plugins/marked.ts +0 -9
@@ -2,18 +2,12 @@
|
|
2
2
|
<div :data-is-loading="isLoading" data-testid="is-loading">
|
3
3
|
<NuxtLayout>
|
4
4
|
<!-- `NuxtLayout` can't have mulitple child nodes (https://github.com/nuxt/nuxt/issues/21759) -->
|
5
|
-
<
|
6
|
-
<NuxtPage :site-description="siteDescriptionProp" />
|
7
|
-
<CookieControl :locale="locale" />
|
8
|
-
</div>
|
5
|
+
<NuxtPage :site-description="siteDescriptionProp" />
|
9
6
|
</NuxtLayout>
|
10
7
|
</div>
|
11
8
|
</template>
|
12
9
|
|
13
10
|
<script setup lang="ts">
|
14
|
-
import type { Locale } from '@dargmuesli/nuxt-cookie-control/dist/runtime/types'
|
15
|
-
import type { WritableComputedRef } from 'vue'
|
16
|
-
|
17
11
|
export interface Props {
|
18
12
|
ogImageAlt: string
|
19
13
|
ogImageComponent?: string
|
@@ -27,15 +21,12 @@ const ogImageComponentProp = toRef(() => props.ogImageComponent)
|
|
27
21
|
const siteDescriptionProp = toRef(() => props.siteDescription)
|
28
22
|
|
29
23
|
const { $dayjs } = useNuxtApp()
|
30
|
-
const
|
24
|
+
const { locale } = useI18n()
|
31
25
|
const cookieControl = useCookieControl()
|
32
26
|
const siteConfig = useSiteConfig()
|
33
27
|
|
34
28
|
const { loadingIds, indicateLoadingDone } = useLoadingDoneIndicator('app')
|
35
29
|
|
36
|
-
// data
|
37
|
-
const locale = i18n.locale as WritableComputedRef<Locale>
|
38
|
-
|
39
30
|
// methods
|
40
31
|
const init = () => {
|
41
32
|
$dayjs.locale(locale.value)
|
@@ -3,5 +3,16 @@
|
|
3
3
|
<main>
|
4
4
|
<slot />
|
5
5
|
</main>
|
6
|
+
<CookieControl :locale="locale" />
|
6
7
|
</div>
|
7
8
|
</template>
|
9
|
+
|
10
|
+
<script setup lang="ts">
|
11
|
+
import type { Locale } from '@dargmuesli/nuxt-cookie-control/dist/runtime/types'
|
12
|
+
import type { WritableComputedRef } from 'vue'
|
13
|
+
|
14
|
+
const i18n = useI18n()
|
15
|
+
|
16
|
+
// data
|
17
|
+
const locale = i18n.locale as WritableComputedRef<Locale>
|
18
|
+
</script>
|
@@ -2,26 +2,30 @@ export const useAppLayout = () => {
|
|
2
2
|
const appConfig = useAppConfig()
|
3
3
|
const siteConfig = useSiteConfig()
|
4
4
|
|
5
|
-
|
5
|
+
useServerHeadSafe({
|
6
6
|
...useLocaleHead({ addSeoAttributes: true }).value,
|
7
7
|
bodyAttrs: {
|
8
8
|
class:
|
9
9
|
'bg-background-bright dark:bg-background-dark font-sans text-text-dark dark:text-text-bright',
|
10
10
|
},
|
11
|
-
})
|
11
|
+
})
|
12
12
|
|
13
|
+
// TODO: convert to `useServerHeadSafe` (https://github.com/harlan-zw/nuxt-seo-kit/issues/98)
|
13
14
|
useServerSeoMeta({
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
}
|
19
|
-
: {}),
|
20
|
-
titleTemplate: (titleChunk) => {
|
21
|
-
return titleChunk && titleChunk !== siteConfig.name
|
22
|
-
? `${titleChunk} ${siteConfig.titleSeparator} ${siteConfig.name}`
|
23
|
-
: siteConfig.name
|
24
|
-
},
|
25
|
-
...(appConfig.vio.seoMeta ? appConfig.vio.seoMeta : {}),
|
15
|
+
titleTemplate: (title) =>
|
16
|
+
title && title !== siteConfig.name
|
17
|
+
? `${title} ${siteConfig.titleSeparator} ${siteConfig.name}`
|
18
|
+
: siteConfig.name,
|
26
19
|
})
|
20
|
+
|
21
|
+
if (appConfig.vio.seoMeta) {
|
22
|
+
useServerSeoMeta(appConfig.vio.seoMeta)
|
23
|
+
}
|
24
|
+
|
25
|
+
if (appConfig.vio.themeColor) {
|
26
|
+
useServerSeoMeta({
|
27
|
+
msapplicationTileColor: appConfig.vio.themeColor,
|
28
|
+
themeColor: appConfig.vio.themeColor,
|
29
|
+
})
|
30
|
+
}
|
27
31
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@dargmuesli/nuxt-vio",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.4.0",
|
4
4
|
"type": "module",
|
5
5
|
"publishConfig": {
|
6
6
|
"access": "public"
|
@@ -8,7 +8,7 @@
|
|
8
8
|
"engines": {
|
9
9
|
"node": "20"
|
10
10
|
},
|
11
|
-
"packageManager": "pnpm@8.7.
|
11
|
+
"packageManager": "pnpm@8.7.4",
|
12
12
|
"files": [
|
13
13
|
"assets",
|
14
14
|
"components",
|
@@ -54,23 +54,23 @@
|
|
54
54
|
},
|
55
55
|
"dependencies": {
|
56
56
|
"@axe-core/playwright": "4.7.3",
|
57
|
-
"@dargmuesli/nuxt-cookie-control": "6.4.
|
57
|
+
"@dargmuesli/nuxt-cookie-control": "6.4.2",
|
58
58
|
"@http-util/status-i18n": "0.8.1",
|
59
59
|
"@nuxt/image": "1.0.0-rc.1",
|
60
60
|
"@nuxtjs/color-mode": "3.3.0",
|
61
61
|
"@nuxtjs/html-validator": "1.5.2",
|
62
|
-
"@nuxtjs/i18n": "8.0.0-rc.
|
62
|
+
"@nuxtjs/i18n": "8.0.0-rc.4",
|
63
63
|
"@nuxtjs/tailwindcss": "6.8.0",
|
64
|
-
"@nuxtseo/module": "2.0.0-beta.
|
64
|
+
"@nuxtseo/module": "2.0.0-beta.25",
|
65
65
|
"@pinia/nuxt": "0.4.11",
|
66
66
|
"@playwright/test": "1.37.1",
|
67
67
|
"@tailwindcss/forms": "0.5.6",
|
68
|
-
"@tailwindcss/typography": "0.5.
|
69
|
-
"@types/cookie": "0.5.
|
70
|
-
"@types/lodash-es": "4.17.
|
71
|
-
"@urql/core": "4.1.
|
68
|
+
"@tailwindcss/typography": "0.5.10",
|
69
|
+
"@types/cookie": "0.5.2",
|
70
|
+
"@types/lodash-es": "4.17.9",
|
71
|
+
"@urql/core": "4.1.2",
|
72
72
|
"@urql/devtools": "2.0.3",
|
73
|
-
"@urql/exchange-graphcache": "6.3.
|
73
|
+
"@urql/exchange-graphcache": "6.3.3",
|
74
74
|
"@urql/vue": "1.1.2",
|
75
75
|
"@vuelidate/core": "2.0.3",
|
76
76
|
"@vuelidate/validators": "2.0.4",
|
@@ -78,9 +78,8 @@
|
|
78
78
|
"cookie": "0.5.0",
|
79
79
|
"dayjs": "2.0.0-alpha.4",
|
80
80
|
"is-https": "4.0.0",
|
81
|
-
"jose": "4.14.
|
81
|
+
"jose": "4.14.6",
|
82
82
|
"lodash-es": "4.17.21",
|
83
|
-
"marked": "7.0.5",
|
84
83
|
"pinia": "2.1.6",
|
85
84
|
"sweetalert2": "11.7.27",
|
86
85
|
"vue-gtag": "2.0.1",
|
@@ -89,7 +88,6 @@
|
|
89
88
|
"devDependencies": {
|
90
89
|
"@intlify/eslint-plugin-vue-i18n": "3.0.0-next.3",
|
91
90
|
"@nuxtjs/eslint-config-typescript": "12.1.0",
|
92
|
-
"@types/marked": "5.0.1",
|
93
91
|
"cross-env": "7.0.3",
|
94
92
|
"eslint": "8.48.0",
|
95
93
|
"eslint-config-prettier": "9.0.0",
|
@@ -98,9 +96,9 @@
|
|
98
96
|
"eslint-plugin-prettier": "5.0.0",
|
99
97
|
"eslint-plugin-yml": "1.8.0",
|
100
98
|
"lint-staged": "14.0.1",
|
101
|
-
"nuxt": "3.7.
|
99
|
+
"nuxt": "3.7.1",
|
102
100
|
"prettier": "3.0.3",
|
103
|
-
"prettier-plugin-tailwindcss": "0.5.
|
101
|
+
"prettier-plugin-tailwindcss": "0.5.4",
|
104
102
|
"stylelint": "15.10.3",
|
105
103
|
"stylelint-config-recommended-vue": "1.5.0",
|
106
104
|
"stylelint-config-standard": "34.0.0",
|