kmcom-nuxt-layers 1.7.9 → 2.1.6
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/layers/animations/nuxt.config.ts +17 -0
- package/layers/animations/package.json +6 -0
- package/layers/animations/tsconfig.json +7 -0
- package/layers/canvas/app/components/ShaderCanvas.vue +125 -0
- package/layers/{shader → canvas}/app/composables/useRendererCapabilities.ts +10 -2
- package/layers/{shader → canvas}/app/composables/useShaderTime.ts +3 -3
- package/layers/canvas/app/types/renderer.ts +50 -0
- package/layers/canvas/nuxt.config.ts +189 -0
- package/layers/canvas/package.json +22 -0
- package/layers/canvas/tsconfig.json +7 -0
- package/layers/content/app/components/Blog/Article.vue +12 -6
- package/layers/content/app/components/Blog/Card.vue +24 -24
- package/layers/content/app/components/Blog/List.vue +8 -11
- package/layers/content/app/components/Gallery/AmbientImage.vue +15 -15
- package/layers/content/app/components/Gallery/Card.vue +19 -19
- package/layers/content/app/components/Gallery/Detail.vue +29 -20
- package/layers/content/app/components/Gallery/Grid.vue +8 -11
- package/layers/content/app/components/Gallery/ImageDetail.vue +18 -17
- package/layers/content/app/components/Gallery/ImagePage.vue +8 -9
- package/layers/content/app/components/Gallery/Lightbox.vue +38 -33
- package/layers/content/app/components/Gallery/Page.vue +8 -8
- package/layers/content/app/components/Gallery/SlugPage.vue +7 -8
- package/layers/content/app/components/NuxtContent/Detail.vue +29 -27
- package/layers/content/app/components/NuxtContent/List.vue +10 -9
- package/layers/content/app/components/NuxtContent/Renderer.vue +4 -4
- package/layers/content/app/components/NuxtContent/Surround.vue +3 -3
- package/layers/content/app/components/NuxtContent/Toc.vue +5 -5
- package/layers/content/app/components/Portfolio/Card.vue +17 -17
- package/layers/content/app/components/Portfolio/ColorPalette.vue +11 -11
- package/layers/content/app/components/Portfolio/Detail.vue +9 -13
- package/layers/content/app/components/Portfolio/ItemPage.vue +8 -9
- package/layers/content/app/components/Portfolio/List.vue +10 -13
- package/layers/content/app/components/Portfolio/Page.vue +8 -8
- package/layers/content/app/components/Portfolio/Typography.vue +4 -4
- package/layers/content/app/components/content/Figure.vue +14 -14
- package/layers/content/app/composables/createPortfolioComposables.ts +1 -0
- package/layers/content/app/composables/useCollectionItem.ts +4 -1
- package/layers/content/app/composables/useCollectionSurround.ts +1 -0
- package/layers/content/app/composables/useContentPage.ts +1 -0
- package/layers/content/app/composables/useGalleryItems.ts +1 -0
- package/layers/content/app/composables/usePortfolioItems.ts +1 -0
- package/layers/content/app/types/app-config.d.ts +1 -1
- package/layers/content/app/types/content.ts +27 -30
- package/layers/content/nuxt.config.ts +4 -3
- package/layers/content/package.json +4 -4
- package/layers/core/app/components/DiagnosticsPage.vue +203 -203
- package/layers/core/app/components/ErrorBoundary.vue +51 -49
- package/layers/core/app/components/LoadingScreen.vue +112 -111
- package/layers/core/app/composables/useBrowser.ts +2 -1
- package/layers/core/app/composables/useCache.ts +4 -2
- package/layers/core/app/composables/useErrorLog.ts +7 -10
- package/layers/core/app/composables/useFeatures.ts +4 -2
- package/layers/core/app/composables/useLoading.ts +1 -0
- package/layers/core/app/composables/useNetworkInfo.ts +1 -0
- package/layers/core/app/composables/usePWAInfo.ts +4 -3
- package/layers/core/app/composables/useRendering.ts +1 -0
- package/layers/core/app/composables/useScreen.ts +1 -0
- package/layers/core/app/composables/useScrollGuard.ts +2 -1
- package/layers/core/app/pages/[...slug].vue +99 -99
- package/layers/core/app/plugins/error-handler.ts +1 -1
- package/layers/core/app/plugins/feature-detection.client.ts +2 -1
- package/layers/core/app/plugins/init.ts +8 -19
- package/layers/core/app/plugins/loading.client.ts +4 -2
- package/layers/core/app/plugins/scroll-guard.client.ts +4 -4
- package/layers/core/app/types/app-config.d.ts +5 -1
- package/layers/core/app/types/detection.ts +8 -8
- package/layers/core/app/types/index.ts +5 -4
- package/layers/core/app/types/loading.ts +3 -3
- package/layers/core/app/types/runtime-config.ts +2 -2
- package/layers/core/app/types/scroll-guard.ts +2 -2
- package/layers/core/app/types/site.ts +43 -0
- package/layers/core/app/utils/helpers.ts +4 -0
- package/layers/core/nuxt.config.ts +1 -0
- package/layers/core/package.json +1 -1
- package/layers/feeds/app/app.config.ts +23 -0
- package/layers/feeds/app/assets/css/feeds.css +66 -0
- package/layers/feeds/app/plugins/feed-head.ts +73 -0
- package/layers/feeds/nuxt.config.ts +36 -0
- package/layers/feeds/package.json +23 -0
- package/layers/feeds/tsconfig.json +7 -0
- package/layers/forms/app/components/Form/Contact.vue +1 -0
- package/layers/forms/app/components/Form/Field.vue +70 -74
- package/layers/forms/app/composables/useFormSchema.ts +2 -0
- package/layers/forms/app/config/fields.ts +1 -0
- package/layers/forms/app/types/app-config.d.ts +1 -1
- package/layers/forms/app/types/fields.ts +1 -1
- package/layers/forms/nuxt.config.ts +4 -9
- package/layers/forms/package.json +4 -9
- package/layers/layout/app/assets/css/layout/grids.css +12 -12
- package/layers/layout/app/assets/css/layout/modes/fluid.css +10 -10
- package/layers/layout/app/components/Layout/Container.vue +34 -34
- package/layers/layout/app/components/Layout/Grid/Debug.vue +55 -55
- package/layers/layout/app/components/Layout/Grid/Item.vue +239 -231
- package/layers/layout/app/components/Layout/Main.vue +27 -23
- package/layers/layout/app/components/Layout/Page/Container.vue +71 -67
- package/layers/layout/app/components/Layout/Page/Header.vue +22 -21
- package/layers/layout/app/components/Layout/Page/index.vue +1 -0
- package/layers/layout/app/components/Layout/Section/Gallery.vue +49 -48
- package/layers/layout/app/components/Layout/Section/Grid.vue +29 -29
- package/layers/layout/app/components/Layout/Section/Hero.vue +31 -29
- package/layers/layout/app/components/Layout/Section/Sidebar.vue +48 -48
- package/layers/layout/app/components/Layout/Section/Split.vue +28 -28
- package/layers/layout/app/components/Layout/Section/Stack.vue +39 -37
- package/layers/layout/app/components/Layout/Section/Title.vue +21 -20
- package/layers/layout/app/composables/GridPlacement.ts +1 -1
- package/layers/layout/app/composables/useGridConfig.ts +2 -1
- package/layers/layout/app/types/app-config.d.ts +2 -1
- package/layers/layout/app/types/layouts.ts +4 -4
- package/layers/layout/nuxt.config.ts +4 -1
- package/layers/mailer/nuxt.config.ts +26 -0
- package/layers/mailer/package.json +15 -0
- package/layers/mailer/tsconfig.json +7 -0
- package/layers/motion/app/components/Motion/index.vue +5 -5
- package/layers/motion/nuxt.config.ts +6 -22
- package/layers/motion/package.json +0 -5
- package/layers/navigation/app/app.config.ts +38 -0
- package/layers/navigation/app/assets/css/navigation.css +3 -0
- package/layers/navigation/app/components/Links/Group.vue +49 -0
- package/layers/navigation/app/components/Links/Named.vue +33 -0
- package/layers/navigation/app/components/Mast/Footer.vue +13 -0
- package/layers/{ui → navigation}/app/components/Mast/Header.vue +2 -2
- package/layers/{ui → navigation}/app/components/Mast/Nav.vue +2 -2
- package/layers/navigation/app/components/Mast/NavModal.vue +76 -0
- package/layers/{ui → navigation}/app/composables/mastNav.ts +7 -4
- package/layers/{ui → navigation}/app/composables/toast.ts +1 -0
- package/layers/{ui → navigation}/app/composables/useSite.ts +1 -0
- package/layers/navigation/app/types/nav.ts +11 -0
- package/layers/{ui → navigation}/app/utils/createModal.ts +2 -1
- package/layers/navigation/nuxt.config.ts +19 -0
- package/layers/navigation/package.json +6 -0
- package/layers/navigation/tsconfig.json +7 -0
- package/layers/page-transitions/app/app.config.ts +15 -0
- package/layers/page-transitions/app/composables/usePageTransition.ts +32 -0
- package/layers/page-transitions/app/plugins/page-transitions.client.ts +14 -0
- package/layers/page-transitions/nuxt.config.ts +17 -0
- package/layers/page-transitions/package.json +6 -0
- package/layers/page-transitions/tsconfig.json +7 -0
- package/layers/routing/app/composables/{useFeatures.ts → useFeatureFlags.ts} +1 -1
- package/layers/routing/app/composables/useRoutingConfig.ts +5 -6
- package/layers/routing/app/middleware/01.maintenance.global.ts +1 -1
- package/layers/routing/app/middleware/02.governance.global.ts +2 -2
- package/layers/routing/app/plugins/feature-flags.client.ts +4 -4
- package/layers/routing/app/plugins/scroll-routing.client.ts +4 -3
- package/layers/routing/app/types/app-config.d.ts +2 -1
- package/layers/routing/app/types/route-meta.d.ts +1 -1
- package/layers/routing/app/types/routing.ts +5 -2
- package/layers/routing/app/utils/resolveRoute.ts +2 -2
- package/layers/routing/nuxt.config.ts +6 -2
- package/layers/scripts/app/app.config.ts +44 -0
- package/layers/scripts/app/composables/useAnalytics.ts +49 -0
- package/layers/scripts/app/composables/useGtm.ts +21 -0
- package/layers/scripts/app/composables/useScriptLoader.ts +31 -0
- package/layers/scripts/app/composables/useScriptsConsent.ts +23 -0
- package/layers/scripts/app/composables/useYoutubeEmbed.ts +14 -0
- package/layers/scripts/nuxt.config.ts +22 -0
- package/layers/scripts/package.json +14 -0
- package/layers/scripts/tsconfig.json +7 -0
- package/layers/{motion/app/types/app-config.d.ts → scroll/app/app.config.ts} +16 -1
- package/layers/scroll/app/components/Motion/HorizontalScroll.vue +61 -0
- package/layers/scroll/app/components/Motion/Parallax.vue +76 -0
- package/layers/scroll/app/components/Motion/PinnedSection.vue +77 -0
- package/layers/scroll/app/components/Motion/ScrollLink.vue +50 -0
- package/layers/scroll/app/components/Motion/ScrollProgress.vue +85 -0
- package/layers/scroll/app/components/Motion/ScrollScene.vue +121 -0
- package/layers/{motion → scroll}/app/components/Motion/ScrollStats.vue +51 -50
- package/layers/scroll/app/components/Motion/ScrollStep.vue +44 -0
- package/layers/{motion → scroll}/app/composables/useGsap.ts +0 -6
- package/layers/{motion → scroll}/app/composables/useScrollSteps.ts +2 -5
- package/layers/{motion → scroll}/app/composables/useSectionProgress.ts +14 -7
- package/layers/{motion → scroll}/app/composables/useSmoothScroll.ts +6 -37
- package/layers/{motion → scroll}/app/plugins/locomotive-scroll.client.ts +3 -2
- package/layers/scroll/nuxt.config.ts +33 -0
- package/layers/scroll/package.json +11 -0
- package/layers/scroll/tsconfig.json +7 -0
- package/layers/seo/app/app.config.ts +30 -0
- package/layers/seo/app/composables/useSeoConfig.ts +14 -0
- package/layers/seo/nuxt.config.ts +34 -0
- package/layers/seo/package.json +14 -0
- package/layers/seo/tsconfig.json +7 -0
- package/layers/shader/app/components/Effect/Bloom.vue +2 -2
- package/layers/shader/app/components/Effect/ChromaticAberration.vue +2 -2
- package/layers/shader/app/components/Effect/PostProcessing.vue +14 -10
- package/layers/shader/app/components/Material/AmbientAurora.client.vue +162 -158
- package/layers/shader/app/components/Material/AmbientFlow.client.vue +165 -161
- package/layers/shader/app/components/Material/AmbientGradientMesh.client.vue +179 -162
- package/layers/shader/app/components/Material/AmbientNebula.client.vue +167 -163
- package/layers/shader/app/components/Material/AmbientOcean.client.vue +154 -150
- package/layers/shader/app/components/Material/Fresnel.client.vue +78 -75
- package/layers/shader/app/components/Material/Gradient.client.vue +175 -173
- package/layers/shader/app/components/Material/Image.client.vue +228 -225
- package/layers/shader/app/components/Material/Node.client.vue +66 -63
- package/layers/shader/app/components/Material/Noise.client.vue +128 -124
- package/layers/shader/app/components/Mesh/Plane.vue +20 -18
- package/layers/shader/app/components/Node/Color.client.vue +47 -45
- package/layers/shader/app/components/Node/Fresnel.client.vue +47 -47
- package/layers/shader/app/components/Node/Gradient.client.vue +120 -70
- package/layers/shader/app/components/Node/Mix.client.vue +41 -39
- package/layers/shader/app/components/Node/Noise.client.vue +91 -83
- package/layers/shader/app/components/Pipeline/ACESTonemap.client.vue +7 -10
- package/layers/shader/app/components/Pipeline/AddBlend.client.vue +33 -19
- package/layers/shader/app/components/Pipeline/AgedFilm.client.vue +61 -40
- package/layers/shader/app/components/Pipeline/Aurora.client.vue +92 -56
- package/layers/shader/app/components/Pipeline/BilinearGradient.client.vue +65 -34
- package/layers/shader/app/components/Pipeline/BillowNoise.client.vue +56 -32
- package/layers/shader/app/components/Pipeline/BrightnessContrast.client.vue +36 -20
- package/layers/shader/app/components/Pipeline/CellularNoise.client.vue +55 -31
- package/layers/shader/app/components/Pipeline/ChannelMixer.client.vue +62 -34
- package/layers/shader/app/components/Pipeline/ChebyshevNoiseField.client.vue +77 -50
- package/layers/shader/app/components/Pipeline/Checkerboard.client.vue +50 -31
- package/layers/shader/app/components/Pipeline/ChromaticAberration.client.vue +49 -33
- package/layers/shader/app/components/Pipeline/ChromaticScreenWaves.client.vue +61 -36
- package/layers/shader/app/components/Pipeline/Circle.client.vue +53 -30
- package/layers/shader/app/components/Pipeline/Clouds.client.vue +86 -48
- package/layers/shader/app/components/Pipeline/ColorBurnBlend.client.vue +34 -19
- package/layers/shader/app/components/Pipeline/ColorDodgeBlend.client.vue +34 -19
- package/layers/shader/app/components/Pipeline/ColourRamp.client.vue +76 -46
- package/layers/shader/app/components/Pipeline/ComplexPlaneField.client.vue +80 -50
- package/layers/shader/app/components/Pipeline/ConicGradient.client.vue +46 -28
- package/layers/shader/app/components/Pipeline/CosinePalette.client.vue +80 -53
- package/layers/shader/app/components/Pipeline/CoverageAlpha.client.vue +12 -14
- package/layers/shader/app/components/Pipeline/Cross.client.vue +66 -37
- package/layers/shader/app/components/Pipeline/CurlNoise.client.vue +58 -35
- package/layers/shader/app/components/Pipeline/DarkenBlend.client.vue +34 -19
- package/layers/shader/app/components/Pipeline/DayNightCycle.client.vue +65 -39
- package/layers/shader/app/components/Pipeline/Desaturate.client.vue +23 -16
- package/layers/shader/app/components/Pipeline/DiagonalGradient.client.vue +50 -29
- package/layers/shader/app/components/Pipeline/DiamondGradient.client.vue +47 -29
- package/layers/shader/app/components/Pipeline/DifferenceBlend.client.vue +34 -19
- package/layers/shader/app/components/Pipeline/DivideBlend.client.vue +34 -19
- package/layers/shader/app/components/Pipeline/DomainWarpedNoise.client.vue +79 -37
- package/layers/shader/app/components/Pipeline/Dots.client.vue +70 -34
- package/layers/shader/app/components/Pipeline/DuoTone.client.vue +40 -26
- package/layers/shader/app/components/Pipeline/ExclusionBlend.client.vue +38 -19
- package/layers/shader/app/components/Pipeline/ExponentialFog.client.vue +52 -35
- package/layers/shader/app/components/Pipeline/Exposure.client.vue +22 -16
- package/layers/shader/app/components/Pipeline/FBMNoise.client.vue +62 -39
- package/layers/shader/app/components/Pipeline/FilmBurn.client.vue +60 -38
- package/layers/shader/app/components/Pipeline/FilmGrain.client.vue +53 -31
- package/layers/shader/app/components/Pipeline/FisheyeRay.client.vue +39 -28
- package/layers/shader/app/components/Pipeline/Flame.client.vue +59 -35
- package/layers/shader/app/components/Pipeline/FocalGradient.client.vue +56 -33
- package/layers/shader/app/components/Pipeline/Gamma.client.vue +21 -16
- package/layers/shader/app/components/Pipeline/GodRays.client.vue +76 -42
- package/layers/shader/app/components/Pipeline/GradientNoise.client.vue +57 -32
- package/layers/shader/app/components/Pipeline/Grain.client.vue +84 -47
- package/layers/shader/app/components/Pipeline/Grid.client.vue +56 -33
- package/layers/shader/app/components/Pipeline/Halation.client.vue +52 -34
- package/layers/shader/app/components/Pipeline/Halftone.client.vue +34 -23
- package/layers/shader/app/components/Pipeline/HardLightBlend.client.vue +33 -19
- package/layers/shader/app/components/Pipeline/Haze.client.vue +57 -36
- package/layers/shader/app/components/Pipeline/Hexagon.client.vue +54 -31
- package/layers/shader/app/components/Pipeline/Hue.client.vue +20 -16
- package/layers/shader/app/components/Pipeline/Invert.client.vue +6 -10
- package/layers/shader/app/components/Pipeline/LensFlare.client.vue +56 -37
- package/layers/shader/app/components/Pipeline/LightenBlend.client.vue +31 -19
- package/layers/shader/app/components/Pipeline/LinearGradient.client.vue +36 -28
- package/layers/shader/app/components/Pipeline/LinearGradient4.client.vue +65 -43
- package/layers/shader/app/components/Pipeline/LinearToSRGB.client.vue +26 -20
- package/layers/shader/app/components/Pipeline/Marble.client.vue +97 -57
- package/layers/shader/app/components/Pipeline/MixBlend.client.vue +45 -35
- package/layers/shader/app/components/Pipeline/MonochromeTint.client.vue +40 -25
- package/layers/shader/app/components/Pipeline/MultiplyBlend.client.vue +33 -19
- package/layers/shader/app/components/Pipeline/NoisyGradient.client.vue +83 -42
- package/layers/shader/app/components/Pipeline/NoisyGradientBlend.client.vue +141 -81
- package/layers/shader/app/components/Pipeline/OverlayBlend.client.vue +33 -19
- package/layers/shader/app/components/Pipeline/PaperTexture.client.vue +47 -30
- package/layers/shader/app/components/Pipeline/Polygon.client.vue +74 -37
- package/layers/shader/app/components/Pipeline/Posterise.client.vue +21 -16
- package/layers/shader/app/components/Pipeline/RadialGradient.client.vue +45 -30
- package/layers/shader/app/components/Pipeline/RayAutoOrbit.client.vue +43 -30
- package/layers/shader/app/components/Pipeline/RayMouseOrbit.client.vue +60 -47
- package/layers/shader/app/components/Pipeline/RayRotateX.client.vue +28 -20
- package/layers/shader/app/components/Pipeline/RayRotateY.client.vue +28 -20
- package/layers/shader/app/components/Pipeline/RayRotateZ.client.vue +28 -20
- package/layers/shader/app/components/Pipeline/RayTiltBasis.client.vue +55 -34
- package/layers/shader/app/components/Pipeline/RaymarchTunnel.client.vue +132 -88
- package/layers/shader/app/components/Pipeline/Rectangle.client.vue +78 -37
- package/layers/shader/app/components/Pipeline/ReinhardTonemap.client.vue +12 -14
- package/layers/shader/app/components/Pipeline/RidgedNoise.client.vue +54 -31
- package/layers/shader/app/components/Pipeline/Ring.client.vue +69 -34
- package/layers/shader/app/components/Pipeline/RingField.client.vue +63 -43
- package/layers/shader/app/components/Pipeline/RisographGrain.client.vue +66 -32
- package/layers/shader/app/components/Pipeline/RotatedGradientBlend.client.vue +73 -48
- package/layers/shader/app/components/Pipeline/SDFColourMask.client.vue +31 -25
- package/layers/shader/app/components/Pipeline/SDFRadialMask.client.vue +31 -21
- package/layers/shader/app/components/Pipeline/SRGBToLinear.client.vue +25 -20
- package/layers/shader/app/components/Pipeline/Saturation.client.vue +22 -16
- package/layers/shader/app/components/Pipeline/Scanlines.client.vue +42 -26
- package/layers/shader/app/components/Pipeline/ScreenBlend.client.vue +33 -19
- package/layers/shader/app/components/Pipeline/ShaderDebugger.client.vue +58 -45
- package/layers/shader/app/components/Pipeline/SimplexNoise.client.vue +59 -37
- package/layers/shader/app/components/Pipeline/SkyAtmosphere.client.vue +87 -54
- package/layers/shader/app/components/Pipeline/SoftLightBlend.client.vue +33 -19
- package/layers/shader/app/components/Pipeline/SolidColour.client.vue +24 -16
- package/layers/shader/app/components/Pipeline/SplitTone.client.vue +58 -34
- package/layers/shader/app/components/Pipeline/Star.client.vue +73 -37
- package/layers/shader/app/components/Pipeline/Starfield.client.vue +68 -34
- package/layers/shader/app/components/Pipeline/Stripes.client.vue +64 -36
- package/layers/shader/app/components/Pipeline/SubtractBlend.client.vue +33 -19
- package/layers/shader/app/components/Pipeline/TanhTonemap.client.vue +25 -19
- package/layers/shader/app/components/Pipeline/Threshold.client.vue +23 -17
- package/layers/shader/app/components/Pipeline/Tint.client.vue +36 -25
- package/layers/shader/app/components/Pipeline/Triangle.client.vue +54 -31
- package/layers/shader/app/components/Pipeline/UVAspectCorrect.client.vue +5 -10
- package/layers/shader/app/components/Pipeline/UVBreath.client.vue +44 -31
- package/layers/shader/app/components/Pipeline/UVBulge.client.vue +35 -21
- package/layers/shader/app/components/Pipeline/UVClamp.client.vue +14 -14
- package/layers/shader/app/components/Pipeline/UVColumnOffset.client.vue +36 -23
- package/layers/shader/app/components/Pipeline/UVFlipX.client.vue +6 -10
- package/layers/shader/app/components/Pipeline/UVFlipXY.client.vue +6 -10
- package/layers/shader/app/components/Pipeline/UVFlipY.client.vue +6 -10
- package/layers/shader/app/components/Pipeline/UVFractBand.client.vue +31 -21
- package/layers/shader/app/components/Pipeline/UVMousePull.client.vue +41 -33
- package/layers/shader/app/components/Pipeline/UVNoiseRotate.client.vue +65 -46
- package/layers/shader/app/components/Pipeline/UVNoiseWarp.client.vue +49 -30
- package/layers/shader/app/components/Pipeline/UVOrbit.client.vue +37 -29
- package/layers/shader/app/components/Pipeline/UVParallax.client.vue +41 -33
- package/layers/shader/app/components/Pipeline/UVPixelate.client.vue +21 -16
- package/layers/shader/app/components/Pipeline/UVPulse.client.vue +41 -28
- package/layers/shader/app/components/Pipeline/UVRipple.client.vue +53 -29
- package/layers/shader/app/components/Pipeline/UVRotate.client.vue +40 -32
- package/layers/shader/app/components/Pipeline/UVScale.client.vue +33 -25
- package/layers/shader/app/components/Pipeline/UVScroll.client.vue +26 -22
- package/layers/shader/app/components/Pipeline/UVScrollX.client.vue +20 -16
- package/layers/shader/app/components/Pipeline/UVScrollY.client.vue +20 -16
- package/layers/shader/app/components/Pipeline/UVShear.client.vue +33 -20
- package/layers/shader/app/components/Pipeline/UVSineWarpXY.client.vue +58 -40
- package/layers/shader/app/components/Pipeline/UVSwapAxes.client.vue +6 -10
- package/layers/shader/app/components/Pipeline/UVTile.client.vue +26 -22
- package/layers/shader/app/components/Pipeline/UVTwirl.client.vue +31 -21
- package/layers/shader/app/components/Pipeline/UVWarp.client.vue +44 -25
- package/layers/shader/app/components/Pipeline/VHSBleed.client.vue +63 -43
- package/layers/shader/app/components/Pipeline/ValueNoise.client.vue +57 -32
- package/layers/shader/app/components/Pipeline/Vibrance.client.vue +25 -19
- package/layers/shader/app/components/Pipeline/Vignette.client.vue +35 -24
- package/layers/shader/app/components/Pipeline/VoronoiEdges.client.vue +66 -38
- package/layers/shader/app/components/Pipeline/Water.client.vue +78 -39
- package/layers/shader/app/components/Pipeline/WaveBendLayer.client.vue +74 -46
- package/layers/shader/app/components/Pipeline/WaveColourLayer.client.vue +76 -43
- package/layers/shader/app/components/Pipeline/WhiteBalance.client.vue +38 -27
- package/layers/shader/app/components/Pipeline/Wood.client.vue +85 -50
- package/layers/shader/app/components/Preset/Aurora.client.vue +69 -52
- package/layers/shader/app/components/Preset/Flow.client.vue +63 -47
- package/layers/shader/app/components/Preset/GradientMesh.client.vue +63 -47
- package/layers/shader/app/components/Preset/Nebula.client.vue +65 -47
- package/layers/shader/app/components/Preset/Ocean.client.vue +64 -47
- package/layers/shader/app/components/Preset/ThemeAurora.client.vue +107 -70
- package/layers/shader/app/components/Preset/ThemeBubble.client.vue +108 -71
- package/layers/shader/app/components/Preset/ThemeFlow.client.vue +107 -70
- package/layers/shader/app/components/Preset/ThemeGradient.client.vue +108 -71
- package/layers/shader/app/components/Preset/ThemeLavaLamp.client.vue +107 -70
- package/layers/shader/app/components/Preset/ThemePlasma.client.vue +107 -70
- package/layers/shader/app/components/Preset/ThemeWave.client.vue +107 -70
- package/layers/shader/app/components/Shader/Background.client.vue +169 -163
- package/layers/shader/app/components/Shader/Debug.vue +45 -40
- package/layers/shader/app/components/Shader/Host.client.vue +120 -121
- package/layers/shader/app/components/Shader/Material.client.vue +42 -36
- package/layers/shader/app/components/Shader/Pipeline.client.vue +55 -46
- package/layers/shader/app/components/Shader/PipelineContext.vue +12 -12
- package/layers/shader/app/components/Shader/Runtime.client.vue +42 -37
- package/layers/shader/app/composables/useAmbientMaterials.ts +316 -105
- package/layers/shader/app/composables/useCSSColourUniform.ts +7 -6
- package/layers/shader/app/composables/useCSSFloatUniform.ts +4 -5
- package/layers/shader/app/composables/useMousePosition.ts +1 -1
- package/layers/shader/app/composables/useShader.ts +5 -3
- package/layers/shader/app/composables/useShaderColor.ts +8 -1
- package/layers/shader/app/composables/useShaderFloat.ts +3 -1
- package/layers/shader/app/composables/useShaderGraph.ts +6 -3
- package/layers/shader/app/composables/useShaderPerf.ts +2 -3
- package/layers/shader/app/composables/useShaderPipeline.ts +14 -6
- package/layers/shader/app/composables/useShaderRuntime.ts +7 -4
- package/layers/shader/app/composables/useShaderVec2.ts +4 -0
- package/layers/shader/app/composables/useSunDirectionUniform.ts +7 -6
- package/layers/shader/app/composables/useTSLNodes.ts +1 -0
- package/layers/shader/app/composables/useThemeColors.ts +14 -10
- package/layers/shader/app/composables/useUniforms.ts +5 -2
- package/layers/shader/app/plugins/shader.client.ts +3 -2
- package/layers/shader/app/shaders/common/blend.ts +3 -0
- package/layers/shader/app/shaders/common/complex.ts +4 -5
- package/layers/shader/app/shaders/common/effects.ts +10 -6
- package/layers/shader/app/shaders/common/grain.ts +4 -0
- package/layers/shader/app/shaders/common/lighting.ts +4 -1
- package/layers/shader/app/shaders/common/math.ts +3 -0
- package/layers/shader/app/shaders/common/noise.ts +7 -4
- package/layers/shader/app/shaders/common/noiseHelpers.ts +2 -0
- package/layers/shader/app/shaders/common/palette.ts +6 -1
- package/layers/shader/app/shaders/common/patterns.ts +7 -4
- package/layers/shader/app/shaders/common/sdf.ts +3 -1
- package/layers/shader/app/shaders/common/shapes.ts +3 -0
- package/layers/shader/app/shaders/common/tonemapping.ts +2 -0
- package/layers/shader/app/shaders/common/uv.ts +8 -1
- package/layers/shader/app/shaders/createMaterial.ts +6 -2
- package/layers/shader/app/shaders/layers/aurora.ts +6 -3
- package/layers/shader/app/shaders/layers/meshGradient.ts +6 -3
- package/layers/shader/app/shaders/layers/paperShading.ts +6 -2
- package/layers/shader/app/shaders/layers/shaderGradient.ts +5 -0
- package/layers/shader/app/shaders/layers/stripe.ts +6 -3
- package/layers/shader/app/shaders/types.ts +1 -0
- package/layers/shader/app/types/app-config.d.ts +1 -1
- package/layers/shader/app/types/index.ts +4 -4
- package/layers/shader/app/types/materials.ts +5 -4
- package/layers/shader/app/types/renderer.ts +1 -50
- package/layers/shader/app/types/tsl.ts +4 -3
- package/layers/shader/app/types/uniforms.ts +3 -2
- package/layers/shader/app/utils/tsl/animation.ts +2 -0
- package/layers/shader/app/utils/tsl/color.ts +5 -2
- package/layers/shader/app/utils/tsl/math.ts +1 -0
- package/layers/shader/app/utils/tsl/noise.ts +2 -0
- package/layers/shader/app/utils/tsl/oklch.ts +2 -0
- package/layers/shader/app/utils/tsl/patterns.ts +2 -0
- package/layers/shader/app/utils/tsl/tween.ts +4 -2
- package/layers/shader/app/utils/tsl/uv.ts +2 -0
- package/layers/shader/nuxt.config.ts +8 -115
- package/layers/shader/package.json +3 -9
- package/layers/theme/app/assets/css/theme.css +2 -2
- package/layers/theme/app/components/ThemePicker/AccentButton.vue +32 -30
- package/layers/theme/app/components/ThemePicker/Colors.vue +6 -5
- package/layers/theme/app/components/ThemePicker/Menu.vue +23 -23
- package/layers/theme/app/composables/useAccentColor.ts +2 -1
- package/layers/theme/app/composables/useThemeContrast.ts +1 -1
- package/layers/theme/app/composables/useThemeMotion.ts +1 -1
- package/layers/theme/app/composables/useThemeTransparency.ts +1 -4
- package/layers/theme/app/plugins/theme.client.ts +33 -15
- package/layers/theme/app/types/app-config.d.ts +3 -2
- package/layers/theme/app/types/theme.ts +1 -1
- package/layers/theme/nuxt.config.ts +4 -1
- package/layers/transitions/app/components/Motion/Transition.vue +76 -0
- package/layers/transitions/nuxt.config.ts +19 -0
- package/layers/transitions/package.json +6 -0
- package/layers/transitions/tsconfig.json +7 -0
- package/layers/typography/app/components/Typography/CodeBlock.vue +44 -0
- package/layers/typography/app/components/Typography/Headline.vue +90 -0
- package/layers/typography/app/components/Typography/HeadlineScreen.vue +75 -0
- package/layers/typography/app/components/Typography/QuoteBlock.vue +21 -0
- package/layers/{ui → typography}/app/components/Typography/TextStroke.vue +33 -32
- package/layers/typography/app/components/Typography/index.vue +54 -0
- package/layers/{ui → typography}/app/composables/typography.ts +1 -0
- package/layers/{ui → typography}/app/types/typography.ts +1 -1
- package/layers/typography/nuxt.config.ts +17 -0
- package/layers/typography/package.json +6 -0
- package/layers/typography/tsconfig.json +7 -0
- package/layers/ui/app/assets/css/ui.css +0 -20
- package/layers/ui/nuxt.config.ts +5 -21
- package/layers/visual/app/app.config.ts +115 -0
- package/layers/visual/app/assets/css/visual.css +15 -0
- package/layers/visual/app/components/Accent/Blob.vue +32 -0
- package/layers/{ui → visual}/app/components/Accent/Scene.vue +26 -23
- package/layers/visual/app/components/Base/Modal.vue +123 -0
- package/layers/visual/app/components/Gradient/Background.vue +24 -0
- package/layers/visual/app/components/Gradient/Text.vue +24 -0
- package/layers/visual/app/components/Media/Picture.vue +51 -0
- package/layers/visual/app/components/Progress/Bar.vue +36 -0
- package/layers/{ui → visual}/app/components/Progress/Circular.vue +26 -25
- package/layers/visual/app/components/Tint/Overlay.vue +27 -0
- package/layers/{ui → visual}/app/composables/accent.ts +1 -0
- package/layers/{ui → visual}/app/composables/gradient.ts +3 -0
- package/layers/{ui → visual}/app/composables/picture.ts +2 -0
- package/layers/{ui → visual}/app/composables/tint.ts +3 -2
- package/layers/{ui → visual}/app/types/accent.ts +2 -2
- package/layers/{ui → visual}/app/types/gradient.ts +2 -2
- package/layers/{ui → visual}/app/types/media.ts +4 -3
- package/layers/{ui → visual}/app/types/tint.ts +1 -1
- package/layers/visual/nuxt.config.ts +19 -0
- package/layers/visual/package.json +6 -0
- package/layers/visual/tsconfig.json +7 -0
- package/package.json +29 -4
- package/layers/motion/app/app.config.ts +0 -27
- package/layers/motion/app/components/Motion/HorizontalScroll.vue +0 -61
- package/layers/motion/app/components/Motion/Parallax.vue +0 -75
- package/layers/motion/app/components/Motion/PinnedSection.vue +0 -77
- package/layers/motion/app/components/Motion/ScrollLink.vue +0 -49
- package/layers/motion/app/components/Motion/ScrollProgress.vue +0 -82
- package/layers/motion/app/components/Motion/ScrollScene.vue +0 -121
- package/layers/motion/app/components/Motion/ScrollStep.vue +0 -45
- package/layers/motion/app/components/Motion/Transition.vue +0 -76
- package/layers/shader/app/components/Shader/Canvas.vue +0 -121
- package/layers/ui/app/app.config.ts +0 -57
- package/layers/ui/app/components/Accent/Blob.vue +0 -29
- package/layers/ui/app/components/Base/Modal.vue +0 -111
- package/layers/ui/app/components/Gradient/Background.vue +0 -22
- package/layers/ui/app/components/Gradient/Text.vue +0 -22
- package/layers/ui/app/components/Links/Group.vue +0 -47
- package/layers/ui/app/components/Links/Named.vue +0 -31
- package/layers/ui/app/components/Mast/Footer.vue +0 -15
- package/layers/ui/app/components/Mast/NavModal.vue +0 -72
- package/layers/ui/app/components/Media/Picture.vue +0 -50
- package/layers/ui/app/components/Progress/Bar.vue +0 -35
- package/layers/ui/app/components/Tint/Overlay.vue +0 -25
- package/layers/ui/app/components/Typography/CodeBlock.vue +0 -42
- package/layers/ui/app/components/Typography/Headline.vue +0 -88
- package/layers/ui/app/components/Typography/HeadlineScreen.vue +0 -77
- package/layers/ui/app/components/Typography/QuoteBlock.vue +0 -20
- package/layers/ui/app/components/Typography/index.vue +0 -52
- package/layers/ui/app/types/app-config.d.ts +0 -22
- package/layers/ui/app/types/nav.ts +0 -5
- /package/layers/{motion → animations}/app/components/Motion/CountUp.vue +0 -0
- /package/layers/{motion → animations}/app/components/Motion/Cursor.vue +0 -0
- /package/layers/{motion → animations}/app/components/Motion/Magnetic.vue +0 -0
- /package/layers/{motion → animations}/app/components/Motion/Marquee.vue +0 -0
- /package/layers/{motion → animations}/app/components/Motion/MarqueeText.vue +0 -0
- /package/layers/{motion → animations}/app/components/Motion/Staggered.vue +0 -0
- /package/layers/{motion → animations}/app/components/Motion/TextReveal.vue +0 -0
- /package/layers/{motion → animations}/app/components/Motion/Tilt.vue +0 -0
- /package/layers/{motion → animations}/app/components/Motion/VelocityEffect.vue +0 -0
- /package/layers/{motion → animations}/app/composables/useCountUp.ts +0 -0
- /package/layers/{motion → animations}/app/composables/useCursorFollower.ts +0 -0
- /package/layers/{motion → animations}/app/composables/useMagneticElement.ts +0 -0
- /package/layers/{motion → animations}/app/composables/useMarqueeCopies.ts +0 -0
- /package/layers/{motion → animations}/app/composables/useMarqueeVelocity.ts +0 -0
- /package/layers/{motion → animations}/app/composables/useTiltEffect.ts +0 -0
- /package/layers/{ui → navigation}/app/components/Mast/Main.vue +0 -0
- /package/layers/{ui → navigation}/app/components/Site/Subtitle.vue +0 -0
- /package/layers/{ui → navigation}/app/components/Site/Title.vue +0 -0
- /package/layers/{ui → navigation}/app/utils/regex.ts +0 -0
- /package/layers/{motion/app/assets/css/motion.css → transitions/app/assets/css/transitions.css} +0 -0
- /package/layers/{ui → typography}/app/composables/color.ts +0 -0
- /package/layers/{ui → typography}/app/types/colors.ts +0 -0
- /package/layers/{ui → visual}/app/types/breakpoints.ts +0 -0
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
const { scrub = 1 } = defineProps<{
|
|
3
|
-
/**
|
|
4
|
-
* Scrub smoothness (1 = default, higher = smoother/slower)
|
|
5
|
-
*/
|
|
6
|
-
scrub?: number
|
|
7
|
-
}>()
|
|
8
|
-
|
|
9
|
-
const emit = defineEmits<{
|
|
10
|
-
'panel-change': [index: number]
|
|
11
|
-
}>()
|
|
12
|
-
|
|
13
|
-
const { gsap } = useGsap()
|
|
14
|
-
|
|
15
|
-
const sectionRef = ref<HTMLElement | null>(null)
|
|
16
|
-
const trackRef = ref<HTMLElement | null>(null)
|
|
17
|
-
|
|
18
|
-
let cleanup: (() => void) | null = null
|
|
19
|
-
|
|
20
|
-
onMounted(() => {
|
|
21
|
-
if (!sectionRef.value || !trackRef.value) return
|
|
22
|
-
|
|
23
|
-
const track = trackRef.value
|
|
24
|
-
const trackWidth = track.scrollWidth - window.innerWidth
|
|
25
|
-
|
|
26
|
-
const tween = gsap.to(track, {
|
|
27
|
-
scrollTrigger: {
|
|
28
|
-
trigger: sectionRef.value,
|
|
29
|
-
start: 'top top',
|
|
30
|
-
end: `+=${trackWidth}`,
|
|
31
|
-
pin: true,
|
|
32
|
-
scrub,
|
|
33
|
-
anticipatePin: 1,
|
|
34
|
-
onUpdate: (self) => {
|
|
35
|
-
const panels = track.querySelectorAll(':scope > *')
|
|
36
|
-
if (panels.length > 0) {
|
|
37
|
-
const index = Math.round(self.progress * (panels.length - 1))
|
|
38
|
-
emit('panel-change', index)
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
x: -trackWidth,
|
|
43
|
-
ease: 'none',
|
|
44
|
-
})
|
|
45
|
-
|
|
46
|
-
cleanup = () => tween.kill()
|
|
47
|
-
})
|
|
48
|
-
|
|
49
|
-
onUnmounted(() => {
|
|
50
|
-
cleanup?.()
|
|
51
|
-
cleanup = null
|
|
52
|
-
})
|
|
53
|
-
</script>
|
|
54
|
-
|
|
55
|
-
<template>
|
|
56
|
-
<section ref="sectionRef" class="motion-horizontal-scroll h-screen overflow-hidden">
|
|
57
|
-
<div ref="trackRef" class="h-full flex items-center will-change-transform">
|
|
58
|
-
<slot />
|
|
59
|
-
</div>
|
|
60
|
-
</section>
|
|
61
|
-
</template>
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
const props = withDefaults(
|
|
3
|
-
defineProps<{
|
|
4
|
-
/**
|
|
5
|
-
* Parallax speed (-1 to 1, negative = slower than scroll)
|
|
6
|
-
*/
|
|
7
|
-
speed?: number
|
|
8
|
-
/**
|
|
9
|
-
* Direction of parallax movement
|
|
10
|
-
*/
|
|
11
|
-
direction?: 'vertical' | 'horizontal'
|
|
12
|
-
/**
|
|
13
|
-
* Enable rotation during parallax
|
|
14
|
-
*/
|
|
15
|
-
rotate?: number
|
|
16
|
-
/**
|
|
17
|
-
* Enable scale during parallax
|
|
18
|
-
*/
|
|
19
|
-
scale?: number
|
|
20
|
-
/**
|
|
21
|
-
* Scrub smoothness (0.1 = very smooth, 1 = instant)
|
|
22
|
-
*/
|
|
23
|
-
scrub?: number
|
|
24
|
-
/**
|
|
25
|
-
* Tag to render as
|
|
26
|
-
*/
|
|
27
|
-
as?: string
|
|
28
|
-
}>(),
|
|
29
|
-
{
|
|
30
|
-
speed: 0.5,
|
|
31
|
-
direction: 'vertical',
|
|
32
|
-
rotate: 0,
|
|
33
|
-
scale: 0,
|
|
34
|
-
scrub: 0.5,
|
|
35
|
-
as: 'div',
|
|
36
|
-
}
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
const { gsap } = useGsap()
|
|
40
|
-
|
|
41
|
-
const containerRef = ref<HTMLElement | null>(null)
|
|
42
|
-
const contentRef = ref<HTMLElement | null>(null)
|
|
43
|
-
|
|
44
|
-
onMounted(() => {
|
|
45
|
-
if (!containerRef.value || !contentRef.value) return
|
|
46
|
-
|
|
47
|
-
const yAmount = props.direction === 'vertical' ? props.speed * -200 : 0
|
|
48
|
-
const xAmount = props.direction === 'horizontal' ? props.speed * 200 : 0
|
|
49
|
-
|
|
50
|
-
const animationProps: gsap.TweenVars = {
|
|
51
|
-
scrollTrigger: {
|
|
52
|
-
trigger: containerRef.value,
|
|
53
|
-
start: 'top bottom',
|
|
54
|
-
end: 'bottom top',
|
|
55
|
-
scrub: props.scrub,
|
|
56
|
-
},
|
|
57
|
-
ease: 'none',
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
if (yAmount !== 0) animationProps.y = yAmount
|
|
61
|
-
if (xAmount !== 0) animationProps.x = xAmount
|
|
62
|
-
if (props.rotate !== 0) animationProps.rotation = props.rotate
|
|
63
|
-
if (props.scale !== 0) animationProps.scale = 1 + props.scale
|
|
64
|
-
|
|
65
|
-
gsap.to(contentRef.value, animationProps)
|
|
66
|
-
})
|
|
67
|
-
</script>
|
|
68
|
-
|
|
69
|
-
<template>
|
|
70
|
-
<component :is="as" ref="containerRef" class="motion-parallax">
|
|
71
|
-
<div ref="contentRef" class="motion-parallax-content will-change-transform">
|
|
72
|
-
<slot />
|
|
73
|
-
</div>
|
|
74
|
-
</component>
|
|
75
|
-
</template>
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
const { duration = 200, scrub = 0.5 } = defineProps<{
|
|
3
|
-
/**
|
|
4
|
-
* Pin duration as a percentage of viewport height (200 = 2× viewport height)
|
|
5
|
-
*/
|
|
6
|
-
duration?: number
|
|
7
|
-
/**
|
|
8
|
-
* Scrub smoothness for card reveals
|
|
9
|
-
*/
|
|
10
|
-
scrub?: number
|
|
11
|
-
}>()
|
|
12
|
-
|
|
13
|
-
const { gsap, ScrollTrigger } = useGsap()
|
|
14
|
-
|
|
15
|
-
const sectionRef = ref<HTMLElement | null>(null)
|
|
16
|
-
const contentRef = ref<HTMLElement | null>(null)
|
|
17
|
-
|
|
18
|
-
const cleanups: Array<() => void> = []
|
|
19
|
-
|
|
20
|
-
onMounted(() => {
|
|
21
|
-
if (!sectionRef.value || !contentRef.value) return
|
|
22
|
-
|
|
23
|
-
const endOffset = (duration * window.innerHeight) / 100
|
|
24
|
-
const endValue = `+=${endOffset}`
|
|
25
|
-
|
|
26
|
-
// Pin the section
|
|
27
|
-
const pinSt = ScrollTrigger.create({
|
|
28
|
-
trigger: sectionRef.value,
|
|
29
|
-
start: 'top top',
|
|
30
|
-
end: endValue,
|
|
31
|
-
pin: true,
|
|
32
|
-
pinSpacing: true,
|
|
33
|
-
})
|
|
34
|
-
cleanups.push(() => pinSt.kill())
|
|
35
|
-
|
|
36
|
-
// Animate each direct child
|
|
37
|
-
const items = Array.from(contentRef.value.querySelectorAll(':scope > *'))
|
|
38
|
-
const total = items.length
|
|
39
|
-
if (total === 0) return
|
|
40
|
-
|
|
41
|
-
items.forEach((item, i) => {
|
|
42
|
-
gsap.set(item, { opacity: 0, y: 60, scale: 0.9 })
|
|
43
|
-
|
|
44
|
-
const startProgress = i / total
|
|
45
|
-
const endProgress = (i + 0.5) / total
|
|
46
|
-
|
|
47
|
-
const tween = gsap.to(item, {
|
|
48
|
-
scrollTrigger: {
|
|
49
|
-
trigger: sectionRef.value,
|
|
50
|
-
start: 'top top',
|
|
51
|
-
end: endValue,
|
|
52
|
-
scrub,
|
|
53
|
-
},
|
|
54
|
-
keyframes: [
|
|
55
|
-
{ opacity: 0, y: 60, scale: 0.9, duration: startProgress },
|
|
56
|
-
{ opacity: 1, y: 0, scale: 1, duration: endProgress - startProgress },
|
|
57
|
-
{ opacity: 1, y: 0, scale: 1, duration: 1 - endProgress },
|
|
58
|
-
],
|
|
59
|
-
ease: 'none',
|
|
60
|
-
})
|
|
61
|
-
cleanups.push(() => tween.kill())
|
|
62
|
-
})
|
|
63
|
-
})
|
|
64
|
-
|
|
65
|
-
onUnmounted(() => {
|
|
66
|
-
cleanups.forEach((fn) => fn())
|
|
67
|
-
cleanups.length = 0
|
|
68
|
-
})
|
|
69
|
-
</script>
|
|
70
|
-
|
|
71
|
-
<template>
|
|
72
|
-
<section ref="sectionRef" class="motion-pinned-section h-screen relative">
|
|
73
|
-
<div ref="contentRef" class="h-full flex items-center justify-center">
|
|
74
|
-
<slot />
|
|
75
|
-
</div>
|
|
76
|
-
</section>
|
|
77
|
-
</template>
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
const props = withDefaults(
|
|
3
|
-
defineProps<{
|
|
4
|
-
/**
|
|
5
|
-
* Target to scroll to (selector, element, or pixel position)
|
|
6
|
-
*/
|
|
7
|
-
to: string | number
|
|
8
|
-
/**
|
|
9
|
-
* Scroll duration in seconds
|
|
10
|
-
*/
|
|
11
|
-
duration?: number
|
|
12
|
-
/**
|
|
13
|
-
* Offset from target (negative = above target)
|
|
14
|
-
*/
|
|
15
|
-
offset?: number
|
|
16
|
-
/**
|
|
17
|
-
* Tag to render as
|
|
18
|
-
*/
|
|
19
|
-
as?: string
|
|
20
|
-
}>(),
|
|
21
|
-
{
|
|
22
|
-
duration: 1.5,
|
|
23
|
-
offset: 0,
|
|
24
|
-
as: 'button',
|
|
25
|
-
}
|
|
26
|
-
)
|
|
27
|
-
|
|
28
|
-
const emit = defineEmits<{
|
|
29
|
-
scrollStart: []
|
|
30
|
-
scrollComplete: []
|
|
31
|
-
}>()
|
|
32
|
-
|
|
33
|
-
const { scrollTo } = useSmoothScroll()
|
|
34
|
-
|
|
35
|
-
function handleClick() {
|
|
36
|
-
emit('scrollStart')
|
|
37
|
-
scrollTo(props.to, {
|
|
38
|
-
duration: props.duration,
|
|
39
|
-
offset: props.offset,
|
|
40
|
-
onComplete: () => emit('scrollComplete'),
|
|
41
|
-
})
|
|
42
|
-
}
|
|
43
|
-
</script>
|
|
44
|
-
|
|
45
|
-
<template>
|
|
46
|
-
<component :is="as" class="motion-scroll-link" @click="handleClick">
|
|
47
|
-
<slot />
|
|
48
|
-
</component>
|
|
49
|
-
</template>
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
defineOptions({ inheritAttrs: false })
|
|
3
|
-
|
|
4
|
-
const props = withDefaults(
|
|
5
|
-
defineProps<{
|
|
6
|
-
/**
|
|
7
|
-
* Display type: linear bar or circular
|
|
8
|
-
*/
|
|
9
|
-
type?: 'linear' | 'circular'
|
|
10
|
-
/**
|
|
11
|
-
* Size for circular progress (px)
|
|
12
|
-
*/
|
|
13
|
-
size?: number
|
|
14
|
-
/**
|
|
15
|
-
* Stroke width for circular progress
|
|
16
|
-
*/
|
|
17
|
-
strokeWidth?: number
|
|
18
|
-
/**
|
|
19
|
-
* Show percentage text
|
|
20
|
-
*/
|
|
21
|
-
showPercentage?: boolean
|
|
22
|
-
/**
|
|
23
|
-
* Gradient colors (start, middle, end)
|
|
24
|
-
*/
|
|
25
|
-
colors?: [string, string, string]
|
|
26
|
-
/**
|
|
27
|
-
* Background color
|
|
28
|
-
*/
|
|
29
|
-
bgColor?: string
|
|
30
|
-
/**
|
|
31
|
-
* Height for linear progress bar (px)
|
|
32
|
-
*/
|
|
33
|
-
height?: number
|
|
34
|
-
}>(),
|
|
35
|
-
{
|
|
36
|
-
type: 'linear',
|
|
37
|
-
size: 120,
|
|
38
|
-
strokeWidth: 8,
|
|
39
|
-
showPercentage: true,
|
|
40
|
-
colors: () => ['var(--color-primary-500)', 'rgb(168, 85, 247)', 'rgb(236, 72, 153)'],
|
|
41
|
-
bgColor: 'rgb(31, 41, 55)',
|
|
42
|
-
height: 4,
|
|
43
|
-
}
|
|
44
|
-
)
|
|
45
|
-
|
|
46
|
-
const { progress } = useSmoothScroll()
|
|
47
|
-
|
|
48
|
-
const percentage = computed(() => Math.round(progress.value * 100))
|
|
49
|
-
</script>
|
|
50
|
-
|
|
51
|
-
<template>
|
|
52
|
-
<!-- Linear Progress -->
|
|
53
|
-
<div v-if="type === 'linear'" class="motion-scroll-progress-linear" v-bind="$attrs">
|
|
54
|
-
<div
|
|
55
|
-
class="w-full rounded-full overflow-hidden"
|
|
56
|
-
:style="{ height: `${height}px`, backgroundColor: bgColor }"
|
|
57
|
-
>
|
|
58
|
-
<div
|
|
59
|
-
class="h-full rounded-full transition-[width] duration-100"
|
|
60
|
-
:style="{
|
|
61
|
-
width: `${percentage}%`,
|
|
62
|
-
background: `linear-gradient(to right, ${colors[0]}, ${colors[1]}, ${colors[2]})`,
|
|
63
|
-
}"
|
|
64
|
-
/>
|
|
65
|
-
</div>
|
|
66
|
-
<span v-if="showPercentage" class="text-sm font-medium tabular-nums mt-2 block text-center">
|
|
67
|
-
{{ percentage }}%
|
|
68
|
-
</span>
|
|
69
|
-
</div>
|
|
70
|
-
|
|
71
|
-
<!-- Circular Progress -->
|
|
72
|
-
<ProgressCircular
|
|
73
|
-
v-else
|
|
74
|
-
v-bind="$attrs"
|
|
75
|
-
:progress="progress"
|
|
76
|
-
:size
|
|
77
|
-
:stroke-width="strokeWidth"
|
|
78
|
-
:show-percentage="showPercentage"
|
|
79
|
-
:colors
|
|
80
|
-
:bg-color="bgColor"
|
|
81
|
-
/>
|
|
82
|
-
</template>
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import type { ScrollSceneContext } from '../../composables/useScrollSteps'
|
|
3
|
-
import { SCROLL_SCENE_KEY } from '../../composables/useScrollSteps'
|
|
4
|
-
|
|
5
|
-
const {
|
|
6
|
-
name,
|
|
7
|
-
start = 'top top',
|
|
8
|
-
end = '+=200%',
|
|
9
|
-
pin = true,
|
|
10
|
-
scrub = 1,
|
|
11
|
-
markers = false,
|
|
12
|
-
} = defineProps<{
|
|
13
|
-
/**
|
|
14
|
-
* Unique name for this scene (for debugging)
|
|
15
|
-
*/
|
|
16
|
-
name: string
|
|
17
|
-
/**
|
|
18
|
-
* ScrollTrigger start position
|
|
19
|
-
*/
|
|
20
|
-
start?: string
|
|
21
|
-
/**
|
|
22
|
-
* ScrollTrigger end position (e.g. '+=200%' = 2 viewport heights past start)
|
|
23
|
-
*/
|
|
24
|
-
end?: string
|
|
25
|
-
/**
|
|
26
|
-
* Pin the section while scroll advances
|
|
27
|
-
*/
|
|
28
|
-
pin?: boolean
|
|
29
|
-
/**
|
|
30
|
-
* Scrub smoothness: true | number | false
|
|
31
|
-
*/
|
|
32
|
-
scrub?: boolean | number
|
|
33
|
-
/**
|
|
34
|
-
* Show GSAP ScrollTrigger markers (debug)
|
|
35
|
-
*/
|
|
36
|
-
markers?: boolean
|
|
37
|
-
}>()
|
|
38
|
-
|
|
39
|
-
const emit = defineEmits<{
|
|
40
|
-
enter: []
|
|
41
|
-
leave: []
|
|
42
|
-
progress: [value: number]
|
|
43
|
-
}>()
|
|
44
|
-
|
|
45
|
-
const { ScrollTrigger } = useGsap()
|
|
46
|
-
|
|
47
|
-
const containerRef = ref<HTMLElement | null>(null)
|
|
48
|
-
const progress = ref(0)
|
|
49
|
-
const active = ref(false)
|
|
50
|
-
|
|
51
|
-
// Step registration
|
|
52
|
-
const registeredSteps = ref(new Set<number>())
|
|
53
|
-
const stepCount = computed(() =>
|
|
54
|
-
registeredSteps.value.size > 0 ? Math.max(...registeredSteps.value) + 1 : 0
|
|
55
|
-
)
|
|
56
|
-
|
|
57
|
-
function registerStep(index: number) {
|
|
58
|
-
registeredSteps.value = new Set([...registeredSteps.value, index])
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
function unregisterStep(index: number) {
|
|
62
|
-
const next = new Set(registeredSteps.value)
|
|
63
|
-
next.delete(index)
|
|
64
|
-
registeredSteps.value = next
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
provide<ScrollSceneContext>(SCROLL_SCENE_KEY, {
|
|
68
|
-
progress,
|
|
69
|
-
active,
|
|
70
|
-
name,
|
|
71
|
-
stepCount,
|
|
72
|
-
registerStep,
|
|
73
|
-
unregisterStep,
|
|
74
|
-
})
|
|
75
|
-
|
|
76
|
-
let st: { kill: () => void } | null = null
|
|
77
|
-
|
|
78
|
-
onMounted(() => {
|
|
79
|
-
if (!containerRef.value) return
|
|
80
|
-
|
|
81
|
-
st = ScrollTrigger.create({
|
|
82
|
-
trigger: containerRef.value,
|
|
83
|
-
start,
|
|
84
|
-
end,
|
|
85
|
-
pin,
|
|
86
|
-
scrub,
|
|
87
|
-
markers,
|
|
88
|
-
onUpdate: (self) => {
|
|
89
|
-
progress.value = self.progress
|
|
90
|
-
emit('progress', self.progress)
|
|
91
|
-
},
|
|
92
|
-
onEnter: () => {
|
|
93
|
-
active.value = true
|
|
94
|
-
emit('enter')
|
|
95
|
-
},
|
|
96
|
-
onLeave: () => {
|
|
97
|
-
active.value = false
|
|
98
|
-
emit('leave')
|
|
99
|
-
},
|
|
100
|
-
onEnterBack: () => {
|
|
101
|
-
active.value = true
|
|
102
|
-
emit('enter')
|
|
103
|
-
},
|
|
104
|
-
onLeaveBack: () => {
|
|
105
|
-
active.value = false
|
|
106
|
-
emit('leave')
|
|
107
|
-
},
|
|
108
|
-
})
|
|
109
|
-
})
|
|
110
|
-
|
|
111
|
-
onUnmounted(() => {
|
|
112
|
-
st?.kill()
|
|
113
|
-
st = null
|
|
114
|
-
})
|
|
115
|
-
</script>
|
|
116
|
-
|
|
117
|
-
<template>
|
|
118
|
-
<div ref="containerRef" class="motion-scroll-scene">
|
|
119
|
-
<slot :progress="progress" :active="active" />
|
|
120
|
-
</div>
|
|
121
|
-
</template>
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import type { ScrollSceneContext } from '../../composables/useScrollSteps'
|
|
3
|
-
import { SCROLL_SCENE_KEY } from '../../composables/useScrollSteps'
|
|
4
|
-
|
|
5
|
-
const { index } = defineProps<{
|
|
6
|
-
/**
|
|
7
|
-
* Zero-based step index within the parent MotionScrollScene
|
|
8
|
-
*/
|
|
9
|
-
index: number
|
|
10
|
-
}>()
|
|
11
|
-
|
|
12
|
-
const emit = defineEmits<{
|
|
13
|
-
enter: []
|
|
14
|
-
leave: []
|
|
15
|
-
}>()
|
|
16
|
-
|
|
17
|
-
const scene = inject<ScrollSceneContext>(SCROLL_SCENE_KEY)
|
|
18
|
-
|
|
19
|
-
onMounted(() => scene?.registerStep(index))
|
|
20
|
-
onUnmounted(() => scene?.unregisterStep(index))
|
|
21
|
-
|
|
22
|
-
const isActive = computed(() => {
|
|
23
|
-
if (!scene) return index === 0
|
|
24
|
-
const total = scene.stepCount.value
|
|
25
|
-
if (total === 0) return false
|
|
26
|
-
const stepSize = 1 / total
|
|
27
|
-
const start = index * stepSize
|
|
28
|
-
const end = (index + 1) * stepSize
|
|
29
|
-
// Last step stays active at progress === 1
|
|
30
|
-
return scene.progress.value >= start && (index === total - 1 || scene.progress.value < end)
|
|
31
|
-
})
|
|
32
|
-
|
|
33
|
-
const wasActive = ref(false)
|
|
34
|
-
watch(isActive, (active) => {
|
|
35
|
-
if (active && !wasActive.value) emit('enter')
|
|
36
|
-
else if (!active && wasActive.value) emit('leave')
|
|
37
|
-
wasActive.value = active
|
|
38
|
-
})
|
|
39
|
-
</script>
|
|
40
|
-
|
|
41
|
-
<template>
|
|
42
|
-
<div class="motion-scroll-step" :class="{ 'is-active': isActive }" :data-step="index">
|
|
43
|
-
<slot :is-active="isActive" />
|
|
44
|
-
</div>
|
|
45
|
-
</template>
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
// Props
|
|
3
|
-
const props = withDefaults(
|
|
4
|
-
defineProps<{
|
|
5
|
-
name?: string
|
|
6
|
-
mode?: 'in-out' | 'out-in' | 'default'
|
|
7
|
-
duration?: number
|
|
8
|
-
delay?: number
|
|
9
|
-
easing?: string
|
|
10
|
-
}>(),
|
|
11
|
-
{
|
|
12
|
-
name: 'fade',
|
|
13
|
-
mode: 'default',
|
|
14
|
-
duration: 300,
|
|
15
|
-
delay: 0,
|
|
16
|
-
easing: 'ease-out',
|
|
17
|
-
}
|
|
18
|
-
)
|
|
19
|
-
|
|
20
|
-
// State
|
|
21
|
-
const isVisible = ref(false)
|
|
22
|
-
const isMounted = ref(false)
|
|
23
|
-
|
|
24
|
-
// Computed classes
|
|
25
|
-
const transitionClass = computed(() => {
|
|
26
|
-
return `transition-${props.name}`
|
|
27
|
-
})
|
|
28
|
-
|
|
29
|
-
const style = computed(() => {
|
|
30
|
-
return {
|
|
31
|
-
transitionDuration: `${props.duration}ms`,
|
|
32
|
-
transitionDelay: `${props.delay}ms`,
|
|
33
|
-
transitionTimingFunction: props.easing,
|
|
34
|
-
}
|
|
35
|
-
})
|
|
36
|
-
|
|
37
|
-
// Lifecycle
|
|
38
|
-
onMounted(() => {
|
|
39
|
-
isMounted.value = true
|
|
40
|
-
// Trigger initial animation
|
|
41
|
-
setTimeout(() => {
|
|
42
|
-
isVisible.value = true
|
|
43
|
-
}, 50)
|
|
44
|
-
})
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
</script>
|
|
48
|
-
|
|
49
|
-
<template>
|
|
50
|
-
<div class="motion-transition" :class="[transitionClass, { 'is-visible': isVisible }]" :style>
|
|
51
|
-
<slot />
|
|
52
|
-
</div>
|
|
53
|
-
</template>
|
|
54
|
-
|
|
55
|
-
<style scoped>
|
|
56
|
-
.motion-transition {
|
|
57
|
-
opacity: 0;
|
|
58
|
-
transition-property: all;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.motion-transition.is-visible {
|
|
62
|
-
opacity: 1;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.transition-fade {
|
|
66
|
-
transition-property: opacity;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.transition-slide {
|
|
70
|
-
transition-property: transform, opacity;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.transition-scale {
|
|
74
|
-
transition-property: transform, opacity;
|
|
75
|
-
}
|
|
76
|
-
</style>
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
// @ts-nocheck - Three.js WebGPU types + TresJS renderer factory
|
|
3
|
-
import { TresCanvas } from '@tresjs/core'
|
|
4
|
-
import type { ToneMapping } from 'three'
|
|
5
|
-
import {
|
|
6
|
-
ACESFilmicToneMapping,
|
|
7
|
-
CineonToneMapping,
|
|
8
|
-
Color,
|
|
9
|
-
LinearToneMapping,
|
|
10
|
-
ReinhardToneMapping,
|
|
11
|
-
SRGBColorSpace,
|
|
12
|
-
} from 'three'
|
|
13
|
-
import { WebGPURenderer } from 'three/webgpu'
|
|
14
|
-
|
|
15
|
-
const props = withDefaults(
|
|
16
|
-
defineProps<{
|
|
17
|
-
clearColor?: string
|
|
18
|
-
toneMapping?: 'aces' | 'reinhard' | 'cineon' | 'linear'
|
|
19
|
-
outputColorSpace?: 'srgb' | 'linear'
|
|
20
|
-
shadows?: boolean
|
|
21
|
-
antialias?: boolean
|
|
22
|
-
alpha?: boolean
|
|
23
|
-
preserveDrawingBuffer?: boolean
|
|
24
|
-
powerPreference?: 'default' | 'high-performance' | 'low-power'
|
|
25
|
-
windowSize?: boolean
|
|
26
|
-
/** Use WebGPURenderer (required for node materials / TSL shaders) */
|
|
27
|
-
webgpu?: boolean
|
|
28
|
-
}>(),
|
|
29
|
-
{
|
|
30
|
-
clearColor: '#000000',
|
|
31
|
-
toneMapping: 'aces',
|
|
32
|
-
outputColorSpace: 'srgb',
|
|
33
|
-
shadows: false,
|
|
34
|
-
antialias: true,
|
|
35
|
-
alpha: false,
|
|
36
|
-
preserveDrawingBuffer: false,
|
|
37
|
-
powerPreference: 'high-performance',
|
|
38
|
-
windowSize: true,
|
|
39
|
-
webgpu: false,
|
|
40
|
-
}
|
|
41
|
-
)
|
|
42
|
-
|
|
43
|
-
const emit = defineEmits<{
|
|
44
|
-
ready: [context: any]
|
|
45
|
-
}>()
|
|
46
|
-
|
|
47
|
-
const config = useAppConfig()
|
|
48
|
-
const shaderConfig = (config.shader || {}) as {
|
|
49
|
-
toneMapping?: string
|
|
50
|
-
maxPixelRatio?: number
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
const toneMappingMap: Record<string, ToneMapping> = {
|
|
54
|
-
aces: ACESFilmicToneMapping,
|
|
55
|
-
reinhard: ReinhardToneMapping,
|
|
56
|
-
cineon: CineonToneMapping,
|
|
57
|
-
linear: LinearToneMapping,
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
const resolvedToneMapping = computed(() => {
|
|
61
|
-
const key = props.toneMapping || shaderConfig.toneMapping || 'aces'
|
|
62
|
-
return toneMappingMap[key] ?? ACESFilmicToneMapping
|
|
63
|
-
})
|
|
64
|
-
|
|
65
|
-
const resolvedColorSpace = computed(() => {
|
|
66
|
-
return props.outputColorSpace === 'srgb' ? SRGBColorSpace : 'srgb-linear'
|
|
67
|
-
})
|
|
68
|
-
|
|
69
|
-
const maxDpr = computed(() => {
|
|
70
|
-
const configDpr = shaderConfig.maxPixelRatio ?? 2
|
|
71
|
-
return Math.min(window.devicePixelRatio, configDpr)
|
|
72
|
-
})
|
|
73
|
-
|
|
74
|
-
// WebGPU renderer factory — TresJS v5 calls renderer.init() automatically
|
|
75
|
-
// when the returned object has isRenderer === true (three/webgpu Renderer base class)
|
|
76
|
-
const webgpuRendererFactory = props.webgpu
|
|
77
|
-
? ({ canvas }: { canvas: any }) => {
|
|
78
|
-
const r = new WebGPURenderer({
|
|
79
|
-
canvas: unref(canvas),
|
|
80
|
-
antialias: props.antialias,
|
|
81
|
-
powerPreference: props.powerPreference,
|
|
82
|
-
})
|
|
83
|
-
r.setPixelRatio(Math.min(window.devicePixelRatio, maxDpr.value))
|
|
84
|
-
r.setClearColor(new Color(props.clearColor))
|
|
85
|
-
r.toneMapping = resolvedToneMapping.value
|
|
86
|
-
r.outputColorSpace = resolvedColorSpace.value
|
|
87
|
-
return r
|
|
88
|
-
}
|
|
89
|
-
: undefined
|
|
90
|
-
|
|
91
|
-
function onReady(context: any) {
|
|
92
|
-
emit('ready', context)
|
|
93
|
-
}
|
|
94
|
-
</script>
|
|
95
|
-
|
|
96
|
-
<template>
|
|
97
|
-
<TresCanvas
|
|
98
|
-
:clear-color
|
|
99
|
-
:tone-mapping="resolvedToneMapping"
|
|
100
|
-
:output-color-space="resolvedColorSpace"
|
|
101
|
-
:shadows
|
|
102
|
-
:antialias
|
|
103
|
-
:alpha
|
|
104
|
-
:preserve-drawing-buffer
|
|
105
|
-
:power-preference
|
|
106
|
-
:window-size
|
|
107
|
-
:dpr="maxDpr"
|
|
108
|
-
:renderer="webgpuRendererFactory"
|
|
109
|
-
class="shader-canvas"
|
|
110
|
-
@ready="onReady"
|
|
111
|
-
>
|
|
112
|
-
<slot />
|
|
113
|
-
</TresCanvas>
|
|
114
|
-
</template>
|
|
115
|
-
|
|
116
|
-
<style scoped>
|
|
117
|
-
.shader-canvas {
|
|
118
|
-
width: 100%;
|
|
119
|
-
height: 100%;
|
|
120
|
-
}
|
|
121
|
-
</style>
|