view-transitions-polyfill
Version:
A polyfill for the View Transitions API.
35 lines (34 loc) • 1.33 kB
TypeScript
import { ViewTransitionImagePair, ViewTransitionOld, ViewTransitionNew } from './view-transition-image-elements';
import { default as CaptureElement } from '../capture-element';
type GroupStyleRuleValues = {
width: string;
height: string;
transform: string;
writingMode: string;
direction: string;
textOrientation: string;
mixBlendMode: string;
backdropFilter: string;
colorScheme: string;
};
export default class ViewTransitionGroup extends HTMLElement {
constructor();
transitionName: string;
captureElement: CaptureElement;
imagePair: ViewTransitionImagePair;
oldImage: ViewTransitionOld | undefined;
newImage: ViewTransitionNew | undefined;
groupStyle: HTMLStyleElement;
setupForOldImage(name: string, captureElement: CaptureElement): void;
setupForNewImage(name: string, captureElement: CaptureElement): void;
addNewImage(): void;
setup(): void;
appendToStyle(string: string): void;
getStyleValues(stage?: 'old' | 'new'): GroupStyleRuleValues;
mapStyleValuesForAttribute(values: GroupStyleRuleValues): void;
getSizingAnimationParemters(): [number, string];
getSizingAnimationDuration(style: CSSStyleDeclaration): number;
getSizingAnimationEasing(style: CSSStyleDeclaration): string;
animateImages(): void;
}
export {};