kmcom-nuxt-layers 2.1.6 → 2.2.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.
@@ -7,7 +7,9 @@ export function createPortfolioComposables(collectionName: string) {
7
7
  const { featured, tags, limit } = options
8
8
 
9
9
  return useContentData(`${collectionName}-items`, async () => {
10
- let items = await queryCollection(collectionName).order('year', 'DESC').all()
10
+ let items = (await queryCollection(collectionName).all()).sort(
11
+ (a, b) => (b.year ?? 0) - (a.year ?? 0)
12
+ )
11
13
 
12
14
  if (featured !== undefined) {
13
15
  items = items.filter((item) => item.featured === featured)
@@ -4,7 +4,9 @@ export function useBlogPosts(options: BlogQueryOptions = {}) {
4
4
  const { excludeDrafts = true, tags, limit } = options
5
5
 
6
6
  return useContentData('blog-posts', async () => {
7
- let posts = await queryCollection('blog').order('date', 'DESC').all()
7
+ let posts = (await queryCollection('blog').all()).sort(
8
+ (a, b) => (b.date ?? '').localeCompare(a.date ?? '')
9
+ )
8
10
 
9
11
  if (excludeDrafts) {
10
12
  posts = posts.filter((post) => !post.draft)
@@ -6,7 +6,9 @@ export function useGalleryItems(options: GalleryQueryOptions = {}) {
6
6
  const { tags, limit } = options
7
7
 
8
8
  return useContentData('gallery-items', async () => {
9
- let items = await queryCollection('gallery').order('date', 'DESC').all()
9
+ let items = (await queryCollection('gallery').all()).sort(
10
+ (a, b) => (b.date ?? '').localeCompare(a.date ?? '')
11
+ )
10
12
 
11
13
  if (tags?.length) {
12
14
  items = items.filter((item) => item.tags?.some((tag: string) => tags.includes(tag)))
@@ -6,7 +6,9 @@ export function usePortfolioItems(options: PortfolioQueryOptions = {}) {
6
6
  const { featured, tags, limit } = options
7
7
 
8
8
  return useContentData('portfolio-items', async () => {
9
- let items = await queryCollection('portfolio').order('year', 'DESC').all()
9
+ let items = (await queryCollection('portfolio').all()).sort(
10
+ (a, b) => (b.year ?? 0) - (a.year ?? 0)
11
+ )
10
12
 
11
13
  if (featured !== undefined) {
12
14
  items = items.filter((item) => item.featured === featured)
@@ -12,8 +12,8 @@
12
12
 
13
13
  const { gsap } = useGsap()
14
14
 
15
- const sectionRef = useTemplateRef<HTMLElement | null>(null)
16
- const trackRef = useTemplateRef<HTMLElement | null>(null)
15
+ const sectionRef = useTemplateRef<HTMLElement>('sectionRef')
16
+ const trackRef = useTemplateRef<HTMLElement>('trackRef')
17
17
 
18
18
  let cleanup: (() => void) | null = null
19
19
 
@@ -12,8 +12,8 @@
12
12
 
13
13
  const { gsap, ScrollTrigger } = useGsap()
14
14
 
15
- const sectionRef = useTemplateRef<HTMLElement | null>(null)
16
- const contentRef = useTemplateRef<HTMLElement | null>(null)
15
+ const sectionRef = useTemplateRef<HTMLElement>('sectionRef')
16
+ const contentRef = useTemplateRef<HTMLElement>('contentRef')
17
17
 
18
18
  const cleanups: Array<() => void> = []
19
19
 
@@ -44,7 +44,7 @@
44
44
 
45
45
  const { ScrollTrigger } = useGsap()
46
46
 
47
- const containerRef = useTemplateRef<HTMLElement | null>(null)
47
+ const containerRef = useTemplateRef<HTMLElement>('containerRef')
48
48
  const progress = ref(0)
49
49
  const active = ref(false)
50
50
 
@@ -2,7 +2,7 @@
2
2
  export default defineAppConfig({
3
3
  seoLayer: {
4
4
  ogImage: {
5
- component: 'OgImageBasic',
5
+ component: 'OgImageNuxtSeo',
6
6
  props: {} as Record<string, unknown>,
7
7
  },
8
8
  twitterCard: 'summary_large_image' as 'summary_large_image' | 'summary' | 'player' | 'app',
@@ -54,7 +54,7 @@
54
54
  ready: [renderer: any]
55
55
  }>()
56
56
 
57
- const canvasRef = useTemplateRef<HTMLCanvasElement>()
57
+ const canvasRef = useTemplateRef<HTMLCanvasElement>('canvasRef')
58
58
  const { width, height } = useWindowSize()
59
59
 
60
60
  let renderer: any
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kmcom-nuxt-layers",
3
3
  "private": false,
4
- "version": "2.1.6",
4
+ "version": "2.2.0",
5
5
  "description": "Composable Nuxt 4 layers for building scalable Vue applications",
6
6
  "exports": {
7
7
  "./layers/core": "./layers/core/nuxt.config.ts",
@@ -47,13 +47,13 @@
47
47
  "packages/*"
48
48
  ],
49
49
  "peerDependencies": {
50
- "@nuxt/scripts": "^0.11.0",
51
- "@nuxtjs/seo": "^2.0.0",
52
50
  "@nuxt/content": "^3.14.0",
53
51
  "@nuxt/eslint": "^1.15.2",
54
52
  "@nuxt/image": "^2.0.0",
53
+ "@nuxt/scripts": "^0.11.0",
55
54
  "@nuxt/ui": "^4.8.1",
56
55
  "@nuxtjs/device": "^4.0.0",
56
+ "@nuxtjs/seo": "^5.0.0",
57
57
  "@tresjs/cientos": "^5.7.2",
58
58
  "@tresjs/core": "^5.8.1",
59
59
  "@tresjs/nuxt": "^5.6.1",
@@ -197,13 +197,14 @@
197
197
  ],
198
198
  "dependencies": {
199
199
  "node-gyp": "^12.3.0",
200
+ "pnpm": "11.5.3",
200
201
  "skills": "^1.5.10"
201
202
  },
202
203
  "engines": {
203
- "node": ">=22 <23"
204
+ "node": ">=24 <25"
204
205
  },
205
206
  "volta": {
206
- "node": "22.22.2",
207
+ "node": "24.16.0",
207
208
  "pnpm": "11.5.1"
208
209
  },
209
210
  "scripts": {