kmcom-nuxt-layers 1.6.36 → 1.6.38

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.
@@ -2,8 +2,9 @@
2
2
  // @ts-nocheck
3
3
  import type { PortfolioCollectionItem } from '@nuxt/content'
4
4
 
5
- const { slug } = defineProps<{
5
+ const { slug, collection = 'portfolio' } = defineProps<{
6
6
  slug: string
7
+ collection?: string
7
8
  }>()
8
9
 
9
10
  const asPortfolio = (item: unknown) => item as PortfolioCollectionItem
@@ -11,9 +12,9 @@ const asPortfolio = (item: unknown) => item as PortfolioCollectionItem
11
12
 
12
13
  <template>
13
14
  <NuxtContentDetail
14
- collection="portfolio"
15
+ :collection
15
16
  :slug
16
- not-found-message="Portfolio item not found"
17
+ not-found-message="Item not found"
17
18
  hide-toc
18
19
  >
19
20
  <template #headline="{ item }">
@@ -2,18 +2,20 @@
2
2
  // @ts-nocheck
3
3
  import type { PortfolioQueryOptions } from '../../types/content'
4
4
 
5
- const { options = {} } = defineProps<{
5
+ const { options = {}, collection = 'portfolio' } = defineProps<{
6
6
  options?: PortfolioQueryOptions
7
+ collection?: string
7
8
  }>()
8
9
 
9
- const { data: items, status } = await usePortfolioItems(options)
10
+ const { useItems } = createPortfolioComposables(collection)
11
+ const { data: items, status } = await useItems(options)
10
12
  </script>
11
13
 
12
14
  <template>
13
15
  <NuxtContentList
14
16
  :status="status"
15
17
  :has-items="!!items?.length"
16
- empty-message="No portfolio items found"
18
+ empty-message="No items found"
17
19
  >
18
20
  <UPageGrid>
19
21
  <UPageCard
@@ -29,15 +29,15 @@ export default defineNuxtPlugin((nuxtApp) => {
29
29
  // 2. Verify modules and composables are loaded
30
30
  // ============================================================
31
31
  try {
32
- // Test @nuxtjs/device module
33
- const { isMobile, isDesktop, isTablet } = useDevice()
32
+ // Test @nuxtjs/device module (SSR-safe: returns undefined before device plugin runs)
33
+ const device = useDevice()
34
34
 
35
- if (isDev) {
35
+ if (isDev && device) {
36
36
  // eslint-disable-next-line no-console
37
37
  console.log('[Core Layer] Device detection:', {
38
- mobile: isMobile,
39
- desktop: isDesktop,
40
- tablet: isTablet,
38
+ mobile: device.isMobile,
39
+ desktop: device.isDesktop,
40
+ tablet: device.isTablet,
41
41
  })
42
42
  }
43
43
 
package/package.json CHANGED
@@ -1,8 +1,19 @@
1
1
  {
2
2
  "name": "kmcom-nuxt-layers",
3
3
  "private": false,
4
- "version": "1.6.36",
4
+ "version": "1.6.38",
5
5
  "description": "Composable Nuxt 4 layers for building scalable Vue applications",
6
+ "exports": {
7
+ "./layers/core": "./layers/core/nuxt.config.ts",
8
+ "./layers/ui": "./layers/ui/nuxt.config.ts",
9
+ "./layers/layout": "./layers/layout/nuxt.config.ts",
10
+ "./layers/motion": "./layers/motion/nuxt.config.ts",
11
+ "./layers/shader": "./layers/shader/nuxt.config.ts",
12
+ "./layers/forms": "./layers/forms/nuxt.config.ts",
13
+ "./layers/theme": "./layers/theme/nuxt.config.ts",
14
+ "./layers/content": "./layers/content/nuxt.config.ts",
15
+ "./layers/routing": "./layers/routing/nuxt.config.ts"
16
+ },
6
17
  "files": [
7
18
  "layers/*/nuxt.config.ts",
8
19
  "layers/*/app.config.ts",