kmcom-nuxt-layers 1.5.1 → 1.6.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.
@@ -3,7 +3,7 @@ import type { BlogQueryOptions } from '../types/content'
3
3
  export function useBlogPosts(options: BlogQueryOptions = {}) {
4
4
  const { excludeDrafts = true, tags, limit } = options
5
5
 
6
- return useAsyncData('blog-posts', async () => {
6
+ return useContentData('blog-posts', async () => {
7
7
  let posts = await queryCollection('blog').order('date', 'DESC').all()
8
8
 
9
9
  if (excludeDrafts) {
@@ -1,5 +1,5 @@
1
1
  export function useCollectionItem(collection: string, slug: string) {
2
- return useAsyncData(`${collection}-${slug}`, () =>
2
+ return useContentData(`${collection}-${slug}`, () =>
3
3
  queryCollection(collection).path(`/${collection}/${slug}`).first()
4
4
  )
5
5
  }
@@ -3,7 +3,7 @@ export function useCollectionSurround(
3
3
  slug: string,
4
4
  fields: string[] = ['description']
5
5
  ) {
6
- return useAsyncData(`${collection}-${slug}-surround`, () =>
6
+ return useContentData(`${collection}-${slug}-surround`, () =>
7
7
  queryCollectionItemSurroundings(collection, `/${collection}/${slug}`, { fields })
8
8
  )
9
9
  }
@@ -0,0 +1,3 @@
1
+ export const useContentData = createUseAsyncData({
2
+ dedupe: 'cancel',
3
+ })
@@ -1,3 +1,3 @@
1
1
  export function useContentPage(path: string) {
2
- return useAsyncData(`content-page-${path}`, () => queryCollection('content').path(path).first())
2
+ return useContentData(`content-page-${path}`, () => queryCollection('content').path(path).first())
3
3
  }
@@ -3,7 +3,7 @@ import type { GalleryQueryOptions } from '../types/content'
3
3
  export function useGalleryItems(options: GalleryQueryOptions = {}) {
4
4
  const { tags, limit } = options
5
5
 
6
- return useAsyncData('gallery-items', async () => {
6
+ return useContentData('gallery-items', async () => {
7
7
  let items = await queryCollection('gallery').order('date', 'DESC').all()
8
8
 
9
9
  if (tags?.length) {
@@ -3,7 +3,7 @@ import type { PortfolioQueryOptions } from '../types/content'
3
3
  export function usePortfolioItems(options: PortfolioQueryOptions = {}) {
4
4
  const { featured, tags, limit } = options
5
5
 
6
- return useAsyncData('portfolio-items', async () => {
6
+ return useContentData('portfolio-items', async () => {
7
7
  let items = await queryCollection('portfolio').order('year', 'DESC').all()
8
8
 
9
9
  if (featured !== undefined) {
@@ -0,0 +1,3 @@
1
+ export const useFormsFetch = createUseFetch({
2
+ baseURL: '/api/forms',
3
+ })
@@ -84,9 +84,6 @@ provide('pageTitle', title)
84
84
 
85
85
  <!-- Main content slot -->
86
86
  <slot />
87
-
88
- <!-- Grid debugging helper -->
89
- <LayoutGridDebug />
90
87
  </template>
91
88
 
92
89
  <!-- UPage Layout Mode - needs wrapper with MastMain -->
@@ -96,8 +93,5 @@ provide('pageTitle', title)
96
93
  <slot />
97
94
  </UPage>
98
95
  </MastMain>
99
-
100
- <!-- Grid debugging helper -->
101
- <LayoutGridDebug />
102
96
  </div>
103
97
  </template>
@@ -0,0 +1,5 @@
1
+ <template>
2
+ <nav>
3
+ <slot />
4
+ </nav>
5
+ </template>
@@ -8,14 +8,10 @@ const hasMastHeader = typeof mastHeader !== 'string'
8
8
  const hasMastFooter = typeof mastFooter !== 'string'
9
9
  </script>
10
10
 
11
- <!-- eslint-disable vue/no-multiple-template-root -->
12
11
  <template>
13
- <MastScroller>
14
- <component :is="mastHeader" v-if="hasMastHeader" />
15
- <MastMain>
16
- <slot />
17
- </MastMain>
18
- <component :is="mastFooter" v-if="hasMastFooter" />
19
- <LayoutGridDebug />
20
- </MastScroller>
12
+ <component :is="mastHeader" v-if="hasMastHeader" />
13
+ <MastMain>
14
+ <slot />
15
+ </MastMain>
16
+ <component :is="mastFooter" v-if="hasMastFooter" />
21
17
  </template>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kmcom-nuxt-layers",
3
3
  "private": false,
4
- "version": "1.5.1",
4
+ "version": "1.6.0",
5
5
  "description": "Composable Nuxt 4 layers for building scalable Vue applications",
6
6
  "files": [
7
7
  "layers/*/nuxt.config.ts",
@@ -35,7 +35,7 @@
35
35
  "better-sqlite3": "^12.6.2",
36
36
  "gsap": "^3.14.2",
37
37
  "locomotive-scroll": "^5.0.1",
38
- "nuxt": "^4.3.1",
38
+ "nuxt": "^4.4.2",
39
39
  "nuxt-studio": "^1.4.0",
40
40
  "pinia": "^3.0.4",
41
41
  "tailwindcss": "^4.2.1",