From ec3afcdb8b79e75ab475c0681dabe5cf041b36b6 Mon Sep 17 00:00:00 2001 From: Steven John Date: Thu, 18 Jan 2024 16:39:46 +0530 Subject: [PATCH] fix(directives): fix locations for baked --- playground/app.vue | 1 + src/functions/use-animate-on-scroll/directive.ts | 2 +- src/functions/use-gsap/directive.ts | 6 ++++-- src/functions/use-split-text-animation/directive.ts | 2 +- src/utils/baked/index.ts | 1 + 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/playground/app.vue b/playground/app.vue index 232a807..d9d7308 100644 --- a/playground/app.vue +++ b/playground/app.vue @@ -85,6 +85,7 @@ const onAfterEnter = async () => { v-aos="{ baked: true, options: { + scrollAnimationOptions: { start: 'top 60%' }, animationOptions: { opacity: true, translate: true, diff --git a/src/functions/use-animate-on-scroll/directive.ts b/src/functions/use-animate-on-scroll/directive.ts index da86a0f..5895a2a 100644 --- a/src/functions/use-animate-on-scroll/directive.ts +++ b/src/functions/use-animate-on-scroll/directive.ts @@ -1,5 +1,5 @@ import { useAnimateOnScroll, useBakedAnimateOnScroll } from "."; -import { defineDirective } from "../baked/directive"; +import { defineDirective } from "../../utils/baked"; export const vAos = defineDirective({ fn: useAnimateOnScroll, diff --git a/src/functions/use-gsap/directive.ts b/src/functions/use-gsap/directive.ts index f94543d..9078633 100644 --- a/src/functions/use-gsap/directive.ts +++ b/src/functions/use-gsap/directive.ts @@ -1,8 +1,10 @@ import { useGsap, useBakedFromTo, type UseGsapReturn } from "."; import { directiveHooks } from "@vueuse/core"; import type { ObjectDirective } from "nuxt/dist/app/compat/capi"; -import type { DirectiveOptions } from "../baked/directive"; -import type { UseBakedAnimationOptions } from "../baked/types"; +import type { + DirectiveOptions, + UseBakedAnimationOptions, +} from "../../utils/baked"; export const vFromTo: ObjectDirective< HTMLElement, diff --git a/src/functions/use-split-text-animation/directive.ts b/src/functions/use-split-text-animation/directive.ts index f148063..e390b00 100644 --- a/src/functions/use-split-text-animation/directive.ts +++ b/src/functions/use-split-text-animation/directive.ts @@ -1,5 +1,5 @@ import { useSplitTextAnimation, useBakedSplitTextAnimation } from "."; -import { defineDirective } from "../baked/directive"; +import { defineDirective } from "../../utils/baked"; export const vSplitAnimate = defineDirective({ fn: useSplitTextAnimation, diff --git a/src/utils/baked/index.ts b/src/utils/baked/index.ts index 566b218..c2563f5 100644 --- a/src/utils/baked/index.ts +++ b/src/utils/baked/index.ts @@ -1,2 +1,3 @@ +export * from "./directive"; export * from "./utils"; export * from "./presets";