@ethlete/core 5.0.0-next.14 → 5.0.0-next.15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ethlete/core",
3
- "version": "5.0.0-next.14",
3
+ "version": "5.0.0-next.15",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {
@@ -9,7 +9,8 @@ import { Placement, OffsetOptions, Padding } from '@floating-ui/dom';
9
9
  import { MatchListView, ParticipantViewUnion, MatchRankingView, StageType } from '@ethlete/types';
10
10
  import * as _angular_platform_browser from '@angular/platform-browser';
11
11
  import { FormGroup, AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';
12
- import { Data, Params, Event as Event$1 } from '@angular/router';
12
+ import * as _angular_router from '@angular/router';
13
+ import { Data, Params } from '@angular/router';
13
14
 
14
15
  declare const ANIMATABLE_TOKEN: InjectionToken<AnimatableDirective>;
15
16
  type AnimationEndEvent = {
@@ -81,6 +82,17 @@ declare class AnimatedLifecycleDirective implements AfterViewInit {
81
82
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AnimatedLifecycleDirective, "[etAnimatedLifecycle]", ["etAnimatedLifecycle"], { "skipNextEnter": { "alias": "skipNextEnter"; "required": false; "isSignal": true; }; }, { "stateChange": "stateChange"; "skipNextEnter": "skipNextEnterChange"; }, never, never, true, [{ directive: typeof AnimatableDirective; inputs: {}; outputs: {}; }]>;
82
83
  }
83
84
 
85
+ /**
86
+ * Cascades hover/active-driven color DOWN to descendants explicitly marked with
87
+ * `ColorInteractiveDirective` — this element does not color itself. Use it when a wrapper should
88
+ * expand a nested control's hit/visual area (e.g. clicking a checkbox's label should light up the
89
+ * checkbox itself), never to give a wrapper its own interactive coloring — that's
90
+ * `ColorInteractiveDirective`.
91
+ *
92
+ * Does nothing unless at least one descendant carries `ColorInteractiveDirective` — check for
93
+ * that before adding this. It was mistakenly added to a component with no such descendant once
94
+ * already, where it did nothing but was confusing to read.
95
+ */
84
96
  declare class ColorInteractiveContainerDirective {
85
97
  private styleManager;
86
98
  constructor();
@@ -88,11 +100,38 @@ declare class ColorInteractiveContainerDirective {
88
100
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ColorInteractiveContainerDirective, "[etColorInteractiveContainer]", never, {}, {}, never, never, true, never>;
89
101
  }
90
102
 
103
+ /**
104
+ * Marks a descendant as NOT counting toward an ancestor's `ColorInteractiveDirective`
105
+ * `:hover`/`:active` reaction (via the `:has()` guard in color-interactive-styles.component.css).
106
+ * Use it for content that's incidentally inside an interactive ancestor but isn't part of what
107
+ * makes that ancestor interactive — e.g. a hint/error block sitting inside a form field's frame.
108
+ *
109
+ * This only suppresses the ancestor's OWN reaction to hovering/pressing the excluded element — it
110
+ * has no effect on custom-property inheritance into descendants past the excluded element. If
111
+ * what you actually need is "stop my own cosmetic styling from reacting to a parent's unrelated
112
+ * interaction," this is the wrong tool; that's the class of bug `ColorInteractiveHasFocusDirective`
113
+ * used to have (see its own comment).
114
+ */
91
115
  declare class ColorInteractiveExcludeDirective {
92
116
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ColorInteractiveExcludeDirective, never>;
93
117
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ColorInteractiveExcludeDirective, "[etColorInteractiveExclude]", never, {}, {}, never, never, true, never>;
94
118
  }
95
119
 
120
+ /**
121
+ * Tints `--et-theme-color-primary-*` etc. only when a descendant genuinely has `:focus-visible`
122
+ * (`:has(:focus-visible)`) — never on mouse `:hover`/`:active`. Use this for a wrapper (like a
123
+ * form field's frame) that should show the theme color while its control is focused, but must
124
+ * NOT react to incidental mouse interaction with unrelated nested widgets (a toolbar button, a
125
+ * rendered link) that happen to live inside the same wrapper.
126
+ *
127
+ * Deliberately does NOT also carry `ColorInteractiveDirective`'s `et-color-interactive` class:
128
+ * that class's plain `:hover`/`:active` rules locally override the same (inheriting)
129
+ * `--et-theme-color-primary-rgb`, so anything bubbling up from ANYWHERE in the subtree would
130
+ * leak the transient hover/press color into every descendant reading it for unrelated cosmetics —
131
+ * exactly the bug this directive's only consumer (form-field) shipped once, before the two
132
+ * behaviors were split apart. If you need the plain hover/active reaction too, add
133
+ * `ColorInteractiveDirective` explicitly and make sure you actually want both.
134
+ */
96
135
  declare class ColorInteractiveHasFocusDirective {
97
136
  private styleManager;
98
137
  constructor();
@@ -100,6 +139,19 @@ declare class ColorInteractiveHasFocusDirective {
100
139
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ColorInteractiveHasFocusDirective, "[etColorInteractiveHasFocus]", never, {}, {}, never, never, true, never>;
101
140
  }
102
141
 
142
+ /**
143
+ * Makes an element react to ITS OWN `:hover`/`:active`/`:focus-visible`/`[disabled]` by tinting
144
+ * `--et-theme-color-primary-*`/`-on-primary-*`/`-ink-*` with the current color theme. Use this on
145
+ * a single, self-contained interactive element — a button, a checkbox, a segmented button.
146
+ *
147
+ * Do NOT apply this to a wrapper that also contains OTHER, independently-interactive elements
148
+ * (e.g. a toolbar with its own buttons, or a form-field's control slot). These are ordinary
149
+ * inheriting CSS custom properties, so a descendant reading them for its own cosmetics (a caret
150
+ * color, a link color) gets swept along whenever ANYTHING inside the wrapper is hovered or
151
+ * clicked — not just when the wrapper itself is the thing being interacted with. That exact bug
152
+ * shipped once already; see ColorInteractiveContainerDirective/ColorInteractiveHasFocusDirective
153
+ * for the shapes that avoid it.
154
+ */
103
155
  declare class ColorInteractiveDirective {
104
156
  private styleManager;
105
157
  constructor();
@@ -311,6 +363,17 @@ declare const injectSurfaceContextTracker: {
311
363
  (options: _angular_core.InjectOptions): SurfaceContextTracker | null;
312
364
  };
313
365
 
366
+ /**
367
+ * Same shape as `ColorInteractiveDirective` — reacts to its own `:hover`/`:focus-visible`/
368
+ * `:active`/`[disabled]` — but drives `--et-surface-interaction-*`, a neutral/muted tint, instead
369
+ * of the ambient color theme. Use it for chrome-level interaction feedback that shouldn't borrow
370
+ * the page's brand color (a tab trigger's hover state, a toggle button that should look neutral
371
+ * until it's actually active — see `ButtonDirective`'s `mutedUntilPressed`).
372
+ *
373
+ * Has no container/exclude/has-focus variants: it has no descendant-cascading CSS at all, so
374
+ * applying it to a wrapper with independently-interactive children is safe by construction —
375
+ * unlike `ColorInteractiveDirective`, there's no bubbling-leak failure mode to worry about here.
376
+ */
314
377
  declare class SurfaceInteractiveDirective {
315
378
  private styleManager;
316
379
  constructor();
@@ -2042,7 +2105,7 @@ type InjectUtilTransformConfig<In, Out> = {
2042
2105
  };
2043
2106
  declare const transformOrReturn: <In, Out>(src: Signal<In>, config?: InjectUtilTransformConfig<In, Out>) => Signal<Out>;
2044
2107
  /** Inject the current router event */
2045
- declare const injectRouterEvent: () => Signal<Event$1>;
2108
+ declare const injectRouterEvent: () => Signal<_angular_router.Event>;
2046
2109
  /**
2047
2110
  * Signal that indicates whether the router has been initialized.
2048
2111
  * The router is considered initialized once the first NavigationEnd event with an id different than -1 has been emitted.