deja-vue 1.0.1 → 2.0.1

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.
Files changed (4) hide show
  1. package/README.md +40 -12
  2. package/dist/index.d.ts +505 -105
  3. package/dist/index.js +699 -205
  4. package/package.json +22 -27
package/dist/index.d.ts CHANGED
@@ -1,120 +1,350 @@
1
- import * as _$vue from "vue";
2
- import { InjectionKey, MaybeRefOrGetter, ShallowRef } from "vue";
1
+ import { Component, ComputedRef, InjectionKey, MaybeRef, MaybeRefOrGetter, ModelRef, Reactive, Ref, ShallowRef, ShallowUnwrapRef, WatchOptions } from "vue";
2
+ import { NodeRef } from "vue-unwrap";
3
+ import { SplitText } from "gsap/SplitText";
3
4
 
4
- //#region src/constants.d.ts
5
- declare const ANIMATION_EVENTS: readonly ["complete", "interrupt", "repeat", "reverseComplete", "start", "update"];
6
- declare const parentAnimationInjectionKey: InjectionKey<Animation>;
7
- //#endregion
8
- //#region src/utils/EventBus.d.ts
9
- declare class EventBus<E extends string> {
5
+ //#region src/core/EventBus.d.ts
6
+ declare class EventBus<E extends string, A extends unknown[] = []> {
10
7
  private bus;
11
8
  constructor(events?: E[]);
12
- on(event: E | E[], callback: CallableFunction): void;
13
- once(event: E | E[], callback: CallableFunction): void;
14
- off(event: E | E[], callback: CallableFunction): void;
15
- dispatch(event: E, ...args: any[]): void;
9
+ on(event: E | E[], callback: (...args: A) => void): void;
10
+ once(event: E | E[], callback: (...args: A) => void): void;
11
+ off(event: E | E[], callback: (...args: A) => void): void;
12
+ dispatch(event: E, ...args: A): void;
16
13
  dispose(): void;
17
14
  }
18
15
  //#endregion
19
- //#region src/utils/Animation.d.ts
20
- declare class Animation extends EventBus<typeof ANIMATION_EVENTS[number]> {
16
+ //#region src/core/Animation.d.ts
17
+ declare class Animation extends EventBus<AnimationEvent, [animation: Animation]> {
18
+ private ctx?;
19
+ private scrollTrigger?;
21
20
  timeline: gsap.core.Timeline;
22
21
  constructor(options?: gsap.TimelineVars);
23
- add(child: Animation | gsap.Callback | string, position?: gsap.Position): void;
24
- remove(child: Animation | gsap.Callback | string): void;
25
- compose(target: HTMLElement | HTMLCollection, definition: TweenAnimationDefinition | TweenAnimationDefinition[]): void;
22
+ attachScrollTrigger(vars: ScrollTrigger.Vars | null | undefined): void;
23
+ compose(definition: AnimationComposeDefinition, withContext?: boolean): void;
24
+ add(child: AnimationChild, position?: gsap.Position, timeShift?: boolean): void;
25
+ remove(child: AnimationChild, force?: boolean): void;
26
+ getChildPosition(child: AnimationChild): number | undefined;
27
+ run(action?: TweenAction, ...args: any[]): void;
28
+ clear(revert?: boolean): void;
26
29
  dispose(): void;
30
+ private handleScrollTriggerReset;
27
31
  }
28
32
  //#endregion
29
33
  //#region src/types.d.ts
30
- interface ControllableAnimation {
31
- progress?: number;
32
- toggle?: boolean | undefined;
34
+ type NonEmptyArray<T> = [T, ...T[]];
35
+ type PlainObject<T> = [T] extends [readonly unknown[]] ? never : T;
36
+ type DejaVueNode = NodeRef | ShallowUnwrapRef<DejaVueComponent>;
37
+ interface DejaVueComponent {
38
+ $el: ShallowRef<Element | null>;
39
+ seamless?: MaybeRef<boolean | undefined>;
40
+ tweenTarget: ComputedRef<gsap.TweenTarget>;
33
41
  }
34
- interface NestableAnimation {
35
- parent?: Animation | null;
36
- position?: gsap.Position;
42
+ interface DejaVueAnimationInstance extends DejaVueComponent {
43
+ animation: Animation;
44
+ controlled: boolean;
45
+ direction: Ref<AnimationDirection>;
46
+ parent: DejaVueAnimationParent | null;
47
+ progress: ModelRef<ControllableAnimation['progress']>;
37
48
  }
38
- interface WrappableAnimation {
39
- group?: boolean;
40
- tag?: string;
49
+ interface DejaVueAnimationComponentProps {
50
+ seamless?: boolean;
51
+ tweenTarget?: 'children' | 'self' | gsap.TweenTarget;
41
52
  }
42
- type BaseAnimation = ControllableAnimation & NestableAnimation & WrappableAnimation;
43
- type TimelineAnimation = BaseAnimation & {
44
- duration?: number;
45
- options?: gsap.TimelineVars;
46
- tweens?: TweenAnimationDefinition[];
47
- };
48
- type TweenAnimationDefinition = ({
53
+ type DejaVueAnimationExposed = ShallowUnwrapRef<DejaVueAnimationInstance>;
54
+ type DejaVueAnimationParent = DejaVueAnimationInstance | DejaVueAnimationExposed;
55
+ type DejaVueAnimationScopeProps = Pick<DejaVueAnimationExposed, 'animation' | 'direction' | 'parent' | 'progress'>;
56
+ type AnimationChild = Animation | gsap.Callback | string;
57
+ type AnimationComposeDefinition = {
58
+ scope?: Element;
59
+ target: gsap.TweenTarget;
60
+ } & ({
61
+ method: 'fromTo';
62
+ vars: [gsap.TweenVars, gsap.TweenVars];
63
+ } | {
49
64
  method: 'from' | 'to';
50
65
  vars: gsap.TweenVars;
51
66
  } | {
52
- method: 'fromTo';
53
- vars: [gsap.TweenVars, gsap.TweenVars];
67
+ method: string;
68
+ vars: Record<string, unknown>;
69
+ });
70
+ type AnimationDirection = 1 | -1 | 0;
71
+ type AnimationEvent = 'complete' | 'interrupt' | 'repeat' | 'reverseComplete' | 'start' | 'update';
72
+ type AnimationEventEmitter = (e: AnimationEvent, animation: Animation, parent: DejaVueAnimationParent | null) => void;
73
+ interface AnimationNestableChild {
74
+ parent?: DejaVueAnimationParent | null;
75
+ position?: gsap.Position;
76
+ }
77
+ interface AnimationTriggerOptions extends WatchOptions {
78
+ actionArgs?: any[];
79
+ }
80
+ type ControllableAnimation = {
81
+ progress?: number;
82
+ } & ({
83
+ trigger?: unknown;
84
+ triggerAction?: TweenAction;
85
+ triggerOptions?: AnimationTriggerOptions;
86
+ } | {
87
+ trigger?: never;
88
+ triggerAction?: never;
89
+ triggerOptions?: never;
90
+ });
91
+ type TweenAction = 'play' | 'pause' | 'reset' | 'restart' | 'resume' | 'reverse';
92
+ type TweenDefinition = ({
93
+ from: gsap.TweenVars;
94
+ to: gsap.TweenVars;
95
+ effect?: never;
96
+ effectOptions?: never;
97
+ } | {
98
+ from: gsap.TweenVars;
99
+ to?: never;
100
+ effect?: never;
101
+ effectOptions?: never;
54
102
  } | {
55
- method: `effect:${string}`;
56
- vars?: object;
57
- }) & Pick<NestableAnimation, 'position'>;
58
- type TweenAnimation = BaseAnimation & TweenAnimationDefinition;
103
+ from?: never;
104
+ to: gsap.TweenVars;
105
+ effect?: never;
106
+ effectOptions?: never;
107
+ } | {
108
+ from?: never;
109
+ to?: never;
110
+ effect?: string;
111
+ effectOptions?: gsap.TweenVars;
112
+ });
113
+ interface WrappableComponent {
114
+ is?: string | Component;
115
+ }
116
+ //#endregion
117
+ //#region src/components/Marker.types.d.ts
118
+ interface DejaVueMarkerInstance {
119
+ crossed: Ref<boolean>;
120
+ parent: DejaVueAnimationParent | null;
121
+ }
122
+ type DejaVueMarkerExposed = ShallowUnwrapRef<DejaVueMarkerInstance>;
123
+ type DejaVueMarkerScopeProps = Pick<DejaVueMarkerExposed, 'crossed' | 'parent'>;
124
+ //#endregion
125
+ //#region src/components/SplitText.types.d.ts
126
+ interface DejaVueSplitTextScopeProps {
127
+ chars: Element[];
128
+ words: Element[];
129
+ lines: Element[];
130
+ }
131
+ type DejaVueSplitTextInstance = DejaVueComponent & { [K in keyof DejaVueSplitTextScopeProps]: Ref<DejaVueSplitTextScopeProps[K]> };
132
+ type DejaVueSplitTextExposed = ShallowUnwrapRef<DejaVueSplitTextInstance>;
133
+ //#endregion
134
+ //#region src/constants.d.ts
135
+ declare const ANIMATION_EVENTS: AnimationEvent[];
136
+ declare const dejaVueParentInstance: InjectionKey<DejaVueAnimationInstance>;
137
+ //#endregion
138
+ //#region src/utils/index.d.ts
139
+ declare function cloneObject<T extends object>(target: T): T;
140
+ declare function isObject(value: unknown): value is Record<string, unknown>;
141
+ declare function patchArray(target: unknown[], changes: unknown[]): void;
142
+ declare function patchObject<T extends object>(target: T, changes: T): void;
143
+ declare function syncData(target: unknown, changes: unknown): boolean;
144
+ declare function toNonEmptyArray<T = unknown>(data: T[]): NonEmptyArray<T> | null;
145
+ //#endregion
146
+ //#region src/utils/gsap.d.ts
147
+ declare function applyTimelineTotalDuration(timeline: gsap.core.Timeline): void;
148
+ declare function getScrollTriggerToggleActionByEvent(event: 'enter' | 'enterBack' | 'leave' | 'leaveBack', instance?: ScrollTrigger): string | undefined;
149
+ declare function isEmptyTarget(target: gsap.TweenTarget): boolean;
150
+ declare function resolveTimelinePosition(timeline: gsap.core.Timeline, position?: gsap.Position): number | null;
151
+ declare function stripScrollTriggerVars(vars: gsap.AnimationVars, defaultTrigger?: gsap.DOMTarget): ScrollTrigger.Vars | null;
59
152
  //#endregion
60
- //#region src/components/Callback.vue.d.ts
61
- type __VLS_Props$1 = NestableAnimation & {
62
- fn: () => void;
153
+ //#region src/composables/useAnimationControls.d.ts
154
+ interface AnimationControls {
155
+ progress: ModelRef<number | undefined>;
156
+ trigger: MaybeRefOrGetter<unknown>;
157
+ triggerAction: MaybeRefOrGetter<TweenAction | undefined>;
158
+ triggerOptions: MaybeRefOrGetter<AnimationTriggerOptions | undefined>;
159
+ }
160
+ declare function useAnimationControls(animation: Animation, controls: AnimationControls): {
161
+ controlled: boolean;
162
+ direction: import("vue").Ref<AnimationDirection, AnimationDirection>;
63
163
  };
64
- declare const __VLS_export$3: _$vue.DefineComponent<__VLS_Props$1, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<__VLS_Props$1> & Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
164
+ //#endregion
165
+ //#region src/composables/useAnimationNesting.d.ts
166
+ interface AnimationNestingOptions {
167
+ parent?: DejaVueAnimationParent | null;
168
+ position?: MaybeRefOrGetter<gsap.Position | undefined>;
169
+ }
170
+ type AnimationNestingTarget = ({
171
+ animation: Animation;
172
+ } | {
173
+ callback: gsap.Callback;
174
+ } | {
175
+ label: MaybeRefOrGetter<string | undefined>;
176
+ });
177
+ declare function useAnimationNesting(target?: AnimationNestingTarget | AnimationNestingTarget[], options?: AnimationNestingOptions): {
178
+ parent: DejaVueAnimationParent | null;
179
+ };
180
+ //#endregion
181
+ //#region src/composables/useAnimationScope.d.ts
182
+ interface AnimationScopeOptions {
183
+ resolveChildrenTweenTarget?: (children: DejaVueNode[]) => Element[];
184
+ tweenTarget?: MaybeRefOrGetter<gsap.TweenTarget | undefined>;
185
+ }
186
+ declare function resolveChildrenTweenTarget(children: DejaVueNode[]): Element[];
187
+ declare function useAnimationScope(options?: AnimationScopeOptions): {
188
+ AnimationScope: {
189
+ (props: DejaVueAnimationScopeProps, context: import("vue").SetupContext): import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
190
+ [key: string]: any;
191
+ }> | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
192
+ [key: string]: any;
193
+ }>[];
194
+ inheritAttrs: boolean;
195
+ props: {
196
+ [x: string]: any;
197
+ };
198
+ };
199
+ root: import("vue").ShallowRef<Element | null, Element | null>;
200
+ tweenTarget: import("vue").ComputedRef<object | null>;
201
+ };
202
+ //#endregion
203
+ //#region src/composables/useSplitText.d.ts
204
+ interface SplitTextOptions {
205
+ type?: string;
206
+ mask?: 'lines' | 'words' | 'chars';
207
+ wordDelimiter?: string | RegExp | SplitText.WordDelimiterConfig;
208
+ linesClass?: string;
209
+ wordsClass?: string;
210
+ charsClass?: string;
211
+ aria?: 'auto' | 'hidden' | 'none';
212
+ tag?: string;
213
+ propIndex?: boolean;
214
+ deepSlice?: boolean;
215
+ smartWrap?: boolean;
216
+ specialChars?: string[] | RegExp;
217
+ reduceWhiteSpace?: boolean;
218
+ autoSplit?: boolean;
219
+ ignore?: SplitText.SplitTextTarget;
220
+ prepareText?: SplitText.PrepareTextFunction;
221
+ onSplit?: (splitText: SplitText) => void;
222
+ onRevert?: (splitText: SplitText) => void;
223
+ overwrite?: boolean;
224
+ }
225
+ declare function useSplitText(domTarget: MaybeRefOrGetter<gsap.DOMTarget>, options: MaybeRefOrGetter<SplitTextOptions>): {
226
+ chars: import("vue").Ref<Element[], Element[]>;
227
+ lines: import("vue").Ref<Element[], Element[]>;
228
+ words: import("vue").Ref<Element[], Element[]>;
229
+ instance: import("vue").ShallowRef<SplitText | undefined, SplitText | undefined>;
230
+ state: import("vue").ShallowReactive<{
231
+ chars: Element[];
232
+ lines: Element[];
233
+ words: Element[];
234
+ }>;
235
+ };
236
+ //#endregion
237
+ //#region src/composables/useStableObjectProp.d.ts
238
+ declare function useStableObjectProp<T extends object>(objectProp: MaybeRefOrGetter<PlainObject<T> | null | undefined>, watchOptions?: WatchOptions): Reactive<T>;
239
+ //#endregion
240
+ //#region src/composables/useTweenVars.d.ts
241
+ declare function useTweenVars(definition: TweenDefinition): {
242
+ method: import("vue").ComputedRef<string>;
243
+ vars: import("vue").ComputedRef<gsap.TweenVars | [gsap.TweenVars, gsap.TweenVars]>;
244
+ };
245
+ //#endregion
246
+ //#region src/components/Marker.vue.d.ts
247
+ type __VLS_Props$1 = AnimationNestableChild & {
248
+ label?: string;
249
+ };
250
+ type __VLS_Slots$3 = {
251
+ default(props: DejaVueMarkerScopeProps): any;
252
+ };
253
+ declare const __VLS_base$3: import("vue").DefineComponent<__VLS_Props$1, DejaVueMarkerInstance, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
254
+ cross: (direction: AnimationDirection) => any;
255
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props$1> & Readonly<{
256
+ onCross?: ((direction: AnimationDirection) => any) | undefined;
257
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
258
+ declare const __VLS_export$3: __VLS_WithSlots$3<typeof __VLS_base$3, __VLS_Slots$3>;
65
259
  declare const _default: typeof __VLS_export$3;
260
+ type __VLS_WithSlots$3<T, S> = T & {
261
+ new (): {
262
+ $slots: S;
263
+ };
264
+ };
66
265
  //#endregion
67
- //#region src/components/PositionMarker.vue.d.ts
68
- type __VLS_Props = NestableAnimation & {
69
- label: string;
266
+ //#region src/components/SplitText.vue.d.ts
267
+ type __VLS_Props = SplitTextOptions & {
268
+ tweenTarget?: 'lines' | 'words' | 'chars';
269
+ };
270
+ type __VLS_Slots$2 = {
271
+ default(props: DejaVueSplitTextScopeProps): any;
70
272
  };
71
- declare const __VLS_export$2: _$vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
72
- cross: (...args: any[]) => void;
73
- }, string, _$vue.PublicProps, Readonly<__VLS_Props> & Readonly<{
74
- onCross?: ((...args: any[]) => any) | undefined;
75
- }>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
273
+ declare const __VLS_base$2: import("vue").DefineComponent<__VLS_Props, DejaVueSplitTextInstance, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
274
+ revert: (splitText: SplitText) => any;
275
+ split: (splitText: SplitText) => any;
276
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
277
+ onRevert?: ((splitText: SplitText) => any) | undefined;
278
+ onSplit?: ((splitText: SplitText) => any) | undefined;
279
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
280
+ declare const __VLS_export$2: __VLS_WithSlots$2<typeof __VLS_base$2, __VLS_Slots$2>;
76
281
  declare const _default$1: typeof __VLS_export$2;
282
+ type __VLS_WithSlots$2<T, S> = T & {
283
+ new (): {
284
+ $slots: S;
285
+ };
286
+ };
77
287
  //#endregion
78
288
  //#region src/components/Timeline.vue.d.ts
79
- declare var __VLS_9$1: {
80
- animation: Animation;
81
- controlled: boolean;
82
- parent: Animation | null;
83
- progress: number;
84
- }, __VLS_11: {
85
- animation: Animation;
86
- controlled: boolean;
87
- parent: Animation | null;
88
- progress: number;
89
- };
90
- type __VLS_Slots$1 = {} & {
91
- default?: (props: typeof __VLS_9$1) => any;
92
- } & {
93
- default?: (props: typeof __VLS_11) => any;
289
+ type __VLS_Slots$1 = {
290
+ default(props: DejaVueAnimationScopeProps): any;
94
291
  };
95
- declare const __VLS_base$1: _$vue.DefineComponent<TimelineAnimation, {
96
- animation: Animation;
97
- controlled: _$vue.ComputedRef<boolean>;
98
- parent: Animation | null;
99
- progress: _$vue.ShallowRef<number, number>;
100
- }, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
292
+ type __VLS_ModelProps$1 = {
293
+ 'progress'?: number;
294
+ };
295
+ declare const __VLS_base$1: import("vue").DefineComponent<(DejaVueAnimationComponentProps & AnimationNestableChild & {
296
+ progress?: number;
297
+ } & {
298
+ trigger?: unknown;
299
+ triggerAction?: TweenAction;
300
+ triggerOptions?: AnimationTriggerOptions;
301
+ } & {
302
+ duration?: number;
303
+ options?: gsap.TimelineVars;
304
+ } & __VLS_ModelProps$1) | (DejaVueAnimationComponentProps & AnimationNestableChild & {
305
+ progress?: number;
306
+ } & {
307
+ trigger?: never;
308
+ triggerAction?: never;
309
+ triggerOptions?: never;
310
+ } & {
311
+ duration?: number;
312
+ options?: gsap.TimelineVars;
313
+ } & __VLS_ModelProps$1), DejaVueAnimationInstance, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
101
314
  complete: (...args: any[]) => void;
102
315
  interrupt: (...args: any[]) => void;
103
316
  repeat: (...args: any[]) => void;
104
317
  reverseComplete: (...args: any[]) => void;
105
318
  start: (...args: any[]) => void;
106
319
  update: (...args: any[]) => void;
107
- }, string, _$vue.PublicProps, Readonly<TimelineAnimation> & Readonly<{
320
+ "update:progress": (value: number) => void;
321
+ }, string, import("vue").PublicProps, Readonly<(DejaVueAnimationComponentProps & AnimationNestableChild & {
322
+ progress?: number;
323
+ } & {
324
+ trigger?: unknown;
325
+ triggerAction?: TweenAction;
326
+ triggerOptions?: AnimationTriggerOptions;
327
+ } & {
328
+ duration?: number;
329
+ options?: gsap.TimelineVars;
330
+ } & __VLS_ModelProps$1) | (DejaVueAnimationComponentProps & AnimationNestableChild & {
331
+ progress?: number;
332
+ } & {
333
+ trigger?: never;
334
+ triggerAction?: never;
335
+ triggerOptions?: never;
336
+ } & {
337
+ duration?: number;
338
+ options?: gsap.TimelineVars;
339
+ } & __VLS_ModelProps$1)> & Readonly<{
340
+ "onUpdate:progress"?: ((value: number) => any) | undefined;
108
341
  onComplete?: ((...args: any[]) => any) | undefined;
109
342
  onInterrupt?: ((...args: any[]) => any) | undefined;
110
343
  onRepeat?: ((...args: any[]) => any) | undefined;
111
344
  onReverseComplete?: ((...args: any[]) => any) | undefined;
112
345
  onStart?: ((...args: any[]) => any) | undefined;
113
346
  onUpdate?: ((...args: any[]) => any) | undefined;
114
- }>, {
115
- toggle: boolean;
116
- tag: string;
117
- }, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
347
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
118
348
  declare const __VLS_export$1: __VLS_WithSlots$1<typeof __VLS_base$1, __VLS_Slots$1>;
119
349
  declare const _default$2: typeof __VLS_export$1;
120
350
  type __VLS_WithSlots$1<T, S> = T & {
@@ -124,16 +354,205 @@ type __VLS_WithSlots$1<T, S> = T & {
124
354
  };
125
355
  //#endregion
126
356
  //#region src/components/Tween.vue.d.ts
127
- declare var __VLS_9: {
128
- animation: Animation;
129
- controlled: boolean;
130
- parent: Animation | null;
131
- progress: number;
357
+ type __VLS_Slots = {
358
+ default(props: DejaVueAnimationScopeProps): any;
132
359
  };
133
- type __VLS_Slots = {} & {
134
- default?: (props: typeof __VLS_9) => any;
360
+ type __VLS_ModelProps = {
361
+ 'progress'?: number;
135
362
  };
136
- declare const __VLS_base: _$vue.DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, _$vue.PublicProps>;
363
+ declare const __VLS_base: import("vue").DefineComponent<(DejaVueAnimationComponentProps & AnimationNestableChild & {
364
+ progress?: number;
365
+ } & {
366
+ trigger?: unknown;
367
+ triggerAction?: TweenAction;
368
+ triggerOptions?: AnimationTriggerOptions;
369
+ } & {
370
+ from: gsap.TweenVars;
371
+ to: gsap.TweenVars;
372
+ effect?: never;
373
+ effectOptions?: never;
374
+ } & __VLS_ModelProps) | (DejaVueAnimationComponentProps & AnimationNestableChild & {
375
+ progress?: number;
376
+ } & {
377
+ trigger?: unknown;
378
+ triggerAction?: TweenAction;
379
+ triggerOptions?: AnimationTriggerOptions;
380
+ } & {
381
+ from: gsap.TweenVars;
382
+ to?: never;
383
+ effect?: never;
384
+ effectOptions?: never;
385
+ } & __VLS_ModelProps) | (DejaVueAnimationComponentProps & AnimationNestableChild & {
386
+ progress?: number;
387
+ } & {
388
+ trigger?: unknown;
389
+ triggerAction?: TweenAction;
390
+ triggerOptions?: AnimationTriggerOptions;
391
+ } & {
392
+ from?: never;
393
+ to: gsap.TweenVars;
394
+ effect?: never;
395
+ effectOptions?: never;
396
+ } & __VLS_ModelProps) | (DejaVueAnimationComponentProps & AnimationNestableChild & {
397
+ progress?: number;
398
+ } & {
399
+ trigger?: unknown;
400
+ triggerAction?: TweenAction;
401
+ triggerOptions?: AnimationTriggerOptions;
402
+ } & {
403
+ from?: never;
404
+ to?: never;
405
+ effect?: string;
406
+ effectOptions?: gsap.TweenVars;
407
+ } & __VLS_ModelProps) | (DejaVueAnimationComponentProps & AnimationNestableChild & {
408
+ progress?: number;
409
+ } & {
410
+ trigger?: never;
411
+ triggerAction?: never;
412
+ triggerOptions?: never;
413
+ } & {
414
+ from: gsap.TweenVars;
415
+ to: gsap.TweenVars;
416
+ effect?: never;
417
+ effectOptions?: never;
418
+ } & __VLS_ModelProps) | (DejaVueAnimationComponentProps & AnimationNestableChild & {
419
+ progress?: number;
420
+ } & {
421
+ trigger?: never;
422
+ triggerAction?: never;
423
+ triggerOptions?: never;
424
+ } & {
425
+ from: gsap.TweenVars;
426
+ to?: never;
427
+ effect?: never;
428
+ effectOptions?: never;
429
+ } & __VLS_ModelProps) | (DejaVueAnimationComponentProps & AnimationNestableChild & {
430
+ progress?: number;
431
+ } & {
432
+ trigger?: never;
433
+ triggerAction?: never;
434
+ triggerOptions?: never;
435
+ } & {
436
+ from?: never;
437
+ to: gsap.TweenVars;
438
+ effect?: never;
439
+ effectOptions?: never;
440
+ } & __VLS_ModelProps) | (DejaVueAnimationComponentProps & AnimationNestableChild & {
441
+ progress?: number;
442
+ } & {
443
+ trigger?: never;
444
+ triggerAction?: never;
445
+ triggerOptions?: never;
446
+ } & {
447
+ from?: never;
448
+ to?: never;
449
+ effect?: string;
450
+ effectOptions?: gsap.TweenVars;
451
+ } & __VLS_ModelProps), DejaVueAnimationInstance, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
452
+ complete: (...args: any[]) => void;
453
+ interrupt: (...args: any[]) => void;
454
+ repeat: (...args: any[]) => void;
455
+ reverseComplete: (...args: any[]) => void;
456
+ start: (...args: any[]) => void;
457
+ update: (...args: any[]) => void;
458
+ "update:progress": (value: number) => void;
459
+ }, string, import("vue").PublicProps, Readonly<(DejaVueAnimationComponentProps & AnimationNestableChild & {
460
+ progress?: number;
461
+ } & {
462
+ trigger?: unknown;
463
+ triggerAction?: TweenAction;
464
+ triggerOptions?: AnimationTriggerOptions;
465
+ } & {
466
+ from: gsap.TweenVars;
467
+ to: gsap.TweenVars;
468
+ effect?: never;
469
+ effectOptions?: never;
470
+ } & __VLS_ModelProps) | (DejaVueAnimationComponentProps & AnimationNestableChild & {
471
+ progress?: number;
472
+ } & {
473
+ trigger?: unknown;
474
+ triggerAction?: TweenAction;
475
+ triggerOptions?: AnimationTriggerOptions;
476
+ } & {
477
+ from: gsap.TweenVars;
478
+ to?: never;
479
+ effect?: never;
480
+ effectOptions?: never;
481
+ } & __VLS_ModelProps) | (DejaVueAnimationComponentProps & AnimationNestableChild & {
482
+ progress?: number;
483
+ } & {
484
+ trigger?: unknown;
485
+ triggerAction?: TweenAction;
486
+ triggerOptions?: AnimationTriggerOptions;
487
+ } & {
488
+ from?: never;
489
+ to: gsap.TweenVars;
490
+ effect?: never;
491
+ effectOptions?: never;
492
+ } & __VLS_ModelProps) | (DejaVueAnimationComponentProps & AnimationNestableChild & {
493
+ progress?: number;
494
+ } & {
495
+ trigger?: unknown;
496
+ triggerAction?: TweenAction;
497
+ triggerOptions?: AnimationTriggerOptions;
498
+ } & {
499
+ from?: never;
500
+ to?: never;
501
+ effect?: string;
502
+ effectOptions?: gsap.TweenVars;
503
+ } & __VLS_ModelProps) | (DejaVueAnimationComponentProps & AnimationNestableChild & {
504
+ progress?: number;
505
+ } & {
506
+ trigger?: never;
507
+ triggerAction?: never;
508
+ triggerOptions?: never;
509
+ } & {
510
+ from: gsap.TweenVars;
511
+ to: gsap.TweenVars;
512
+ effect?: never;
513
+ effectOptions?: never;
514
+ } & __VLS_ModelProps) | (DejaVueAnimationComponentProps & AnimationNestableChild & {
515
+ progress?: number;
516
+ } & {
517
+ trigger?: never;
518
+ triggerAction?: never;
519
+ triggerOptions?: never;
520
+ } & {
521
+ from: gsap.TweenVars;
522
+ to?: never;
523
+ effect?: never;
524
+ effectOptions?: never;
525
+ } & __VLS_ModelProps) | (DejaVueAnimationComponentProps & AnimationNestableChild & {
526
+ progress?: number;
527
+ } & {
528
+ trigger?: never;
529
+ triggerAction?: never;
530
+ triggerOptions?: never;
531
+ } & {
532
+ from?: never;
533
+ to: gsap.TweenVars;
534
+ effect?: never;
535
+ effectOptions?: never;
536
+ } & __VLS_ModelProps) | (DejaVueAnimationComponentProps & AnimationNestableChild & {
537
+ progress?: number;
538
+ } & {
539
+ trigger?: never;
540
+ triggerAction?: never;
541
+ triggerOptions?: never;
542
+ } & {
543
+ from?: never;
544
+ to?: never;
545
+ effect?: string;
546
+ effectOptions?: gsap.TweenVars;
547
+ } & __VLS_ModelProps)> & Readonly<{
548
+ "onUpdate:progress"?: ((value: number) => any) | undefined;
549
+ onComplete?: ((...args: any[]) => any) | undefined;
550
+ onInterrupt?: ((...args: any[]) => any) | undefined;
551
+ onRepeat?: ((...args: any[]) => any) | undefined;
552
+ onReverseComplete?: ((...args: any[]) => any) | undefined;
553
+ onStart?: ((...args: any[]) => any) | undefined;
554
+ onUpdate?: ((...args: any[]) => any) | undefined;
555
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
137
556
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
138
557
  declare const _default$3: typeof __VLS_export;
139
558
  type __VLS_WithSlots<T, S> = T & {
@@ -142,23 +561,4 @@ type __VLS_WithSlots<T, S> = T & {
142
561
  };
143
562
  };
144
563
  //#endregion
145
- //#region src/composables/useAnimation.d.ts
146
- declare function useAnimation(wrapper: Readonly<ShallowRef<HTMLElement | null>>): {
147
- animation: Animation;
148
- controlled: _$vue.ComputedRef<boolean>;
149
- parent: Animation | null;
150
- progress: ShallowRef<number, number>;
151
- };
152
- //#endregion
153
- //#region src/composables/useAnimationControls.d.ts
154
- type AnimationControls<C = ControllableAnimation> = { [K in keyof C]?: MaybeRefOrGetter<C[K]> };
155
- declare function useAnimationControls(animation: Animation, controls: AnimationControls): {
156
- controlled: _$vue.ComputedRef<boolean>;
157
- };
158
- //#endregion
159
- //#region src/composables/useAnimationNesting.d.ts
160
- declare function useAnimationNesting(child?: Animation | gsap.Callback | string, options?: NestableAnimation): {
161
- parent: Animation | null;
162
- };
163
- //#endregion
164
- export { ANIMATION_EVENTS, Animation, BaseAnimation, _default as Callback, ControllableAnimation, NestableAnimation, _default$1 as PositionMarker, _default$2 as Timeline, TimelineAnimation, _default$3 as Tween, TweenAnimation, TweenAnimationDefinition, WrappableAnimation, parentAnimationInjectionKey, useAnimation, useAnimationControls, useAnimationNesting };
564
+ export { ANIMATION_EVENTS, Animation, type AnimationChild, type AnimationComposeDefinition, AnimationControls, type AnimationDirection, type AnimationEvent, type AnimationEventEmitter, type AnimationNestableChild, AnimationNestingOptions, AnimationNestingTarget, AnimationScopeOptions, type AnimationTriggerOptions, type ControllableAnimation, type DejaVueAnimationComponentProps, type DejaVueAnimationExposed, type DejaVueAnimationInstance, type DejaVueAnimationParent, type DejaVueAnimationScopeProps, type DejaVueComponent, type DejaVueMarkerExposed, type DejaVueMarkerInstance, type DejaVueMarkerScopeProps, type DejaVueNode, type DejaVueSplitTextExposed, type DejaVueSplitTextInstance, type DejaVueSplitTextScopeProps, _default as Marker, type NonEmptyArray, type PlainObject, _default$1 as SplitText, SplitTextOptions, _default$2 as Timeline, _default$3 as Tween, type TweenAction, type TweenDefinition, type WrappableComponent, applyTimelineTotalDuration, cloneObject, dejaVueParentInstance, getScrollTriggerToggleActionByEvent, isEmptyTarget, isObject, patchArray, patchObject, resolveChildrenTweenTarget, resolveTimelinePosition, stripScrollTriggerVars, syncData, toNonEmptyArray, useAnimationControls, useAnimationNesting, useAnimationScope, useSplitText, useStableObjectProp, useTweenVars };