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,132 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* Intercepts three.webgpu.js in SSR via the transform hook.
|
|
5
|
-
*
|
|
6
|
-
* Unlike resolveId (which isn't reliably called in vite-node dev mode after
|
|
7
|
-
* the module graph is built), transform IS called for every module evaluation.
|
|
8
|
-
* We know this because Vite's `define` substitution — which works via transform —
|
|
9
|
-
* successfully polyfilled `self` in earlier debugging.
|
|
10
|
-
*
|
|
11
|
-
* Both `three/webgpu` and `three/tsl` package.json exports resolve to the same
|
|
12
|
-
* file: three/build/three.webgpu.js. That file accesses `self` and `navigator`
|
|
13
|
-
* at module scope, crashing SSR startup. We return a lightweight stub instead.
|
|
14
|
-
*/
|
|
15
|
-
function threeWebGPUSSRStub(): Plugin {
|
|
16
|
-
const tslNoop = `
|
|
17
|
-
const n = new Proxy(function noop() { return n }, {
|
|
18
|
-
get(_t, k) {
|
|
19
|
-
if (k === 'then' || k === Symbol.toPrimitive || k === Symbol.iterator || k === Symbol.toStringTag) return undefined
|
|
20
|
-
return n
|
|
1
|
+
export default defineNuxtConfig({
|
|
2
|
+
$meta: {
|
|
3
|
+
name: 'shader',
|
|
21
4
|
},
|
|
22
|
-
apply() { return n },
|
|
23
|
-
construct() { return Object.create(n) },
|
|
24
|
-
})
|
|
25
|
-
`
|
|
26
|
-
const tslNames = [
|
|
27
|
-
// Constructors
|
|
28
|
-
'float', 'vec2', 'vec3', 'vec4', 'color', 'mat2', 'mat3', 'mat4',
|
|
29
|
-
// Uniforms / attributes
|
|
30
|
-
'uniform', 'attribute', 'varying',
|
|
31
|
-
// Function definition
|
|
32
|
-
'Fn',
|
|
33
|
-
// Arithmetic
|
|
34
|
-
'add', 'sub', 'mul', 'div', 'mod', 'abs', 'sign',
|
|
35
|
-
'floor', 'ceil', 'fract', 'round',
|
|
36
|
-
'min', 'max', 'clamp', 'mix', 'smoothstep',
|
|
37
|
-
'pow', 'sqrt', 'exp', 'log',
|
|
38
|
-
// Trigonometry
|
|
39
|
-
'sin', 'cos', 'tan', 'asin', 'acos', 'atan', 'atan2',
|
|
40
|
-
// Vector operations
|
|
41
|
-
'dot', 'cross', 'normalize', 'length', 'distance', 'reflect', 'refract',
|
|
42
|
-
// Matrix operations
|
|
43
|
-
'transpose', 'inverse',
|
|
44
|
-
// Texture
|
|
45
|
-
'texture', 'sampler',
|
|
46
|
-
// Comparison / selection
|
|
47
|
-
'lessThan', 'lessThanEqual', 'greaterThan', 'greaterThanEqual',
|
|
48
|
-
'step', 'select', 'cond',
|
|
49
|
-
// Built-in inputs
|
|
50
|
-
'uv', 'time', 'EPSILON', 'Loop',
|
|
51
|
-
'positionLocal', 'positionWorld', 'positionView',
|
|
52
|
-
'normalLocal', 'normalWorld', 'normalView',
|
|
53
|
-
'positionViewDirection', 'cameraPosition',
|
|
54
|
-
// Timers
|
|
55
|
-
'timerGlobal', 'timerLocal', 'timerDelta',
|
|
56
|
-
]
|
|
57
5
|
|
|
58
|
-
const stub =
|
|
59
|
-
tslNoop +
|
|
60
|
-
tslNames.map((name) => `export const ${name} = n`).join('\n') +
|
|
61
|
-
`
|
|
62
|
-
// WebGPU class stubs (used by three/webgpu imports)
|
|
63
|
-
export class MeshBasicNodeMaterial {
|
|
64
|
-
constructor() { this.colorNode = null; this.side = null }
|
|
65
|
-
}
|
|
66
|
-
export class MeshStandardNodeMaterial {
|
|
67
|
-
constructor() { this.colorNode = null; this.side = null }
|
|
68
|
-
}
|
|
69
|
-
export class TextureLoader {
|
|
70
|
-
load() { return null }
|
|
71
|
-
}
|
|
72
|
-
export class UniformNode {}
|
|
73
|
-
export default {}
|
|
74
|
-
`
|
|
75
|
-
|
|
76
|
-
return {
|
|
77
|
-
name: 'three-webgpu-ssr-stub',
|
|
78
|
-
enforce: 'pre',
|
|
79
|
-
transform(_code, id, options) {
|
|
80
|
-
// Only intercept in SSR context
|
|
81
|
-
if (!options?.ssr) return null
|
|
82
|
-
// In three r182+, three/webgpu → three.webgpu.js, three/tsl → three.tsl.js
|
|
83
|
-
if (!id.includes('three.webgpu.js') && !id.includes('three.tsl.js')) return null
|
|
84
|
-
return { code: stub, map: null }
|
|
85
|
-
},
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export default defineNuxtConfig({
|
|
90
6
|
compatibilityDate: '2025-07-15',
|
|
91
7
|
|
|
8
|
+
extends: ['../canvas'],
|
|
9
|
+
|
|
92
10
|
typescript: {
|
|
93
|
-
typeCheck:
|
|
11
|
+
typeCheck: false,
|
|
94
12
|
strict: true,
|
|
95
13
|
},
|
|
96
14
|
|
|
97
|
-
modules: ['@tresjs/nuxt'],
|
|
98
|
-
|
|
99
|
-
tres: {
|
|
100
|
-
devtools: true,
|
|
101
|
-
},
|
|
102
|
-
|
|
103
15
|
css: ['#layers/shader/app/assets/css/shader.css'],
|
|
104
16
|
|
|
105
17
|
alias: {
|
|
106
18
|
'#layers/shader': import.meta.dirname,
|
|
19
|
+
'#layers/shader/types': `${import.meta.dirname}/app/types`,
|
|
107
20
|
},
|
|
108
21
|
|
|
109
22
|
imports: {
|
|
110
|
-
dirs: [
|
|
111
|
-
`${import.meta.dirname}/app/composables`,
|
|
112
|
-
],
|
|
113
|
-
},
|
|
114
|
-
|
|
115
|
-
// Vite config for WebGPU/TSL support
|
|
116
|
-
vite: {
|
|
117
|
-
plugins: [threeWebGPUSSRStub()],
|
|
118
|
-
optimizeDeps: {
|
|
119
|
-
include: ['three', 'three/webgpu', 'three/tsl'],
|
|
120
|
-
esbuildOptions: {
|
|
121
|
-
target: 'esnext',
|
|
122
|
-
},
|
|
123
|
-
},
|
|
124
|
-
build: {
|
|
125
|
-
target: 'esnext',
|
|
126
|
-
},
|
|
127
|
-
// Bundle three for client-side SSR transforms
|
|
128
|
-
ssr: {
|
|
129
|
-
noExternal: ['three'],
|
|
130
|
-
},
|
|
23
|
+
dirs: [`${import.meta.dirname}/app/composables`],
|
|
131
24
|
},
|
|
132
25
|
})
|
|
@@ -4,17 +4,11 @@
|
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./nuxt.config.ts",
|
|
6
6
|
"scripts": {
|
|
7
|
+
"dev": "nuxi dev",
|
|
8
|
+
"dev:playground": "PLAYGROUND_LAYERS=core,canvas,shader pnpm -F playground dev",
|
|
7
9
|
"typecheck": "vue-tsc --noEmit -p ../../tsconfig.typecheck.json"
|
|
8
10
|
},
|
|
9
11
|
"dependencies": {
|
|
10
|
-
"@
|
|
11
|
-
"@tresjs/core": "^5.8.1",
|
|
12
|
-
"@tresjs/nuxt": "^5.6.1",
|
|
13
|
-
"@tresjs/post-processing": "^3.7.2",
|
|
14
|
-
"@vueuse/core": "^14.3.0",
|
|
15
|
-
"three": "^0.184.0"
|
|
16
|
-
},
|
|
17
|
-
"devDependencies": {
|
|
18
|
-
"@types/three": "^0.184.1"
|
|
12
|
+
"@vueuse/core": "catalog:"
|
|
19
13
|
}
|
|
20
14
|
}
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
/* --- Theme Transition --- */
|
|
10
10
|
.theme-transition {
|
|
11
|
-
transition-property: color, background-color, border-color, fill, stroke, box-shadow;
|
|
12
|
-
transition-duration: 700ms;
|
|
13
11
|
transition-delay: 0ms;
|
|
12
|
+
transition-duration: 700ms;
|
|
13
|
+
transition-property: color, background-color, border-color, fill, stroke, box-shadow;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
/* --- Reduced Motion --- */
|
|
@@ -1,41 +1,43 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { AccentColor } from '#layers/theme/app/types/theme'
|
|
2
|
+
import type { AccentColor } from '#layers/theme/app/types/theme'
|
|
3
3
|
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
yellow: '#eab308',
|
|
9
|
-
lime: '#84cc16',
|
|
10
|
-
green: '#22c55e',
|
|
11
|
-
emerald: '#10b981',
|
|
12
|
-
teal: '#14b8a6',
|
|
13
|
-
cyan: '#06b6d4',
|
|
14
|
-
sky: '#0ea5e9',
|
|
15
|
-
blue: '#3b82f6',
|
|
16
|
-
indigo: '#6366f1',
|
|
17
|
-
violet: '#8b5cf6',
|
|
18
|
-
purple: '#a855f7',
|
|
19
|
-
fuchsia: '#d946ef',
|
|
20
|
-
pink: '#ec4899',
|
|
21
|
-
rose: '#f43f5e',
|
|
22
|
-
}
|
|
4
|
+
const { color, active = false } = defineProps<{
|
|
5
|
+
color: AccentColor
|
|
6
|
+
active?: boolean
|
|
7
|
+
}>()
|
|
23
8
|
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}>()
|
|
9
|
+
const emit = defineEmits<{
|
|
10
|
+
select: [color: AccentColor]
|
|
11
|
+
}>()
|
|
28
12
|
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
13
|
+
const COLORS: Record<AccentColor, string> = {
|
|
14
|
+
red: '#ef4444',
|
|
15
|
+
orange: '#f97316',
|
|
16
|
+
amber: '#f59e0b',
|
|
17
|
+
yellow: '#eab308',
|
|
18
|
+
lime: '#84cc16',
|
|
19
|
+
green: '#22c55e',
|
|
20
|
+
emerald: '#10b981',
|
|
21
|
+
teal: '#14b8a6',
|
|
22
|
+
cyan: '#06b6d4',
|
|
23
|
+
sky: '#0ea5e9',
|
|
24
|
+
blue: '#3b82f6',
|
|
25
|
+
indigo: '#6366f1',
|
|
26
|
+
violet: '#8b5cf6',
|
|
27
|
+
purple: '#a855f7',
|
|
28
|
+
fuchsia: '#d946ef',
|
|
29
|
+
pink: '#ec4899',
|
|
30
|
+
rose: '#f43f5e',
|
|
31
|
+
}
|
|
32
32
|
|
|
33
|
-
const bgStyle = computed(() => ({
|
|
34
|
-
|
|
35
|
-
}))
|
|
33
|
+
const bgStyle = computed(() => ({
|
|
34
|
+
backgroundColor: COLORS[color],
|
|
35
|
+
}))
|
|
36
36
|
</script>
|
|
37
37
|
|
|
38
38
|
<template>
|
|
39
|
+
<!-- eslint-disable vue/v-on-handler-style -->
|
|
40
|
+
|
|
39
41
|
<button
|
|
40
42
|
class="size-8 rounded-full ring-1 ring-offset-2 transition-shadow duration-200"
|
|
41
43
|
:class="[
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
<!-- eslint-disable @typescript-eslint/no-explicit-any -->
|
|
1
2
|
<script setup lang="ts">
|
|
2
|
-
import type { AccentColor } from '#layers/theme/app/types/theme'
|
|
3
|
+
import type { AccentColor } from '#layers/theme/app/types/theme'
|
|
3
4
|
|
|
4
|
-
const appConfig = useAppConfig()
|
|
5
|
-
const { activeAccent, setAccent } = useAccentColor()
|
|
5
|
+
const appConfig = useAppConfig()
|
|
6
|
+
const { activeAccent, setAccent } = useAccentColor()
|
|
6
7
|
|
|
7
|
-
const accents = computed(() => ((appConfig as any).themeLayer?.accents as AccentColor[]) ?? [])
|
|
8
|
+
const accents = computed(() => ((appConfig as any).themeLayer?.accents as AccentColor[]) ?? [])
|
|
8
9
|
</script>
|
|
9
10
|
|
|
10
11
|
<template>
|
|
@@ -12,7 +13,7 @@ const accents = computed(() => ((appConfig as any).themeLayer?.accents as Accent
|
|
|
12
13
|
<ThemePickerAccentButton
|
|
13
14
|
v-for="color in accents"
|
|
14
15
|
:key="color"
|
|
15
|
-
:color
|
|
16
|
+
:color
|
|
16
17
|
:active="activeAccent === color"
|
|
17
18
|
@select="setAccent"
|
|
18
19
|
/>
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
const {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
} = useTheme()
|
|
2
|
+
const {
|
|
3
|
+
contrastOverride,
|
|
4
|
+
motionOverride,
|
|
5
|
+
transparencyOverride,
|
|
6
|
+
setContrastOverride,
|
|
7
|
+
setMotionOverride,
|
|
8
|
+
setTransparencyOverride,
|
|
9
|
+
effectiveHighContrast,
|
|
10
|
+
effectiveReducedMotion,
|
|
11
|
+
effectiveReducedTransparency,
|
|
12
|
+
} = useTheme()
|
|
13
13
|
|
|
14
|
-
const contrastModel = computed({
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
})
|
|
14
|
+
const contrastModel = computed({
|
|
15
|
+
get: () => effectiveHighContrast.value,
|
|
16
|
+
set: (val: boolean) => setContrastOverride(val ? 'on' : 'system'),
|
|
17
|
+
})
|
|
18
18
|
|
|
19
|
-
const motionModel = computed({
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
})
|
|
19
|
+
const motionModel = computed({
|
|
20
|
+
get: () => effectiveReducedMotion.value,
|
|
21
|
+
set: (val: boolean) => setMotionOverride(val ? 'on' : 'system'),
|
|
22
|
+
})
|
|
23
23
|
|
|
24
|
-
const transparencyModel = computed({
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
})
|
|
24
|
+
const transparencyModel = computed({
|
|
25
|
+
get: () => effectiveReducedTransparency.value,
|
|
26
|
+
set: (val: boolean) => setTransparencyOverride(val ? 'on' : 'system'),
|
|
27
|
+
})
|
|
28
28
|
</script>
|
|
29
29
|
|
|
30
30
|
<template>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable @typescript-eslint/consistent-type-assertions */
|
|
2
2
|
import type { AccentColor } from '#layers/theme/app/types/theme'
|
|
3
|
+
import { createSharedComposable } from '@vueuse/core'
|
|
3
4
|
|
|
4
5
|
export const useAccentColor = createSharedComposable(() => {
|
|
5
6
|
const appConfig = useAppConfig()
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createSharedComposable, usePreferredContrast } from '@vueuse/core'
|
|
2
1
|
import type { PreferenceOverride } from '#layers/theme/app/types/theme'
|
|
2
|
+
import { createSharedComposable, usePreferredContrast } from '@vueuse/core'
|
|
3
3
|
|
|
4
4
|
export const useThemeContrast = createSharedComposable(() => {
|
|
5
5
|
const contrastOverride = useState<PreferenceOverride>('theme-contrast', () => 'system')
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createSharedComposable, usePreferredReducedMotion } from '@vueuse/core'
|
|
2
1
|
import type { PreferenceOverride } from '#layers/theme/app/types/theme'
|
|
2
|
+
import { createSharedComposable, usePreferredReducedMotion } from '@vueuse/core'
|
|
3
3
|
|
|
4
4
|
export const useThemeMotion = createSharedComposable(() => {
|
|
5
5
|
const motionOverride = useState<PreferenceOverride>('theme-motion', () => 'system')
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createSharedComposable,
|
|
3
|
-
usePreferredReducedTransparency,
|
|
4
|
-
} from '@vueuse/core'
|
|
5
1
|
import type { PreferenceOverride } from '#layers/theme/app/types/theme'
|
|
2
|
+
import { createSharedComposable, usePreferredReducedTransparency } from '@vueuse/core'
|
|
6
3
|
|
|
7
4
|
export const useThemeTransparency = createSharedComposable(() => {
|
|
8
5
|
const transparencyOverride = useState<PreferenceOverride>('theme-transparency', () => 'system')
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* eslint-disable no-restricted-syntax */
|
|
2
|
+
/* eslint-disable @typescript-eslint/consistent-type-assertions */
|
|
1
3
|
import type { AccentColor, PreferenceOverride } from '#layers/theme/app/types/theme'
|
|
2
4
|
|
|
3
5
|
export default defineNuxtPlugin(() => {
|
|
@@ -21,19 +23,35 @@ export default defineNuxtPlugin(() => {
|
|
|
21
23
|
const storedTransparency = localStorage.getItem('theme-transparency')
|
|
22
24
|
if (storedTransparency) setTransparencyOverride(storedTransparency as PreferenceOverride)
|
|
23
25
|
|
|
24
|
-
watch(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
watch(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
26
|
+
watch(
|
|
27
|
+
activeAccent,
|
|
28
|
+
(color) => {
|
|
29
|
+
document.documentElement.setAttribute('data-theme-colour', color)
|
|
30
|
+
},
|
|
31
|
+
{ immediate: true }
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
watch(
|
|
35
|
+
effectiveHighContrast,
|
|
36
|
+
(high) => {
|
|
37
|
+
document.documentElement.setAttribute('data-theme-contrast', high ? 'high' : 'standard')
|
|
38
|
+
},
|
|
39
|
+
{ immediate: true }
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
watch(
|
|
43
|
+
effectiveReducedMotion,
|
|
44
|
+
(reduced) => {
|
|
45
|
+
document.documentElement.setAttribute('data-theme-motion', reduced ? 'reduced' : 'full')
|
|
46
|
+
},
|
|
47
|
+
{ immediate: true }
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
watch(
|
|
51
|
+
effectiveReducedTransparency,
|
|
52
|
+
(reduced) => {
|
|
53
|
+
document.documentElement.setAttribute('data-theme-transparency', reduced ? 'reduced' : 'full')
|
|
54
|
+
},
|
|
55
|
+
{ immediate: true }
|
|
56
|
+
)
|
|
39
57
|
})
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/consistent-type-imports */
|
|
1
2
|
declare module '@nuxt/schema' {
|
|
2
|
-
|
|
3
|
+
type AppConfigInput = {
|
|
3
4
|
themeLayer?: {
|
|
4
|
-
accents?: import('./theme').AccentColor
|
|
5
|
+
accents?: Array<import('./theme').AccentColor>
|
|
5
6
|
defaultAccent?: import('./theme').AccentColor
|
|
6
7
|
}
|
|
7
8
|
}
|
|
@@ -30,7 +30,7 @@ export type ThemeContrast = 'high' | 'standard'
|
|
|
30
30
|
export type ThemeMotion = 'reduced' | 'full'
|
|
31
31
|
export type ThemeTransparency = 'reduced' | 'full'
|
|
32
32
|
|
|
33
|
-
export
|
|
33
|
+
export type ThemePreferences = {
|
|
34
34
|
accent: AccentColor
|
|
35
35
|
contrast: PreferenceOverride
|
|
36
36
|
motion: PreferenceOverride
|
|
@@ -4,8 +4,11 @@ export default defineNuxtConfig({
|
|
|
4
4
|
name: 'theme',
|
|
5
5
|
},
|
|
6
6
|
|
|
7
|
+
extends: ['../core'],
|
|
8
|
+
|
|
7
9
|
alias: {
|
|
8
10
|
'#layers/theme': import.meta.dirname,
|
|
11
|
+
'#layers/theme/types': `${import.meta.dirname}/app/types`,
|
|
9
12
|
},
|
|
10
13
|
|
|
11
14
|
css: ['#layers/theme/app/assets/css/theme.css'],
|
|
@@ -52,7 +55,7 @@ export default defineNuxtConfig({
|
|
|
52
55
|
compatibilityDate: '2026-01-30',
|
|
53
56
|
|
|
54
57
|
typescript: {
|
|
55
|
-
typeCheck:
|
|
58
|
+
typeCheck: false,
|
|
56
59
|
strict: true,
|
|
57
60
|
},
|
|
58
61
|
})
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
<!-- eslint-disable vue/no-unused-properties -->
|
|
2
|
+
<!-- eslint-disable vue/define-props-destructuring -->
|
|
3
|
+
<script setup lang="ts">
|
|
4
|
+
// Props
|
|
5
|
+
const props = withDefaults(
|
|
6
|
+
defineProps<{
|
|
7
|
+
name?: string
|
|
8
|
+
mode?: 'in-out' | 'out-in' | 'default'
|
|
9
|
+
duration?: number
|
|
10
|
+
delay?: number
|
|
11
|
+
easing?: string
|
|
12
|
+
}>(),
|
|
13
|
+
{
|
|
14
|
+
name: 'fade',
|
|
15
|
+
mode: 'default',
|
|
16
|
+
duration: 300,
|
|
17
|
+
delay: 0,
|
|
18
|
+
easing: 'ease-out',
|
|
19
|
+
}
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
// State
|
|
23
|
+
const isVisible = ref(false)
|
|
24
|
+
const isMounted = ref(false)
|
|
25
|
+
|
|
26
|
+
// Computed classes
|
|
27
|
+
const transitionClass = computed(() => {
|
|
28
|
+
return `transition-${props.name}`
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
const style = computed(() => {
|
|
32
|
+
return {
|
|
33
|
+
transitionDuration: `${props.duration}ms`,
|
|
34
|
+
transitionDelay: `${props.delay}ms`,
|
|
35
|
+
transitionTimingFunction: props.easing,
|
|
36
|
+
}
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
// Lifecycle
|
|
40
|
+
onMounted(() => {
|
|
41
|
+
isMounted.value = true
|
|
42
|
+
// Trigger initial animation
|
|
43
|
+
setTimeout(() => {
|
|
44
|
+
isVisible.value = true
|
|
45
|
+
}, 50)
|
|
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>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export default defineNuxtConfig({
|
|
2
|
+
$meta: { name: 'transitions' },
|
|
3
|
+
|
|
4
|
+
extends: ['../core'],
|
|
5
|
+
|
|
6
|
+
alias: {
|
|
7
|
+
'#layers/transitions': import.meta.dirname,
|
|
8
|
+
'#layers/transitions/types': `${import.meta.dirname}/app/types`,
|
|
9
|
+
},
|
|
10
|
+
|
|
11
|
+
css: ['#layers/transitions/app/assets/css/transitions.css'],
|
|
12
|
+
|
|
13
|
+
compatibilityDate: '2026-06-06',
|
|
14
|
+
|
|
15
|
+
typescript: {
|
|
16
|
+
typeCheck: false,
|
|
17
|
+
strict: true,
|
|
18
|
+
},
|
|
19
|
+
})
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<!-- eslint-disable vue/require-default-prop -->
|
|
2
|
+
<!-- eslint-disable vue/define-props-destructuring -->
|
|
3
|
+
<script lang="ts" setup>
|
|
4
|
+
import { useColor } from '../../composables/color'
|
|
5
|
+
import type { UiColors } from '../../types/colors'
|
|
6
|
+
import type { FontSize } from '../../types/typography'
|
|
7
|
+
|
|
8
|
+
defineOptions({ inheritAttrs: false })
|
|
9
|
+
|
|
10
|
+
const props = withDefaults(
|
|
11
|
+
defineProps<{
|
|
12
|
+
language?: string
|
|
13
|
+
color?: UiColors
|
|
14
|
+
size?: FontSize
|
|
15
|
+
class?: string
|
|
16
|
+
}>(),
|
|
17
|
+
{
|
|
18
|
+
class: '',
|
|
19
|
+
color: 'default',
|
|
20
|
+
}
|
|
21
|
+
)
|
|
22
|
+
const colorClass = useColor(props.color, 'text')
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<template>
|
|
26
|
+
<Typography
|
|
27
|
+
tag="pre"
|
|
28
|
+
v-bind="{
|
|
29
|
+
...$attrs,
|
|
30
|
+
...(props.size !== undefined && { size: props.size }),
|
|
31
|
+
...(props.language !== undefined && { 'data-language': props.language }),
|
|
32
|
+
}"
|
|
33
|
+
class="overflow-x-auto"
|
|
34
|
+
:class="[props.class]"
|
|
35
|
+
>
|
|
36
|
+
<Typography
|
|
37
|
+
tag="code"
|
|
38
|
+
class="font-mono"
|
|
39
|
+
:class="[colorClass, props.language ? `language-${props.language}` : '']"
|
|
40
|
+
>
|
|
41
|
+
<slot />
|
|
42
|
+
</Typography>
|
|
43
|
+
</Typography>
|
|
44
|
+
</template>
|