kmcom-nuxt-layers 2.6.2 → 2.7.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.
Files changed (114) hide show
  1. package/docs/ARCHITECTURE.md +21 -17
  2. package/docs/FEEDS.md +42 -34
  3. package/docs/IMPROVE-AUDIT-README.md +9 -10
  4. package/docs/IMPROVE-AUDIT-RESULTS.md +16 -17
  5. package/docs/IMPROVE-DEEP-AUDIT-RESULTS.md +29 -29
  6. package/docs/LAYERS-FIXES.md +1 -0
  7. package/docs/LAYOUT.md +91 -86
  8. package/docs/MIGRATION.md +93 -60
  9. package/docs/UPAGE-GRID-INTEGRATION.md +12 -10
  10. package/docs/USAGE.md +29 -38
  11. package/layers/animations/app/utils/pointerMotion.ts +1 -4
  12. package/layers/baseline/app/components/BaselineStatus.vue +13 -13
  13. package/layers/baseline/app/plugins/baseline-status.client.ts +4 -1
  14. package/layers/canvas/app/composables/useRendererCapabilities.ts +2 -2
  15. package/layers/content/app/components/Blog/Card.vue +1 -0
  16. package/layers/content/app/components/Gallery/Card.vue +1 -1
  17. package/layers/content/app/components/Gallery/Detail.vue +8 -1
  18. package/layers/content/app/components/Portfolio/Card.vue +1 -0
  19. package/layers/content/app/components/Portfolio/ColorPalette.vue +8 -1
  20. package/layers/content/app/components/Portfolio/Typography.vue +12 -2
  21. package/layers/content/app/composables/useGalleryItems.ts +3 -2
  22. package/layers/content/app/composables/usePortfolioItems.ts +3 -2
  23. package/layers/core/app/components/DiagnosticsPage.vue +15 -3
  24. package/layers/core/app/utils/featureClasses.test.ts +1 -3
  25. package/layers/core/app/utils/featureClasses.ts +1 -3
  26. package/layers/core/app/utils/helpers.test.ts +6 -2
  27. package/layers/core/nuxt.config.ts +2 -0
  28. package/layers/feeds/app/assets/css/feeds.css +3 -2
  29. package/layers/feeds/app/components/Feeds/Index.vue +36 -6
  30. package/layers/feeds/app/components/Feeds/RouteCard.vue +1 -3
  31. package/layers/feeds/app/plugins/feed-head.ts +2 -2
  32. package/layers/feeds/package.json +1 -1
  33. package/layers/feeds/public/feed/style.css +9 -9
  34. package/layers/feeds/server/utils/content-adapter.test.ts +3 -4
  35. package/layers/feeds/server/utils/content-adapter.ts +1 -1
  36. package/layers/feeds/server/utils/feed-author.test.ts +3 -3
  37. package/layers/feeds/server/utils/feed-config.test.ts +28 -6
  38. package/layers/feeds/server/utils/feed-config.ts +1 -4
  39. package/layers/feeds/server/utils/feed-service.ts +1 -1
  40. package/layers/feeds/server/utils/formats/rss.ts +1 -1
  41. package/layers/feeds/server/utils/formats.test.ts +1 -1
  42. package/layers/forms/app/utils/fieldProps.ts +1 -2
  43. package/layers/forms/server/api/contact.post.ts +4 -1
  44. package/layers/layout/app/assets/css/layout/grids.css +12 -3
  45. package/layers/layout/app/assets/css/layout/modes/fluid.css +9 -0
  46. package/layers/layout/app/components/Layout/Section/Sidebar.vue +11 -4
  47. package/layers/layout/app/utils/gridPlacementStyle.test.ts +3 -9
  48. package/layers/layout/app/utils/gridPlacementStyle.ts +10 -7
  49. package/layers/mailer/server/utils/email.ts +4 -3
  50. package/layers/mailer/server/utils/hooks.ts +1 -1
  51. package/layers/metadata/app/composables/useMetadataItem.ts +6 -2
  52. package/layers/metadata/app/composables/useMetadataSearch.ts +6 -2
  53. package/layers/metadata/providers/comicvine/server/utils/metadata-comicvine/client.ts +5 -5
  54. package/layers/metadata/providers/comicvine/server/utils/metadata-comicvine/provider.ts +11 -3
  55. package/layers/metadata/providers/google-books/server/utils/metadata-google-books/client.ts +9 -6
  56. package/layers/metadata/providers/google-books/server/utils/metadata-google-books/provider.ts +6 -3
  57. package/layers/metadata/providers/openlibrary/server/utils/metadata-openlibrary/normalise.test.ts +3 -1
  58. package/layers/metadata/providers/openlibrary/server/utils/metadata-openlibrary/provider.ts +4 -2
  59. package/layers/metadata/providers/themoviedb/server/utils/metadata-tmdb/client.test.ts +1 -3
  60. package/layers/metadata/providers/themoviedb/server/utils/metadata-tmdb/provider.ts +3 -1
  61. package/layers/metadata/server/api/metadata/status.get.ts +13 -18
  62. package/layers/metadata/server/utils/metadata/provider-registry.test.ts +1 -1
  63. package/layers/metadata/server/utils/metadata/search.test.ts +18 -18
  64. package/layers/metadata/server/utils/metadata/search.ts +16 -8
  65. package/layers/navigation/app/utils/site.test.ts +1 -3
  66. package/layers/scroll/app/components/Motion/PinnedSection.vue +11 -1
  67. package/layers/scroll/app/composables/useSectionProgress.ts +1 -1
  68. package/layers/scroll/app/plugins/locomotive-scroll.client.ts +6 -0
  69. package/layers/scroll/app/utils/scroll.ts +5 -1
  70. package/layers/seo/app/utils/seoConfig.test.ts +1 -1
  71. package/layers/shader/app/assets/css/shader.css +1 -1
  72. package/layers/shader/app/components/Material/AmbientAurora.client.vue +16 -4
  73. package/layers/shader/app/components/Material/AmbientFlow.client.vue +21 -5
  74. package/layers/shader/app/components/Material/AmbientGradientMesh.client.vue +21 -5
  75. package/layers/shader/app/components/Material/AmbientNebula.client.vue +21 -5
  76. package/layers/shader/app/components/Material/AmbientOcean.client.vue +16 -4
  77. package/layers/shader/app/components/Material/Gradient.client.vue +1 -1
  78. package/layers/shader/app/components/Material/Image.client.vue +1 -1
  79. package/layers/shader/app/components/Material/Noise.client.vue +11 -3
  80. package/layers/shader/app/composables/useAmbientMaterials.ts +0 -1
  81. package/layers/shader/app/shaders/common/blend.ts +5 -1
  82. package/layers/shader/app/shaders/common/grain.ts +5 -1
  83. package/layers/shader/app/shaders/common/lighting.ts +1 -6
  84. package/layers/shader/app/shaders/common/noise.ts +3 -1
  85. package/layers/shader/app/shaders/common/patterns.ts +1 -1
  86. package/layers/shader/app/shaders/common/shapes.ts +5 -1
  87. package/layers/shader/app/shaders/common/uv.ts +19 -2
  88. package/layers/shader/app/shaders/createMaterial.ts +11 -6
  89. package/layers/shader/app/shaders/layers/shaderGradient.ts +2 -12
  90. package/layers/shader/app/shaders/types.ts +1 -1
  91. package/layers/shader/app/types/uniforms.ts +1 -0
  92. package/layers/shader/app/utils/tsl/animation.ts +34 -36
  93. package/layers/starter/app/components/StarterDesignSystem.vue +120 -120
  94. package/layers/starter/app/components/StarterHome.vue +233 -208
  95. package/layers/theme/app/assets/css/theme.css +1 -1
  96. package/layers/theme/server/utils/accent-css.test.ts +17 -2
  97. package/layers/theme/server/utils/fouc-config.test.ts +7 -3
  98. package/layers/theme/server/utils/fouc-config.ts +24 -12
  99. package/layers/transitions/app/assets/css/transitions.css +6 -0
  100. package/layers/typography/app/assets/css/typography.css +313 -0
  101. package/layers/typography/app/components/Typography/Headline.vue +23 -14
  102. package/layers/typography/app/components/Typography/HeadlineScreen.vue +5 -12
  103. package/layers/typography/app/components/Typography/index.vue +4 -0
  104. package/layers/typography/app/composables/typography.ts +45 -5
  105. package/layers/typography/app/types/typography.ts +36 -7
  106. package/layers/typography/nuxt.config.ts +2 -0
  107. package/layers/visual/app/app.config.ts +1 -1
  108. package/layers/visual/app/assets/css/visual.css +1 -1
  109. package/layers/visual/app/composables/accent.ts +1 -2
  110. package/layers/visual/app/composables/tint.ts +1 -2
  111. package/layers/visual/app/types/media.ts +2 -2
  112. package/layers/visual/app/utils/gradientStyle.test.ts +1 -2
  113. package/layers/visual/app/utils/responsiveSizes.ts +0 -1
  114. package/package.json +36 -16
@@ -1,11 +1,11 @@
1
1
  <script setup lang="ts">
2
+ import { watchUniformProp } from '#layers/shader/app/composables/useUniformWatchers'
2
3
  import { Color, DoubleSide } from 'three'
3
4
  import { mix, time as tslTime, uniform, uv, vec3 } from 'three/tsl'
4
5
  import { MeshBasicNodeMaterial } from 'three/webgpu'
5
6
 
6
7
  import type { TSLNode } from '../../shaders/types'
7
8
  import { fbm, simplexNoise2D } from '../../utils/tsl/noise'
8
- import { watchUniformProp } from '#layers/shader/app/composables/useUniformWatchers'
9
9
 
10
10
  const {
11
11
  scale = 3,
@@ -52,8 +52,16 @@
52
52
  watchUniformProp(() => mouseX, mouseXUniform)
53
53
  watchUniformProp(() => mouseY, mouseYUniform)
54
54
  watchUniformProp(() => mouseStrength, mouseStrengthUniform)
55
- watchUniformProp(() => baseColor, baseColorUniform, (val) => new Color(val))
56
- watchUniformProp(() => peakColor, peakColorUniform, (val) => new Color(val))
55
+ watchUniformProp(
56
+ () => baseColor,
57
+ baseColorUniform,
58
+ (val) => new Color(val)
59
+ )
60
+ watchUniformProp(
61
+ () => peakColor,
62
+ peakColorUniform,
63
+ (val) => new Color(val)
64
+ )
57
65
 
58
66
  const material = computed(() => {
59
67
  const mat = new MeshBasicNodeMaterial()
@@ -34,7 +34,6 @@ import type { ColorUniform, FloatUniform, TSLNode, Vec3Uniform } from '../shader
34
34
  // Private helpers
35
35
  // ============================================
36
36
 
37
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
38
37
  function buildFlowWarpedUV(
39
38
  uvCoord: any,
40
39
  t: any,
@@ -169,7 +169,11 @@ export function blendPinLight(base: TSLNode, blend: TSLNode): TSLNode {
169
169
  */
170
170
  export function blendWithOpacity(
171
171
  base: TSLNode,
172
- ...args: [blend: TSLNode, blendFn: (a: TSLNode, b: TSLNode) => TSLNode, opacity?: TSLNode | number]
172
+ ...args: [
173
+ blend: TSLNode,
174
+ blendFn: (a: TSLNode, b: TSLNode) => TSLNode,
175
+ opacity?: TSLNode | number,
176
+ ]
173
177
  ): TSLNode {
174
178
  const [blend, blendFn, opacity = 1] = args
175
179
  const op = toScalarNode(opacity)
@@ -151,7 +151,11 @@ export function interlace(
151
151
  */
152
152
  export function vignette(
153
153
  uv: TSLNode,
154
- ...args: [intensity?: TSLNode | number, smoothness?: TSLNode | number, roundness?: TSLNode | number]
154
+ ...args: [
155
+ intensity?: TSLNode | number,
156
+ smoothness?: TSLNode | number,
157
+ roundness?: TSLNode | number,
158
+ ]
155
159
  ): TSLNode {
156
160
  const [intensity = 0.5, smoothness = 0.5, roundness = 1] = args
157
161
  const int = toScalarNode(intensity)
@@ -126,12 +126,7 @@ export type LightingOptions = {
126
126
  */
127
127
  export function phongLighting(
128
128
  viewDir: TSLNode,
129
- ...args: [
130
- normal: TSLNode,
131
- lightDir: TSLNode,
132
- lightColor: TSLNode,
133
- options?: LightingOptions,
134
- ]
129
+ ...args: [normal: TSLNode, lightDir: TSLNode, lightColor: TSLNode, options?: LightingOptions]
135
130
  ): TSLNode {
136
131
  const [normal, lightDir, lightColor, options = {}] = args
137
132
  const { ambient = 0.1, diffuseStrength = 1.0, specularStrength = 0.5, shininess = 32 } = options
@@ -149,7 +149,9 @@ export function simplexNoise2D(v: TSLNode): TSLNode {
149
149
  const ox = floor(x.add(0.5))
150
150
  const a0 = x.sub(ox)
151
151
 
152
- const mMod: TSLNode = m4.mul(float(1.79284291400159).sub(a0.mul(a0).add(h.mul(h)).mul(0.85373472095314)))
152
+ const mMod: TSLNode = m4.mul(
153
+ float(1.79284291400159).sub(a0.mul(a0).add(h.mul(h)).mul(0.85373472095314))
154
+ )
153
155
 
154
156
  const gx: TSLNode = a0.x.mul(x0.x).add(h.x.mul(x0.y))
155
157
  const gy: TSLNode = a0.y.mul(x12_mod.x).add(h.y.mul(x12_mod.y))
@@ -18,8 +18,8 @@ import {
18
18
  } from 'three/tsl'
19
19
 
20
20
  import type { TSLNode } from '../types'
21
- import { fbm3dSimplex, simplexNoise3d } from './noise'
22
21
  import { toScalarNode, toVec2Node } from './nodes'
22
+ import { fbm3dSimplex, simplexNoise3d } from './noise'
23
23
 
24
24
  // ============================================
25
25
  // Canvas Weave Pattern
@@ -338,7 +338,11 @@ export function radialLines(
338
338
  */
339
339
  export function concentricCircles(
340
340
  uv: TSLNode,
341
- ...args: [center?: TSLNode | [number, number], frequency?: TSLNode | number, thickness?: TSLNode | number]
341
+ ...args: [
342
+ center?: TSLNode | [number, number],
343
+ frequency?: TSLNode | number,
344
+ thickness?: TSLNode | number,
345
+ ]
342
346
  ): TSLNode {
343
347
  const [center = [0.5, 0.5], frequency = 10, thickness = 0.5] = args
344
348
  const c = toVec2Node(center)
@@ -2,7 +2,20 @@
2
2
  * Modular TSL UV Manipulation Utilities
3
3
  * Provides composable UV transformation functions
4
4
  */
5
- import { abs, atan, cos, float, floor, fract, length, mix, pow, sin, smoothstep, vec2 } from 'three/tsl'
5
+ import {
6
+ abs,
7
+ atan,
8
+ cos,
9
+ float,
10
+ floor,
11
+ fract,
12
+ length,
13
+ mix,
14
+ pow,
15
+ sin,
16
+ smoothstep,
17
+ vec2,
18
+ } from 'three/tsl'
6
19
 
7
20
  import type { TSLNode } from '../types'
8
21
  import { toScalarNode, toVec2Node } from './nodes'
@@ -179,7 +192,11 @@ export function rippleUV(
179
192
  */
180
193
  export function swirlUV(
181
194
  uv: TSLNode,
182
- ...args: [center?: TSLNode | [number, number], strength?: TSLNode | number, radius?: TSLNode | number]
195
+ ...args: [
196
+ center?: TSLNode | [number, number],
197
+ strength?: TSLNode | number,
198
+ radius?: TSLNode | number,
199
+ ]
183
200
  ): TSLNode {
184
201
  const [center = [0.5, 0.5], strength = 1, radius = 0.5] = args
185
202
  const c = toVec2Node(center)
@@ -6,8 +6,6 @@ import { BackSide, DoubleSide, FrontSide, type Side } from 'three'
6
6
  import { vec4 } from 'three/tsl'
7
7
  import { MeshBasicNodeMaterial } from 'three/webgpu'
8
8
 
9
- import type { TSLNode } from './types'
10
-
11
9
  import {
12
10
  aurora,
13
11
  createAuroraUniforms,
@@ -44,7 +42,7 @@ import {
44
42
  type StripeGradientOptions,
45
43
  type StripeGradientUniforms,
46
44
  } from './layers/stripe'
47
-
45
+ import type { TSLNode } from './types'
48
46
 
49
47
  // ============================================
50
48
  // Types
@@ -112,19 +110,26 @@ function createShaderUniforms<T extends ShaderType>(
112
110
  ): ShaderUniforms<T> {
113
111
  switch (type) {
114
112
  case 'stripe':
115
- return createStripeGradientUniforms(shaderOptions as StripeGradientOptions) as ShaderUniforms<T>
113
+ return createStripeGradientUniforms(
114
+ shaderOptions as StripeGradientOptions
115
+ ) as ShaderUniforms<T>
116
116
  case 'meshGradient':
117
117
  return createMeshGradientUniforms(shaderOptions as MeshGradientOptions) as ShaderUniforms<T>
118
118
  case 'aurora':
119
119
  return createAuroraUniforms(shaderOptions as AuroraOptions) as ShaderUniforms<T>
120
120
  case 'shaderGradient':
121
- return createShaderGradientUniforms(shaderOptions as ShaderGradientOptions) as ShaderUniforms<T>
121
+ return createShaderGradientUniforms(
122
+ shaderOptions as ShaderGradientOptions
123
+ ) as ShaderUniforms<T>
122
124
  case 'paperShading':
123
125
  return createPaperShadingUniforms(shaderOptions as PaperShadingOptions) as ShaderUniforms<T>
124
126
  }
125
127
  }
126
128
 
127
- function createShaderColorNode<T extends ShaderType>(type: T, uniforms: ShaderUniforms<T>): TSLNode {
129
+ function createShaderColorNode<T extends ShaderType>(
130
+ type: T,
131
+ uniforms: ShaderUniforms<T>
132
+ ): TSLNode {
128
133
  switch (type) {
129
134
  case 'stripe':
130
135
  return stripeGradient(uniforms as StripeGradientUniforms)
@@ -75,18 +75,8 @@ export type ShaderGradientUniforms = {
75
75
  export function createShaderGradientUniforms(
76
76
  options: ShaderGradientOptions = {}
77
77
  ): ShaderGradientUniforms {
78
- const {
79
- color1,
80
- color2,
81
- color3,
82
- speed,
83
- morphIntensity,
84
- grain,
85
- lightX,
86
- lightY,
87
- brightness,
88
- zoom,
89
- } = { ...DEFAULT_SHADER_GRADIENT_OPTIONS, ...options }
78
+ const { color1, color2, color3, speed, morphIntensity, grain, lightX, lightY, brightness, zoom } =
79
+ { ...DEFAULT_SHADER_GRADIENT_OPTIONS, ...options }
90
80
 
91
81
  return {
92
82
  color1: uniform(new Color(color1)),
@@ -6,8 +6,8 @@
6
6
  // TSL nodes are complex internally, so we use a simple type alias
7
7
  // This provides flexibility while maintaining code readability
8
8
 
9
- import type { UniformNode } from 'three/webgpu'
10
9
  import type { Color, Vector3 } from 'three'
10
+ import type { UniformNode } from 'three/webgpu'
11
11
 
12
12
  export type { TSLNode } from '../types/tsl'
13
13
 
@@ -1,4 +1,5 @@
1
1
  import type { Color, Matrix3, Matrix4, Texture, Vector2, Vector3, Vector4 } from 'three'
2
+
2
3
  import type { TSLNode } from './tsl'
3
4
 
4
5
  export type UniformPrimitive = number | boolean | string
@@ -30,43 +30,43 @@ export const loopTime = Fn(([time, duration]: [TSLNode, TSLNode]) => {
30
30
  * Bounce easing (standalone so `easing` does not reference itself)
31
31
  */
32
32
  const easeOutBounceFn = Fn(([t]: [TSLNode]) => {
33
- const n1 = 7.5625
34
- const d1 = 2.75
35
-
36
- const c1 = t.lessThan(1.0 / d1).select(t.mul(t).mul(n1), float(0.0))
37
- const c2 = t
38
- .greaterThanEqual(1.0 / d1)
39
- .mul(t.lessThan(2.0 / d1))
40
- .select(
41
- t
42
- .sub(1.5 / d1)
43
- .mul(t.sub(1.5 / d1))
44
- .mul(n1)
45
- .add(0.75),
46
- float(0.0)
47
- )
48
- const c3 = t
49
- .greaterThanEqual(2.0 / d1)
50
- .mul(t.lessThan(2.5 / d1))
51
- .select(
52
- t
53
- .sub(2.25 / d1)
54
- .mul(t.sub(2.25 / d1))
55
- .mul(n1)
56
- .add(0.9375),
57
- float(0.0)
58
- )
59
- const c4 = t.greaterThanEqual(2.5 / d1).select(
33
+ const n1 = 7.5625
34
+ const d1 = 2.75
35
+
36
+ const c1 = t.lessThan(1.0 / d1).select(t.mul(t).mul(n1), float(0.0))
37
+ const c2 = t
38
+ .greaterThanEqual(1.0 / d1)
39
+ .mul(t.lessThan(2.0 / d1))
40
+ .select(
60
41
  t
61
- .sub(2.625 / d1)
62
- .mul(t.sub(2.625 / d1))
42
+ .sub(1.5 / d1)
43
+ .mul(t.sub(1.5 / d1))
63
44
  .mul(n1)
64
- .add(0.984375),
45
+ .add(0.75),
65
46
  float(0.0)
66
47
  )
67
-
68
- return c1.add(c2).add(c3).add(c4)
69
- })
48
+ const c3 = t
49
+ .greaterThanEqual(2.0 / d1)
50
+ .mul(t.lessThan(2.5 / d1))
51
+ .select(
52
+ t
53
+ .sub(2.25 / d1)
54
+ .mul(t.sub(2.25 / d1))
55
+ .mul(n1)
56
+ .add(0.9375),
57
+ float(0.0)
58
+ )
59
+ const c4 = t.greaterThanEqual(2.5 / d1).select(
60
+ t
61
+ .sub(2.625 / d1)
62
+ .mul(t.sub(2.625 / d1))
63
+ .mul(n1)
64
+ .add(0.984375),
65
+ float(0.0)
66
+ )
67
+
68
+ return c1.add(c2).add(c3).add(c4)
69
+ })
70
70
 
71
71
  /**
72
72
  * Easing functions
@@ -85,9 +85,7 @@ export const easing = {
85
85
  easeOutCubic: Fn(([t]: [TSLNode]) => float(1.0).sub(pow(float(1.0).sub(t), 3.0))),
86
86
  easeInOutCubic: Fn(([t]: [TSLNode]) => {
87
87
  const inv: TSLNode = float(-2.0).mul(t).add(2.0)
88
- return t
89
- .lessThan(0.5)
90
- .select(t.mul(t).mul(t).mul(4.0), float(1.0).sub(inv.pow(3.0).div(2.0)))
88
+ return t.lessThan(0.5).select(t.mul(t).mul(t).mul(4.0), float(1.0).sub(inv.pow(3.0).div(2.0)))
91
89
  }),
92
90
 
93
91
  // Quartic
@@ -1,130 +1,130 @@
1
1
  <script setup lang="ts">
2
- useSeoMeta({
3
- title: 'Design System — kmcom-nuxt-layers',
4
- description:
5
- 'Comprehensive design system reference: typography, colors, layout grid, section components, motion components, and UI components.',
6
- })
7
-
8
- // Grid debug ref
9
- const gridDebug = ref<{ toggle: () => void } | null>(null)
10
-
11
- // Color tokens for demo
12
- const semanticColors = ['dimmed', 'muted', 'toned', 'default', 'highlighted', 'inverted'] as const
13
- const statusColors = ['info', 'success', 'warning', 'error'] as const
14
- const brandColors = ['primary', 'secondary', 'neutral'] as const
15
-
16
- // Typography weight demos
17
- const fontWeights = [
18
- 'font-thin',
19
- 'font-light',
20
- 'font-normal',
21
- 'font-medium',
22
- 'font-semibold',
23
- 'font-bold',
24
- 'font-black',
25
- ] as const
26
-
27
- // Sample code for CodeBlock demo
28
- const sampleCode = `function useScreen() {
2
+ useSeoMeta({
3
+ title: 'Design System — kmcom-nuxt-layers',
4
+ description:
5
+ 'Comprehensive design system reference: typography, colors, layout grid, section components, motion components, and UI components.',
6
+ })
7
+
8
+ // Grid debug ref
9
+ const gridDebug = useTemplateRef<{ toggle: () => void }>('gridDebug')
10
+
11
+ // Color tokens for demo
12
+ const semanticColors = ['dimmed', 'muted', 'toned', 'default', 'highlighted', 'inverted'] as const
13
+ const statusColors = ['info', 'success', 'warning', 'error'] as const
14
+ const brandColors = ['primary', 'secondary', 'neutral'] as const
15
+
16
+ // Typography weight demos
17
+ const fontWeights = [
18
+ 'font-thin',
19
+ 'font-light',
20
+ 'font-normal',
21
+ 'font-medium',
22
+ 'font-semibold',
23
+ 'font-bold',
24
+ 'font-black',
25
+ ] as const
26
+
27
+ // Sample code for CodeBlock demo
28
+ const sampleCode = `function useScreen() {
29
29
  const breakpoints = useBreakpoints(breakpointsTailwind)
30
30
  const isMobile = breakpoints.smaller('md')
31
31
  const isDesktop = breakpoints.greaterOrEqual('lg')
32
32
  return { isMobile, isDesktop }
33
33
  }`
34
34
 
35
- // Code samples — kept as script variables to avoid the Vue HTML lexer treating
36
- // <!-- sequences inside {{ `` }} template literals as HTML comment nodes.
37
- const scrollProgressCodeSample = [
38
- '<!-- Fixed top bar -->',
39
- '<div class="fixed top-0 left-0 right-0 z-50">',
40
- ' <MotionScrollProgress type="linear" :height="3" />',
41
- '</div>',
42
- '',
43
- '<!-- Floating circular indicator -->',
44
- '<div class="fixed bottom-6 right-6">',
45
- ' <MotionScrollProgress type="circular" :size="56" :stroke-width="4" :show-percentage="false" />',
46
- '</div>',
47
- ].join('\n')
48
-
49
- const scrollStatsCodeSample = [
50
- '<!-- Add during development only -->',
51
- "<MotionScrollStats :show=\"['velocity', 'progress', 'scrollY']\" position=\"bottom-right\" />",
52
- ].join('\n')
53
-
54
- const layoutPageCodeSample = [
55
- '// Standard page with grid layout + header and footer',
56
- 'definePageMeta({',
57
- " layout: { name: 'grid', props: { showHeader: true, showFooter: true } },",
58
- '})',
59
- '',
60
- '// No chrome — content-only',
61
- "definePageMeta({ layout: 'grid' })",
62
- '',
63
- '// Full-bleed / animation page — opt out entirely',
64
- 'definePageMeta({ layout: false })',
65
- '',
66
- '// In the template:',
67
- '// <LayoutPage title="About" description="Learn more." :show-header="true">',
68
- '// <LayoutSection>...</LayoutSection>',
69
- '// </LayoutPage>',
70
- ].join('\n')
71
-
72
- // Table of contents
73
- const tocItems = [
74
- {
75
- id: 'typography-headlines',
76
- label: 'Typography — Headlines',
77
- icon: 'i-lucide-heading',
78
- },
79
- {
80
- id: 'typography-controls',
81
- label: 'Typography — Controls',
82
- icon: 'i-lucide-type',
83
- },
84
- {
85
- id: 'typography-decorative',
86
- label: 'Typography — Decorative',
87
- icon: 'i-lucide-pen-tool',
88
- },
89
- {
90
- id: 'typography-blocks',
91
- label: 'Typography — Blocks',
92
- icon: 'i-lucide-code',
93
- },
94
- { id: 'color-system', label: 'Color System', icon: 'i-lucide-palette' },
95
- { id: 'layout-grid', label: 'Layout Grid', icon: 'i-lucide-grid-3x3' },
96
- { id: 'layout-page', label: 'LayoutPage', icon: 'i-lucide-file' },
97
- {
98
- id: 'section-components',
99
- label: 'Section Components',
100
- icon: 'i-lucide-image',
101
- },
102
- {
103
- id: 'motion-components',
104
- label: 'Motion Components',
105
- icon: 'i-lucide-sparkles',
106
- },
107
- {
108
- id: 'links-group',
109
- label: 'LinksGroup',
110
- icon: 'i-lucide-mouse-pointer-click',
111
- },
112
- {
113
- id: 'ui-components',
114
- label: 'UI Components',
115
- icon: 'i-lucide-mouse-pointer',
116
- },
117
- ]
118
-
119
- // Gallery items for section demo
120
- const galleryItems = [
121
- { id: 1, title: 'Item 1', color: 'bg-blue-500' },
122
- { id: 2, title: 'Item 2', color: 'bg-green-500' },
123
- { id: 3, title: 'Item 3', color: 'bg-purple-500' },
124
- { id: 4, title: 'Item 4', color: 'bg-orange-500' },
125
- { id: 5, title: 'Item 5', color: 'bg-pink-500' },
126
- { id: 6, title: 'Item 6', color: 'bg-cyan-500' },
127
- ]
35
+ // Code samples — kept as script variables to avoid the Vue HTML lexer treating
36
+ // <!-- sequences inside {{ `` }} template literals as HTML comment nodes.
37
+ const scrollProgressCodeSample = [
38
+ '<!-- Fixed top bar -->',
39
+ '<div class="fixed top-0 left-0 right-0 z-50">',
40
+ ' <MotionScrollProgress type="linear" :height="3" />',
41
+ '</div>',
42
+ '',
43
+ '<!-- Floating circular indicator -->',
44
+ '<div class="fixed bottom-6 right-6">',
45
+ ' <MotionScrollProgress type="circular" :size="56" :stroke-width="4" :show-percentage="false" />',
46
+ '</div>',
47
+ ].join('\n')
48
+
49
+ const scrollStatsCodeSample = [
50
+ '<!-- Add during development only -->',
51
+ "<MotionScrollStats :show=\"['velocity', 'progress', 'scrollY']\" position=\"bottom-right\" />",
52
+ ].join('\n')
53
+
54
+ const layoutPageCodeSample = [
55
+ '// Standard page with grid layout + header and footer',
56
+ 'definePageMeta({',
57
+ " layout: { name: 'grid', props: { showHeader: true, showFooter: true } },",
58
+ '})',
59
+ '',
60
+ '// No chrome — content-only',
61
+ "definePageMeta({ layout: 'grid' })",
62
+ '',
63
+ '// Full-bleed / animation page — opt out entirely',
64
+ 'definePageMeta({ layout: false })',
65
+ '',
66
+ '// In the template:',
67
+ '// <LayoutPage title="About" description="Learn more." :show-header="true">',
68
+ '// <LayoutSection>...</LayoutSection>',
69
+ '// </LayoutPage>',
70
+ ].join('\n')
71
+
72
+ // Table of contents
73
+ const tocItems = [
74
+ {
75
+ id: 'typography-headlines',
76
+ label: 'Typography — Headlines',
77
+ icon: 'i-lucide-heading',
78
+ },
79
+ {
80
+ id: 'typography-controls',
81
+ label: 'Typography — Controls',
82
+ icon: 'i-lucide-type',
83
+ },
84
+ {
85
+ id: 'typography-decorative',
86
+ label: 'Typography — Decorative',
87
+ icon: 'i-lucide-pen-tool',
88
+ },
89
+ {
90
+ id: 'typography-blocks',
91
+ label: 'Typography — Blocks',
92
+ icon: 'i-lucide-code',
93
+ },
94
+ { id: 'color-system', label: 'Color System', icon: 'i-lucide-palette' },
95
+ { id: 'layout-grid', label: 'Layout Grid', icon: 'i-lucide-grid-3x3' },
96
+ { id: 'layout-page', label: 'LayoutPage', icon: 'i-lucide-file' },
97
+ {
98
+ id: 'section-components',
99
+ label: 'Section Components',
100
+ icon: 'i-lucide-image',
101
+ },
102
+ {
103
+ id: 'motion-components',
104
+ label: 'Motion Components',
105
+ icon: 'i-lucide-sparkles',
106
+ },
107
+ {
108
+ id: 'links-group',
109
+ label: 'LinksGroup',
110
+ icon: 'i-lucide-mouse-pointer-click',
111
+ },
112
+ {
113
+ id: 'ui-components',
114
+ label: 'UI Components',
115
+ icon: 'i-lucide-mouse-pointer',
116
+ },
117
+ ]
118
+
119
+ // Gallery items for section demo
120
+ const galleryItems = [
121
+ { id: 1, title: 'Item 1', color: 'bg-blue-500' },
122
+ { id: 2, title: 'Item 2', color: 'bg-green-500' },
123
+ { id: 3, title: 'Item 3', color: 'bg-purple-500' },
124
+ { id: 4, title: 'Item 4', color: 'bg-orange-500' },
125
+ { id: 5, title: 'Item 5', color: 'bg-pink-500' },
126
+ { id: 6, title: 'Item 6', color: 'bg-cyan-500' },
127
+ ]
128
128
  </script>
129
129
 
130
130
  <template>