kmcom-nuxt-layers 1.6.40 → 1.6.44

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.
Files changed (48) hide show
  1. package/layers/content/app/components/Portfolio/ItemPage.vue +19 -0
  2. package/layers/content/app/{pages/portfolio/index.vue → components/Portfolio/Page.vue} +8 -8
  3. package/layers/core/app/composables/useErrorLog.ts +6 -11
  4. package/layers/core/app/composables/useLoading.ts +15 -46
  5. package/layers/core/app/composables/useScrollGuard.ts +115 -129
  6. package/layers/forms/app/components/Form/Field.vue +2 -2
  7. package/layers/forms/app/composables/useFormSchema.ts +1 -3
  8. package/layers/forms/app/config/fields.ts +12 -6
  9. package/layers/forms/app/types/fields.ts +2 -20
  10. package/layers/forms/nuxt.config.ts +0 -10
  11. package/layers/motion/app/components/Motion/CountUp.vue +39 -0
  12. package/layers/motion/app/components/Motion/Cursor.vue +101 -0
  13. package/layers/motion/app/components/Motion/Magnetic.vue +22 -0
  14. package/layers/motion/app/components/Motion/Tilt.vue +22 -0
  15. package/layers/motion/app/components/Motion/VelocityEffect.vue +33 -71
  16. package/layers/motion/app/composables/useCountUp.ts +61 -0
  17. package/layers/motion/app/composables/useCursorFollower.ts +25 -0
  18. package/layers/motion/app/composables/useMagneticElement.ts +56 -0
  19. package/layers/motion/app/composables/useSmoothScroll.ts +11 -0
  20. package/layers/motion/app/composables/useTiltEffect.ts +58 -0
  21. package/layers/motion/app/plugins/locomotive-scroll.client.ts +1 -1
  22. package/layers/motion/app/types/app-config.d.ts +11 -2
  23. package/layers/routing/app/middleware/02.governance.global.ts +7 -18
  24. package/layers/routing/app/types/routing.ts +10 -0
  25. package/layers/routing/app/utils/resolveRoute.ts +31 -0
  26. package/layers/shader/package.json +2 -1
  27. package/layers/theme/app/composables/useAccentColor.ts +1 -12
  28. package/layers/theme/app/composables/useThemeContrast.ts +0 -11
  29. package/layers/theme/app/composables/useThemeMotion.ts +0 -11
  30. package/layers/theme/app/composables/useThemeTransparency.ts +0 -14
  31. package/layers/theme/app/plugins/theme.client.ts +20 -3
  32. package/layers/theme/app/types/app-config.d.ts +2 -2
  33. package/layers/ui/app/components/Base/Modal.vue +0 -1
  34. package/layers/ui/app/composables/color.ts +1 -32
  35. package/layers/ui/app/utils/createModal.ts +11 -2
  36. package/package.json +28 -26
  37. package/layers/content/app/.DS_Store +0 -0
  38. package/layers/content/app/pages/blog/[slug].vue +0 -19
  39. package/layers/content/app/pages/blog/index.vue +0 -22
  40. package/layers/content/app/pages/portfolio/[slug].vue +0 -17
  41. package/layers/core/app/.DS_Store +0 -0
  42. package/layers/core/app/assets/.DS_Store +0 -0
  43. package/layers/forms/app/.DS_Store +0 -0
  44. package/layers/layout/app/.DS_Store +0 -0
  45. package/layers/motion/app/.DS_Store +0 -0
  46. package/layers/shader/app/.DS_Store +0 -0
  47. package/layers/theme/app/.DS_Store +0 -0
  48. package/layers/ui/app/.DS_Store +0 -0
@@ -1,11 +1,10 @@
1
- // @ts-nocheck
2
1
  import { createSharedComposable, useLocalStorage } from '@vueuse/core'
3
2
  import type { AccentColor } from '#layers/theme/app/types/theme'
4
3
 
5
4
  export const useAccentColor = createSharedComposable(() => {
6
5
  const appConfig = useAppConfig()
7
6
 
8
- const defaultAccent = ((appConfig as any).themeLayer?.defaultAccent ?? 'blue') as AccentColor
7
+ const defaultAccent = (appConfig.themeLayer?.defaultAccent ?? 'blue') as AccentColor
9
8
  const accent = useLocalStorage<AccentColor>('theme-colour', defaultAccent)
10
9
 
11
10
  const pageAccent = ref<AccentColor | null>(null)
@@ -19,16 +18,6 @@ export const useAccentColor = createSharedComposable(() => {
19
18
  pageAccent.value = color
20
19
  }
21
20
 
22
- if (import.meta.client) {
23
- watch(
24
- activeAccent,
25
- (color) => {
26
- document.documentElement.setAttribute('data-theme-colour', color)
27
- },
28
- { immediate: true }
29
- )
30
- }
31
-
32
21
  return {
33
22
  accent: readonly(accent),
34
23
  setAccent,
@@ -1,4 +1,3 @@
1
- // @ts-nocheck
2
1
  import { createSharedComposable, useLocalStorage, usePreferredContrast } from '@vueuse/core'
3
2
  import type { PreferenceOverride } from '#layers/theme/app/types/theme'
4
3
 
@@ -16,16 +15,6 @@ export const useThemeContrast = createSharedComposable(() => {
16
15
  contrastOverride.value = value
17
16
  }
18
17
 
19
- if (import.meta.client) {
20
- watch(
21
- effectiveHighContrast,
22
- (high) => {
23
- document.documentElement.setAttribute('data-theme-contrast', high ? 'high' : 'standard')
24
- },
25
- { immediate: true }
26
- )
27
- }
28
-
29
18
  return {
30
19
  contrastOverride: readonly(contrastOverride),
31
20
  setContrastOverride,
@@ -1,4 +1,3 @@
1
- // @ts-nocheck
2
1
  import { createSharedComposable, useLocalStorage, usePreferredReducedMotion } from '@vueuse/core'
3
2
  import type { PreferenceOverride } from '#layers/theme/app/types/theme'
4
3
 
@@ -16,16 +15,6 @@ export const useThemeMotion = createSharedComposable(() => {
16
15
  motionOverride.value = value
17
16
  }
18
17
 
19
- if (import.meta.client) {
20
- watch(
21
- effectiveReducedMotion,
22
- (reduced) => {
23
- document.documentElement.setAttribute('data-theme-motion', reduced ? 'reduced' : 'full')
24
- },
25
- { immediate: true }
26
- )
27
- }
28
-
29
18
  return {
30
19
  motionOverride: readonly(motionOverride),
31
20
  setMotionOverride,
@@ -1,4 +1,3 @@
1
- // @ts-nocheck
2
1
  import {
3
2
  createSharedComposable,
4
3
  useLocalStorage,
@@ -20,19 +19,6 @@ export const useThemeTransparency = createSharedComposable(() => {
20
19
  transparencyOverride.value = value
21
20
  }
22
21
 
23
- if (import.meta.client) {
24
- watch(
25
- effectiveReducedTransparency,
26
- (reduced) => {
27
- document.documentElement.setAttribute(
28
- 'data-theme-transparency',
29
- reduced ? 'reduced' : 'full'
30
- )
31
- },
32
- { immediate: true }
33
- )
34
- }
35
-
36
22
  return {
37
23
  transparencyOverride: readonly(transparencyOverride),
38
24
  setTransparencyOverride,
@@ -1,5 +1,22 @@
1
1
  export default defineNuxtPlugin(() => {
2
- // Initialize shared composables applies data-theme-colour, data-theme-contrast,
3
- // data-theme-motion, and data-theme-transparency on <html> on first load.
4
- useTheme()
2
+ const { activeAccent } = useAccentColor()
3
+ const { effectiveHighContrast } = useThemeContrast()
4
+ const { effectiveReducedMotion } = useThemeMotion()
5
+ const { effectiveReducedTransparency } = useThemeTransparency()
6
+
7
+ watch(activeAccent, (color) => {
8
+ document.documentElement.setAttribute('data-theme-colour', color)
9
+ }, { immediate: true })
10
+
11
+ watch(effectiveHighContrast, (high) => {
12
+ document.documentElement.setAttribute('data-theme-contrast', high ? 'high' : 'standard')
13
+ }, { immediate: true })
14
+
15
+ watch(effectiveReducedMotion, (reduced) => {
16
+ document.documentElement.setAttribute('data-theme-motion', reduced ? 'reduced' : 'full')
17
+ }, { immediate: true })
18
+
19
+ watch(effectiveReducedTransparency, (reduced) => {
20
+ document.documentElement.setAttribute('data-theme-transparency', reduced ? 'reduced' : 'full')
21
+ }, { immediate: true })
5
22
  })
@@ -1,8 +1,8 @@
1
1
  declare module '@nuxt/schema' {
2
2
  interface AppConfigInput {
3
3
  themeLayer?: {
4
- accents?: string[]
5
- defaultAccent?: string
4
+ accents?: import('./theme').AccentColor[]
5
+ defaultAccent?: import('./theme').AccentColor
6
6
  }
7
7
  }
8
8
  }
@@ -1,5 +1,4 @@
1
1
  <script setup lang="ts">
2
- // @ts-nocheck
3
2
  /**
4
3
  * BaseModal — overlay-compatible modal shell.
5
4
  *
@@ -1,36 +1,5 @@
1
1
  import type { ColorUsage, UiColors } from '../types/colors'
2
2
 
3
- const colorMap: Record<UiColors, string> = {
4
- // Semantic
5
- dimmed: 'dimmed',
6
- muted: 'muted',
7
- toned: 'toned',
8
- highlighted: 'highlighted',
9
- inverted: 'inverted',
10
- default: 'default',
11
-
12
- // Status
13
- info: 'info',
14
- success: 'success',
15
- warning: 'warning',
16
- error: 'error',
17
-
18
- // Nuxt UI core
19
- primary: 'primary',
20
- neutral: 'neutral',
21
-
22
- // Custom
23
- secondary: 'secondary',
24
- accent: 'accent',
25
-
26
- // Base
27
- black: 'black',
28
- white: 'white',
29
- }
30
-
31
3
  export function useColor(color?: UiColors, type: ColorUsage = 'text') {
32
- return computed(() => {
33
- const colorName = color ? colorMap[color] : 'default'
34
- return `${type}-${colorName}`
35
- })
4
+ return computed(() => `${type}-${color ?? 'default'}`)
36
5
  }
@@ -1,5 +1,11 @@
1
1
  import type { Component } from 'vue'
2
2
 
3
+ export interface ModalController<P extends Record<string, unknown>> {
4
+ open: (props?: Partial<P>) => void
5
+ close: () => void
6
+ patch: (props: Partial<P>) => void
7
+ }
8
+
3
9
  /**
4
10
  * Factory that turns any overlay-compatible component into a shared modal composable.
5
11
  *
@@ -19,10 +25,13 @@ import type { Component } from 'vue'
19
25
  * Extend BaseModal.vue as a starting point.
20
26
  */
21
27
  export function createModal<P extends Record<string, unknown>>(component: Component) {
22
- return createSharedComposable(() => {
23
- if (import.meta.server) return { open: () => {}, close: () => {}, patch: () => {} }
28
+ return createSharedComposable((): ModalController<P> => {
29
+ if (import.meta.server) {
30
+ return { open: () => {}, close: () => {}, patch: () => {} }
31
+ }
24
32
 
25
33
  const overlay = useOverlay()
34
+ // useOverlay is a Nuxt UI auto-import; not resolvable in standalone layer typecheck
26
35
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
27
36
  const modal = overlay.create(component as any)
28
37
  return {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kmcom-nuxt-layers",
3
3
  "private": false,
4
- "version": "1.6.40",
4
+ "version": "1.6.44",
5
5
  "description": "Composable Nuxt 4 layers for building scalable Vue applications",
6
6
  "exports": {
7
7
  "./layers/core": "./layers/core/nuxt.config.ts",
@@ -49,7 +49,7 @@
49
49
  "nuxt": "^4.4.2",
50
50
  "nuxt-studio": "^1.4.0",
51
51
  "pinia": "^3.0.4",
52
- "tailwindcss": "^4.2.4",
52
+ "tailwindcss": "^4.3.0",
53
53
  "three": ">=0.183.0",
54
54
  "v-gsap-nuxt": ">=1.0.0",
55
55
  "zod": "^4.4.3"
@@ -102,14 +102,14 @@
102
102
  }
103
103
  },
104
104
  "devDependencies": {
105
- "@commitlint/cli": "^20.4.3",
106
- "@commitlint/config-conventional": "^20.4.3",
107
- "@culur/config-stylelint": "^1.6.5",
105
+ "@commitlint/cli": "^21.0.2",
106
+ "@commitlint/config-conventional": "^21.0.2",
107
+ "@culur/config-stylelint": "^1.7.0",
108
108
  "@eslint/json": "^1.2.0",
109
- "@eslint/markdown": "^8.0.1",
109
+ "@eslint/markdown": "^8.0.2",
110
110
  "@ianvs/prettier-plugin-sort-imports": "^4.7.1",
111
- "@iconify-json/lucide": "^1.2.107",
112
- "@netlify/nuxt": "0.3.1",
111
+ "@iconify-json/lucide": "^1.2.110",
112
+ "@netlify/nuxt": "0.3.6",
113
113
  "@nuxt/eslint": "^1.15.2",
114
114
  "@nuxt/fonts": "^0.14.0",
115
115
  "@nuxt/image": "^2.0.0",
@@ -117,50 +117,51 @@
117
117
  "@nuxtjs/device": "^4.0.0",
118
118
  "@perplex-digital/stylelint-config": "^17.4.0",
119
119
  "@pinia/nuxt": "^0.11.3",
120
- "@types/node": "^25.6.0",
121
- "@typescript-eslint/eslint-plugin": "^8.59.3",
122
- "@typescript-eslint/parser": "^8.59.3",
120
+ "@types/node": "^25.9.1",
121
+ "@types/three": "^0.184.1",
122
+ "@typescript-eslint/eslint-plugin": "^8.59.4",
123
+ "@typescript-eslint/parser": "^8.59.4",
123
124
  "@vue/eslint-config-typescript": "^14.7.0",
124
125
  "@vueuse/core": "^14.3.0",
125
126
  "@vueuse/nuxt": "^14.3.0",
126
127
  "@webgpu/glslang": "^0.0.15",
127
128
  "browserslist": "^4.28.2",
128
129
  "changesets": "^1.0.2",
129
- "cypress": "^15.10.0",
130
+ "cypress": "^15.16.0",
130
131
  "depcheck": "^1.4.7",
131
- "eslint": "^10.3.0",
132
+ "eslint": "^10.4.0",
132
133
  "eslint-plugin-compat": "^7.0.2",
133
134
  "eslint-plugin-glsl": "0.0.0-wip",
134
- "eslint-plugin-pnpm": "^1.6.0",
135
- "eslint-plugin-prettier": "^5.5.5",
135
+ "eslint-plugin-pnpm": "^1.6.1",
136
+ "eslint-plugin-prettier": "^5.5.6",
136
137
  "eslint-plugin-unicorn": "^64.0.0",
137
138
  "eslint-plugin-unused-imports": "^4.4.1",
138
139
  "eslint-plugin-vue": "^10.9.1",
139
- "npm-check-updates": "^21.0.3",
140
- "nuxt": "latest",
140
+ "npm-check-updates": "^22.2.1",
141
+ "nuxt": "^4.4.6",
141
142
  "pinia": "^3.0.4",
142
- "playwright": "^1.58.2",
143
+ "playwright": "^1.60.0",
143
144
  "postcss-html": "^1.8.1",
144
145
  "prettier": "^3.8.3",
145
146
  "prettier-plugin-css-order": "^2.2.0",
146
- "prettier-plugin-glsl": "^0.2.5",
147
+ "prettier-plugin-glsl": "^0.3.0",
147
148
  "prettier-plugin-organize-attributes": "^1.0.0",
148
149
  "prettier-plugin-tailwind-styled-components": "^2.0.2",
149
150
  "prettier-plugin-tailwindcss": "^0.8.0",
150
- "stylelint": "^17.10.0",
151
+ "stylelint": "^17.12.0",
151
152
  "stylelint-config-recommended-vue": "^1.6.1",
152
153
  "stylelint-config-standard": "^40.0.0",
153
154
  "stylelint-config-standard-vue": "^1.0.0",
154
155
  "stylelint-config-tailwindcss": "^1.0.1",
155
156
  "stylelint-no-unsupported-browser-features": "^8.1.1",
156
157
  "stylelint-prettier": "^5.0.3",
157
- "tailwindcss": "^4.2.4",
158
- "turbo": "^2.9.14",
158
+ "tailwindcss": "^4.3.0",
159
+ "turbo": "^2.9.16",
159
160
  "typescript": "^6.0.3",
160
- "vite-plugin-checker": "^0.13.0",
161
- "vitest": "^4.1.6",
161
+ "vite-plugin-checker": "^0.14.1",
162
+ "vitest": "^4.1.7",
162
163
  "vue": "latest",
163
- "vue-tsc": "^3.2.9",
164
+ "vue-tsc": "3.3.2",
164
165
  "zod": "^4.4.3",
165
166
  "zod-to-json-schema": "^3.25.2"
166
167
  },
@@ -172,13 +173,14 @@
172
173
  ],
173
174
  "dependencies": {
174
175
  "node-gyp": "^12.3.0",
175
- "skills": "^1.5.0"
176
+ "skills": "^1.5.9"
176
177
  },
177
178
  "engines": {
178
179
  "node": ">=21 <23"
179
180
  },
180
181
  "scripts": {
181
182
  "dev": "pnpm -F playground dev",
183
+ "dev:identity": "pnpm -F visual-identity dev",
182
184
  "dev:core": "PLAYGROUND_LAYERS=core pnpm -F playground dev",
183
185
  "dev:ui": "PLAYGROUND_LAYERS=core,ui pnpm -F playground dev",
184
186
  "dev:layout": "PLAYGROUND_LAYERS=core,ui,layout pnpm -F playground dev",
Binary file
@@ -1,19 +0,0 @@
1
- <script setup lang="ts">
2
- definePageMeta({ name: 'content-blog-slug' })
3
-
4
- const { contentLayer } = useAppConfig()
5
- if (contentLayer?.sections?.blog === false) {
6
- throw createError({ statusCode: 404, statusMessage: 'Not Found' })
7
- }
8
-
9
- const route = useRoute()
10
- const slug = route.params.slug as string
11
- </script>
12
-
13
- <template>
14
- <LayoutSection>
15
- <LayoutGridItem>
16
- <BlogArticle :slug="slug" />
17
- </LayoutGridItem>
18
- </LayoutSection>
19
- </template>
@@ -1,22 +0,0 @@
1
- <script setup lang="ts">
2
- const { contentLayer } = useAppConfig()
3
- if (contentLayer?.sections?.blog === false) {
4
- throw createError({ statusCode: 404, statusMessage: 'Not Found' })
5
- }
6
-
7
- useSeoMeta({
8
- title: 'Blog',
9
- description: 'Latest articles and updates',
10
- })
11
- </script>
12
-
13
- <template>
14
- <LayoutSection>
15
- <LayoutGridItem>
16
- <UPageHeader title="Blog" description="Latest articles and updates" />
17
- <UPageBody>
18
- <BlogList />
19
- </UPageBody>
20
- </LayoutGridItem>
21
- </LayoutSection>
22
- </template>
@@ -1,17 +0,0 @@
1
- <script setup lang="ts">
2
- const { contentLayer } = useAppConfig()
3
- if (contentLayer?.sections?.portfolio === false) {
4
- throw createError({ statusCode: 404, statusMessage: 'Not Found' })
5
- }
6
-
7
- const route = useRoute()
8
- const slug = route.params.slug as string
9
- </script>
10
-
11
- <template>
12
- <LayoutSection>
13
- <LayoutGridItem>
14
- <PortfolioDetail :slug="slug" />
15
- </LayoutGridItem>
16
- </LayoutSection>
17
- </template>
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file