@ethlete/core 4.13.0 → 4.14.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.
@@ -8,17 +8,17 @@ export declare const createPropHandlers: () => {
8
8
  pushMany: (map: Record<string, import("@angular/core").Signal<unknown>>) => void;
9
9
  };
10
10
  attributes: {
11
- remove: (...tokens: string[]) => void;
11
+ remove: (tokens: string) => void;
12
12
  removeMany: (tokens: string[]) => void;
13
- has: (token: string) => boolean;
14
- push: (tokenString: string, signal: import("@angular/core").Signal<unknown>) => void;
13
+ has: (tokens: string) => boolean;
14
+ push: (tokens: string, signal: import("@angular/core").Signal<unknown>) => void;
15
15
  pushMany: (map: Record<string, import("@angular/core").Signal<unknown>>) => void;
16
16
  };
17
17
  styles: {
18
- remove: (...tokens: string[]) => void;
18
+ remove: (tokens: string) => void;
19
19
  removeMany: (tokens: string[]) => void;
20
- has: (token: string) => boolean;
21
- push: (tokenString: string, signal: import("@angular/core").Signal<unknown>) => void;
20
+ has: (tokens: string) => boolean;
21
+ push: (tokens: string, signal: import("@angular/core").Signal<unknown>) => void;
22
22
  pushMany: (map: Record<string, import("@angular/core").Signal<unknown>>) => void;
23
23
  };
24
24
  id: string;
@@ -16,17 +16,17 @@ export declare class PropsDirective {
16
16
  pushMany: (map: Record<string, import("@angular/core").Signal<unknown>>) => void;
17
17
  };
18
18
  attributes: {
19
- remove: (...tokens: string[]) => void;
19
+ remove: (tokens: string) => void;
20
20
  removeMany: (tokens: string[]) => void;
21
- has: (token: string) => boolean;
22
- push: (tokenString: string, signal: import("@angular/core").Signal<unknown>) => void;
21
+ has: (tokens: string) => boolean;
22
+ push: (tokens: string, signal: import("@angular/core").Signal<unknown>) => void;
23
23
  pushMany: (map: Record<string, import("@angular/core").Signal<unknown>>) => void;
24
24
  };
25
25
  styles: {
26
- remove: (...tokens: string[]) => void;
26
+ remove: (tokens: string) => void;
27
27
  removeMany: (tokens: string[]) => void;
28
- has: (token: string) => boolean;
29
- push: (tokenString: string, signal: import("@angular/core").Signal<unknown>) => void;
28
+ has: (tokens: string) => boolean;
29
+ push: (tokens: string, signal: import("@angular/core").Signal<unknown>) => void;
30
30
  pushMany: (map: Record<string, import("@angular/core").Signal<unknown>>) => void;
31
31
  };
32
32
  id: string;
@@ -11,21 +11,19 @@ type ElementSignal = Signal<{
11
11
  currentElements: HTMLElement[];
12
12
  previousElements: HTMLElement[];
13
13
  }>;
14
- export declare const buildSignalEffects: <T extends Record<string, Signal<unknown>>>(config: {
15
- map: T;
16
- eachItemFn: (pair: {
17
- key: string;
18
- value: unknown;
19
- }) => void;
20
- cleanupFn: (pair: {
21
- key: string;
22
- value: unknown;
23
- }) => void;
24
- }) => {
25
- remove: (...tokens: string[]) => void;
14
+ export interface BuildSignalEffectsConfig<T extends Record<string, Signal<unknown>>> {
15
+ /** The tokens to apply and their signal value */
16
+ tokenMap: T;
17
+ /** This function will be invoked for elements that were removed from the signal effects */
18
+ cleanupFn: (el: HTMLElement, tokens: string[]) => void;
19
+ /** This function will be invoked for elements that were added to the signal effects or when their signal value changes */
20
+ updateFn: (el: HTMLElement, tokens: string[], conditionResult: unknown) => void;
21
+ }
22
+ export declare const buildSignalEffects: <T extends Record<string, Signal<unknown>>>(el: SignalElementBindingType, config: BuildSignalEffectsConfig<T>) => {
23
+ remove: (tokens: string) => void;
26
24
  removeMany: (tokens: string[]) => void;
27
- has: (token: string) => boolean;
28
- push: (tokenString: string, signal: Signal<unknown>) => void;
25
+ has: (tokens: string) => boolean;
26
+ push: (tokens: string, signal: Signal<unknown>) => void;
29
27
  pushMany: (map: Record<string, Signal<unknown>>) => void;
30
28
  };
31
29
  export declare const signalIsRendered: () => Signal<boolean>;
@@ -44,31 +42,31 @@ export declare const signalHostClasses: <T extends Record<string, Signal<unknown
44
42
  pushMany: (map: Record<string, Signal<unknown>>) => void;
45
43
  };
46
44
  export declare const signalAttributes: <T extends Record<string, Signal<unknown>>>(el: SignalElementBindingType, attributeMap: T) => {
47
- remove: (...tokens: string[]) => void;
45
+ remove: (tokens: string) => void;
48
46
  removeMany: (tokens: string[]) => void;
49
- has: (token: string) => boolean;
50
- push: (tokenString: string, signal: Signal<unknown>) => void;
47
+ has: (tokens: string) => boolean;
48
+ push: (tokens: string, signal: Signal<unknown>) => void;
51
49
  pushMany: (map: Record<string, Signal<unknown>>) => void;
52
50
  };
53
51
  export declare const signalHostAttributes: <T extends Record<string, Signal<unknown>>>(attributeMap: T) => {
54
- remove: (...tokens: string[]) => void;
52
+ remove: (tokens: string) => void;
55
53
  removeMany: (tokens: string[]) => void;
56
- has: (token: string) => boolean;
57
- push: (tokenString: string, signal: Signal<unknown>) => void;
54
+ has: (tokens: string) => boolean;
55
+ push: (tokens: string, signal: Signal<unknown>) => void;
58
56
  pushMany: (map: Record<string, Signal<unknown>>) => void;
59
57
  };
60
58
  export declare const signalStyles: <T extends Record<string, Signal<unknown>>>(el: SignalElementBindingType, styleMap: T) => {
61
- remove: (...tokens: string[]) => void;
59
+ remove: (tokens: string) => void;
62
60
  removeMany: (tokens: string[]) => void;
63
- has: (token: string) => boolean;
64
- push: (tokenString: string, signal: Signal<unknown>) => void;
61
+ has: (tokens: string) => boolean;
62
+ push: (tokens: string, signal: Signal<unknown>) => void;
65
63
  pushMany: (map: Record<string, Signal<unknown>>) => void;
66
64
  };
67
65
  export declare const signalHostStyles: <T extends Record<string, Signal<unknown>>>(styleMap: T) => {
68
- remove: (...tokens: string[]) => void;
66
+ remove: (tokens: string) => void;
69
67
  removeMany: (tokens: string[]) => void;
70
- has: (token: string) => boolean;
71
- push: (tokenString: string, signal: Signal<unknown>) => void;
68
+ has: (tokens: string) => boolean;
69
+ push: (tokens: string, signal: Signal<unknown>) => void;
72
70
  pushMany: (map: Record<string, Signal<unknown>>) => void;
73
71
  };
74
72
  export interface LogicalSize {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ethlete/core",
3
- "version": "4.13.0",
3
+ "version": "4.14.0",
4
4
  "peerDependencies": {
5
5
  "@angular/cdk": "17.3.6",
6
6
  "@angular/common": "17.3.6",