kmcom-nuxt-layers 1.7.9 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +4 -1
- package/layers/content/app/composables/useBlogPosts.ts +3 -1
- 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 +4 -1
- package/layers/content/app/composables/usePortfolioItems.ts +4 -1
- 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 +32 -6
- 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,232 +1,240 @@
|
|
|
1
|
+
<!-- eslint-disable vue/define-props-destructuring -->
|
|
2
|
+
<!-- eslint-disable @typescript-eslint/ban-ts-comment -->
|
|
1
3
|
<script setup lang="ts">
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
/**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
type ColSpanValue = number | 'full'
|
|
37
|
-
type Alignment = 'start' | 'center' | 'end' | 'stretch'
|
|
38
|
-
type LayerName = 'back' | 'mid' | 'front' | 'top'
|
|
39
|
-
type BleedDirection = 'left' | 'right' | 'both'
|
|
40
|
-
type AspectRatio = '1/1' | '4/3' | '3/4' | '16/9' | '9/16' | '2/1' | '1/2'
|
|
41
|
-
|
|
42
|
-
interface ResponsiveValue<T> {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
type ContainerSize = 'content' | 'wide' | 'fluid' | 'full'
|
|
49
|
-
type Density = 'compact' | 'normal' | 'relaxed'
|
|
50
|
-
|
|
51
|
-
interface Props {
|
|
52
|
-
preset?: string
|
|
53
|
-
as?: string
|
|
54
|
-
colStart?: number | ResponsiveValue<number>
|
|
55
|
-
colSpan?: ColSpanValue | ResponsiveValue<number>
|
|
56
|
-
rowStart?: number | ResponsiveValue<number>
|
|
57
|
-
rowSpan?: number | ResponsiveValue<number>
|
|
58
|
-
align?: Alignment
|
|
59
|
-
justify?: Alignment
|
|
60
|
-
container?: ContainerSize
|
|
61
|
-
gap?: string
|
|
62
|
-
density?: Density
|
|
63
|
-
z?: number
|
|
64
|
-
layer?: LayerName
|
|
65
|
-
bleed?: BleedDirection
|
|
66
|
-
aspect?: AspectRatio
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
const props = defineProps<Props>()
|
|
70
|
-
|
|
71
|
-
const { as = 'div' } = props
|
|
72
|
-
|
|
73
|
-
// Get preset configuration if preset prop is provided
|
|
74
|
-
const { getPreset } = useGridConfig()
|
|
75
|
-
const presetConfig = computed(() => (props.preset ? getPreset(props.preset) : undefined))
|
|
76
|
-
|
|
77
|
-
// Merge preset values with explicit props (explicit props take precedence)
|
|
78
|
-
const colStart = computed(() => props.colStart ?? presetConfig.value?.colStart)
|
|
79
|
-
const colSpan = computed(() => props.colSpan ?? presetConfig.value?.colSpan ?? 'full')
|
|
80
|
-
const rowStart = computed(() => props.rowStart ?? presetConfig.value?.rowStart)
|
|
81
|
-
const rowSpan = computed(() => props.rowSpan ?? presetConfig.value?.rowSpan ?? 1)
|
|
82
|
-
|
|
83
|
-
// Preset-aware alignment computed refs
|
|
84
|
-
const align = computed(() => props.align ?? presetConfig.value?.align)
|
|
85
|
-
const justify = computed(() => props.justify ?? presetConfig.value?.justify)
|
|
86
|
-
const container = computed(() => props.container ?? presetConfig.value?.container)
|
|
87
|
-
const gap = computed(() => props.gap ?? presetConfig.value?.gap)
|
|
88
|
-
const density = computed(() => props.density ?? presetConfig.value?.density)
|
|
89
|
-
|
|
90
|
-
const layerZIndex: Record<LayerName, number> = {
|
|
91
|
-
back: 0,
|
|
92
|
-
mid: 10,
|
|
93
|
-
front: 20,
|
|
94
|
-
top: 30,
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
const aspectClasses: Record<AspectRatio, string> = {
|
|
98
|
-
'1/1': 'aspect-square',
|
|
99
|
-
'4/3': 'aspect-[4/3]',
|
|
100
|
-
'3/4': 'aspect-[3/4]',
|
|
101
|
-
'16/9': 'aspect-video',
|
|
102
|
-
'9/16': 'aspect-[9/16]',
|
|
103
|
-
'2/1': 'aspect-[2/1]',
|
|
104
|
-
'1/2': 'aspect-[1/2]',
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
const getDefaultValue = <T,>(value: T | ResponsiveValue<T> | undefined, defaultVal: T): T => {
|
|
108
|
-
if (value === undefined) return defaultVal
|
|
109
|
-
if (typeof value === 'object' && value !== null && 'default' in value) {
|
|
110
|
-
return value.default
|
|
4
|
+
// @ts-nocheck
|
|
5
|
+
/**
|
|
6
|
+
* BaseGridItem - Positions content on the Swiss Grid
|
|
7
|
+
*
|
|
8
|
+
* Places content on the parent section's grid using grid-column and grid-row.
|
|
9
|
+
* Supports responsive values, alignment, layering, bleed, and aspect ratios.
|
|
10
|
+
*
|
|
11
|
+
* @prop {string} as - HTML element to render (default: 'div')
|
|
12
|
+
* @prop {number | ResponsiveValue} colStart - Starting column (1-18)
|
|
13
|
+
* @prop {ColSpanValue | ResponsiveValue} colSpan - Columns to span (default: 'full')
|
|
14
|
+
* @prop {number | ResponsiveValue} rowStart - Starting row (1-12)
|
|
15
|
+
* @prop {number | ResponsiveValue} rowSpan - Number of rows to span (default: 1)
|
|
16
|
+
* @prop {Alignment} align - Vertical alignment (align-self): start, center, end, stretch
|
|
17
|
+
* @prop {Alignment} justify - Horizontal alignment (justify-self): start, center, end, stretch
|
|
18
|
+
* @prop {string} container - Content width constraint: content (65ch), wide (90rem), fluid, full
|
|
19
|
+
* @prop {string} gap - Override --grid-gap for nested content (e.g. '1rem', '2rem')
|
|
20
|
+
* @prop {string} density - Vertical rhythm: compact (2px), normal (4px), relaxed (8px)
|
|
21
|
+
* @prop {number} z - Explicit z-index value
|
|
22
|
+
* @prop {LayerName} layer - Semantic layer: back, mid, front, top
|
|
23
|
+
* @prop {BleedDirection} bleed - Edge bleed: left, right, both
|
|
24
|
+
* @prop {AspectRatio} aspect - Aspect ratio: 1/1, 4/3, 3/4, 16/9, 9/16, 2/1, 1/2
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* <BaseGridItem
|
|
28
|
+
* :col-start="{ default: 1, md: 2, lg: 3 }"
|
|
29
|
+
* :col-span="{ default: 6, md: 8, lg: 10 }"
|
|
30
|
+
* align="center"
|
|
31
|
+
* justify="start"
|
|
32
|
+
* layer="front"
|
|
33
|
+
* >
|
|
34
|
+
* <h1>Content</h1>
|
|
35
|
+
* </BaseGridItem>
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
type ColSpanValue = number | 'full'
|
|
39
|
+
type Alignment = 'start' | 'center' | 'end' | 'stretch'
|
|
40
|
+
type LayerName = 'back' | 'mid' | 'front' | 'top'
|
|
41
|
+
type BleedDirection = 'left' | 'right' | 'both'
|
|
42
|
+
type AspectRatio = '1/1' | '4/3' | '3/4' | '16/9' | '9/16' | '2/1' | '1/2'
|
|
43
|
+
|
|
44
|
+
interface ResponsiveValue<T> {
|
|
45
|
+
default: T
|
|
46
|
+
md?: T
|
|
47
|
+
lg?: T
|
|
111
48
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
49
|
+
|
|
50
|
+
type ContainerSize = 'content' | 'wide' | 'fluid' | 'full'
|
|
51
|
+
type Density = 'compact' | 'normal' | 'relaxed'
|
|
52
|
+
|
|
53
|
+
interface Props {
|
|
54
|
+
preset?: string
|
|
55
|
+
as?: string
|
|
56
|
+
colStart?: number | ResponsiveValue<number>
|
|
57
|
+
colSpan?: ColSpanValue | ResponsiveValue<number>
|
|
58
|
+
rowStart?: number | ResponsiveValue<number>
|
|
59
|
+
rowSpan?: number | ResponsiveValue<number>
|
|
60
|
+
align?: Alignment
|
|
61
|
+
justify?: Alignment
|
|
62
|
+
container?: ContainerSize
|
|
63
|
+
gap?: string
|
|
64
|
+
density?: Density
|
|
65
|
+
z?: number
|
|
66
|
+
layer?: LayerName
|
|
67
|
+
bleed?: BleedDirection
|
|
68
|
+
aspect?: AspectRatio
|
|
122
69
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
const
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
const
|
|
130
|
-
const
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
)
|
|
134
|
-
const
|
|
135
|
-
const
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
} else if (colSpanVal === 'full') {
|
|
151
|
-
// 'full' span: use inline gridColumn directly (no CSS var approach needed)
|
|
152
|
-
styles.gridColumn = `${colStartVal ?? 1} / -1`
|
|
153
|
-
// Still set row vars for responsive row support
|
|
154
|
-
styles['--_rs'] = String(rowStartVal ?? 'auto')
|
|
155
|
-
styles['--_re'] = String(rowSpanVal)
|
|
156
|
-
|
|
157
|
-
const mdRowStart = getResponsiveValue(rowStart.value, 'md')
|
|
158
|
-
const lgRowStart = getResponsiveValue(rowStart.value, 'lg')
|
|
159
|
-
const mdRowSpan = getResponsiveValue(rowSpan.value, 'md')
|
|
160
|
-
const lgRowSpan = getResponsiveValue(rowSpan.value, 'lg')
|
|
161
|
-
|
|
162
|
-
if (mdRowStart !== undefined) styles['--_md-rs'] = String(mdRowStart)
|
|
163
|
-
if (lgRowStart !== undefined) styles['--_lg-rs'] = String(lgRowStart)
|
|
164
|
-
if (mdRowSpan !== undefined) styles['--_md-re'] = String(mdRowSpan)
|
|
165
|
-
if (lgRowSpan !== undefined) styles['--_lg-re'] = String(lgRowSpan)
|
|
166
|
-
} else {
|
|
167
|
-
// Set CSS custom properties instead of grid-column/grid-row directly.
|
|
168
|
-
// The <style> block below reads these vars and applies them at each breakpoint,
|
|
169
|
-
// which correctly cascades without inline-style specificity conflicts.
|
|
170
|
-
styles['--_cs'] = String(colStartVal ?? 'auto')
|
|
171
|
-
styles['--_ce'] = String(colSpanVal)
|
|
172
|
-
styles['--_rs'] = String(rowStartVal ?? 'auto')
|
|
173
|
-
styles['--_re'] = String(rowSpanVal)
|
|
174
|
-
|
|
175
|
-
const mdColStart = getResponsiveValue(colStart.value, 'md')
|
|
176
|
-
const lgColStart = getResponsiveValue(colStart.value, 'lg')
|
|
177
|
-
const mdColSpan = getResponsiveValue(colSpan.value as ResponsiveValue<number> | undefined, 'md')
|
|
178
|
-
const lgColSpan = getResponsiveValue(colSpan.value as ResponsiveValue<number> | undefined, 'lg')
|
|
179
|
-
const mdRowStart = getResponsiveValue(rowStart.value, 'md')
|
|
180
|
-
const lgRowStart = getResponsiveValue(rowStart.value, 'lg')
|
|
181
|
-
const mdRowSpan = getResponsiveValue(rowSpan.value, 'md')
|
|
182
|
-
const lgRowSpan = getResponsiveValue(rowSpan.value, 'lg')
|
|
183
|
-
|
|
184
|
-
if (mdColStart !== undefined) styles['--_md-cs'] = String(mdColStart)
|
|
185
|
-
if (lgColStart !== undefined) styles['--_lg-cs'] = String(lgColStart)
|
|
186
|
-
if (mdColSpan !== undefined) styles['--_md-ce'] = String(mdColSpan)
|
|
187
|
-
if (lgColSpan !== undefined) styles['--_lg-ce'] = String(lgColSpan)
|
|
188
|
-
if (mdRowStart !== undefined) styles['--_md-rs'] = String(mdRowStart)
|
|
189
|
-
if (lgRowStart !== undefined) styles['--_lg-rs'] = String(lgRowStart)
|
|
190
|
-
if (mdRowSpan !== undefined) styles['--_md-re'] = String(mdRowSpan)
|
|
191
|
-
if (lgRowSpan !== undefined) styles['--_lg-re'] = String(lgRowSpan)
|
|
70
|
+
|
|
71
|
+
const props = defineProps<Props>()
|
|
72
|
+
|
|
73
|
+
const { as = 'div' } = props
|
|
74
|
+
|
|
75
|
+
// Get preset configuration if preset prop is provided
|
|
76
|
+
const { getPreset } = useGridConfig()
|
|
77
|
+
const presetConfig = computed(() => (props.preset ? getPreset(props.preset) : undefined))
|
|
78
|
+
|
|
79
|
+
// Merge preset values with explicit props (explicit props take precedence)
|
|
80
|
+
const colStart = computed(() => props.colStart ?? presetConfig.value?.colStart)
|
|
81
|
+
const colSpan = computed(() => props.colSpan ?? presetConfig.value?.colSpan ?? 'full')
|
|
82
|
+
const rowStart = computed(() => props.rowStart ?? presetConfig.value?.rowStart)
|
|
83
|
+
const rowSpan = computed(() => props.rowSpan ?? presetConfig.value?.rowSpan ?? 1)
|
|
84
|
+
|
|
85
|
+
// Preset-aware alignment computed refs
|
|
86
|
+
const align = computed(() => props.align ?? presetConfig.value?.align)
|
|
87
|
+
const justify = computed(() => props.justify ?? presetConfig.value?.justify)
|
|
88
|
+
const container = computed(() => props.container ?? presetConfig.value?.container)
|
|
89
|
+
const gap = computed(() => props.gap ?? presetConfig.value?.gap)
|
|
90
|
+
const density = computed(() => props.density ?? presetConfig.value?.density)
|
|
91
|
+
|
|
92
|
+
const layerZIndex: Record<LayerName, number> = {
|
|
93
|
+
back: 0,
|
|
94
|
+
mid: 10,
|
|
95
|
+
front: 20,
|
|
96
|
+
top: 30,
|
|
192
97
|
}
|
|
193
98
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
99
|
+
const aspectClasses: Record<AspectRatio, string> = {
|
|
100
|
+
'1/1': 'aspect-square',
|
|
101
|
+
'4/3': 'aspect-[4/3]',
|
|
102
|
+
'3/4': 'aspect-[3/4]',
|
|
103
|
+
'16/9': 'aspect-video',
|
|
104
|
+
'9/16': 'aspect-[9/16]',
|
|
105
|
+
'2/1': 'aspect-[2/1]',
|
|
106
|
+
'1/2': 'aspect-[1/2]',
|
|
200
107
|
}
|
|
201
108
|
|
|
202
|
-
|
|
203
|
-
|
|
109
|
+
const getDefaultValue = <T,>(value: T | ResponsiveValue<T> | undefined, defaultVal: T): T => {
|
|
110
|
+
if (value === undefined) return defaultVal
|
|
111
|
+
if (typeof value === 'object' && value !== null && 'default' in value) {
|
|
112
|
+
return value.default
|
|
113
|
+
}
|
|
114
|
+
return value as T
|
|
115
|
+
}
|
|
204
116
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
117
|
+
const getResponsiveValue = <T,>(
|
|
118
|
+
value: T | ResponsiveValue<T> | undefined,
|
|
119
|
+
breakpoint: 'md' | 'lg'
|
|
120
|
+
): T | undefined => {
|
|
121
|
+
if (value === undefined) return undefined
|
|
122
|
+
if (typeof value === 'object' && value !== null && 'default' in value) {
|
|
123
|
+
return value[breakpoint]
|
|
211
124
|
}
|
|
212
|
-
|
|
125
|
+
return undefined
|
|
213
126
|
}
|
|
214
127
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
128
|
+
const style = computed(() => {
|
|
129
|
+
const styles: Record<string, string> = {}
|
|
130
|
+
|
|
131
|
+
const colStartVal = getDefaultValue(colStart.value, undefined)
|
|
132
|
+
const colSpanVal = getDefaultValue(
|
|
133
|
+
colSpan.value as ColSpanValue | ResponsiveValue<number> | undefined,
|
|
134
|
+
'full' as ColSpanValue
|
|
135
|
+
)
|
|
136
|
+
const rowStartVal = getDefaultValue(rowStart.value, undefined)
|
|
137
|
+
const rowSpanVal = getDefaultValue(rowSpan.value, 1)
|
|
138
|
+
|
|
139
|
+
if (props.bleed) {
|
|
140
|
+
if (props.bleed === 'both') {
|
|
141
|
+
styles.gridColumn = '1 / -1'
|
|
142
|
+
styles.marginInline = 'calc(-1 * var(--grid-padding))'
|
|
143
|
+
} else if (props.bleed === 'left') {
|
|
144
|
+
const spanNum = typeof colSpanVal === 'number' ? colSpanVal : undefined
|
|
145
|
+
styles.gridColumn = spanNum ? `1 / span ${spanNum}` : '1 / -1'
|
|
146
|
+
styles.marginInlineStart = 'calc(-1 * var(--grid-padding))'
|
|
147
|
+
} else if (props.bleed === 'right') {
|
|
148
|
+
styles.gridColumn = `${colStartVal ?? 'auto'} / -1`
|
|
149
|
+
styles.marginInlineEnd = 'calc(-1 * var(--grid-padding))'
|
|
150
|
+
}
|
|
151
|
+
styles.gridRow = `${rowStartVal ?? 'auto'} / span ${rowSpanVal}`
|
|
152
|
+
} else if (colSpanVal === 'full') {
|
|
153
|
+
// 'full' span: use inline gridColumn directly (no CSS var approach needed)
|
|
154
|
+
styles.gridColumn = `${colStartVal ?? 1} / -1`
|
|
155
|
+
// Still set row vars for responsive row support
|
|
156
|
+
styles['--_rs'] = String(rowStartVal ?? 'auto')
|
|
157
|
+
styles['--_re'] = String(rowSpanVal)
|
|
158
|
+
|
|
159
|
+
const mdRowStart = getResponsiveValue(rowStart.value, 'md')
|
|
160
|
+
const lgRowStart = getResponsiveValue(rowStart.value, 'lg')
|
|
161
|
+
const mdRowSpan = getResponsiveValue(rowSpan.value, 'md')
|
|
162
|
+
const lgRowSpan = getResponsiveValue(rowSpan.value, 'lg')
|
|
163
|
+
|
|
164
|
+
if (mdRowStart !== undefined) styles['--_md-rs'] = String(mdRowStart)
|
|
165
|
+
if (lgRowStart !== undefined) styles['--_lg-rs'] = String(lgRowStart)
|
|
166
|
+
if (mdRowSpan !== undefined) styles['--_md-re'] = String(mdRowSpan)
|
|
167
|
+
if (lgRowSpan !== undefined) styles['--_lg-re'] = String(lgRowSpan)
|
|
168
|
+
} else {
|
|
169
|
+
// Set CSS custom properties instead of grid-column/grid-row directly.
|
|
170
|
+
// The <style> block below reads these vars and applies them at each breakpoint,
|
|
171
|
+
// which correctly cascades without inline-style specificity conflicts.
|
|
172
|
+
styles['--_cs'] = String(colStartVal ?? 'auto')
|
|
173
|
+
styles['--_ce'] = String(colSpanVal)
|
|
174
|
+
styles['--_rs'] = String(rowStartVal ?? 'auto')
|
|
175
|
+
styles['--_re'] = String(rowSpanVal)
|
|
176
|
+
|
|
177
|
+
const mdColStart = getResponsiveValue(colStart.value, 'md')
|
|
178
|
+
const lgColStart = getResponsiveValue(colStart.value, 'lg')
|
|
179
|
+
const mdColSpan = getResponsiveValue(
|
|
180
|
+
colSpan.value as ResponsiveValue<number> | undefined,
|
|
181
|
+
'md'
|
|
182
|
+
)
|
|
183
|
+
const lgColSpan = getResponsiveValue(
|
|
184
|
+
colSpan.value as ResponsiveValue<number> | undefined,
|
|
185
|
+
'lg'
|
|
186
|
+
)
|
|
187
|
+
const mdRowStart = getResponsiveValue(rowStart.value, 'md')
|
|
188
|
+
const lgRowStart = getResponsiveValue(rowStart.value, 'lg')
|
|
189
|
+
const mdRowSpan = getResponsiveValue(rowSpan.value, 'md')
|
|
190
|
+
const lgRowSpan = getResponsiveValue(rowSpan.value, 'lg')
|
|
191
|
+
|
|
192
|
+
if (mdColStart !== undefined) styles['--_md-cs'] = String(mdColStart)
|
|
193
|
+
if (lgColStart !== undefined) styles['--_lg-cs'] = String(lgColStart)
|
|
194
|
+
if (mdColSpan !== undefined) styles['--_md-ce'] = String(mdColSpan)
|
|
195
|
+
if (lgColSpan !== undefined) styles['--_lg-ce'] = String(lgColSpan)
|
|
196
|
+
if (mdRowStart !== undefined) styles['--_md-rs'] = String(mdRowStart)
|
|
197
|
+
if (lgRowStart !== undefined) styles['--_lg-rs'] = String(lgRowStart)
|
|
198
|
+
if (mdRowSpan !== undefined) styles['--_md-re'] = String(mdRowSpan)
|
|
199
|
+
if (lgRowSpan !== undefined) styles['--_lg-re'] = String(lgRowSpan)
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
// Content alignment
|
|
203
|
+
if (align.value || justify.value) {
|
|
204
|
+
styles.display = 'grid'
|
|
205
|
+
styles.width = '100%'
|
|
206
|
+
styles.height = '100%'
|
|
207
|
+
styles.placeItems = `${align.value ?? 'stretch'} ${justify.value ?? 'stretch'}`
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
// Gap override — cascades to nested content via --grid-gap
|
|
211
|
+
if (gap.value) styles['--grid-gap'] = gap.value
|
|
212
|
+
|
|
213
|
+
// Density — sets --rhythm base unit for child spacing utilities
|
|
214
|
+
if (density.value) {
|
|
215
|
+
const rhythmMap: Record<Density, string> = {
|
|
216
|
+
compact: '0.125rem',
|
|
217
|
+
normal: '0.25rem',
|
|
218
|
+
relaxed: '0.5rem',
|
|
219
|
+
}
|
|
220
|
+
styles['--rhythm'] = rhythmMap[density.value]
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
// Z-index
|
|
224
|
+
const zIndex = props.z ?? (props.layer ? layerZIndex[props.layer] : undefined)
|
|
225
|
+
if (zIndex !== undefined) styles.zIndex = String(zIndex)
|
|
218
226
|
|
|
219
|
-
|
|
220
|
-
})
|
|
227
|
+
return styles
|
|
228
|
+
})
|
|
221
229
|
|
|
222
|
-
const classes = computed(() => {
|
|
223
|
-
|
|
230
|
+
const classes = computed(() => {
|
|
231
|
+
const classList: string[] = ['gi-placed', '@container', '@container/item']
|
|
224
232
|
|
|
225
|
-
|
|
226
|
-
|
|
233
|
+
if (props.aspect) classList.push(aspectClasses[props.aspect])
|
|
234
|
+
if (container.value) classList.push(`layout-container-${container.value}`)
|
|
227
235
|
|
|
228
|
-
|
|
229
|
-
})
|
|
236
|
+
return classList.join(' ')
|
|
237
|
+
})
|
|
230
238
|
</script>
|
|
231
239
|
|
|
232
240
|
<template>
|
|
@@ -236,25 +244,25 @@ const classes = computed(() => {
|
|
|
236
244
|
</template>
|
|
237
245
|
|
|
238
246
|
<style>
|
|
239
|
-
/* stylelint-disable custom-property-pattern */
|
|
240
|
-
.gi-placed {
|
|
241
|
-
grid-row: var(--_rs, auto) / span var(--_re, 1);
|
|
242
|
-
grid-column: var(--_cs, auto) / span var(--_ce, 1);
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
@media (width >= 48rem) {
|
|
247
|
+
/* stylelint-disable custom-property-pattern */
|
|
246
248
|
.gi-placed {
|
|
247
|
-
grid-row: var(--
|
|
248
|
-
grid-column: var(--
|
|
249
|
+
grid-row: var(--_rs, auto) / span var(--_re, 1);
|
|
250
|
+
grid-column: var(--_cs, auto) / span var(--_ce, 1);
|
|
249
251
|
}
|
|
250
|
-
}
|
|
251
252
|
|
|
252
|
-
@media (width >=
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
var(--
|
|
256
|
-
|
|
257
|
-
|
|
253
|
+
@media (width >= 48rem) {
|
|
254
|
+
.gi-placed {
|
|
255
|
+
grid-row: var(--_md-rs, var(--_rs, auto)) / span var(--_md-re, var(--_re, 1));
|
|
256
|
+
grid-column: var(--_md-cs, var(--_cs, auto)) / span var(--_md-ce, var(--_ce, 1));
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
@media (width >= 80rem) {
|
|
261
|
+
.gi-placed {
|
|
262
|
+
grid-row: var(--_lg-rs, var(--_md-rs, var(--_rs, auto))) / span
|
|
263
|
+
var(--_lg-re, var(--_md-re, var(--_re, 1)));
|
|
264
|
+
grid-column: var(--_lg-cs, var(--_md-cs, var(--_cs, auto))) / span
|
|
265
|
+
var(--_lg-ce, var(--_md-ce, var(--_ce, 1)));
|
|
266
|
+
}
|
|
258
267
|
}
|
|
259
|
-
}
|
|
260
268
|
</style>
|
|
@@ -1,36 +1,40 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
2
|
+
/**
|
|
3
|
+
* LayoutMain — grid root container applying the `mastmain` utility.
|
|
4
|
+
*
|
|
5
|
+
* Use this component when you need an explicit wrapper element that owns the
|
|
6
|
+
* Swiss Grid stacking context. The default layout can use it in place of a
|
|
7
|
+
* raw `<main class="mastmain">`.
|
|
8
|
+
*
|
|
9
|
+
* When `mode` is `'disabled'`, falls back to a plain semantic `<main>` so the
|
|
10
|
+
* page renders correctly without grid dependencies.
|
|
11
|
+
*
|
|
12
|
+
* @prop {string} tag — HTML element to render (default: 'main')
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* <LayoutMain>
|
|
16
|
+
* <LayoutSection>…</LayoutSection>
|
|
17
|
+
* </LayoutMain>
|
|
18
|
+
*/
|
|
19
19
|
|
|
20
|
-
interface Props {
|
|
21
|
-
|
|
22
|
-
}
|
|
20
|
+
interface Props {
|
|
21
|
+
tag?: string
|
|
22
|
+
}
|
|
23
23
|
|
|
24
|
-
const { tag = 'main' } = defineProps<Props>()
|
|
24
|
+
const { tag = 'main' } = defineProps<Props>()
|
|
25
25
|
|
|
26
|
-
const { mode } = useGridConfig()
|
|
26
|
+
const { mode } = useGridConfig()
|
|
27
27
|
</script>
|
|
28
28
|
|
|
29
29
|
<template>
|
|
30
30
|
<component
|
|
31
31
|
:is="tag"
|
|
32
32
|
:class="mode !== 'disabled' ? 'mastmain' : undefined"
|
|
33
|
-
:style="
|
|
33
|
+
:style="
|
|
34
|
+
mode !== 'disabled'
|
|
35
|
+
? { paddingInline: 'var(--grid-padding, clamp(1rem, 2.5vw, 2rem))' }
|
|
36
|
+
: undefined
|
|
37
|
+
"
|
|
34
38
|
>
|
|
35
39
|
<slot />
|
|
36
40
|
</component>
|