kmcom-nuxt-layers 2.2.6 → 2.2.9
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/FEEDS.md +197 -0
- package/docs/LAYERS-FIXES.md +101 -0
- package/docs/MIGRATION.md +627 -0
- package/docs/feed-layer.md +374 -0
- package/docs/patch-picture-provider-type.md +52 -0
- package/docs/shaderGuide.md +2071 -0
- package/docs/types-architecture.md +234 -0
- package/layers/animations/app/components/Motion/CountUp.vue +1 -2
- package/layers/animations/app/components/Motion/Magnetic.vue +1 -2
- package/layers/animations/app/components/Motion/Marquee.vue +2 -5
- package/layers/animations/app/components/Motion/MarqueeText.vue +1 -2
- package/layers/animations/app/components/Motion/Tilt.vue +1 -2
- package/layers/animations/app/composables/useCountUp.ts +4 -1
- package/layers/animations/app/composables/useMagneticElement.ts +1 -3
- package/layers/animations/app/composables/useMarqueeCopies.ts +3 -3
- package/layers/animations/app/types/animations.ts +8 -0
- package/layers/animations/app/types/index.ts +1 -0
- package/layers/animations/package.json +4 -1
- package/layers/canvas/app/components/ShaderCanvas.vue +4 -4
- package/layers/canvas/app/composables/useRendererCapabilities.ts +19 -15
- package/layers/canvas/app/types/index.ts +1 -0
- package/layers/canvas/package.json +2 -1
- package/layers/canvas/tsconfig.json +2 -1
- package/layers/content/app/components/Blog/Card.vue +5 -5
- package/layers/content/app/components/Gallery/AmbientImage.vue +3 -3
- package/layers/content/app/components/Gallery/Card.vue +3 -3
- package/layers/content/app/components/NuxtContent/Detail.vue +5 -1
- package/layers/content/app/components/NuxtContent/Surround.vue +5 -3
- package/layers/content/app/components/NuxtContent/Toc.vue +1 -1
- package/layers/content/app/components/Portfolio/Card.vue +5 -5
- package/layers/content/app/components/content/Figure.vue +3 -3
- package/layers/content/app/types/index.ts +1 -0
- package/layers/content/package.json +2 -1
- package/layers/core/app/composables/useErrorLog.ts +9 -11
- package/layers/core/app/utils/helpers.ts +14 -12
- package/layers/core/nuxt.config.ts +1 -0
- package/layers/feeds/app/plugins/feed-head.ts +1 -2
- package/layers/feeds/package.json +2 -1
- package/layers/feeds/public/feed/style.css +256 -0
- package/layers/feeds/server/routes/feed/discovery.get.ts +1 -2
- package/layers/feeds/server/utils/content-adapter.ts +3 -2
- package/layers/forms/app/components/Form/Field.vue +4 -4
- package/layers/forms/app/types/index.ts +1 -0
- package/layers/forms/package.json +2 -1
- package/layers/layout/app/components/Layout/Grid/Item.vue +33 -19
- package/layers/layout/app/components/Layout/Page/Container.vue +11 -11
- package/layers/layout/app/components/Layout/Page/Header.vue +1 -1
- package/layers/layout/app/components/Layout/Page/index.vue +1 -1
- package/layers/layout/app/components/Layout/Section/Gallery.vue +6 -1
- package/layers/layout/app/components/Layout/Section/Title.vue +1 -1
- package/layers/layout/app/types/index.ts +1 -0
- package/layers/layout/package.json +2 -1
- package/layers/mailer/app/types/index.ts +1 -0
- package/layers/mailer/app/types/mailer.ts +25 -0
- package/layers/mailer/package.json +2 -1
- package/layers/motion/package.json +2 -1
- package/layers/navigation/app/components/Links/Group.vue +1 -0
- package/layers/navigation/app/components/Links/Named.vue +2 -0
- package/layers/navigation/app/types/index.ts +1 -0
- package/layers/navigation/package.json +4 -1
- package/layers/page-transitions/package.json +4 -1
- package/layers/routing/app/types/app-config.d.ts +3 -1
- package/layers/routing/app/types/index.ts +1 -0
- package/layers/routing/package.json +2 -1
- package/layers/scripts/app/composables/useGtm.ts +1 -1
- package/layers/scripts/app/types/index.ts +1 -0
- package/layers/scripts/app/types/scripts.ts +14 -0
- package/layers/scripts/package.json +2 -1
- package/layers/scroll/app/components/Motion/ScrollScene.vue +3 -1
- package/layers/scroll/app/composables/useScrollSteps.ts +2 -9
- package/layers/scroll/app/composables/useSectionProgress.ts +2 -1
- package/layers/scroll/app/plugins/locomotive-scroll.client.ts +1 -8
- package/layers/scroll/app/types/index.ts +1 -0
- package/layers/scroll/app/types/scroll.ts +32 -0
- package/layers/scroll/package.json +3 -0
- package/layers/seo/package.json +2 -1
- package/layers/shader/app/components/Material/Fresnel.client.vue +1 -1
- package/layers/shader/app/components/Material/Image.client.vue +1 -1
- package/layers/shader/app/components/Material/Node.client.vue +7 -7
- package/layers/shader/app/components/Material/Noise.client.vue +1 -1
- package/layers/shader/app/components/Node/Color.client.vue +17 -20
- package/layers/shader/app/components/Node/Noise.client.vue +31 -34
- package/layers/shader/app/components/Pipeline/Aurora.client.vue +4 -8
- package/layers/shader/app/components/Pipeline/BilinearGradient.client.vue +8 -11
- package/layers/shader/app/components/Pipeline/BillowNoise.client.vue +4 -8
- package/layers/shader/app/components/Pipeline/BrightnessContrast.client.vue +6 -2
- package/layers/shader/app/components/Pipeline/CellularNoise.client.vue +4 -8
- package/layers/shader/app/components/Pipeline/Checkerboard.client.vue +4 -8
- package/layers/shader/app/components/Pipeline/Circle.client.vue +5 -8
- package/layers/shader/app/components/Pipeline/Clouds.client.vue +4 -8
- package/layers/shader/app/components/Pipeline/ColorBurnBlend.client.vue +2 -19
- package/layers/shader/app/components/Pipeline/ColorDodgeBlend.client.vue +2 -19
- package/layers/shader/app/components/Pipeline/ColourRamp.client.vue +5 -9
- package/layers/shader/app/components/Pipeline/ConicGradient.client.vue +5 -8
- package/layers/shader/app/components/Pipeline/Cross.client.vue +4 -8
- package/layers/shader/app/components/Pipeline/CurlNoise.client.vue +3 -7
- package/layers/shader/app/components/Pipeline/DarkenBlend.client.vue +2 -19
- package/layers/shader/app/components/Pipeline/DayNightCycle.client.vue +5 -8
- package/layers/shader/app/components/Pipeline/DiagonalGradient.client.vue +5 -8
- package/layers/shader/app/components/Pipeline/DiamondGradient.client.vue +5 -8
- package/layers/shader/app/components/Pipeline/DifferenceBlend.client.vue +2 -19
- package/layers/shader/app/components/Pipeline/DomainWarpedNoise.client.vue +4 -8
- package/layers/shader/app/components/Pipeline/Dots.client.vue +4 -8
- package/layers/shader/app/components/Pipeline/DuoTone.client.vue +5 -9
- package/layers/shader/app/components/Pipeline/ExclusionBlend.client.vue +3 -23
- package/layers/shader/app/components/Pipeline/ExponentialFog.client.vue +4 -7
- package/layers/shader/app/components/Pipeline/FilmBurn.client.vue +4 -7
- package/layers/shader/app/components/Pipeline/Flame.client.vue +4 -8
- package/layers/shader/app/components/Pipeline/FocalGradient.client.vue +5 -8
- package/layers/shader/app/components/Pipeline/GodRays.client.vue +4 -7
- package/layers/shader/app/components/Pipeline/GradientNoise.client.vue +4 -8
- package/layers/shader/app/components/Pipeline/Grid.client.vue +4 -8
- package/layers/shader/app/components/Pipeline/Halation.client.vue +3 -7
- package/layers/shader/app/components/Pipeline/HardLightBlend.client.vue +2 -19
- package/layers/shader/app/components/Pipeline/Haze.client.vue +4 -7
- package/layers/shader/app/components/Pipeline/Hexagon.client.vue +4 -8
- package/layers/shader/app/components/Pipeline/LensFlare.client.vue +4 -7
- package/layers/shader/app/components/Pipeline/LightenBlend.client.vue +2 -19
- package/layers/shader/app/components/Pipeline/LinearGradient4.client.vue +2 -2
- package/layers/shader/app/components/Pipeline/Marble.client.vue +4 -8
- package/layers/shader/app/components/Pipeline/MonochromeTint.client.vue +3 -7
- package/layers/shader/app/components/Pipeline/MultiplyBlend.client.vue +2 -19
- package/layers/shader/app/components/Pipeline/NoisyGradient.client.vue +4 -8
- package/layers/shader/app/components/Pipeline/NoisyGradientBlend.client.vue +4 -8
- package/layers/shader/app/components/Pipeline/OverlayBlend.client.vue +2 -19
- package/layers/shader/app/components/Pipeline/Polygon.client.vue +4 -8
- package/layers/shader/app/components/Pipeline/RaymarchTunnel.client.vue +4 -7
- package/layers/shader/app/components/Pipeline/Rectangle.client.vue +4 -8
- package/layers/shader/app/components/Pipeline/RidgedNoise.client.vue +4 -8
- package/layers/shader/app/components/Pipeline/Ring.client.vue +4 -8
- package/layers/shader/app/components/Pipeline/ScreenBlend.client.vue +2 -19
- package/layers/shader/app/components/Pipeline/SkyAtmosphere.client.vue +6 -9
- package/layers/shader/app/components/Pipeline/SoftLightBlend.client.vue +2 -19
- package/layers/shader/app/components/Pipeline/SplitTone.client.vue +4 -8
- package/layers/shader/app/components/Pipeline/Star.client.vue +4 -8
- package/layers/shader/app/components/Pipeline/Stripes.client.vue +4 -8
- package/layers/shader/app/components/Pipeline/Tint.client.vue +4 -7
- package/layers/shader/app/components/Pipeline/Triangle.client.vue +4 -8
- package/layers/shader/app/components/Pipeline/ValueNoise.client.vue +4 -8
- package/layers/shader/app/components/Pipeline/VoronoiEdges.client.vue +4 -8
- package/layers/shader/app/components/Pipeline/Water.client.vue +5 -8
- package/layers/shader/app/components/Pipeline/WaveBendLayer.client.vue +4 -7
- package/layers/shader/app/components/Pipeline/WaveColourLayer.client.vue +3 -7
- package/layers/shader/app/components/Pipeline/Wood.client.vue +4 -8
- package/layers/shader/app/components/Preset/Aurora.client.vue +15 -21
- package/layers/shader/app/components/Preset/Flow.client.vue +2 -1
- package/layers/shader/app/components/Preset/GradientMesh.client.vue +2 -1
- package/layers/shader/app/components/Preset/Nebula.client.vue +2 -1
- package/layers/shader/app/components/Preset/Ocean.client.vue +2 -1
- package/layers/shader/app/components/Preset/ThemeAurora.client.vue +30 -90
- package/layers/shader/app/components/Preset/ThemeBubble.client.vue +30 -91
- package/layers/shader/app/components/Preset/ThemeFlow.client.vue +30 -90
- package/layers/shader/app/components/Preset/ThemeGradient.client.vue +30 -91
- package/layers/shader/app/components/Preset/ThemeLavaLamp.client.vue +30 -90
- package/layers/shader/app/components/Preset/ThemePlasma.client.vue +30 -90
- package/layers/shader/app/components/Preset/ThemeWave.client.vue +30 -90
- package/layers/shader/app/components/Shader/Background.client.vue +4 -4
- package/layers/shader/app/components/Shader/Host.client.vue +31 -33
- package/layers/shader/app/components/Shader/Runtime.client.vue +15 -23
- package/layers/shader/app/composables/useAmbientMaterials.ts +53 -51
- package/layers/shader/app/composables/useShaderMixBlend.ts +26 -0
- package/layers/shader/app/composables/useThemePreset.ts +75 -0
- package/layers/shader/app/shaders/common/noise.ts +2 -7
- package/layers/shader/app/shaders/types.ts +6 -6
- package/layers/shader/app/types/tsl.ts +7 -25
- package/layers/shader/app/types/uniforms.ts +2 -1
- package/layers/shader/app/utils/tsl/color.ts +7 -1
- package/layers/shader/package.json +2 -1
- package/layers/theme/app/components/ThemePicker/Colors.vue +1 -3
- package/layers/theme/app/types/app-config.d.ts +4 -2
- package/layers/theme/app/types/index.ts +1 -0
- package/layers/theme/app/types/theme.ts +3 -18
- package/layers/theme/package.json +2 -1
- package/layers/theme/server/plugins/theme-fouc.ts +1 -1
- package/layers/transitions/package.json +4 -1
- package/layers/typography/app/components/Typography/CodeBlock.vue +2 -2
- package/layers/typography/app/components/Typography/Headline.vue +2 -2
- package/layers/typography/app/components/Typography/HeadlineScreen.vue +1 -1
- package/layers/typography/app/components/Typography/QuoteBlock.vue +4 -1
- package/layers/typography/app/components/Typography/TextStroke.vue +2 -0
- package/layers/typography/app/components/Typography/index.vue +36 -27
- package/layers/typography/app/composables/typography.ts +27 -21
- package/layers/typography/app/types/colors.ts +9 -29
- package/layers/typography/app/types/index.ts +2 -0
- package/layers/typography/package.json +4 -1
- package/layers/ui/package.json +2 -1
- package/layers/visual/app/app.config.ts +5 -2
- package/layers/visual/app/components/Accent/Blob.vue +20 -20
- package/layers/visual/app/components/Accent/Scene.vue +2 -2
- package/layers/visual/app/components/Base/Modal.vue +2 -2
- package/layers/visual/app/components/Gradient/Background.vue +2 -2
- package/layers/visual/app/components/Gradient/Text.vue +2 -2
- package/layers/visual/app/components/Media/Picture.vue +3 -1
- package/layers/visual/app/components/Progress/Bar.vue +6 -6
- package/layers/visual/app/components/Tint/Overlay.vue +14 -14
- package/layers/visual/app/composables/accent.ts +10 -8
- package/layers/visual/app/composables/tint.ts +7 -7
- package/layers/visual/app/types/index.ts +6 -0
- package/layers/visual/app/types/media.ts +4 -2
- package/layers/visual/app/types/tint.ts +2 -1
- package/layers/visual/package.json +4 -1
- package/package.json +6 -2
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { ColorShade
|
|
2
|
+
import type { ColorShade } from '../../types/gradient'
|
|
3
|
+
import type { TintColorSlot, TintLevel } from '../../types/tint'
|
|
3
4
|
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
)
|
|
5
|
+
const {
|
|
6
|
+
color,
|
|
7
|
+
level,
|
|
8
|
+
shade = 500,
|
|
9
|
+
tag = 'div',
|
|
10
|
+
} = defineProps<{
|
|
11
|
+
color: TintColorSlot
|
|
12
|
+
level: TintLevel
|
|
13
|
+
shade?: ColorShade
|
|
14
|
+
tag?: string
|
|
15
|
+
}>()
|
|
16
16
|
|
|
17
|
-
const { style } = useTint(
|
|
17
|
+
const { style } = useTint(() => ({ color, level, shade }))
|
|
18
18
|
</script>
|
|
19
19
|
|
|
20
20
|
<template>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { ComputedRef, CSSProperties } from 'vue'
|
|
1
|
+
import type { ComputedRef, CSSProperties, MaybeRefOrGetter } from 'vue'
|
|
2
|
+
import { toValue } from 'vue'
|
|
2
3
|
|
|
3
4
|
import type { BlobBlur, BlobConfig } from '../types/accent'
|
|
4
5
|
|
|
@@ -25,22 +26,23 @@ function resolveColor(config: BlobConfig): string {
|
|
|
25
26
|
return `var(--ui-color-${color}-${shade})`
|
|
26
27
|
}
|
|
27
28
|
|
|
28
|
-
export function useAccentBlob(config: BlobConfig): {
|
|
29
|
+
export function useAccentBlob(config: MaybeRefOrGetter<BlobConfig>): {
|
|
29
30
|
style: ComputedRef<CSSProperties>
|
|
30
31
|
} {
|
|
31
32
|
const style = computed((): CSSProperties => {
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
const
|
|
33
|
+
const resolved = toValue(config)
|
|
34
|
+
const size = resolved.size ?? '40rem'
|
|
35
|
+
const opacity = (resolved.opacity ?? 25) / 100
|
|
36
|
+
const blurPx = resolveBlurPx(resolved.blur)
|
|
35
37
|
|
|
36
38
|
return {
|
|
37
39
|
position: 'absolute',
|
|
38
|
-
left: `${
|
|
39
|
-
top: `${
|
|
40
|
+
left: `${resolved.x}%`,
|
|
41
|
+
top: `${resolved.y}%`,
|
|
40
42
|
transform: 'translate(-50%, -50%)',
|
|
41
43
|
width: size,
|
|
42
44
|
height: size,
|
|
43
|
-
backgroundColor: resolveColor(
|
|
45
|
+
backgroundColor: resolveColor(resolved),
|
|
44
46
|
opacity,
|
|
45
47
|
borderRadius: '9999px',
|
|
46
48
|
filter: blurPx > 0 ? `blur(${blurPx}px)` : undefined,
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import type { ComputedRef, CSSProperties } from 'vue'
|
|
1
|
+
import type { ComputedRef, CSSProperties, MaybeRefOrGetter } from 'vue'
|
|
2
|
+
import { toValue } from 'vue'
|
|
2
3
|
|
|
3
4
|
import { TINT_LEVEL_OPACITY, type TintConfig } from '../types/tint'
|
|
4
5
|
|
|
5
|
-
export function useTint(config: TintConfig): {
|
|
6
|
+
export function useTint(config: MaybeRefOrGetter<TintConfig>): {
|
|
6
7
|
style: ComputedRef<CSSProperties>
|
|
7
8
|
} {
|
|
8
9
|
const style = computed((): CSSProperties => {
|
|
9
|
-
const { color, shade = 500 } = config
|
|
10
|
-
let backgroundColor
|
|
10
|
+
const { color, shade = 500, level } = toValue(config)
|
|
11
|
+
let backgroundColor = `var(--ui-color-${color}-${shade})`
|
|
11
12
|
if (color === 'white') backgroundColor = '#ffffff'
|
|
12
|
-
|
|
13
|
-
else backgroundColor = `var(--ui-color-${color}-${shade})`
|
|
13
|
+
if (color === 'black') backgroundColor = '#000000'
|
|
14
14
|
|
|
15
|
-
const opacity = TINT_LEVEL_OPACITY[
|
|
15
|
+
const opacity = TINT_LEVEL_OPACITY[level] / 100
|
|
16
16
|
return { backgroundColor, opacity }
|
|
17
17
|
})
|
|
18
18
|
|
|
@@ -174,12 +174,14 @@ export type PictureProps = {
|
|
|
174
174
|
decoding?: 'sync' | 'async' | 'auto'
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
+
import type { ComputedRef } from 'vue'
|
|
178
|
+
|
|
177
179
|
/**
|
|
178
180
|
* Return type for usePicture composable
|
|
179
181
|
*/
|
|
180
182
|
export type UsePictureReturn = {
|
|
181
183
|
/** Computed sizes attribute string */
|
|
182
|
-
sizesString:
|
|
184
|
+
sizesString: ComputedRef<string>
|
|
183
185
|
/** Computed format string */
|
|
184
|
-
computedFormat:
|
|
186
|
+
computedFormat: ComputedRef<string>
|
|
185
187
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { ColorShade } from './gradient'
|
|
2
|
+
|
|
1
3
|
export type TintLevel = 'subtle' | 'light' | 'medium' | 'strong' | 'heavy'
|
|
2
4
|
export type TintColorSlot =
|
|
3
5
|
| 'primary'
|
|
@@ -8,7 +10,6 @@ export type TintColorSlot =
|
|
|
8
10
|
| 'error'
|
|
9
11
|
| 'white'
|
|
10
12
|
| 'black'
|
|
11
|
-
export type ColorShade = 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 950
|
|
12
13
|
|
|
13
14
|
export const TINT_LEVEL_OPACITY: Record<TintLevel, number> = {
|
|
14
15
|
subtle: 5,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kmcom-nuxt-layers",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "2.2.
|
|
4
|
+
"version": "2.2.9",
|
|
5
5
|
"description": "Composable Nuxt 4 layers for building scalable Vue applications",
|
|
6
6
|
"exports": {
|
|
7
7
|
"./layers/core": "./layers/core/nuxt.config.ts",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"layers/*/tsconfig.json",
|
|
34
34
|
"layers/*/tailwind.config.*",
|
|
35
35
|
"layers/*/app/**",
|
|
36
|
+
"layers/*/public/**",
|
|
36
37
|
"layers/*/server/**",
|
|
37
38
|
"docs/"
|
|
38
39
|
],
|
|
@@ -150,8 +151,10 @@
|
|
|
150
151
|
"@vueuse/core": "^14.3.0",
|
|
151
152
|
"@vueuse/nuxt": "^14.3.0",
|
|
152
153
|
"@webgpu/glslang": "^0.0.15",
|
|
154
|
+
"@webgpu/types": "^0.1.70",
|
|
153
155
|
"browserslist": "^4.28.2",
|
|
154
156
|
"changesets": "^1.0.2",
|
|
157
|
+
"csstype": "^3.2.3",
|
|
155
158
|
"cypress": "^15.16.0",
|
|
156
159
|
"depcheck": "^1.4.7",
|
|
157
160
|
"eslint": "^10.4.1",
|
|
@@ -183,7 +186,8 @@
|
|
|
183
186
|
"stylelint-no-unsupported-browser-features": "^8.1.1",
|
|
184
187
|
"stylelint-prettier": "^5.0.3",
|
|
185
188
|
"tailwindcss": "^4.3.0",
|
|
186
|
-
"turbo": "^2.9.
|
|
189
|
+
"turbo": "^2.9.18",
|
|
190
|
+
"type-fest": "^5.7.0",
|
|
187
191
|
"typescript": "^6",
|
|
188
192
|
"vite-plugin-checker": "^0.14.1",
|
|
189
193
|
"vitest": "^4.1.8",
|