@yorozu/animations 0.3.0 → 0.5.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/_test/fake-animate.d.ts +7 -0
- package/index.d.ts +45 -1
- package/index.js +39 -18
- package/package.json +1 -1
- package/{src/popover → popover}/popover.d.ts +9 -1
- package/playground/src/catalog.d.ts +0 -8
- package/playground/src/level-switch.d.ts +0 -1
- package/playground/src/level.d.ts +0 -7
- package/playground/src/main.d.ts +0 -0
- package/playground/src/overlay.d.ts +0 -2
- package/playground/src/testers/digit-flip.d.ts +0 -1
- package/playground/src/testers/dock.d.ts +0 -1
- package/playground/src/testers/fade.d.ts +0 -1
- package/playground/src/testers/list-layer.d.ts +0 -1
- package/playground/src/testers/list-reorder.d.ts +0 -1
- package/playground/src/testers/pinch-zoom.d.ts +0 -1
- package/playground/src/testers/popover.d.ts +0 -1
- package/playground/src/testers/presence-pop.d.ts +0 -1
- package/playground/src/testers/ripple.d.ts +0 -1
- package/playground/src/testers/scroll-tween.d.ts +0 -1
- package/playground/src/testers/send-flight.d.ts +0 -1
- package/playground/src/testers/shared-element.d.ts +0 -1
- package/playground/src/testers/sliding-indicator.d.ts +0 -1
- package/playground/src/testers/spoiler.d.ts +0 -1
- package/playground/src/testers/swipe-reveal.d.ts +0 -1
- package/playground/src/testers/tabs.d.ts +0 -1
- package/playground/src/testers/view-slide-modes.d.ts +0 -3
- package/playground/src/testers/view-slide.d.ts +0 -1
- package/playground/src/testers/waveform.d.ts +0 -1
- package/src/index.d.ts +0 -45
- /package/{src/core → core}/level.d.ts +0 -0
- /package/{src/core → core}/playback.d.ts +0 -0
- /package/{src/core → core}/raf.d.ts +0 -0
- /package/{src/core → core}/reduced-motion.d.ts +0 -0
- /package/{src/core → core}/styles.d.ts +0 -0
- /package/{src/core → core}/tween.d.ts +0 -0
- /package/{src/core → core}/types.d.ts +0 -0
- /package/{src/digit-flip → digit-flip}/play.d.ts +0 -0
- /package/{src/digit-flip → digit-flip}/slots.d.ts +0 -0
- /package/{src/dock → dock}/dock.d.ts +0 -0
- /package/{src/dock → dock}/transforms.d.ts +0 -0
- /package/{src/fade → fade}/fade.d.ts +0 -0
- /package/{src/list-reorder → list-reorder}/classify.d.ts +0 -0
- /package/{src/list-reorder → list-reorder}/reorder.d.ts +0 -0
- /package/{src/pinch-zoom → pinch-zoom}/math.d.ts +0 -0
- /package/{src/pinch-zoom → pinch-zoom}/pinch.d.ts +0 -0
- /package/{src/rect → rect}/fit.d.ts +0 -0
- /package/{src/rect → rect}/types.d.ts +0 -0
- /package/{src/ripple → ripple}/ripple.d.ts +0 -0
- /package/{src/scroll-tween → scroll-tween}/scroll.d.ts +0 -0
- /package/{src/send-flight → send-flight}/flight.d.ts +0 -0
- /package/{src/shared-element → shared-element}/math.d.ts +0 -0
- /package/{src/shared-element → shared-element}/player.d.ts +0 -0
- /package/{src/sliding-indicator → sliding-indicator}/indicator.d.ts +0 -0
- /package/{src/spoiler → spoiler}/spoiler.d.ts +0 -0
- /package/{src/swipe-reveal → swipe-reveal}/swipe.d.ts +0 -0
- /package/{src/view-slide → view-slide}/session.d.ts +0 -0
- /package/{src/view-slide → view-slide}/transforms.d.ts +0 -0
- /package/{src/waveform → waveform}/decode.d.ts +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Mock } from 'vitest';
|
|
2
|
+
export type FakeAnimation = {
|
|
3
|
+
finished: Promise<void>;
|
|
4
|
+
cancel: () => void;
|
|
5
|
+
};
|
|
6
|
+
export type FakeAnimate = (this: unknown, frames: Keyframe[], options?: KeyframeAnimationOptions) => FakeAnimation;
|
|
7
|
+
export declare function createFakeAnimate(impl?: FakeAnimate): Mock<FakeAnimate>;
|
package/index.d.ts
CHANGED
|
@@ -1 +1,45 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type { AttachHandle, Key, Playback } from './core/types';
|
|
2
|
+
export { prefersReducedMotion } from './core/reduced-motion';
|
|
3
|
+
export { dualRaf } from './core/raf';
|
|
4
|
+
export type { AnimationLevel } from './core/level';
|
|
5
|
+
export { ANIMATION_LEVELS, DEFAULT_ANIMATION_LEVEL, isAnimationLevel, parseAnimationLevel, defaultAnimationLevel, cycleAnimationLevel, canAnimate, pickAnimationLevelFromRatio, stepAnimationLevel, } from './core/level';
|
|
6
|
+
export type { TweenOptions } from './core/tween';
|
|
7
|
+
export { easeOutCubic, lerp, tween } from './core/tween';
|
|
8
|
+
export type { Rect, Size, Insets, ObjectFit } from './rect/types';
|
|
9
|
+
export { fitContain, centerFitInViewport } from './rect/fit';
|
|
10
|
+
export type { Flight, OpenFlightOpts, CloseFlightOpts } from './shared-element/math';
|
|
11
|
+
export { uncoverByAspect, computeFlight, resolveNaturalSize, computeOpenFlight, computeCloseFlight, isRectFullyVisibleIn, isRectInViewport, offViewportLandingRect, } from './shared-element/math';
|
|
12
|
+
export type { SharedElementSeed, SharedElementPlayOptions, SharedElementController } from './shared-element/player';
|
|
13
|
+
export { SHARED_ELEMENT_MS, SHARED_ELEMENT_EASING, SHARED_ELEMENT_END_MS, createSharedElement, playSharedElement, } from './shared-element/player';
|
|
14
|
+
export type { SlideDirection, ViewSlideMode, ViewSlideKind, ViewSlideMountPolicy, PanelRole, SlidePanelState, SlideTransforms, } from './view-slide/transforms';
|
|
15
|
+
export { VIEW_SLIDE_FADE_OFFSET, VIEW_SLIDE_MS, VIEW_SLIDE_EASING, VIEW_SLIDE_COVER_MS, VIEW_SLIDE_COVER_EASING, VIEW_SLIDE_ZOOM_MS, VIEW_SLIDE_ZOOM_EASING, VIEW_SLIDE_REVEAL_MS, VIEW_SLIDE_REVEAL_EASING, slideDirectionByIndex, resolveViewSlideMode, viewSlideDurationMs, viewSlideEasing, viewSlideTransforms, } from './view-slide/transforms';
|
|
16
|
+
export type { ViewSlideConfig, ViewSlide } from './view-slide/session';
|
|
17
|
+
export { VIEW_SLIDE_SETTLE_SLACK_MS, createViewSlide } from './view-slide/session';
|
|
18
|
+
export type { SlidingIndicator, SlidingIndicatorOptions } from './sliding-indicator/indicator';
|
|
19
|
+
export { INDICATOR_MS, INDICATOR_EASING, createSlidingIndicator } from './sliding-indicator/indicator';
|
|
20
|
+
export type { ReorderAnimKind, OrderDiffByKey } from './list-reorder/classify';
|
|
21
|
+
export { buildOrderDiff, classifyReorderAnim } from './list-reorder/classify';
|
|
22
|
+
export type { ListReorder } from './list-reorder/reorder';
|
|
23
|
+
export { LIST_REORDER_MS, LIST_REORDER_EASING, LIST_REORDER_EPSILON_PX, createListReorder, } from './list-reorder/reorder';
|
|
24
|
+
export type { Fade, FadeOptions } from './fade/fade';
|
|
25
|
+
export { FADE_MS, FADE_EASING, createFade } from './fade/fade';
|
|
26
|
+
export type { Dock, DockConfig, DockEdge, DockHandle, DockMode, DockPanelState, DockTransforms } from './dock/dock';
|
|
27
|
+
export { DOCK_EASING, DOCK_FADE_OFFSET, DOCK_MS, createDock, dockTransforms } from './dock/dock';
|
|
28
|
+
export type { Popover, PopoverConfig, PopoverPlayOptions } from './popover/popover';
|
|
29
|
+
export { POPOVER_EASING, POPOVER_MS, POPOVER_ORIGIN, POPOVER_SCALE, createPopover } from './popover/popover';
|
|
30
|
+
export type { DigitSlot } from './digit-flip/slots';
|
|
31
|
+
export { DIGIT_FLIP_MS, MAX_SIMULTANEOUS_DIGIT_FLIPS, buildDigitSlots, formatCounterText, scheduleDigitFlip, shouldPresencePop, } from './digit-flip/slots';
|
|
32
|
+
export { DIGIT_FLIP_EASING, PRESENCE_POP_EASING, PRESENCE_POP_MS, playDigitFlip, playPresencePop, } from './digit-flip/play';
|
|
33
|
+
export type { SendFlightOptions } from './send-flight/flight';
|
|
34
|
+
export { SEND_FLIGHT_EASING, SEND_FLIGHT_MS, playSendFlight } from './send-flight/flight';
|
|
35
|
+
export type { SwipeReveal, SwipeRevealOptions } from './swipe-reveal/swipe';
|
|
36
|
+
export { SWIPE_MAX, SWIPE_THRESHOLD, SWIPE_TWEEN_MS, createSwipeReveal, rubberSwipeOffset, shouldCommitSwipe, } from './swipe-reveal/swipe';
|
|
37
|
+
export type { ScrollTweenOptions } from './scroll-tween/scroll';
|
|
38
|
+
export { SCROLL_TWEEN_MS, playScrollTween } from './scroll-tween/scroll';
|
|
39
|
+
export type { RippleOptions } from './ripple/ripple';
|
|
40
|
+
export { RIPPLE_COLOR, RIPPLE_EASING, RIPPLE_MS, RIPPLE_SIZE_PX, playRipple } from './ripple/ripple';
|
|
41
|
+
export type { Point, Translate, ZoomState, PinchZoom, PinchZoomConfig } from './pinch-zoom/pinch';
|
|
42
|
+
export { PINCH_MAX_SCALE, PINCH_MIN_SCALE, PINCH_WHEEL_FACTOR, boundTranslate, clampScale, createPinchZoom, maxTranslate, nextScaleFromWheel, resetZoom, zoomAtOrigin, zoomTransform, } from './pinch-zoom/pinch';
|
|
43
|
+
export { decodeWaveform, fitWaveform } from './waveform/decode';
|
|
44
|
+
export type { Spoiler, SpoilerOptions } from './spoiler/spoiler';
|
|
45
|
+
export { SPOILER_EASING, SPOILER_MS, createSpoiler } from './spoiler/spoiler';
|
package/index.js
CHANGED
|
@@ -1031,6 +1031,12 @@ function createViewSlide(config) {
|
|
|
1031
1031
|
tryRunPending();
|
|
1032
1032
|
},
|
|
1033
1033
|
destroy: () => {
|
|
1034
|
+
if (pair && (pair.from === key || pair.to === key) || pending && (pending.from === key || pending.to === key)) {
|
|
1035
|
+
slideGen++;
|
|
1036
|
+
abortInFlight();
|
|
1037
|
+
animating = false;
|
|
1038
|
+
leavingKey = void 0;
|
|
1039
|
+
}
|
|
1034
1040
|
if (panelEls.get(key) === el) panelEls.delete(key);
|
|
1035
1041
|
}
|
|
1036
1042
|
};
|
|
@@ -1547,11 +1553,10 @@ function createDock(config) {
|
|
|
1547
1553
|
active = null;
|
|
1548
1554
|
animating = false;
|
|
1549
1555
|
leaving = false;
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
}
|
|
1556
|
+
mounted = false;
|
|
1557
|
+
wantOpen = false;
|
|
1558
|
+
clearPanel();
|
|
1559
|
+
clearBackdrop();
|
|
1555
1560
|
}
|
|
1556
1561
|
cancel();
|
|
1557
1562
|
};
|
|
@@ -1647,17 +1652,23 @@ function createDock(config) {
|
|
|
1647
1652
|
var POPOVER_MS = 120;
|
|
1648
1653
|
var POPOVER_EASING = "ease-out";
|
|
1649
1654
|
var POPOVER_ORIGIN = "center top";
|
|
1650
|
-
var
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
}
|
|
1655
|
+
var POPOVER_SCALE = .92;
|
|
1656
|
+
function closedFrame(scale) {
|
|
1657
|
+
return {
|
|
1658
|
+
transform: `scale(${scale})`,
|
|
1659
|
+
opacity: "0"
|
|
1660
|
+
};
|
|
1661
|
+
}
|
|
1654
1662
|
var OPEN = {
|
|
1655
1663
|
transform: "scale(1)",
|
|
1656
1664
|
opacity: "1"
|
|
1657
1665
|
};
|
|
1658
1666
|
var STYLE_KEYS = ["will-change"];
|
|
1659
|
-
function createPopover() {
|
|
1660
|
-
let lastOrigin =
|
|
1667
|
+
function createPopover(config) {
|
|
1668
|
+
let lastOrigin = config?.origin ?? "center top";
|
|
1669
|
+
let lastScale = config?.scale ?? .92;
|
|
1670
|
+
let defaultDuration = config?.durationMs ?? 120;
|
|
1671
|
+
let defaultEasing = config?.easing ?? "ease-out";
|
|
1661
1672
|
let current = null;
|
|
1662
1673
|
let stopCurrent = () => {
|
|
1663
1674
|
if (!current) return;
|
|
@@ -1668,12 +1679,15 @@ function createPopover() {
|
|
|
1668
1679
|
let play = (el, opening, options) => {
|
|
1669
1680
|
stopCurrent();
|
|
1670
1681
|
let { playback, resolve, isCancelled } = createPlayback();
|
|
1671
|
-
let durationMs = options?.durationMs ??
|
|
1672
|
-
let easing = options?.easing ??
|
|
1682
|
+
let durationMs = options?.durationMs ?? defaultDuration;
|
|
1683
|
+
let easing = options?.easing ?? defaultEasing;
|
|
1673
1684
|
if (options?.origin != null) lastOrigin = options.origin;
|
|
1674
|
-
|
|
1675
|
-
let
|
|
1676
|
-
let
|
|
1685
|
+
if (options?.scale != null) lastScale = options.scale;
|
|
1686
|
+
let origin = options?.origin ?? lastOrigin;
|
|
1687
|
+
let closed = closedFrame(options?.scale ?? lastScale);
|
|
1688
|
+
applyStyles(el, { "transform-origin": origin });
|
|
1689
|
+
let from = opening ? closed : OPEN;
|
|
1690
|
+
let to = opening ? OPEN : closed;
|
|
1677
1691
|
if (durationMs <= 0) {
|
|
1678
1692
|
applyStyles(el, {
|
|
1679
1693
|
transform: to.transform,
|
|
@@ -1957,12 +1971,14 @@ function createSwipeReveal(el, options) {
|
|
|
1957
1971
|
//#endregion
|
|
1958
1972
|
//#region src/scroll-tween/scroll.ts
|
|
1959
1973
|
var SCROLL_TWEEN_MS = 200;
|
|
1974
|
+
var activeByEl = /* @__PURE__ */ new WeakMap();
|
|
1960
1975
|
function playScrollTween(el, options) {
|
|
1976
|
+
activeByEl.get(el)?.cancel();
|
|
1961
1977
|
let fromLeft = el.scrollLeft;
|
|
1962
1978
|
let fromTop = el.scrollTop;
|
|
1963
1979
|
let toLeft = options.left ?? fromLeft;
|
|
1964
1980
|
let toTop = options.top ?? fromTop;
|
|
1965
|
-
|
|
1981
|
+
let playback = tween({
|
|
1966
1982
|
from: 0,
|
|
1967
1983
|
to: 1,
|
|
1968
1984
|
durationMs: options.durationMs ?? 200,
|
|
@@ -1971,6 +1987,11 @@ function playScrollTween(el, options) {
|
|
|
1971
1987
|
if (options.top != null) el.scrollTop = lerp(fromTop, toTop, t);
|
|
1972
1988
|
}
|
|
1973
1989
|
});
|
|
1990
|
+
activeByEl.set(el, playback);
|
|
1991
|
+
playback.done.finally(() => {
|
|
1992
|
+
if (activeByEl.get(el) === playback) activeByEl.delete(el);
|
|
1993
|
+
});
|
|
1994
|
+
return playback;
|
|
1974
1995
|
}
|
|
1975
1996
|
//#endregion
|
|
1976
1997
|
//#region src/ripple/ripple.ts
|
|
@@ -2226,4 +2247,4 @@ function createSpoiler(el, options) {
|
|
|
2226
2247
|
};
|
|
2227
2248
|
}
|
|
2228
2249
|
//#endregion
|
|
2229
|
-
export { ANIMATION_LEVELS, DEFAULT_ANIMATION_LEVEL, DIGIT_FLIP_EASING, DIGIT_FLIP_MS, DOCK_EASING, DOCK_FADE_OFFSET, DOCK_MS, FADE_EASING, FADE_MS, INDICATOR_EASING, INDICATOR_MS, LIST_REORDER_EASING, LIST_REORDER_EPSILON_PX, LIST_REORDER_MS, MAX_SIMULTANEOUS_DIGIT_FLIPS, PINCH_MAX_SCALE, PINCH_MIN_SCALE, PINCH_WHEEL_FACTOR, POPOVER_EASING, POPOVER_MS, POPOVER_ORIGIN, PRESENCE_POP_EASING, PRESENCE_POP_MS, RIPPLE_COLOR, RIPPLE_EASING, RIPPLE_MS, RIPPLE_SIZE_PX, SCROLL_TWEEN_MS, SEND_FLIGHT_EASING, SEND_FLIGHT_MS, SHARED_ELEMENT_EASING, SHARED_ELEMENT_END_MS, SHARED_ELEMENT_MS, SPOILER_EASING, SPOILER_MS, SWIPE_MAX, SWIPE_THRESHOLD, SWIPE_TWEEN_MS, VIEW_SLIDE_COVER_EASING, VIEW_SLIDE_COVER_MS, VIEW_SLIDE_EASING, VIEW_SLIDE_FADE_OFFSET, VIEW_SLIDE_MS, VIEW_SLIDE_REVEAL_EASING, VIEW_SLIDE_REVEAL_MS, VIEW_SLIDE_SETTLE_SLACK_MS, VIEW_SLIDE_ZOOM_EASING, VIEW_SLIDE_ZOOM_MS, boundTranslate, buildDigitSlots, buildOrderDiff, canAnimate, centerFitInViewport, clampScale, classifyReorderAnim, computeCloseFlight, computeFlight, computeOpenFlight, createDock, createFade, createListReorder, createPinchZoom, createPopover, createSharedElement, createSlidingIndicator, createSpoiler, createSwipeReveal, createViewSlide, cycleAnimationLevel, decodeWaveform, defaultAnimationLevel, dockTransforms, dualRaf, easeOutCubic, fitContain, fitWaveform, formatCounterText, isAnimationLevel, isRectFullyVisibleIn, isRectInViewport, lerp, maxTranslate, nextScaleFromWheel, offViewportLandingRect, parseAnimationLevel, pickAnimationLevelFromRatio, playDigitFlip, playPresencePop, playRipple, playScrollTween, playSendFlight, playSharedElement, prefersReducedMotion, resetZoom, resolveNaturalSize, resolveViewSlideMode, rubberSwipeOffset, scheduleDigitFlip, shouldCommitSwipe, shouldPresencePop, slideDirectionByIndex, stepAnimationLevel, tween, uncoverByAspect, viewSlideDurationMs, viewSlideEasing, viewSlideTransforms, zoomAtOrigin, zoomTransform };
|
|
2250
|
+
export { ANIMATION_LEVELS, DEFAULT_ANIMATION_LEVEL, DIGIT_FLIP_EASING, DIGIT_FLIP_MS, DOCK_EASING, DOCK_FADE_OFFSET, DOCK_MS, FADE_EASING, FADE_MS, INDICATOR_EASING, INDICATOR_MS, LIST_REORDER_EASING, LIST_REORDER_EPSILON_PX, LIST_REORDER_MS, MAX_SIMULTANEOUS_DIGIT_FLIPS, PINCH_MAX_SCALE, PINCH_MIN_SCALE, PINCH_WHEEL_FACTOR, POPOVER_EASING, POPOVER_MS, POPOVER_ORIGIN, POPOVER_SCALE, PRESENCE_POP_EASING, PRESENCE_POP_MS, RIPPLE_COLOR, RIPPLE_EASING, RIPPLE_MS, RIPPLE_SIZE_PX, SCROLL_TWEEN_MS, SEND_FLIGHT_EASING, SEND_FLIGHT_MS, SHARED_ELEMENT_EASING, SHARED_ELEMENT_END_MS, SHARED_ELEMENT_MS, SPOILER_EASING, SPOILER_MS, SWIPE_MAX, SWIPE_THRESHOLD, SWIPE_TWEEN_MS, VIEW_SLIDE_COVER_EASING, VIEW_SLIDE_COVER_MS, VIEW_SLIDE_EASING, VIEW_SLIDE_FADE_OFFSET, VIEW_SLIDE_MS, VIEW_SLIDE_REVEAL_EASING, VIEW_SLIDE_REVEAL_MS, VIEW_SLIDE_SETTLE_SLACK_MS, VIEW_SLIDE_ZOOM_EASING, VIEW_SLIDE_ZOOM_MS, boundTranslate, buildDigitSlots, buildOrderDiff, canAnimate, centerFitInViewport, clampScale, classifyReorderAnim, computeCloseFlight, computeFlight, computeOpenFlight, createDock, createFade, createListReorder, createPinchZoom, createPopover, createSharedElement, createSlidingIndicator, createSpoiler, createSwipeReveal, createViewSlide, cycleAnimationLevel, decodeWaveform, defaultAnimationLevel, dockTransforms, dualRaf, easeOutCubic, fitContain, fitWaveform, formatCounterText, isAnimationLevel, isRectFullyVisibleIn, isRectInViewport, lerp, maxTranslate, nextScaleFromWheel, offViewportLandingRect, parseAnimationLevel, pickAnimationLevelFromRatio, playDigitFlip, playPresencePop, playRipple, playScrollTween, playSendFlight, playSharedElement, prefersReducedMotion, resetZoom, resolveNaturalSize, resolveViewSlideMode, rubberSwipeOffset, scheduleDigitFlip, shouldCommitSwipe, shouldPresencePop, slideDirectionByIndex, stepAnimationLevel, tween, uncoverByAspect, viewSlideDurationMs, viewSlideEasing, viewSlideTransforms, zoomAtOrigin, zoomTransform };
|
package/package.json
CHANGED
|
@@ -2,13 +2,21 @@ import { Playback } from '../core/types';
|
|
|
2
2
|
export declare const POPOVER_MS: number;
|
|
3
3
|
export declare const POPOVER_EASING: string;
|
|
4
4
|
export declare const POPOVER_ORIGIN: string;
|
|
5
|
+
export declare const POPOVER_SCALE: number;
|
|
6
|
+
export type PopoverConfig = {
|
|
7
|
+
scale?: number;
|
|
8
|
+
origin?: string;
|
|
9
|
+
durationMs?: number;
|
|
10
|
+
easing?: string;
|
|
11
|
+
};
|
|
5
12
|
export type PopoverPlayOptions = {
|
|
6
13
|
origin?: string;
|
|
7
14
|
durationMs?: number;
|
|
8
15
|
easing?: string;
|
|
16
|
+
scale?: number;
|
|
9
17
|
};
|
|
10
18
|
export type Popover = {
|
|
11
19
|
playOpen: (el: HTMLElement, options?: PopoverPlayOptions) => Playback;
|
|
12
20
|
playClose: (el: HTMLElement, options?: PopoverPlayOptions) => Playback;
|
|
13
21
|
};
|
|
14
|
-
export declare function createPopover(): Popover;
|
|
22
|
+
export declare function createPopover(config?: PopoverConfig): Popover;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function mountLevelSwitch(host: HTMLElement): () => void;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { AnimationLevel } from '../../src/index.ts';
|
|
2
|
-
export declare let LEVEL_KEY: string;
|
|
3
|
-
type Listener = (level: AnimationLevel) => void;
|
|
4
|
-
export declare function getAnimationLevel(): AnimationLevel;
|
|
5
|
-
export declare function setAnimationLevel(next: AnimationLevel): void;
|
|
6
|
-
export declare function subscribeAnimationLevel(listener: Listener): () => void;
|
|
7
|
-
export {};
|
package/playground/src/main.d.ts
DELETED
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function mountDigitFlip(root: HTMLElement): () => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function mountDock(root: HTMLElement): () => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function mountFade(root: HTMLElement): () => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function mountListLayer(root: HTMLElement): () => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function mountListReorder(root: HTMLElement): () => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function mountPinchZoom(root: HTMLElement): () => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function mountPopover(root: HTMLElement): () => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function mountPresencePop(root: HTMLElement): () => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function mountRipple(root: HTMLElement): () => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function mountScrollTween(root: HTMLElement): () => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function mountSendFlight(root: HTMLElement): () => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function mountSharedElement(root: HTMLElement): () => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function mountSlidingIndicator(root: HTMLElement): () => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function mountSpoiler(root: HTMLElement): () => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function mountSwipeReveal(root: HTMLElement): () => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function mountTabs(root: HTMLElement): () => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function mountViewSlide(root: HTMLElement): () => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function mountWaveform(root: HTMLElement): () => void;
|
package/src/index.d.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
export type { AttachHandle, Key, Playback } from './core/types';
|
|
2
|
-
export { prefersReducedMotion } from './core/reduced-motion';
|
|
3
|
-
export { dualRaf } from './core/raf';
|
|
4
|
-
export type { AnimationLevel } from './core/level';
|
|
5
|
-
export { ANIMATION_LEVELS, DEFAULT_ANIMATION_LEVEL, isAnimationLevel, parseAnimationLevel, defaultAnimationLevel, cycleAnimationLevel, canAnimate, pickAnimationLevelFromRatio, stepAnimationLevel, } from './core/level';
|
|
6
|
-
export type { TweenOptions } from './core/tween';
|
|
7
|
-
export { easeOutCubic, lerp, tween } from './core/tween';
|
|
8
|
-
export type { Rect, Size, Insets, ObjectFit } from './rect/types';
|
|
9
|
-
export { fitContain, centerFitInViewport } from './rect/fit';
|
|
10
|
-
export type { Flight, OpenFlightOpts, CloseFlightOpts } from './shared-element/math';
|
|
11
|
-
export { uncoverByAspect, computeFlight, resolveNaturalSize, computeOpenFlight, computeCloseFlight, isRectFullyVisibleIn, isRectInViewport, offViewportLandingRect, } from './shared-element/math';
|
|
12
|
-
export type { SharedElementSeed, SharedElementPlayOptions, SharedElementController } from './shared-element/player';
|
|
13
|
-
export { SHARED_ELEMENT_MS, SHARED_ELEMENT_EASING, SHARED_ELEMENT_END_MS, createSharedElement, playSharedElement, } from './shared-element/player';
|
|
14
|
-
export type { SlideDirection, ViewSlideMode, ViewSlideKind, ViewSlideMountPolicy, PanelRole, SlidePanelState, SlideTransforms, } from './view-slide/transforms';
|
|
15
|
-
export { VIEW_SLIDE_FADE_OFFSET, VIEW_SLIDE_MS, VIEW_SLIDE_EASING, VIEW_SLIDE_COVER_MS, VIEW_SLIDE_COVER_EASING, VIEW_SLIDE_ZOOM_MS, VIEW_SLIDE_ZOOM_EASING, VIEW_SLIDE_REVEAL_MS, VIEW_SLIDE_REVEAL_EASING, slideDirectionByIndex, resolveViewSlideMode, viewSlideDurationMs, viewSlideEasing, viewSlideTransforms, } from './view-slide/transforms';
|
|
16
|
-
export type { ViewSlideConfig, ViewSlide } from './view-slide/session';
|
|
17
|
-
export { VIEW_SLIDE_SETTLE_SLACK_MS, createViewSlide } from './view-slide/session';
|
|
18
|
-
export type { SlidingIndicator, SlidingIndicatorOptions } from './sliding-indicator/indicator';
|
|
19
|
-
export { INDICATOR_MS, INDICATOR_EASING, createSlidingIndicator, } from './sliding-indicator/indicator';
|
|
20
|
-
export type { ReorderAnimKind, OrderDiffByKey } from './list-reorder/classify';
|
|
21
|
-
export { buildOrderDiff, classifyReorderAnim } from './list-reorder/classify';
|
|
22
|
-
export type { ListReorder } from './list-reorder/reorder';
|
|
23
|
-
export { LIST_REORDER_MS, LIST_REORDER_EASING, LIST_REORDER_EPSILON_PX, createListReorder, } from './list-reorder/reorder';
|
|
24
|
-
export type { Fade, FadeOptions } from './fade/fade';
|
|
25
|
-
export { FADE_MS, FADE_EASING, createFade } from './fade/fade';
|
|
26
|
-
export type { Dock, DockConfig, DockEdge, DockHandle, DockMode, DockPanelState, DockTransforms, } from './dock/dock';
|
|
27
|
-
export { DOCK_EASING, DOCK_FADE_OFFSET, DOCK_MS, createDock, dockTransforms } from './dock/dock';
|
|
28
|
-
export type { Popover, PopoverPlayOptions } from './popover/popover';
|
|
29
|
-
export { POPOVER_EASING, POPOVER_MS, POPOVER_ORIGIN, createPopover } from './popover/popover';
|
|
30
|
-
export type { DigitSlot } from './digit-flip/slots';
|
|
31
|
-
export { DIGIT_FLIP_MS, MAX_SIMULTANEOUS_DIGIT_FLIPS, buildDigitSlots, formatCounterText, scheduleDigitFlip, shouldPresencePop, } from './digit-flip/slots';
|
|
32
|
-
export { DIGIT_FLIP_EASING, PRESENCE_POP_EASING, PRESENCE_POP_MS, playDigitFlip, playPresencePop, } from './digit-flip/play';
|
|
33
|
-
export type { SendFlightOptions } from './send-flight/flight';
|
|
34
|
-
export { SEND_FLIGHT_EASING, SEND_FLIGHT_MS, playSendFlight } from './send-flight/flight';
|
|
35
|
-
export type { SwipeReveal, SwipeRevealOptions } from './swipe-reveal/swipe';
|
|
36
|
-
export { SWIPE_MAX, SWIPE_THRESHOLD, SWIPE_TWEEN_MS, createSwipeReveal, rubberSwipeOffset, shouldCommitSwipe, } from './swipe-reveal/swipe';
|
|
37
|
-
export type { ScrollTweenOptions } from './scroll-tween/scroll';
|
|
38
|
-
export { SCROLL_TWEEN_MS, playScrollTween } from './scroll-tween/scroll';
|
|
39
|
-
export type { RippleOptions } from './ripple/ripple';
|
|
40
|
-
export { RIPPLE_COLOR, RIPPLE_EASING, RIPPLE_MS, RIPPLE_SIZE_PX, playRipple } from './ripple/ripple';
|
|
41
|
-
export type { Point, Translate, ZoomState, PinchZoom, PinchZoomConfig } from './pinch-zoom/pinch';
|
|
42
|
-
export { PINCH_MAX_SCALE, PINCH_MIN_SCALE, PINCH_WHEEL_FACTOR, boundTranslate, clampScale, createPinchZoom, maxTranslate, nextScaleFromWheel, resetZoom, zoomAtOrigin, zoomTransform, } from './pinch-zoom/pinch';
|
|
43
|
-
export { decodeWaveform, fitWaveform } from './waveform/decode';
|
|
44
|
-
export type { Spoiler, SpoilerOptions } from './spoiler/spoiler';
|
|
45
|
-
export { SPOILER_EASING, SPOILER_MS, createSpoiler } from './spoiler/spoiler';
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|