@ethlete/core 4.12.1 → 4.13.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/CHANGELOG.md +14 -0
- package/esm2022/lib/utils/scrollable.utils.mjs +7 -5
- package/esm2022/lib/utils/signal.utils.mjs +141 -12
- package/fesm2022/ethlete-core.mjs +146 -17
- package/fesm2022/ethlete-core.mjs.map +1 -1
- package/lib/directives/animated-lifecycle/animated-lifecycle.directive.d.ts +3 -3
- package/lib/props/create-prop-handlers.d.ts +3 -3
- package/lib/props/props.directive.d.ts +3 -3
- package/lib/utils/signal.utils.d.ts +24 -8
- package/package.json +1 -1
|
@@ -13,10 +13,10 @@ export declare class AnimatedLifecycleDirective implements AfterViewInit {
|
|
|
13
13
|
readonly state$: import("rxjs").Observable<AnimatedLifecycleState>;
|
|
14
14
|
get state(): AnimatedLifecycleState;
|
|
15
15
|
readonly hostClassBindings: {
|
|
16
|
-
remove: (
|
|
16
|
+
remove: (tokens: string) => void;
|
|
17
17
|
removeMany: (tokens: string[]) => void;
|
|
18
|
-
has: (
|
|
19
|
-
push: (
|
|
18
|
+
has: (tokens: string) => boolean;
|
|
19
|
+
push: (tokens: string, signal: import("@angular/core").Signal<unknown>) => void;
|
|
20
20
|
pushMany: (map: Record<string, import("@angular/core").Signal<unknown>>) => void;
|
|
21
21
|
};
|
|
22
22
|
stateChange: import("@angular/core").OutputRef<AnimatedLifecycleState>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ElementRef } from '@angular/core';
|
|
2
2
|
export declare const createPropHandlers: () => {
|
|
3
3
|
classes: {
|
|
4
|
-
remove: (
|
|
4
|
+
remove: (tokens: string) => void;
|
|
5
5
|
removeMany: (tokens: string[]) => void;
|
|
6
|
-
has: (
|
|
7
|
-
push: (
|
|
6
|
+
has: (tokens: string) => boolean;
|
|
7
|
+
push: (tokens: string, signal: import("@angular/core").Signal<unknown>) => void;
|
|
8
8
|
pushMany: (map: Record<string, import("@angular/core").Signal<unknown>>) => void;
|
|
9
9
|
};
|
|
10
10
|
attributes: {
|
|
@@ -9,10 +9,10 @@ export declare class PropsDirective {
|
|
|
9
9
|
}>>;
|
|
10
10
|
propHandlers: {
|
|
11
11
|
classes: {
|
|
12
|
-
remove: (
|
|
12
|
+
remove: (tokens: string) => void;
|
|
13
13
|
removeMany: (tokens: string[]) => void;
|
|
14
|
-
has: (
|
|
15
|
-
push: (
|
|
14
|
+
has: (tokens: string) => boolean;
|
|
15
|
+
push: (tokens: string, signal: import("@angular/core").Signal<unknown>) => void;
|
|
16
16
|
pushMany: (map: Record<string, import("@angular/core").Signal<unknown>>) => void;
|
|
17
17
|
};
|
|
18
18
|
attributes: {
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { ElementRef, Injector, QueryList, Signal, WritableSignal } from '@angular/core';
|
|
1
|
+
import { EffectRef, ElementRef, Injector, QueryList, Signal, WritableSignal } from '@angular/core';
|
|
2
2
|
import { FormArray, FormControl, FormGroup } from '@angular/forms';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
type SignalElementBindingComplexType = HTMLElement | ElementRef<HTMLElement> | QueryList<ElementRef<HTMLElement> | HTMLElement> | Array<ElementRef<HTMLElement> | HTMLElement> | null | undefined;
|
|
5
5
|
type SignalElementBindingType = HTMLElement | ElementRef<HTMLElement> | Observable<SignalElementBindingComplexType> | Signal<SignalElementBindingComplexType> | QueryList<ElementRef<HTMLElement> | HTMLElement> | ElementSignal;
|
|
6
6
|
type ElementSignal = Signal<{
|
|
7
|
+
/** @deprecated Always use currentElements */
|
|
7
8
|
currentElement: HTMLElement | null;
|
|
9
|
+
/** @deprecated Always use previousElements */
|
|
8
10
|
previousElement: HTMLElement | null;
|
|
9
11
|
currentElements: HTMLElement[];
|
|
10
12
|
previousElements: HTMLElement[];
|
|
@@ -28,17 +30,17 @@ export declare const buildSignalEffects: <T extends Record<string, Signal<unknow
|
|
|
28
30
|
};
|
|
29
31
|
export declare const signalIsRendered: () => Signal<boolean>;
|
|
30
32
|
export declare const signalClasses: <T extends Record<string, Signal<unknown>>>(el: SignalElementBindingType, classMap: T) => {
|
|
31
|
-
remove: (
|
|
33
|
+
remove: (tokens: string) => void;
|
|
32
34
|
removeMany: (tokens: string[]) => void;
|
|
33
|
-
has: (
|
|
34
|
-
push: (
|
|
35
|
+
has: (tokens: string) => boolean;
|
|
36
|
+
push: (tokens: string, signal: Signal<unknown>) => void;
|
|
35
37
|
pushMany: (map: Record<string, Signal<unknown>>) => void;
|
|
36
38
|
};
|
|
37
39
|
export declare const signalHostClasses: <T extends Record<string, Signal<unknown>>>(classMap: T) => {
|
|
38
|
-
remove: (
|
|
40
|
+
remove: (tokens: string) => void;
|
|
39
41
|
removeMany: (tokens: string[]) => void;
|
|
40
|
-
has: (
|
|
41
|
-
push: (
|
|
42
|
+
has: (tokens: string) => boolean;
|
|
43
|
+
push: (tokens: string, signal: Signal<unknown>) => void;
|
|
42
44
|
pushMany: (map: Record<string, Signal<unknown>>) => void;
|
|
43
45
|
};
|
|
44
46
|
export declare const signalAttributes: <T extends Record<string, Signal<unknown>>>(el: SignalElementBindingType, attributeMap: T) => {
|
|
@@ -83,7 +85,14 @@ export declare const signalElementDimensions: (el: SignalElementBindingType) =>
|
|
|
83
85
|
export declare const signalHostElementDimensions: () => Signal<ElementDimensions>;
|
|
84
86
|
export declare const signalElementMutations: (el: SignalElementBindingType, options?: MutationObserverInit) => Signal<MutationRecord | null>;
|
|
85
87
|
export declare const signalHostElementMutations: (options?: MutationObserverInit) => Signal<MutationRecord | null>;
|
|
86
|
-
export
|
|
88
|
+
export type SignalElementScrollStateOptions = {
|
|
89
|
+
/** The initial scroll position to scroll to. Once a truthy value get's emitted, all further values will be ignored. */
|
|
90
|
+
initialScrollPosition?: Signal<{
|
|
91
|
+
x: number;
|
|
92
|
+
y: number;
|
|
93
|
+
} | null>;
|
|
94
|
+
};
|
|
95
|
+
export declare const signalElementScrollState: (el: SignalElementBindingType, options?: SignalElementScrollStateOptions) => Signal<{
|
|
87
96
|
canScroll: boolean;
|
|
88
97
|
canScrollHorizontally: boolean;
|
|
89
98
|
canScrollVertically: boolean;
|
|
@@ -166,4 +175,11 @@ export declare const injectQueryParam: <T = string | null>(key: string, config?:
|
|
|
166
175
|
export declare const injectRouteDataItem: <T = unknown>(key: string, config?: InjectUtilConfig & InjectUtilTransformConfig<unknown, T>) => Signal<T>;
|
|
167
176
|
/** Inject a specific path parameter as a signal */
|
|
168
177
|
export declare const injectPathParam: <T = string | null>(key: string, config?: InjectUtilConfig & InjectUtilTransformConfig<string | null, T>) => Signal<T>;
|
|
178
|
+
export declare const createIsRenderedSignal: () => {
|
|
179
|
+
state: WritableSignal<boolean>;
|
|
180
|
+
bind: () => EffectRef;
|
|
181
|
+
};
|
|
182
|
+
export declare const createCanAnimateSignal: () => {
|
|
183
|
+
state: WritableSignal<boolean>;
|
|
184
|
+
};
|
|
169
185
|
export {};
|