@ethlete/core 4.17.0 → 4.18.1

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.
Files changed (44) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/esm2022/lib/components/structured-data/structured-data.component.mjs +3 -3
  3. package/esm2022/lib/directives/animatable/animatable.directive.mjs +3 -3
  4. package/esm2022/lib/directives/animated-if/animated-if.directive.mjs +3 -3
  5. package/esm2022/lib/directives/animated-lifecycle/animated-lifecycle.directive.mjs +3 -3
  6. package/esm2022/lib/directives/animated-overlay/animated-overlay.directive.mjs +3 -3
  7. package/esm2022/lib/directives/click-outside/click-outside.directive.mjs +3 -3
  8. package/esm2022/lib/directives/cursor-drag-scroll/cursor-drag-scroll.directive.mjs +3 -3
  9. package/esm2022/lib/directives/debug/debug.directive.mjs +3 -3
  10. package/esm2022/lib/directives/delayable/delayable.directive.mjs +3 -3
  11. package/esm2022/lib/directives/is-active-element/is-active-element.directive.mjs +3 -3
  12. package/esm2022/lib/directives/is-element/is-element.directive.mjs +3 -3
  13. package/esm2022/lib/directives/let/let.directive.mjs +3 -3
  14. package/esm2022/lib/directives/observe-content/observe-content.directive.mjs +3 -3
  15. package/esm2022/lib/directives/observe-resize/observe-resize.directive.mjs +3 -3
  16. package/esm2022/lib/directives/observe-scroll-state/observe-scroll-state.directive.mjs +3 -3
  17. package/esm2022/lib/directives/observe-visibility/observe-visibility.directive.mjs +3 -3
  18. package/esm2022/lib/directives/repeat/repeat.directive.mjs +3 -3
  19. package/esm2022/lib/directives/root-boundary/root-boundary.directive.mjs +3 -3
  20. package/esm2022/lib/directives/scroll-observer-first-element/scroll-observer-first-element.directive.mjs +3 -3
  21. package/esm2022/lib/directives/scroll-observer-ignore-target/scroll-observer-ignore-target.directive.mjs +3 -3
  22. package/esm2022/lib/directives/scroll-observer-last-element/scroll-observer-last-element.directive.mjs +3 -3
  23. package/esm2022/lib/directives/seo/seo.directive.mjs +3 -3
  24. package/esm2022/lib/pipes/infer-mime-type/infer-mime-type.pipe.mjs +3 -3
  25. package/esm2022/lib/pipes/normalize-game-result-type/normalize-game-result-type.pipe.mjs +3 -3
  26. package/esm2022/lib/pipes/normalize-match-participants/normalize-match-participants.pipe.mjs +3 -3
  27. package/esm2022/lib/pipes/normalize-match-score/normalize-match-score.pipe.mjs +3 -3
  28. package/esm2022/lib/pipes/normalize-match-state/normalize-match-state.pipe.mjs +3 -3
  29. package/esm2022/lib/pipes/normalize-match-type/normalize-match-type.pipe.mjs +3 -3
  30. package/esm2022/lib/pipes/to-array/to-array.pipe.mjs +3 -3
  31. package/esm2022/lib/props/props.directive.mjs +3 -3
  32. package/esm2022/lib/services/click-observer.service.mjs +6 -6
  33. package/esm2022/lib/services/content-observer.service.mjs +6 -6
  34. package/esm2022/lib/services/focus-visible.service.mjs +3 -3
  35. package/esm2022/lib/services/intersection-observer.service.mjs +6 -6
  36. package/esm2022/lib/services/resize-observer.service.mjs +6 -6
  37. package/esm2022/lib/services/router-state.service.mjs +3 -3
  38. package/esm2022/lib/services/viewport.service.mjs +10 -10
  39. package/esm2022/lib/utils/intersection-observer.utils.mjs +2 -2
  40. package/esm2022/lib/utils/signal.utils.mjs +86 -12
  41. package/fesm2022/ethlete-core.mjs +215 -141
  42. package/fesm2022/ethlete-core.mjs.map +1 -1
  43. package/lib/utils/signal.utils.d.ts +30 -0
  44. package/package.json +7 -7
@@ -1,6 +1,7 @@
1
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
+ import { Breakpoint } from '../types';
4
5
  type SignalElementBindingComplexType = HTMLElement | ElementRef<HTMLElement> | QueryList<ElementRef<HTMLElement> | HTMLElement> | Array<ElementRef<HTMLElement> | HTMLElement> | null | undefined;
5
6
  type SignalElementBindingType = HTMLElement | ElementRef<HTMLElement> | Observable<SignalElementBindingComplexType> | Signal<SignalElementBindingComplexType> | QueryList<ElementRef<HTMLElement> | HTMLElement> | ElementSignal;
6
7
  type ElementSignal = Signal<{
@@ -204,4 +205,33 @@ export declare const computedTillTruthy: <T>(source: Signal<T>) => Signal<T | nu
204
205
  * All subsequent changes inside the computation will be ignored.
205
206
  */
206
207
  export declare const computedTillFalsy: <T>(source: Signal<T>) => Signal<T | null>;
208
+ /** Inject a signal containing a boolean value indicating if the viewport is xs */
209
+ export declare const injectIsXs: () => Signal<boolean>;
210
+ /** Inject a signal containing a boolean value indicating if the viewport is sm */
211
+ export declare const injectIsSm: () => Signal<boolean>;
212
+ /** Inject a signal containing a boolean value indicating if the viewport is md */
213
+ export declare const injectIsMd: () => Signal<boolean>;
214
+ /** Inject a signal containing a boolean value indicating if the viewport is lg */
215
+ export declare const injectIsLg: () => Signal<boolean>;
216
+ /** Inject a signal containing a boolean value indicating if the viewport is xl */
217
+ export declare const injectIsXl: () => Signal<boolean>;
218
+ /** Inject a signal containing a boolean value indicating if the viewport is 2xl */
219
+ export declare const injectIs2Xl: () => Signal<boolean>;
220
+ /**
221
+ * Inject a boolean value indicating if the viewport is matching the provided options.
222
+ * This value is not reactive. If you want to react to changes, use the {@link injectObserveBreakpoint} function instead.
223
+ */
224
+ export declare const injectBreakpointIsMatched: (options: {
225
+ min?: number | Breakpoint;
226
+ max?: number | Breakpoint;
227
+ }) => boolean;
228
+ /**
229
+ * Inject a signal containing a boolean value indicating if the viewport is matching the provided options.
230
+ */
231
+ export declare const injectObserveBreakpoint: (options: {
232
+ min?: number | Breakpoint;
233
+ max?: number | Breakpoint;
234
+ }) => Signal<boolean>;
235
+ /** Inject a signal containing the current breakpoint. */
236
+ export declare const injectCurrentBreakpoint: () => Signal<"xs" | "sm" | "md" | "lg" | "xl" | "2xl">;
207
237
  export {};
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@ethlete/core",
3
- "version": "4.17.0",
3
+ "version": "4.18.1",
4
4
  "peerDependencies": {
5
- "@angular/cdk": "17.3.6",
6
- "@angular/common": "17.3.7",
7
- "@angular/core": "17.3.7",
8
- "@angular/forms": "17.3.7",
9
- "@angular/platform-browser": "17.3.7",
10
- "@angular/router": "17.3.7",
5
+ "@angular/cdk": "17.3.8",
6
+ "@angular/common": "17.3.8",
7
+ "@angular/core": "17.3.8",
8
+ "@angular/forms": "17.3.8",
9
+ "@angular/platform-browser": "17.3.8",
10
+ "@angular/router": "17.3.8",
11
11
  "@ethlete/theming": "^2.3.1",
12
12
  "@ethlete/types": "^1.6.2",
13
13
  "@floating-ui/dom": "^1.5.3",