kmcom-nuxt-layers 1.6.9 → 1.6.11
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/docs/LAYOUT.md +9 -4
- package/layers/content/app/types/app-config.d.ts +7 -0
- package/layers/content/nuxt.config.ts +1 -1
- package/layers/core/app/assets/css/{main.css → core.css} +0 -2
- package/layers/core/app/types/app-config.d.ts +59 -0
- package/layers/core/nuxt.config.ts +1 -1
- package/layers/forms/app/types/app-config.d.ts +7 -0
- package/layers/layout/{app.config.ts → app/app.config.ts} +5 -4
- package/layers/layout/app/components/Layout/Grid/Item.vue +27 -3
- package/layers/layout/app/types/app-config.d.ts +10 -0
- package/layers/layout/app/types/layouts.ts +1 -1
- package/layers/layout/nuxt.config.ts +1 -1
- package/layers/motion/app/composables/useGsap.ts +6 -8
- package/layers/motion/app/types/app-config.d.ts +7 -0
- package/layers/motion/nuxt.config.ts +1 -1
- package/layers/shader/app/types/app-config.d.ts +7 -0
- package/layers/shader/nuxt.config.ts +1 -1
- package/layers/theme/app/assets/css/theme.css +11 -11
- package/layers/theme/app/types/app-config.d.ts +8 -0
- package/layers/ui/app/assets/css/{main.css → ui.css} +4 -2
- package/layers/ui/app/components/Typography/Headline.vue +1 -1
- package/layers/ui/app/composables/typography.ts +1 -1
- package/layers/ui/app/types/typography.ts +9 -1
- package/layers/ui/nuxt.config.ts +1 -1
- package/package.json +20 -20
- package/layers/motion/app/composables/useMotion.ts +0 -137
- package/layers/motion/app/plugins/gsap.client.ts +0 -15
- /package/layers/content/{app.config.ts → app/app.config.ts} +0 -0
- /package/layers/content/app/assets/css/{main.css → content.css} +0 -0
- /package/layers/core/{app.config.ts → app/app.config.ts} +0 -0
- /package/layers/forms/{app.config.ts → app/app.config.ts} +0 -0
- /package/layers/layout/app/assets/css/{main.css → layout.css} +0 -0
- /package/layers/motion/{app.config.ts → app/app.config.ts} +0 -0
- /package/layers/motion/app/assets/css/{main.css → motion.css} +0 -0
- /package/layers/shader/{app.config.ts → app/app.config.ts} +0 -0
- /package/layers/shader/app/assets/css/{main.css → shader.css} +0 -0
- /package/layers/theme/{app.config.ts → app/app.config.ts} +0 -0
package/docs/LAYOUT.md
CHANGED
|
@@ -208,8 +208,11 @@ Positioned child within a subgrid section. Use `preset` for common layouts or se
|
|
|
208
208
|
| `rowStart` | `number \| ResponsiveValue` | Grid row start |
|
|
209
209
|
| `rowSpan` | `number \| ResponsiveValue` | Row span |
|
|
210
210
|
| `layer` | `keyof GridLayers` | Z-index layer: `back`, `mid`, `front`, `top` |
|
|
211
|
-
| `align` | `string` | `align-self` value |
|
|
212
|
-
| `justify` | `string` | `justify-self` value |
|
|
211
|
+
| `align` | `string` | `align-self` value: `start`, `center`, `end`, `stretch` |
|
|
212
|
+
| `justify` | `string` | `justify-self` value: `start`, `center`, `end`, `stretch` |
|
|
213
|
+
| `container` | `string` | Content width constraint: `content` (65ch), `wide` (90rem), `fluid`, `full` |
|
|
214
|
+
| `gap` | `string` | Override `--grid-gap` for nested content (e.g. `'1rem'`) |
|
|
215
|
+
| `density` | `string` | Rhythm base unit: `compact` (2px), `normal` (4px), `relaxed` (8px) |
|
|
213
216
|
| `bleed` | `boolean` | Negative margin to reach viewport edge |
|
|
214
217
|
| `as` | `string` | Tag override |
|
|
215
218
|
|
|
@@ -428,12 +431,14 @@ interface GridConfig {
|
|
|
428
431
|
|
|
429
432
|
interface GridPresetsItem {
|
|
430
433
|
colStart?: number | ResponsiveValue
|
|
431
|
-
colSpan?: number | ResponsiveValue
|
|
434
|
+
colSpan?: number | 'full' | ResponsiveValue
|
|
432
435
|
rowStart?: number | ResponsiveValue
|
|
433
436
|
rowSpan?: number | ResponsiveValue
|
|
437
|
+
align?: 'start' | 'center' | 'end' | 'stretch'
|
|
438
|
+
justify?: 'start' | 'center' | 'end' | 'stretch'
|
|
434
439
|
container?: 'content' | 'wide' | 'fluid' | 'full'
|
|
435
440
|
gap?: string
|
|
436
|
-
density?: 'compact' | 'normal' | '
|
|
441
|
+
density?: 'compact' | 'normal' | 'relaxed'
|
|
437
442
|
}
|
|
438
443
|
```
|
|
439
444
|
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
declare module '@nuxt/schema' {
|
|
2
|
+
interface AppConfigInput {
|
|
3
|
+
coreLayer?: {
|
|
4
|
+
/** Project name */
|
|
5
|
+
name?: string
|
|
6
|
+
|
|
7
|
+
/** 404 Not Found page configuration */
|
|
8
|
+
notFound?: {
|
|
9
|
+
icon?: string
|
|
10
|
+
title?: string
|
|
11
|
+
description?: string
|
|
12
|
+
showPath?: boolean
|
|
13
|
+
showHomeButton?: boolean
|
|
14
|
+
homeButtonLabel?: string
|
|
15
|
+
homeButtonTo?: string
|
|
16
|
+
showBackButton?: boolean
|
|
17
|
+
backButtonLabel?: string
|
|
18
|
+
actions?: Array<{
|
|
19
|
+
label: string
|
|
20
|
+
to?: string
|
|
21
|
+
icon?: string
|
|
22
|
+
color?: 'primary' | 'neutral' | 'error' | 'success'
|
|
23
|
+
variant?: 'solid' | 'outline' | 'ghost' | 'soft'
|
|
24
|
+
click?: () => void
|
|
25
|
+
}>
|
|
26
|
+
suggestions?: {
|
|
27
|
+
enabled?: boolean
|
|
28
|
+
title?: string
|
|
29
|
+
links?: Array<{ label: string; to: string; icon?: string }>
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
loading?: {
|
|
34
|
+
enabled?: boolean
|
|
35
|
+
minDuration?: number
|
|
36
|
+
maxDuration?: number
|
|
37
|
+
background?: string
|
|
38
|
+
textColor?: string
|
|
39
|
+
zIndex?: number
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
errors?: {
|
|
43
|
+
logToConsole?: boolean
|
|
44
|
+
logToExternal?: boolean
|
|
45
|
+
externalUrl?: string
|
|
46
|
+
externalToken?: string
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
scrollGuard?: {
|
|
50
|
+
enabled?: boolean
|
|
51
|
+
excludeSelectors?: string[]
|
|
52
|
+
strict?: boolean
|
|
53
|
+
transitionDuration?: number
|
|
54
|
+
resizeDebounce?: number
|
|
55
|
+
debug?: boolean
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -86,11 +86,12 @@ export default {
|
|
|
86
86
|
// Full-viewport hero: full width, all 12 rows
|
|
87
87
|
hero: { colSpan: 'full', rowSpan: 12 },
|
|
88
88
|
|
|
89
|
-
//
|
|
90
|
-
//
|
|
89
|
+
// Full-width content area within the grid's own padding.
|
|
90
|
+
// mastmain already applies padding-inline (clamp-based gutters),
|
|
91
|
+
// so col-start:1 / col-end:-1 is already visually centred.
|
|
92
|
+
// Use preset="prose" for a narrower reading-width column.
|
|
91
93
|
centered: {
|
|
92
|
-
|
|
93
|
-
colSpan: { default: 6, md: 10, lg: 12 },
|
|
94
|
+
colSpan: 'full',
|
|
94
95
|
rowSpan: 12,
|
|
95
96
|
},
|
|
96
97
|
|
|
@@ -12,6 +12,9 @@
|
|
|
12
12
|
* @prop {number | ResponsiveValue} rowSpan - Number of rows to span (default: 1)
|
|
13
13
|
* @prop {Alignment} align - Vertical alignment (align-self): start, center, end, stretch
|
|
14
14
|
* @prop {Alignment} justify - Horizontal alignment (justify-self): start, center, end, stretch
|
|
15
|
+
* @prop {string} container - Content width constraint: content (65ch), wide (90rem), fluid, full
|
|
16
|
+
* @prop {string} gap - Override --grid-gap for nested content (e.g. '1rem', '2rem')
|
|
17
|
+
* @prop {string} density - Vertical rhythm: compact (2px), normal (4px), relaxed (8px)
|
|
15
18
|
* @prop {number} z - Explicit z-index value
|
|
16
19
|
* @prop {LayerName} layer - Semantic layer: back, mid, front, top
|
|
17
20
|
* @prop {BleedDirection} bleed - Edge bleed: left, right, both
|
|
@@ -41,6 +44,9 @@ interface ResponsiveValue<T> {
|
|
|
41
44
|
lg?: T
|
|
42
45
|
}
|
|
43
46
|
|
|
47
|
+
type ContainerSize = 'content' | 'wide' | 'fluid' | 'full'
|
|
48
|
+
type Density = 'compact' | 'normal' | 'relaxed'
|
|
49
|
+
|
|
44
50
|
interface Props {
|
|
45
51
|
preset?: string
|
|
46
52
|
as?: string
|
|
@@ -50,6 +56,9 @@ interface Props {
|
|
|
50
56
|
rowSpan?: number | ResponsiveValue<number>
|
|
51
57
|
align?: Alignment
|
|
52
58
|
justify?: Alignment
|
|
59
|
+
container?: ContainerSize
|
|
60
|
+
gap?: string
|
|
61
|
+
density?: Density
|
|
53
62
|
z?: number
|
|
54
63
|
layer?: LayerName
|
|
55
64
|
bleed?: BleedDirection
|
|
@@ -73,6 +82,9 @@ const rowSpan = computed(() => props.rowSpan ?? presetConfig.value?.rowSpan ?? 1
|
|
|
73
82
|
// Preset-aware alignment computed refs
|
|
74
83
|
const align = computed(() => props.align ?? presetConfig.value?.align)
|
|
75
84
|
const justify = computed(() => props.justify ?? presetConfig.value?.justify)
|
|
85
|
+
const container = computed(() => props.container ?? presetConfig.value?.container)
|
|
86
|
+
const gap = computed(() => props.gap ?? presetConfig.value?.gap)
|
|
87
|
+
const density = computed(() => props.density ?? presetConfig.value?.density)
|
|
76
88
|
|
|
77
89
|
const layerZIndex: Record<LayerName, number> = {
|
|
78
90
|
back: 0,
|
|
@@ -186,6 +198,19 @@ const style = computed(() => {
|
|
|
186
198
|
styles.placeItems = `${align.value ?? 'stretch'} ${justify.value ?? 'stretch'}`
|
|
187
199
|
}
|
|
188
200
|
|
|
201
|
+
// Gap override — cascades to nested content via --grid-gap
|
|
202
|
+
if (gap.value) styles['--grid-gap'] = gap.value
|
|
203
|
+
|
|
204
|
+
// Density — sets --rhythm base unit for child spacing utilities
|
|
205
|
+
if (density.value) {
|
|
206
|
+
const rhythmMap: Record<Density, string> = {
|
|
207
|
+
compact: '0.125rem',
|
|
208
|
+
normal: '0.25rem',
|
|
209
|
+
relaxed: '0.5rem',
|
|
210
|
+
}
|
|
211
|
+
styles['--rhythm'] = rhythmMap[density.value]
|
|
212
|
+
}
|
|
213
|
+
|
|
189
214
|
// Z-index
|
|
190
215
|
const zIndex = props.z ?? (props.layer ? layerZIndex[props.layer] : undefined)
|
|
191
216
|
if (zIndex !== undefined) styles.zIndex = String(zIndex)
|
|
@@ -196,9 +221,8 @@ const style = computed(() => {
|
|
|
196
221
|
const classes = computed(() => {
|
|
197
222
|
const classList: string[] = ['gi-placed', '@container', '@container/item']
|
|
198
223
|
|
|
199
|
-
if (props.aspect)
|
|
200
|
-
|
|
201
|
-
}
|
|
224
|
+
if (props.aspect) classList.push(aspectClasses[props.aspect])
|
|
225
|
+
if (container.value) classList.push(`layout-container-${container.value}`)
|
|
202
226
|
|
|
203
227
|
return classList.join(' ')
|
|
204
228
|
})
|
|
@@ -28,7 +28,7 @@ export interface GridLayers {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
export type GridContainerSize = 'content' | 'wide' | 'fluid' | 'full'
|
|
31
|
-
export type GridDensity = 'compact' | 'normal' | 'relaxed'
|
|
31
|
+
export type GridDensity = 'compact' | 'normal' | 'relaxed' // relaxed = 0.5rem --rhythm base
|
|
32
32
|
export type GridMode = 'swiss' | 'fluid' | 'disabled'
|
|
33
33
|
|
|
34
34
|
export interface GridPresetsItem {
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import { gsap } from 'gsap'
|
|
2
|
+
import { ScrollTrigger } from 'gsap/ScrollTrigger'
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
5
|
+
* Provides access to GSAP and ScrollTrigger.
|
|
6
|
+
* Registration is handled by v-gsap-nuxt.
|
|
3
7
|
*
|
|
4
8
|
* @example
|
|
5
9
|
* const { gsap, ScrollTrigger } = useGsap()
|
|
@@ -11,11 +15,5 @@
|
|
|
11
15
|
* })
|
|
12
16
|
*/
|
|
13
17
|
export function useGsap() {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return {
|
|
17
|
-
gsap: nuxtApp.$gsap as unknown as typeof import('gsap').gsap,
|
|
18
|
-
ScrollTrigger:
|
|
19
|
-
nuxtApp.$ScrollTrigger as unknown as typeof import('gsap/ScrollTrigger').ScrollTrigger,
|
|
20
|
-
}
|
|
18
|
+
return { gsap, ScrollTrigger }
|
|
21
19
|
}
|
|
@@ -7,46 +7,46 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
/* --- Reduced Motion --- */
|
|
10
|
-
[data-theme-motion=
|
|
11
|
-
[data-theme-motion=
|
|
12
|
-
[data-theme-motion=
|
|
10
|
+
[data-theme-motion='reduced'] *,
|
|
11
|
+
[data-theme-motion='reduced'] *::before,
|
|
12
|
+
[data-theme-motion='reduced'] *::after {
|
|
13
13
|
animation-duration: 0.01ms !important;
|
|
14
14
|
animation-iteration-count: 1 !important;
|
|
15
15
|
transition-duration: 0.01ms !important;
|
|
16
16
|
scroll-behavior: auto !important;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
[data-theme-motion=
|
|
19
|
+
[data-theme-motion='reduced'] {
|
|
20
20
|
--duration-base: 0ms;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
/* --- Reduced Transparency --- */
|
|
24
|
-
[data-theme-transparency=
|
|
24
|
+
[data-theme-transparency='reduced'] {
|
|
25
25
|
--ui-bg-elevated: var(--ui-bg);
|
|
26
26
|
--opacity-glass: 1;
|
|
27
27
|
--backdrop-blur: 0px;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
[data-theme-transparency=
|
|
30
|
+
[data-theme-transparency='reduced'] :where([class*='backdrop-blur']) {
|
|
31
31
|
backdrop-filter: none !important;
|
|
32
32
|
-webkit-backdrop-filter: none !important;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
[data-theme-transparency=
|
|
35
|
+
[data-theme-transparency='reduced'] :where([class*='bg-default/'], [class*='bg-elevated/']) {
|
|
36
36
|
background-color: var(--ui-bg-elevated) !important;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
/* --- High Contrast --- */
|
|
40
|
-
[data-theme-contrast=
|
|
40
|
+
[data-theme-contrast='high'] {
|
|
41
41
|
--ui-border: var(--ui-border-accented);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
[data-theme-contrast=
|
|
44
|
+
[data-theme-contrast='high'] :where(button, a, [role='button']) {
|
|
45
45
|
outline-width: 2px;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
[data-theme-contrast=
|
|
49
|
-
[data-theme-contrast=
|
|
48
|
+
[data-theme-contrast='high'] .text-muted,
|
|
49
|
+
[data-theme-contrast='high'] .text-dimmed {
|
|
50
50
|
opacity: 1;
|
|
51
51
|
filter: contrast(1.25);
|
|
52
52
|
}
|
|
@@ -10,9 +10,11 @@
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
.accent-blob {
|
|
13
|
-
transition:
|
|
13
|
+
transition:
|
|
14
|
+
background-color 400ms ease,
|
|
15
|
+
opacity 300ms ease;
|
|
14
16
|
}
|
|
15
17
|
|
|
16
|
-
[data-theme-transparency=
|
|
18
|
+
[data-theme-transparency='reduced'] .accent-blob {
|
|
17
19
|
opacity: 0 !important;
|
|
18
20
|
}
|
|
@@ -65,7 +65,15 @@ export type FontSize =
|
|
|
65
65
|
- Semantic abstraction over wdth axis
|
|
66
66
|
====================================================== */
|
|
67
67
|
|
|
68
|
-
export type FontWidth =
|
|
68
|
+
export type FontWidth =
|
|
69
|
+
| 'font-stretch-ultra-condensed'
|
|
70
|
+
| 'font-stretch-condensed'
|
|
71
|
+
| 'font-stretch-semi-condensed'
|
|
72
|
+
| 'font-stretch-normal'
|
|
73
|
+
| 'font-stretch-semi-expanded'
|
|
74
|
+
| 'font-stretch-expanded'
|
|
75
|
+
| 'font-stretch-ultra-expanded'
|
|
76
|
+
| number // variable wdth axis override
|
|
69
77
|
|
|
70
78
|
/* ======================================================
|
|
71
79
|
Font Slant
|
package/layers/ui/nuxt.config.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kmcom-nuxt-layers",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.6.
|
|
4
|
+
"version": "1.6.11",
|
|
5
5
|
"description": "Composable Nuxt 4 layers for building scalable Vue applications",
|
|
6
6
|
"files": [
|
|
7
7
|
"layers/*/nuxt.config.ts",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@tresjs/nuxt": "^5.3.0",
|
|
32
32
|
"@tresjs/post-processing": "^3.4.0",
|
|
33
33
|
"@vite-pwa/nuxt": "^1.1.1",
|
|
34
|
-
"@vueuse/nuxt": "^14.
|
|
34
|
+
"@vueuse/nuxt": "^14.3.0",
|
|
35
35
|
"better-sqlite3": "^12.6.2",
|
|
36
36
|
"gsap": "^3.14.2",
|
|
37
37
|
"locomotive-scroll": "^5.0.1",
|
|
@@ -94,49 +94,49 @@
|
|
|
94
94
|
"@commitlint/cli": "^20.4.3",
|
|
95
95
|
"@commitlint/config-conventional": "^20.4.3",
|
|
96
96
|
"@culur/config-stylelint": "^1.6.5",
|
|
97
|
-
"@eslint/json": "^1.0
|
|
98
|
-
"@eslint/markdown": "^
|
|
97
|
+
"@eslint/json": "^1.2.0",
|
|
98
|
+
"@eslint/markdown": "^8.0.1",
|
|
99
99
|
"@ianvs/prettier-plugin-sort-imports": "^4.7.1",
|
|
100
|
-
"@iconify-json/lucide": "^1.2.
|
|
101
|
-
"@netlify/nuxt": "0.
|
|
100
|
+
"@iconify-json/lucide": "^1.2.105",
|
|
101
|
+
"@netlify/nuxt": "0.3.1",
|
|
102
102
|
"@nuxt/eslint": "^1.15.2",
|
|
103
103
|
"@nuxt/fonts": "^0.14.0",
|
|
104
104
|
"@nuxt/image": "^2.0.0",
|
|
105
105
|
"@nuxt/ui": "latest",
|
|
106
106
|
"@nuxtjs/device": "^4.0.0",
|
|
107
|
-
"@perplex-digital/stylelint-config": "^17.
|
|
107
|
+
"@perplex-digital/stylelint-config": "^17.4.0",
|
|
108
108
|
"@pinia/nuxt": "^0.11.3",
|
|
109
109
|
"@types/node": "^25.6.0",
|
|
110
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
111
|
-
"@typescript-eslint/parser": "^8.
|
|
110
|
+
"@typescript-eslint/eslint-plugin": "^8.59.1",
|
|
111
|
+
"@typescript-eslint/parser": "^8.59.1",
|
|
112
112
|
"@vue/eslint-config-typescript": "^14.7.0",
|
|
113
|
-
"@vueuse/core": "^14.
|
|
114
|
-
"@vueuse/nuxt": "^14.
|
|
113
|
+
"@vueuse/core": "^14.3.0",
|
|
114
|
+
"@vueuse/nuxt": "^14.3.0",
|
|
115
115
|
"@webgpu/glslang": "^0.0.15",
|
|
116
116
|
"browserslist": "^4.28.2",
|
|
117
117
|
"changesets": "^1.0.2",
|
|
118
118
|
"cypress": "^15.10.0",
|
|
119
119
|
"depcheck": "^1.4.7",
|
|
120
|
-
"eslint": "^10.
|
|
121
|
-
"eslint-plugin-compat": "^7.0.
|
|
120
|
+
"eslint": "^10.3.0",
|
|
121
|
+
"eslint-plugin-compat": "^7.0.2",
|
|
122
122
|
"eslint-plugin-glsl": "0.0.0-wip",
|
|
123
123
|
"eslint-plugin-pnpm": "^1.6.0",
|
|
124
124
|
"eslint-plugin-prettier": "^5.5.5",
|
|
125
125
|
"eslint-plugin-unicorn": "^64.0.0",
|
|
126
126
|
"eslint-plugin-unused-imports": "^4.4.1",
|
|
127
|
-
"eslint-plugin-vue": "^10.
|
|
127
|
+
"eslint-plugin-vue": "^10.9.0",
|
|
128
128
|
"npm-check-updates": "^21.0.3",
|
|
129
129
|
"nuxt": "latest",
|
|
130
130
|
"pinia": "^3.0.4",
|
|
131
131
|
"playwright": "^1.58.2",
|
|
132
132
|
"postcss-html": "^1.8.1",
|
|
133
|
-
"prettier": "^3.8.
|
|
133
|
+
"prettier": "^3.8.3",
|
|
134
134
|
"prettier-plugin-css-order": "^2.2.0",
|
|
135
135
|
"prettier-plugin-glsl": "^0.2.5",
|
|
136
136
|
"prettier-plugin-organize-attributes": "^1.0.0",
|
|
137
137
|
"prettier-plugin-tailwind-styled-components": "^2.0.2",
|
|
138
|
-
"prettier-plugin-tailwindcss": "^0.
|
|
139
|
-
"stylelint": "^17.
|
|
138
|
+
"prettier-plugin-tailwindcss": "^0.8.0",
|
|
139
|
+
"stylelint": "^17.10.0",
|
|
140
140
|
"stylelint-config-recommended-vue": "^1.6.1",
|
|
141
141
|
"stylelint-config-standard": "^40.0.0",
|
|
142
142
|
"stylelint-config-standard-vue": "^1.0.0",
|
|
@@ -144,12 +144,12 @@
|
|
|
144
144
|
"stylelint-no-unsupported-browser-features": "^8.1.1",
|
|
145
145
|
"stylelint-prettier": "^5.0.3",
|
|
146
146
|
"tailwindcss": "^4.2.4",
|
|
147
|
-
"turbo": "^2.9.
|
|
148
|
-
"typescript": "^6.0.
|
|
147
|
+
"turbo": "^2.9.8",
|
|
148
|
+
"typescript": "^6.0.3",
|
|
149
149
|
"vite-plugin-checker": "^0.13.0",
|
|
150
150
|
"vitest": "^4.1.5",
|
|
151
151
|
"vue": "latest",
|
|
152
|
-
"vue-tsc": "^3.2.
|
|
152
|
+
"vue-tsc": "^3.2.8",
|
|
153
153
|
"zod": "^4.3.6",
|
|
154
154
|
"zod-to-json-schema": "^3.25.1"
|
|
155
155
|
},
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
import { useElementHover, useElementVisibility, useScroll } from '@vueuse/core'
|
|
2
|
-
// eslint-disable-next-line no-restricted-imports
|
|
3
|
-
import type { Ref } from 'vue'
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Composable for handling element animations and transitions
|
|
7
|
-
*/
|
|
8
|
-
export function useMotion(target?: Ref<HTMLElement | null>) {
|
|
9
|
-
// Hover state
|
|
10
|
-
const isHovered = ref(false)
|
|
11
|
-
|
|
12
|
-
// Visibility state
|
|
13
|
-
const isVisible = ref(false)
|
|
14
|
-
|
|
15
|
-
// Scroll position
|
|
16
|
-
const scroll = ref({ x: 0, y: 0 })
|
|
17
|
-
|
|
18
|
-
// Initialize if target is provided
|
|
19
|
-
if (target?.value) {
|
|
20
|
-
isHovered.value = useElementHover(target).value
|
|
21
|
-
isVisible.value = useElementVisibility(target).value
|
|
22
|
-
|
|
23
|
-
const scrollResult = useScroll(target)
|
|
24
|
-
scroll.value = {
|
|
25
|
-
x: scrollResult.x.value,
|
|
26
|
-
y: scrollResult.y.value,
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
// Animation trigger states
|
|
31
|
-
const animateOnHover = ref(false)
|
|
32
|
-
const animateOnVisible = ref(false)
|
|
33
|
-
const animateOnScroll = ref(false)
|
|
34
|
-
|
|
35
|
-
// Trigger functions
|
|
36
|
-
const triggerHoverAnimation = () => {
|
|
37
|
-
animateOnHover.value = true
|
|
38
|
-
setTimeout(() => {
|
|
39
|
-
animateOnHover.value = false
|
|
40
|
-
}, 300)
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
const triggerVisibleAnimation = () => {
|
|
44
|
-
animateOnVisible.value = true
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
const triggerScrollAnimation = () => {
|
|
48
|
-
animateOnScroll.value = true
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
return {
|
|
52
|
-
// States
|
|
53
|
-
isHovered,
|
|
54
|
-
isVisible,
|
|
55
|
-
scroll,
|
|
56
|
-
animateOnHover,
|
|
57
|
-
animateOnVisible,
|
|
58
|
-
animateOnScroll,
|
|
59
|
-
|
|
60
|
-
// Methods
|
|
61
|
-
triggerHoverAnimation,
|
|
62
|
-
triggerVisibleAnimation,
|
|
63
|
-
triggerScrollAnimation,
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Composable for managing CSS transitions
|
|
69
|
-
*/
|
|
70
|
-
export function useTransition() {
|
|
71
|
-
const transitionClasses = ref<string[]>([])
|
|
72
|
-
|
|
73
|
-
const addTransition = (className: string) => {
|
|
74
|
-
if (!transitionClasses.value.includes(className)) {
|
|
75
|
-
transitionClasses.value.push(className)
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
const removeTransition = (className: string) => {
|
|
80
|
-
const index = transitionClasses.value.indexOf(className)
|
|
81
|
-
if (index > -1) {
|
|
82
|
-
transitionClasses.value.splice(index, 1)
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
const clearTransitions = () => {
|
|
87
|
-
transitionClasses.value = []
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
return {
|
|
91
|
-
transitionClasses,
|
|
92
|
-
addTransition,
|
|
93
|
-
removeTransition,
|
|
94
|
-
clearTransitions,
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Composable for managing CSS animations
|
|
100
|
-
*/
|
|
101
|
-
export function useAnimation() {
|
|
102
|
-
const animationClasses = ref<string[]>([])
|
|
103
|
-
const isAnimating = ref(false)
|
|
104
|
-
|
|
105
|
-
const addAnimation = (className: string) => {
|
|
106
|
-
if (!animationClasses.value.includes(className)) {
|
|
107
|
-
animationClasses.value.push(className)
|
|
108
|
-
isAnimating.value = true
|
|
109
|
-
|
|
110
|
-
// Auto-remove after duration (assuming 300ms)
|
|
111
|
-
setTimeout(() => {
|
|
112
|
-
removeAnimation(className)
|
|
113
|
-
isAnimating.value = false
|
|
114
|
-
}, 300)
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
const removeAnimation = (className: string) => {
|
|
119
|
-
const index = animationClasses.value.indexOf(className)
|
|
120
|
-
if (index > -1) {
|
|
121
|
-
animationClasses.value.splice(index, 1)
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
const clearAnimations = () => {
|
|
126
|
-
animationClasses.value = []
|
|
127
|
-
isAnimating.value = false
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
return {
|
|
131
|
-
animationClasses,
|
|
132
|
-
isAnimating,
|
|
133
|
-
addAnimation,
|
|
134
|
-
removeAnimation,
|
|
135
|
-
clearAnimations,
|
|
136
|
-
}
|
|
137
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { gsap } from 'gsap'
|
|
2
|
-
import { ScrollTrigger } from 'gsap/ScrollTrigger'
|
|
3
|
-
|
|
4
|
-
export default defineNuxtPlugin(() => {
|
|
5
|
-
// Register GSAP plugins
|
|
6
|
-
gsap.registerPlugin(ScrollTrigger)
|
|
7
|
-
|
|
8
|
-
// Provide GSAP globally
|
|
9
|
-
return {
|
|
10
|
-
provide: {
|
|
11
|
-
gsap,
|
|
12
|
-
ScrollTrigger,
|
|
13
|
-
},
|
|
14
|
-
}
|
|
15
|
-
})
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|