kmcom-nuxt-layers 6.2.1 → 6.4.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.
- package/docs/MIGRATION-v6.3.0.md +234 -0
- package/docs/MIGRATION-v6.4.0.md +215 -0
- package/docs/MIGRATION.md +3 -0
- package/docs/adr/0003-modular-step-system-replaces-fluid-clamps.md +16 -0
- package/docs/component-levels.md +117 -0
- package/docs/layout-shift-causes.md +18 -0
- package/layers/content/app/components/Blog/ItemPage.vue +2 -7
- package/layers/content/app/components/Blog/List.vue +9 -2
- package/layers/content/app/components/Blog/Page.vue +9 -19
- package/layers/content/app/components/Gallery/Detail.vue +1 -0
- package/layers/content/app/components/Gallery/Grid.vue +9 -2
- package/layers/content/app/components/Gallery/ImageDetail.vue +0 -6
- package/layers/content/app/components/Gallery/ImagePage.vue +10 -6
- package/layers/content/app/components/Gallery/Page.vue +9 -19
- package/layers/content/app/components/Gallery/SlugPage.vue +2 -7
- package/layers/content/app/components/NuxtContent/Detail.vue +20 -11
- package/layers/content/app/components/NuxtContent/IndexTemplate.vue +21 -0
- package/layers/content/app/components/NuxtContent/List.vue +6 -1
- package/layers/content/app/components/Portfolio/ColorPalette.vue +2 -2
- package/layers/content/app/components/Portfolio/ItemPage.vue +2 -6
- package/layers/content/app/components/Portfolio/List.vue +19 -8
- package/layers/content/app/components/Portfolio/Page.vue +9 -19
- package/layers/content/app/composables/useContentItemSeo.ts +19 -0
- package/layers/content/app/composables/useContentSection.ts +9 -0
- package/layers/content/app/utils/galleryImageMeta.test.ts +30 -0
- package/layers/content/app/utils/galleryImageMeta.ts +11 -0
- package/layers/content/nuxt.config.ts +1 -1
- package/layers/core/app/app.config.ts +2 -2
- package/layers/core/app/app.vue +2 -1
- package/layers/core/app/assets/css/core.css +5 -11
- package/layers/core/app/assets/css/tokens/z-index.css +16 -0
- package/layers/core/app/components/DiagnosticsPage.vue +41 -41
- package/layers/core/app/components/LoadingScreen.vue +2 -0
- package/layers/core/app/utils/loading.test.ts +2 -2
- package/layers/core/app/utils/loading.ts +1 -1
- package/layers/delivery/feeds/app/components/Feeds/Index.vue +36 -75
- package/layers/delivery/feeds/app/components/Feeds/RouteCard.vue +6 -8
- package/layers/design-system/theming/nuxt.config.ts +1 -3
- package/layers/design-system/typography/app/assets/css/typography.css +41 -5
- package/layers/design-system/visual/app/components/Base/Modal.vue +34 -86
- package/layers/design-system/visual/app/components/HoverDimGroup.test.ts +38 -0
- package/layers/design-system/visual/app/components/HoverDimGroup.vue +54 -0
- package/layers/design-system/visual/app/components/Progress/Bar.vue +9 -29
- package/layers/motion/animations/app/components/Motion/Cursor.vue +1 -1
- package/layers/motion/animations/app/components/Motion/Marquee.vue +5 -0
- package/layers/motion/animations/app/components/Motion/MarqueeText.vue +2 -1
- package/layers/motion/animations/app/components/Motion/Staggered.test.ts +40 -0
- package/layers/motion/animations/app/components/Motion/Staggered.vue +37 -42
- package/layers/motion/animations/app/components/Motion/TextReveal.vue +8 -1
- package/layers/motion/animations/app/components/Motion/VelocityEffect.vue +6 -0
- package/layers/motion/animations/app/composables/useCountUp.ts +6 -0
- package/layers/motion/animations/app/composables/useCursorFollower.ts +4 -1
- package/layers/motion/animations/app/utils/pointerMotion.ts +7 -2
- package/layers/motion/scroll/app/components/Motion/HorizontalScroll.vue +9 -0
- package/layers/motion/scroll/app/components/Motion/Parallax.vue +13 -12
- package/layers/motion/scroll/app/components/Motion/PinnedSection.vue +16 -9
- package/layers/motion/scroll/app/composables/useReducedMotion.test.ts +23 -0
- package/layers/motion/scroll/app/composables/useReducedMotion.ts +14 -0
- package/layers/motion/scroll/app/utils/parallax.test.ts +24 -0
- package/layers/motion/scroll/app/utils/parallax.ts +16 -0
- package/layers/motion/scroll/nuxt.config.ts +1 -1
- package/layers/structure/layout/app/components/Layout/Grid/Debug.vue +1 -1
- package/layers/structure/layout/app/components/Layout/Page/index.vue +9 -10
- package/layers/structure/navigation/app/app.config.ts +37 -14
- package/layers/structure/navigation/app/components/Links/Group.vue +12 -38
- package/layers/structure/navigation/app/components/Links/Named.vue +9 -0
- package/layers/structure/navigation/app/components/Mast/Footer.vue +1 -1
- package/layers/structure/navigation/app/components/Mast/Nav.vue +14 -11
- package/layers/structure/navigation/app/components/Mast/NavModal.vue +95 -45
- package/layers/structure/navigation/app/components/Site/Logo.vue +35 -0
- package/layers/structure/navigation/app/components/Site/Subtitle.vue +10 -0
- package/layers/structure/navigation/app/components/Site/Title.vue +8 -0
- package/layers/structure/navigation/app/composables/mastNav.ts +38 -13
- package/layers/structure/navigation/app/types/nav.ts +34 -0
- package/layers/structure/navigation/nuxt.config.ts +7 -1
- package/package.json +1 -1
- /package/layers/{design-system/theming/app/assets/css/tokens.css → core/app/assets/css/tokens/elevation-motion.css} +0 -0
|
@@ -1,15 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Shared open state for the site nav. Plain `useState`, not an overlay: layouts and triggers read
|
|
3
|
+
* `isOpen`, and `<MastNavModal />` (rendered once by the layout) binds to it. Any number of
|
|
4
|
+
* `<MastNav>` triggers share the one modal.
|
|
5
|
+
*
|
|
6
|
+
* Scroll lock: UModal (Reka) locks body scroll and pads for the scrollbar, so this only stops
|
|
7
|
+
* Lenis — and only after Reka has measured. Hiding overflow first (lockScrolling) left Reka
|
|
8
|
+
* measuring a 0px scrollbar, and the page widened by the scrollbar on open.
|
|
9
|
+
*/
|
|
10
|
+
export function useMastNav() {
|
|
11
|
+
const isOpen = useState('mast-nav:open', () => false)
|
|
3
12
|
|
|
4
|
-
|
|
5
|
-
onOpen: () => {
|
|
13
|
+
function smoothScroll() {
|
|
6
14
|
try {
|
|
7
|
-
useSmoothScroll().
|
|
8
|
-
} catch {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
return useSmoothScroll().locomotiveScroll
|
|
16
|
+
} catch {
|
|
17
|
+
return undefined
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function open() {
|
|
22
|
+
const scroll = smoothScroll()
|
|
23
|
+
isOpen.value = true
|
|
24
|
+
if (import.meta.client) nextTick(() => scroll?.value?.stop())
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function close() {
|
|
28
|
+
const scroll = smoothScroll()
|
|
29
|
+
isOpen.value = false
|
|
30
|
+
if (!import.meta.client) return
|
|
31
|
+
scroll?.value?.start()
|
|
32
|
+
// Lenis/Locomotive measure the page while stopped; resize after restart so they resync
|
|
33
|
+
scroll?.value?.lenisInstance?.resize()
|
|
34
|
+
requestAnimationFrame(() => scroll?.value?.resize())
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const toggle = () => (isOpen.value ? close() : open())
|
|
38
|
+
|
|
39
|
+
return { isOpen: readonly(isOpen), open, close, toggle }
|
|
40
|
+
}
|
|
@@ -8,4 +8,38 @@ export type MastNavLink = {
|
|
|
8
8
|
params?: Record<string, string | number>
|
|
9
9
|
query?: Record<string, string | number>
|
|
10
10
|
}
|
|
11
|
+
/** Skip the link without passing a custom `links` prop. */
|
|
12
|
+
hidden?: boolean
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* UButton props for the MastNav trigger. Plain strings: Nuxt UI's ButtonProps is derived from the
|
|
17
|
+
* resolved app config, so using it inside app.config.ts would be a type cycle.
|
|
18
|
+
*/
|
|
19
|
+
export type MastNavTrigger = {
|
|
20
|
+
label?: string
|
|
21
|
+
icon?: string
|
|
22
|
+
trailingIcon?: string
|
|
23
|
+
color?: string
|
|
24
|
+
variant?: string
|
|
25
|
+
size?: string
|
|
26
|
+
square?: boolean
|
|
27
|
+
class?: string
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** Class strings for MastNavModal's parts. Merged per key over app.config; strings replace. */
|
|
31
|
+
export type MastNavUi = {
|
|
32
|
+
content: string
|
|
33
|
+
close: string
|
|
34
|
+
nav: string
|
|
35
|
+
link: string
|
|
36
|
+
linkActive: string
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type SiteLogoSize = 'sm' | 'md' | 'lg' | 'display'
|
|
40
|
+
|
|
41
|
+
export type SiteLogoConfig = {
|
|
42
|
+
stacked: boolean
|
|
43
|
+
ui: { root: string; word: string }
|
|
44
|
+
sizes: Record<SiteLogoSize, string>
|
|
11
45
|
}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
export default defineNuxtConfig({
|
|
2
2
|
$meta: { name: 'navigation' },
|
|
3
3
|
|
|
4
|
-
extends: [
|
|
4
|
+
extends: [
|
|
5
|
+
'../../core',
|
|
6
|
+
'../../motion/scroll',
|
|
7
|
+
'../layout',
|
|
8
|
+
'../../design-system/typography',
|
|
9
|
+
'../../design-system/visual',
|
|
10
|
+
],
|
|
5
11
|
|
|
6
12
|
alias: {
|
|
7
13
|
'#layers/navigation': import.meta.dirname,
|
package/package.json
CHANGED
|
File without changes
|