diff --git a/core/package-lock.json b/core/package-lock.json index affab7a005..5c2daaa060 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -9,7 +9,7 @@ "version": "7.0.10", "license": "MIT", "dependencies": { - "@stencil/core": "^3.2.2", + "@stencil/core": "^3.3.0", "ionicons": "^7.1.0", "tslib": "^2.1.0" }, @@ -1594,9 +1594,9 @@ } }, "node_modules/@stencil/core": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/@stencil/core/-/core-3.2.2.tgz", - "integrity": "sha512-wXb9cVWL0T3cTwYLveekdTFCRGx6+9hpVDEXna+N8K8OPoW6xtFAHRLv+LjOM7k59PkA8MG3IinAfV7Y+xa0Hw==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@stencil/core/-/core-3.3.0.tgz", + "integrity": "sha512-+3hqJ8RmUvxz8FgvMP9lxYJdjb4EnZrkdo6ln5fUqGju62ORS5/Ch9m6OAIjlEn6CbDb5Uf1OdeMjO87DJwIAA==", "bin": { "stencil": "bin/stencil" }, @@ -11467,9 +11467,9 @@ "requires": {} }, "@stencil/core": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/@stencil/core/-/core-3.2.2.tgz", - "integrity": "sha512-wXb9cVWL0T3cTwYLveekdTFCRGx6+9hpVDEXna+N8K8OPoW6xtFAHRLv+LjOM7k59PkA8MG3IinAfV7Y+xa0Hw==" + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@stencil/core/-/core-3.3.0.tgz", + "integrity": "sha512-+3hqJ8RmUvxz8FgvMP9lxYJdjb4EnZrkdo6ln5fUqGju62ORS5/Ch9m6OAIjlEn6CbDb5Uf1OdeMjO87DJwIAA==" }, "@stencil/react-output-target": { "version": "0.5.0", diff --git a/core/package.json b/core/package.json index be7a959e9a..3014518410 100644 --- a/core/package.json +++ b/core/package.json @@ -31,7 +31,7 @@ "loader/" ], "dependencies": { - "@stencil/core": "^3.2.2", + "@stencil/core": "^3.3.0", "ionicons": "^7.1.0", "tslib": "^2.1.0" }, diff --git a/core/src/utils/animation/animation-interface.ts b/core/src/utils/animation/animation-interface.ts index 7a65f52157..b28b9fdd3d 100644 --- a/core/src/utils/animation/animation-interface.ts +++ b/core/src/utils/animation/animation-interface.ts @@ -220,6 +220,24 @@ export interface Animation { * Returns `false` otherwise. */ isRunning(): boolean; + + /** + * Sets the parent animation. + * @internal + */ + parent(animation: Animation): Animation; + + /** + * Updates any existing animations. + * @internal + */ + update(deep: boolean, toggleAnimationName: boolean, step?: number): Animation; + + /** + * Forcibly finishes the animation. + * @internal + */ + animationFinish(): void; } export type AnimationLifecycle = (currentStep: 0 | 1, animation: Animation) => void; diff --git a/core/src/utils/animation/animation.ts b/core/src/utils/animation/animation.ts index df3eeece63..8d7b358bed 100644 --- a/core/src/utils/animation/animation.ts +++ b/core/src/utils/animation/animation.ts @@ -30,20 +30,6 @@ interface AnimationOnFinishCallback { o?: AnimationCallbackOptions; } -interface AnimationInternal extends Animation { - /** - * Sets the parent animation. - */ - parent(animation: Animation): Animation; - - /** - * Updates any existing animations. - */ - update(deep: boolean, toggleAnimationName: boolean, step?: number): Animation; - - animationFinish(): void; -} - export const createAnimation = (animationId?: string): Animation => { let _delay: number | undefined; let _duration: number | undefined; @@ -55,7 +41,7 @@ export const createAnimation = (animationId?: string): Animation => { let beforeAddClasses: string[] = []; let beforeRemoveClasses: string[] = []; let initialized = false; - let parentAnimation: AnimationInternal | undefined; + let parentAnimation: Animation | undefined; let beforeStylesValue: { [property: string]: any } = {}; let afterAddClasses: string[] = []; let afterRemoveClasses: string[] = []; @@ -71,14 +57,14 @@ export const createAnimation = (animationId?: string): Animation => { let finished = false; let shouldCalculateNumAnimations = true; let keyframeName: string | undefined; - let ani: AnimationInternal; + let ani: Animation; let paused = false; const id: string | undefined = animationId; const onFinishCallbacks: AnimationOnFinishCallback[] = []; const onFinishOneTimeCallbacks: AnimationOnFinishCallback[] = []; const elements: HTMLElement[] = []; - const childAnimations: AnimationInternal[] = []; + const childAnimations: Animation[] = []; const stylesheets: HTMLElement[] = []; const _beforeAddReadFunctions: any[] = []; const _beforeAddWriteFunctions: any[] = []; @@ -436,7 +422,7 @@ export const createAnimation = (animationId?: string): Animation => { return ani; }; - const parent = (animation: AnimationInternal) => { + const parent = (animation: Animation) => { parentAnimation = animation; return ani; @@ -458,7 +444,7 @@ export const createAnimation = (animationId?: string): Animation => { return ani; }; - const addAnimation = (animationToAdd: AnimationInternal | AnimationInternal[]) => { + const addAnimation = (animationToAdd: Animation | Animation[]) => { if ((animationToAdd as any) != null) { if (Array.isArray(animationToAdd)) { for (const animation of animationToAdd) {