@happydesigns/ui 0.13.5 → 0.15.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.
- package/README.md +53 -94
- package/app/app.config.ts +168 -169
- package/app/app.vue +11 -0
- package/app/components/article/ArticleGrid.vue +134 -158
- package/app/components/article/ArticleGridDate.vue +1 -1
- package/app/components/article/ArticleHeaderBody.vue +20 -20
- package/app/components/article/ArticleHeadlineMeta.vue +26 -26
- package/app/components/article/ArticleList.vue +80 -95
- package/app/components/article/ArticlePage.vue +17 -16
- package/app/components/footer/FooterColumnHeading.vue +5 -5
- package/app/components/footer/FooterColumns.vue +16 -20
- package/app/components/footer/FooterCopyright.vue +35 -29
- package/app/components/traits/Authors.vue +21 -20
- package/app/components/traits/BackButton.vue +15 -26
- package/app/components/traits/Category.vue +9 -9
- package/app/components/traits/CopyButton.vue +32 -39
- package/app/components/traits/Dates.vue +20 -20
- package/app/components/traits/Links.vue +17 -17
- package/app/components/traits/Location.vue +20 -20
- package/app/components/traits/Separator.vue +21 -26
- package/app/components/traits/SeparatorButtons.vue +54 -56
- package/app/components/traits/Surround.vue +51 -60
- package/app/components/traits/Toc.vue +16 -16
- package/app/composables/useArticleList.ts +13 -15
- package/app/composables/useArticleListQuery.ts +54 -0
- package/app/composables/useCategoryBadge.ts +27 -27
- package/app/composables/useClipboard.ts +26 -26
- package/app/composables/usePageContent.ts +18 -18
- package/app/composables/usePageSeo.ts +30 -30
- package/app/layouts/article.vue +120 -128
- package/app/layouts/content.vue +59 -67
- package/app/layouts/default.vue +1 -10
- package/app/types/config.ts +13 -6
- package/app/utils/resolveUsers.ts +32 -3
- package/content.config.ts +6 -6
- package/nuxt.config.ts +72 -80
- package/package.json +29 -18
- package/schemas/collections.ts +46 -46
- package/schemas/index.ts +2 -2
- package/schemas/traits.ts +90 -90
package/app/layouts/article.vue
CHANGED
|
@@ -1,128 +1,120 @@
|
|
|
1
|
-
<script setup lang="ts" generic="C extends keyof PageCollections
|
|
2
|
-
import type { PageCollections } from '@nuxt/content'
|
|
3
|
-
|
|
4
|
-
const {
|
|
5
|
-
path
|
|
6
|
-
collection
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
<
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
</template>
|
|
122
|
-
</UPage>
|
|
123
|
-
</UContainer>
|
|
124
|
-
</UMain>
|
|
125
|
-
|
|
126
|
-
<AppFooter />
|
|
127
|
-
</div>
|
|
128
|
-
</template>
|
|
1
|
+
<script setup lang="ts" generic="C extends keyof PageCollections = 'article'">
|
|
2
|
+
import type { PageCollections } from '@nuxt/content'
|
|
3
|
+
|
|
4
|
+
const props = defineProps<{
|
|
5
|
+
path?: string
|
|
6
|
+
collection?: C
|
|
7
|
+
}>()
|
|
8
|
+
|
|
9
|
+
const route = useRoute()
|
|
10
|
+
const collection = computed(() => props.collection ?? 'article')
|
|
11
|
+
|
|
12
|
+
const { data: page } = await usePageContent({
|
|
13
|
+
path: () => props.path,
|
|
14
|
+
collection: () => collection.value,
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
const { config, has } = useVariant(collection)
|
|
18
|
+
const hasHeader = has('header')
|
|
19
|
+
const hasBackButton = has('backButton')
|
|
20
|
+
const hasCopyButton = has('copyButton')
|
|
21
|
+
const hasSeparator = has('separator')
|
|
22
|
+
const hasSurround = has('surround')
|
|
23
|
+
const hasToc = has('toc')
|
|
24
|
+
const tocEnabled = computed(() => !page.value || !('toc' in page.value) || page.value.toc !== false)
|
|
25
|
+
|
|
26
|
+
if (!page.value) {
|
|
27
|
+
throw createError({
|
|
28
|
+
statusCode: 404,
|
|
29
|
+
statusMessage: `${collection.value} ${props.path || route.path} not found`,
|
|
30
|
+
fatal: true,
|
|
31
|
+
})
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
usePageSeo(page)
|
|
35
|
+
|
|
36
|
+
const header = computed(() => resolvePageHeader(page.value))
|
|
37
|
+
|
|
38
|
+
const breadcrumbsBase = computed(() => config.value.breadcrumbs ?? [])
|
|
39
|
+
|
|
40
|
+
const breadcrumbItems = computed(() => {
|
|
41
|
+
return [
|
|
42
|
+
...breadcrumbsBase.value,
|
|
43
|
+
{ label: page.value?.title, to: page.value?.path },
|
|
44
|
+
]
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
const backLink = computed(() => {
|
|
48
|
+
const lastBreadcrumb = breadcrumbsBase.value.at(-1)
|
|
49
|
+
|
|
50
|
+
if (!lastBreadcrumb && !config.value?.backButton)
|
|
51
|
+
return null
|
|
52
|
+
|
|
53
|
+
return { ...(lastBreadcrumb ?? {}), ...config.value?.backButton }
|
|
54
|
+
})
|
|
55
|
+
</script>
|
|
56
|
+
|
|
57
|
+
<template>
|
|
58
|
+
<UContainer v-if="page">
|
|
59
|
+
<UPageHeader
|
|
60
|
+
v-if="hasHeader && header"
|
|
61
|
+
v-bind="header"
|
|
62
|
+
:ui="{
|
|
63
|
+
headline: 'all:flex flex-col gap-y-8 items-start',
|
|
64
|
+
wrapper: 'lg:flex-row',
|
|
65
|
+
}"
|
|
66
|
+
>
|
|
67
|
+
<template #headline>
|
|
68
|
+
<UBreadcrumb
|
|
69
|
+
:ui="{ root: 'max-w-full' }"
|
|
70
|
+
:items="breadcrumbItems"
|
|
71
|
+
/>
|
|
72
|
+
<HArticleHeadlineMeta :page="page" :collection="collection" />
|
|
73
|
+
</template>
|
|
74
|
+
<HArticleHeaderBody :page="page" :collection="collection">
|
|
75
|
+
<slot name="header" />
|
|
76
|
+
</HArticleHeaderBody>
|
|
77
|
+
</UPageHeader>
|
|
78
|
+
|
|
79
|
+
<UPage>
|
|
80
|
+
<UPageBody>
|
|
81
|
+
<slot />
|
|
82
|
+
|
|
83
|
+
<div
|
|
84
|
+
v-if="hasBackButton || hasCopyButton"
|
|
85
|
+
class="all:flex items-center justify-between mt-12"
|
|
86
|
+
>
|
|
87
|
+
<HBackButton
|
|
88
|
+
v-if="hasBackButton && backLink"
|
|
89
|
+
v-bind="backLink"
|
|
90
|
+
/>
|
|
91
|
+
<div class="all:flex justify-end items-center gap-1.5 ml-auto">
|
|
92
|
+
<HCopyButton v-if="hasCopyButton" v-bind="config.copyButton" />
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
|
|
96
|
+
<HSeparator
|
|
97
|
+
v-if="hasSeparator"
|
|
98
|
+
:stem="page?.stem"
|
|
99
|
+
:extension="page?.extension"
|
|
100
|
+
v-bind="config.separator"
|
|
101
|
+
/>
|
|
102
|
+
|
|
103
|
+
<HSurround
|
|
104
|
+
v-if="hasSurround"
|
|
105
|
+
:collection="collection"
|
|
106
|
+
v-bind="config.surround"
|
|
107
|
+
:query="config.query"
|
|
108
|
+
/>
|
|
109
|
+
</UPageBody>
|
|
110
|
+
|
|
111
|
+
<template #right>
|
|
112
|
+
<HToc
|
|
113
|
+
v-if="hasToc && tocEnabled"
|
|
114
|
+
:links="page?.body?.toc?.links"
|
|
115
|
+
:title="page?.body?.toc?.title"
|
|
116
|
+
/>
|
|
117
|
+
</template>
|
|
118
|
+
</UPage>
|
|
119
|
+
</UContainer>
|
|
120
|
+
</template>
|
package/app/layouts/content.vue
CHANGED
|
@@ -1,67 +1,59 @@
|
|
|
1
|
-
<script setup lang="ts" generic="C extends 'page' = 'page'">
|
|
2
|
-
import type { Collections } from '@nuxt/content'
|
|
3
|
-
|
|
4
|
-
const {
|
|
5
|
-
path,
|
|
6
|
-
collection = 'page' as C,
|
|
7
|
-
} = defineProps<{
|
|
8
|
-
path?: string
|
|
9
|
-
collection?: C
|
|
10
|
-
}>()
|
|
11
|
-
|
|
12
|
-
const appConfig = useAppConfig()
|
|
13
|
-
const route = useRoute()
|
|
14
|
-
|
|
15
|
-
const { data: page } = await usePageContent<C, Collections['page']>({
|
|
16
|
-
path: () => path,
|
|
17
|
-
collection: () => collection,
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
const { has } = useVariant(collection)
|
|
21
|
-
const hasHeader = has('header')
|
|
22
|
-
const hasToc = has('toc')
|
|
23
|
-
|
|
24
|
-
if (!page.value) {
|
|
25
|
-
throw createError({
|
|
26
|
-
statusCode: 404,
|
|
27
|
-
statusMessage: `${collection} ${path || route.path} not found`,
|
|
28
|
-
fatal: true,
|
|
29
|
-
})
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
usePageSeo(page)
|
|
33
|
-
|
|
34
|
-
const renderToc = computed(() => hasToc.value && page.value?.toc !== false)
|
|
35
|
-
const header = computed(() => resolvePageHeader(page.value))
|
|
36
|
-
</script>
|
|
37
|
-
|
|
38
|
-
<template>
|
|
39
|
-
<
|
|
40
|
-
<
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
</template>
|
|
61
|
-
</UPage>
|
|
62
|
-
</UContainer>
|
|
63
|
-
</UMain>
|
|
64
|
-
|
|
65
|
-
<AppFooter />
|
|
66
|
-
</div>
|
|
67
|
-
</template>
|
|
1
|
+
<script setup lang="ts" generic="C extends 'page' = 'page'">
|
|
2
|
+
import type { Collections } from '@nuxt/content'
|
|
3
|
+
|
|
4
|
+
const {
|
|
5
|
+
path,
|
|
6
|
+
collection = 'page' as C,
|
|
7
|
+
} = defineProps<{
|
|
8
|
+
path?: string
|
|
9
|
+
collection?: C
|
|
10
|
+
}>()
|
|
11
|
+
|
|
12
|
+
const appConfig = useAppConfig()
|
|
13
|
+
const route = useRoute()
|
|
14
|
+
|
|
15
|
+
const { data: page } = await usePageContent<C, Collections['page']>({
|
|
16
|
+
path: () => path,
|
|
17
|
+
collection: () => collection,
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
const { has } = useVariant(collection)
|
|
21
|
+
const hasHeader = has('header')
|
|
22
|
+
const hasToc = has('toc')
|
|
23
|
+
|
|
24
|
+
if (!page.value) {
|
|
25
|
+
throw createError({
|
|
26
|
+
statusCode: 404,
|
|
27
|
+
statusMessage: `${collection} ${path || route.path} not found`,
|
|
28
|
+
fatal: true,
|
|
29
|
+
})
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
usePageSeo(page)
|
|
33
|
+
|
|
34
|
+
const renderToc = computed(() => hasToc.value && page.value?.toc !== false)
|
|
35
|
+
const header = computed(() => resolvePageHeader(page.value))
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<template>
|
|
39
|
+
<UContainer v-if="page">
|
|
40
|
+
<UPage>
|
|
41
|
+
<UPageHeader
|
|
42
|
+
v-if="hasHeader && header"
|
|
43
|
+
v-bind="header"
|
|
44
|
+
/>
|
|
45
|
+
|
|
46
|
+
<UPageBody>
|
|
47
|
+
<slot />
|
|
48
|
+
</UPageBody>
|
|
49
|
+
|
|
50
|
+
<template #right>
|
|
51
|
+
<UContentToc
|
|
52
|
+
v-if="renderToc && page.body?.toc?.links?.length"
|
|
53
|
+
:links="page.body.toc.links"
|
|
54
|
+
:title="page.body.toc.title || appConfig.app.toc?.title"
|
|
55
|
+
/>
|
|
56
|
+
</template>
|
|
57
|
+
</UPage>
|
|
58
|
+
</UContainer>
|
|
59
|
+
</template>
|
package/app/layouts/default.vue
CHANGED
package/app/types/config.ts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import type { SQLOperator } from '@nuxt/content'
|
|
2
|
+
import type { ButtonProps } from '@nuxt/ui'
|
|
3
|
+
|
|
4
|
+
export type ActionButton = ButtonProps & {
|
|
5
|
+
/** Built-in type for a dynamic GitHub link (URL resolved from app.meta.github) */
|
|
6
|
+
action?: 'github-edit' | 'report-github-issue'
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface QueryConfig {
|
|
10
|
+
fields?: string[]
|
|
11
|
+
where?: { field: string, operator: SQLOperator, value?: unknown }[]
|
|
12
|
+
order?: { field: string, direction: 'ASC' | 'DESC' } | false
|
|
13
|
+
}
|
|
@@ -1,16 +1,45 @@
|
|
|
1
|
+
import type { UserProps } from '@nuxt/ui'
|
|
2
|
+
|
|
3
|
+
interface UserRecord {
|
|
4
|
+
username: string
|
|
5
|
+
name?: UserProps['name']
|
|
6
|
+
description?: UserProps['description']
|
|
7
|
+
to?: UserProps['to']
|
|
8
|
+
avatar?: UserProps['avatar']
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface UserQuery {
|
|
12
|
+
where: (field: 'username', operator: 'IN', value: string[]) => UserQuery
|
|
13
|
+
select: (...fields: Array<keyof UserRecord>) => UserQuery
|
|
14
|
+
all: () => Promise<UserRecord[]>
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Removes the internal collection lookup key before passing a profile to Nuxt UI.
|
|
19
|
+
*/
|
|
20
|
+
export function toUserProps<T extends { username: string }>(
|
|
21
|
+
user: T,
|
|
22
|
+
extraProps: Partial<UserProps> = {},
|
|
23
|
+
) {
|
|
24
|
+
const { username: _lookupKey, ...profile } = user
|
|
25
|
+
|
|
26
|
+
return { ...profile, ...extraProps }
|
|
27
|
+
}
|
|
28
|
+
|
|
1
29
|
/**
|
|
2
30
|
* Fetches user details from the Nuxt Content user collection.
|
|
3
31
|
*
|
|
4
32
|
* @param users - A single username or an array of usernames
|
|
5
33
|
* @returns A promise resolving to the selected user profiles
|
|
6
34
|
*/
|
|
7
|
-
export default async function resolveUsers(users: string | string[], extraProps:
|
|
35
|
+
export default async function resolveUsers(users: string | string[], extraProps: Partial<UserProps> = {}) {
|
|
8
36
|
const userList = Array.isArray(users) ? users : [users]
|
|
9
37
|
|
|
10
|
-
const
|
|
38
|
+
const queryUserCollection = queryCollection as unknown as (collection: 'user') => UserQuery
|
|
39
|
+
const resolved = await queryUserCollection('user')
|
|
11
40
|
.where('username', 'IN', userList)
|
|
12
41
|
.select('username', 'name', 'description', 'to', 'avatar')
|
|
13
42
|
.all()
|
|
14
43
|
|
|
15
|
-
return resolved.map(user => (
|
|
44
|
+
return resolved.map(user => toUserProps(user, extraProps))
|
|
16
45
|
}
|
package/content.config.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineContentConfig } from '@nuxt/content'
|
|
2
|
-
import { collections } from './schemas'
|
|
3
|
-
|
|
4
|
-
export default defineContentConfig({
|
|
5
|
-
collections,
|
|
6
|
-
})
|
|
1
|
+
import { defineContentConfig } from '@nuxt/content'
|
|
2
|
+
import { collections } from './schemas'
|
|
3
|
+
|
|
4
|
+
export default defineContentConfig({
|
|
5
|
+
collections,
|
|
6
|
+
})
|
package/nuxt.config.ts
CHANGED
|
@@ -1,80 +1,72 @@
|
|
|
1
|
-
import { dirname } from 'node:path'
|
|
2
|
-
import { fileURLToPath } from 'node:url'
|
|
3
|
-
import { resolve } from 'pathe'
|
|
4
|
-
|
|
5
|
-
const currentDir: string = dirname(fileURLToPath(import.meta.url))
|
|
6
|
-
|
|
7
|
-
// https://nuxt.com/docs/api/configuration/nuxt-config
|
|
8
|
-
export default defineNuxtConfig({
|
|
9
|
-
|
|
10
|
-
$meta: {
|
|
11
|
-
name: '@happydesigns/ui',
|
|
12
|
-
},
|
|
13
|
-
|
|
14
|
-
components: [
|
|
15
|
-
{ path: './components', pathPrefix: false, prefix: 'H' },
|
|
16
|
-
],
|
|
17
|
-
|
|
18
|
-
css: [
|
|
19
|
-
resolve(currentDir, './app/assets/css/main.css'),
|
|
20
|
-
],
|
|
21
|
-
|
|
22
|
-
devtools: { enabled: true },
|
|
23
|
-
|
|
24
|
-
modules: [
|
|
25
|
-
'@nuxt
|
|
26
|
-
'@
|
|
27
|
-
'@nuxt/
|
|
28
|
-
'
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
standalone: false,
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
studio: {
|
|
78
|
-
dev: true,
|
|
79
|
-
},
|
|
80
|
-
})
|
|
1
|
+
import { dirname } from 'node:path'
|
|
2
|
+
import { fileURLToPath } from 'node:url'
|
|
3
|
+
import { resolve } from 'pathe'
|
|
4
|
+
|
|
5
|
+
const currentDir: string = dirname(fileURLToPath(import.meta.url))
|
|
6
|
+
|
|
7
|
+
// https://nuxt.com/docs/api/configuration/nuxt-config
|
|
8
|
+
export default defineNuxtConfig({
|
|
9
|
+
|
|
10
|
+
$meta: {
|
|
11
|
+
name: '@happydesigns/ui',
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
components: [
|
|
15
|
+
{ path: './components', pathPrefix: false, prefix: 'H' },
|
|
16
|
+
],
|
|
17
|
+
|
|
18
|
+
css: [
|
|
19
|
+
resolve(currentDir, './app/assets/css/main.css'),
|
|
20
|
+
],
|
|
21
|
+
|
|
22
|
+
devtools: { enabled: true },
|
|
23
|
+
|
|
24
|
+
modules: [
|
|
25
|
+
'@happydesigns/nuxt-variants',
|
|
26
|
+
'@nuxt/ui',
|
|
27
|
+
'@nuxt/content',
|
|
28
|
+
'nuxt-studio',
|
|
29
|
+
],
|
|
30
|
+
|
|
31
|
+
variants: {
|
|
32
|
+
registry: {
|
|
33
|
+
// Data features — schema only, no config
|
|
34
|
+
dates: {},
|
|
35
|
+
authors: {},
|
|
36
|
+
category: {},
|
|
37
|
+
status: {},
|
|
38
|
+
header: {},
|
|
39
|
+
toc: {},
|
|
40
|
+
links: {},
|
|
41
|
+
location: {},
|
|
42
|
+
layout: {},
|
|
43
|
+
separatorButtons: {},
|
|
44
|
+
|
|
45
|
+
// UI features — config defined in app.config.ts
|
|
46
|
+
user: {},
|
|
47
|
+
backButton: {},
|
|
48
|
+
copyButton: {},
|
|
49
|
+
separator: {},
|
|
50
|
+
surround: {},
|
|
51
|
+
|
|
52
|
+
// Collection variants — extends chains defined here for graph generation
|
|
53
|
+
snippet: {},
|
|
54
|
+
article: {
|
|
55
|
+
extends: ['dates', 'authors', 'category', 'status', 'header', 'toc', 'surround', 'copyButton', 'separator', 'backButton', 'user'],
|
|
56
|
+
config: {},
|
|
57
|
+
},
|
|
58
|
+
event: {
|
|
59
|
+
extends: ['dates', 'location', 'category', 'links', 'status', 'header', 'toc', 'surround', 'copyButton', 'separator', 'backButton', 'user'],
|
|
60
|
+
config: {},
|
|
61
|
+
},
|
|
62
|
+
page: {
|
|
63
|
+
extends: ['layout', 'header', 'toc'],
|
|
64
|
+
config: {},
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
|
|
69
|
+
studio: {
|
|
70
|
+
dev: true,
|
|
71
|
+
},
|
|
72
|
+
})
|