kmcom-nuxt-layers 1.6.12 → 1.6.16

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.
@@ -6,6 +6,15 @@
6
6
  * same Tailwind pass as all utility generation (avoids HMR regeneration shift).
7
7
  */
8
8
 
9
+ /* --- Theme Transition --- */
10
+ @layer utilities {
11
+ .theme-transition {
12
+ transition-property: color, background-color, border-color, fill, stroke, box-shadow;
13
+ transition-duration: 700ms;
14
+ transition-delay: 0ms;
15
+ }
16
+ }
17
+
9
18
  /* --- Reduced Motion --- */
10
19
  [data-theme-motion='reduced'] *,
11
20
  [data-theme-motion='reduced'] *::before,
@@ -18,3 +18,9 @@
18
18
  [data-theme-transparency='reduced'] .accent-blob {
19
19
  opacity: 0 !important;
20
20
  }
21
+
22
+ @layer utilities {
23
+ .site-word {
24
+ display: block;
25
+ }
26
+ }
@@ -0,0 +1,5 @@
1
+ <template>
2
+ <span v-for="(word, index) in useSite().subtitleWords" :key="index" class="site-word">
3
+ {{ word }}
4
+ </span>
5
+ </template>
@@ -1,15 +1,5 @@
1
- <script lang="ts" setup>
2
- import { splitSpaces } from '../../utils/regex'
3
-
4
- defineProps<{
5
- siteTitle: string
6
- tag: string
7
- titleVariant: string
8
- }>()
9
- </script>
10
-
11
1
  <template>
12
- <component :is="tag" :v-bind="$attrs">
13
- {{ titleVariant == 'split' ? splitSpaces(siteTitle) : siteTitle }}
14
- </component>
2
+ <span v-for="(word, index) in useSite().titleWords" :key="index" class="site-word">
3
+ {{ word }}
4
+ </span>
15
5
  </template>
@@ -44,7 +44,14 @@ const props = withDefaults(
44
44
  )
45
45
 
46
46
  const tag = computed(() => `h${props.level}` as const)
47
- const sizeClass = computed(() => `text-${props.size}`)
47
+
48
+ const sizeMap: Record<string, string> = {
49
+ screen: 'text-screen',
50
+ 'screen-xl': 'text-screen-xl',
51
+ 'screen-xxl': 'text-screen-xxl',
52
+ 'screen-xxxl': 'text-screen-xxxl',
53
+ }
54
+ const sizeClass = computed(() => sizeMap[props.size] ?? 'text-screen-xxl')
48
55
 
49
56
  const { classes } = useTypography({
50
57
  weight: props.weight,
@@ -0,0 +1,13 @@
1
+ import { splitSpaces } from '../utils/regex'
2
+
3
+ export function useSite() {
4
+ const config = useAppConfig().site
5
+
6
+ return {
7
+ title: config.title as string,
8
+ titleWords: splitSpaces(config.title as string) as string[],
9
+ subtitle: config.subtitle as string,
10
+ subtitleWords: splitSpaces(config.subtitle as string) as string[],
11
+ description: config.description as string,
12
+ }
13
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kmcom-nuxt-layers",
3
3
  "private": false,
4
- "version": "1.6.12",
4
+ "version": "1.6.16",
5
5
  "description": "Composable Nuxt 4 layers for building scalable Vue applications",
6
6
  "files": [
7
7
  "layers/*/nuxt.config.ts",