@ethlete/core 1.5.1 → 1.6.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/esm2020/lib/utils/scrollable.utils.mjs +81 -1
- package/fesm2015/ethlete-core.mjs +81 -1
- package/fesm2015/ethlete-core.mjs.map +1 -1
- package/fesm2020/ethlete-core.mjs +81 -1
- package/fesm2020/ethlete-core.mjs.map +1 -1
- package/lib/directives/animated-lifecycle/animated-lifecycle.directive.d.ts +2 -2
- package/lib/utils/scrollable.utils.d.ts +49 -0
- package/package.json +1 -1
|
@@ -8,8 +8,8 @@ export declare class AnimatedLifecycleDirective {
|
|
|
8
8
|
private readonly _animatable;
|
|
9
9
|
private readonly _classList;
|
|
10
10
|
private _state$;
|
|
11
|
-
readonly state$: import("rxjs").Observable<"
|
|
12
|
-
get state(): "
|
|
11
|
+
readonly state$: import("rxjs").Observable<"left" | "entering" | "entered" | "leaving" | "init">;
|
|
12
|
+
get state(): "left" | "entering" | "entered" | "leaving" | "init";
|
|
13
13
|
private readonly _bindings;
|
|
14
14
|
enter(config?: {
|
|
15
15
|
onlyTransition?: boolean;
|
|
@@ -1 +1,50 @@
|
|
|
1
1
|
export declare const elementCanScroll: (element: HTMLElement) => boolean;
|
|
2
|
+
export interface IsElementVisibleOptions {
|
|
3
|
+
/**
|
|
4
|
+
* The element to check if it is visible inside a container.
|
|
5
|
+
*/
|
|
6
|
+
element?: HTMLElement | null;
|
|
7
|
+
/**
|
|
8
|
+
* The container to check if the element is visible inside.
|
|
9
|
+
* @default document.documentElement
|
|
10
|
+
*/
|
|
11
|
+
container?: HTMLElement | null;
|
|
12
|
+
}
|
|
13
|
+
export interface CurrentElementVisibility {
|
|
14
|
+
/**
|
|
15
|
+
* Whether the element is visible in the inline direction.
|
|
16
|
+
*/
|
|
17
|
+
inline: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Whether the element is visible in the block direction.
|
|
20
|
+
*/
|
|
21
|
+
block: boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare const isElementVisible: (options: IsElementVisibleOptions) => CurrentElementVisibility | null;
|
|
24
|
+
export interface ScrollToElementOptions {
|
|
25
|
+
/**
|
|
26
|
+
* The element to scroll to.
|
|
27
|
+
*/
|
|
28
|
+
element?: HTMLElement | null;
|
|
29
|
+
/**
|
|
30
|
+
* The scroll container to scroll to the element in.
|
|
31
|
+
* @default document.documentElement
|
|
32
|
+
*/
|
|
33
|
+
container?: HTMLElement | null;
|
|
34
|
+
/**
|
|
35
|
+
* The direction to scroll in.
|
|
36
|
+
* @default 'both'
|
|
37
|
+
*/
|
|
38
|
+
direction?: 'inline' | 'block' | 'both';
|
|
39
|
+
/**
|
|
40
|
+
* The origin of the element to scroll to.
|
|
41
|
+
* @default 'nearest'
|
|
42
|
+
*/
|
|
43
|
+
origin?: 'start' | 'end' | 'center' | 'nearest';
|
|
44
|
+
/**
|
|
45
|
+
* The scroll behavior.
|
|
46
|
+
* @default 'smooth'
|
|
47
|
+
*/
|
|
48
|
+
behavior?: ScrollBehavior;
|
|
49
|
+
}
|
|
50
|
+
export declare const scrollToElement: (options: ScrollToElementOptions) => void;
|