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