@ethlete/core 5.0.0-next.30 → 5.0.0-next.32

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.30",
3
+ "version": "5.0.0-next.32",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {
@@ -14,7 +14,6 @@
14
14
  "@ethlete/types": "^2.0.0-beta.4",
15
15
  "@floating-ui/dom": "1.7.6",
16
16
  "@nx/devkit": "23.1.0-beta.7",
17
- "@nx/vite": "23.1.0-beta.7",
18
17
  "rxjs": "7.8.2",
19
18
  "ts-morph": "21.0.1",
20
19
  "typescript": "6.0.3",
@@ -11,6 +11,7 @@ import * as _angular_platform_browser from '@angular/platform-browser';
11
11
  import { AbstractControl, FormGroup, ValidationErrors, ValidatorFn } from '@angular/forms';
12
12
  import * as _angular_router from '@angular/router';
13
13
  import { Data, Params, Router } from '@angular/router';
14
+ import { FieldTree } from '@angular/forms/signals';
14
15
 
15
16
  declare const ANIMATABLE_TOKEN: InjectionToken<AnimatableDirective>;
16
17
  type AnimationEndEvent = {
@@ -133,6 +134,10 @@ declare class ColorInteractiveExcludeDirective {
133
134
  * NOT react to incidental mouse interaction with unrelated nested widgets (a toolbar button, a
134
135
  * rendered link) that happen to live inside the same wrapper.
135
136
  *
137
+ * The color it resolves to is the theme's BASE accent, not the `-focus` variant: the `-focus`
138
+ * shade is the treatment for an element that is itself focused, whereas a container only mirroring
139
+ * a child's focus should read as the plain accent color.
140
+ *
136
141
  * Deliberately does NOT also carry `ColorInteractiveDirective`'s `et-color-interactive` class:
137
142
  * that class's plain `:hover`/`:active` rules locally override the same (inheriting)
138
143
  * `--et-theme-color-primary-rgb`, so anything bubbling up from ANYWHERE in the subtree would
@@ -262,12 +267,24 @@ declare class AutoSurfaceDirective {
262
267
  private ownSurfaceProvider;
263
268
  private contextSurfaceProvider;
264
269
  private surfaceThemes;
270
+ private surfaceContextTracker;
271
+ private elementRef;
265
272
  /**
266
273
  * Explicit surface provider to resolve the surface relative to. Falls back to the
267
274
  * surface provider from the surrounding (trigger) context when not set.
268
275
  */
269
276
  surfaceProvider: _angular_core.InputSignal<ProvideSurfaceDirective | null>;
277
+ private consultsOverlayContext;
270
278
  resolvedSurface: _angular_core.Signal<string | null>;
279
+ /**
280
+ * Opt this auto-surface out of the overlay surface-context tracker. An overlay
281
+ * *panel* (menu, select/date/cascader panel, tooltip, toggletip) is its overlay's
282
+ * own painted surface, so it must adopt the overlay elevation from its injector or
283
+ * explicit `surfaceProvider` — not stack a level above it. The tracker exists for
284
+ * content rendered *inside* such a panel, whose injector points back at the trigger
285
+ * location and therefore cannot see the overlay it visually lives in.
286
+ */
287
+ ignoreOverlaySurfaceContext(): void;
271
288
  constructor();
272
289
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AutoSurfaceDirective, never>;
273
290
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AutoSurfaceDirective, "[etAutoSurface]", never, { "surfaceProvider": { "alias": "surfaceProvider"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof ProvideSurfaceDirective; inputs: {}; outputs: {}; }]>;
@@ -433,11 +450,22 @@ type SurfaceContextEntry = {
433
450
  id: string;
434
451
  type: SurfaceType;
435
452
  elevation: number;
453
+ element: HTMLElement;
454
+ };
455
+ type SurfaceContextSurface = {
456
+ type: SurfaceType;
457
+ elevation: number;
436
458
  };
437
459
  type SurfaceContextTracker = {
438
460
  topType: Signal<SurfaceType | null>;
439
461
  topElevation: Signal<number>;
440
- register: (type: SurfaceType, elevation: number) => () => void;
462
+ register: (type: SurfaceType, elevation: number, element: HTMLElement) => () => void;
463
+ /**
464
+ * The surface of the innermost registered overlay whose pane actually contains `host` in the DOM,
465
+ * or `null` when `host` sits outside every open overlay. Reactive: reads the entries signal, so
466
+ * calling it inside a computed re-runs when overlays open/close.
467
+ */
468
+ surfaceForElement: (host: HTMLElement) => SurfaceContextSurface | null;
441
469
  };
442
470
  declare const provideSurfaceContextTracker: () => _angular_core.Provider[];
443
471
  declare const injectSurfaceContextTracker: {
@@ -1611,6 +1639,13 @@ type OverlayRuntimeCloseEvent<TResult = unknown> = {
1611
1639
  result: TResult | undefined;
1612
1640
  source: OverlayRuntimeCloseSource;
1613
1641
  };
1642
+ /**
1643
+ * A synchronous veto for a pending close. Return `false` to cancel the close (the overlay stays
1644
+ * open); return `true` to let it proceed. Registered via `overlayRef.registerCloseGuard`. An async
1645
+ * decision (e.g. a confirm dialog) lives in the guard's owner, which re-issues the close through
1646
+ * `overlayRef.forceClose` once resolved. `reference-detached` closes bypass all guards.
1647
+ */
1648
+ type OverlayRuntimeCloseGuard<TResult = unknown> = (event: OverlayRuntimeCloseEvent<TResult>) => boolean;
1614
1649
  type OverlayRuntimeComponentBase = {
1615
1650
  animatedLifecycle?: Signal<AnimatedLifecycleDirective | undefined>;
1616
1651
  };
@@ -1667,6 +1702,11 @@ declare const createOverlayRuntimeRef: <TComponent extends object, TResult = unk
1667
1702
  componentInstance: _angular_core.Signal<TComponent | null>;
1668
1703
  beforeOpenedSubject: Subject<void>;
1669
1704
  close(result?: TResult, source?: OverlayRuntimeCloseSource): void;
1705
+ /** Close bypassing every registered close guard — used by a guard's owner to commit a
1706
+ * close it previously vetoed (e.g. after an async confirm resolved). */
1707
+ forceClose(result?: TResult, source?: OverlayRuntimeCloseSource): void;
1708
+ /** Register a synchronous veto for pending closes. Returns an unregister function. */
1709
+ registerCloseGuard(guard: OverlayRuntimeCloseGuard<TResult>): () => void;
1670
1710
  beforeOpened(): Observable<void>;
1671
1711
  afterOpened(): Observable<void>;
1672
1712
  beforeClosed(): Observable<OverlayRuntimeCloseEvent<TResult>>;
@@ -2991,5 +3031,97 @@ declare const injectTitleStore: {
2991
3031
  };
2992
3032
  declare const applyHeadTitleBinding: (binding: MaybeSignal<string | number | null | undefined>, options?: Omit<TitlePart, "text">) => void;
2993
3033
 
2994
- export { ANIMATABLE_TOKEN, ANIMATED_IF_TOKEN, ANIMATED_LIFECYCLE_TOKEN, ANIMATION_DEBUG_STORAGE_KEY, AT_LEAST_ONE_REQUIRED, AnimatableDirective, AnimatedIfDirective, AnimatedLifecycleDirective, AnimatedOverlayDirective, AutoSurfaceDirective, BOUNDARY_ELEMENT_TOKEN, BREAKPOINT_INSTANCE_TOKEN, BREAKPOINT_ORDER, COLOR_PROVIDER, ClickOutsideDirective, ColorInteractiveContainerDirective, ColorInteractiveDirective, ColorInteractiveExcludeDirective, ColorInteractiveHasFocusDirective, DEFAULT_MULTI_INSTANCE_RELS, DEFAULT_MULTI_INSTANCE_TAGS, DEFAULT_VIEWPORT_CONFIG, DISABLE_LOGGER_PARAM, DragHandleDirective, ET_DISABLE_SCROLL_TOP, ET_DISABLE_SCROLL_TOP_AS_RETURN_ROUTE, ET_DISABLE_SCROLL_TOP_ON_PATH_PARAM_CHANGE, ET_PROPERTY_REMOVED, FOCUSABLE_SELECTOR, FOCUS_VISIBLE_TRACKER_TOKEN, HtmlToMarkdownPipe, IS_ARRAY_NOT_EMPTY, IS_EMAIL, InferMimeTypePipe, InitialsPipe, IsArrayNotEmpty, IsEmail, jsonLd_d as JsonLD, KeyPressManager, MUST_MATCH, MarkdownToHtmlPipe, MatchStateType, MustMatch, NormalizeGameResultTypePipe, NormalizeMatchParticipantsPipe, NormalizeMatchScorePipe, NormalizeMatchStatePipe, NormalizeMatchTypePipe, PropsDirective, ProvideColorDirective, ProvideSurfaceDirective, RUNTIME_ERROR_NO_DATA, RepeatDirective, ResizeHandlesComponent, RuntimeError, SEO_DIRECTIVE_TOKEN, SURFACE_PROVIDER, SURFACE_TYPE, ScrollObserverDirective, ScrollObserverEndDirective, ScrollObserverStartDirective, SeoDirective, SlugifyPipe, StructuredDataComponent, SurfaceInteractiveDirective, ToArrayPipe, TypedQueryList, ValidateAtLeastOneRequired, Validators, animationDebugLog, applyAlternateBinding, applyAlternateLanguagesBindings, applyArticleBindings, applyAuthorBinding, applyCanonicalBinding, applyCenteredPosition, applyDescriptionBinding, applyGlobalPosition, applyHeadBinding, applyHeadTitleBinding, applyHostListener, applyHostListeners, applyInitialFocus, applyKeywordsBinding, applyLinkBinding, applyMetaBinding, applyNextBinding, applyOgBinding, applyOpenGraphBindings, applyPrevBinding, applyResourceHintsBindings, applyRobotsBinding, applySocialMediaBindings, applyStructuredDataBinding, applyTwitterCardBindings, areScrollStatesEqual, bindProps, boolBreakpointTransform, booleanBreakpointAttribute, boundingClientRectToElementRect, breakpointTransformBase, buildElementSignal, buildSignalEffects, canUseSessionMemory, clamp, clone, cloneFormGroup, computedTillFalsy, computedTillTruthy, controlValueSignal, controlValueSignalWithPrevious, copyToClipboard, createAnchoredPositionCleanup, createArrayPropertyBinding, createAutoSessionMemoryKey, createBulkPropertyBinding, createCanAnimateSignal, createComponentId, createCssColorThemeName, createCssSurfaceName, createDependencyStash, createDestroy, createDocumentElementSignal, createElementDictionary, createElementDimensions, createEmptyElementSignal, createFlipAnimation, createFlipAnimationGroup, createHostProps, createIsRenderedSignal, createLogger, createOverlayRuntimeRef, createPropHandlers, createPropertyBinding, createProps, createProvider, createRootProvider, createRootThemeCss, createRoute, createRouterState, createRxHostListener, createSessionMemory, createSetup, createStaticProvider, createStaticRootProvider, createSwatchCss, createSwipeTracker, createTailwindColorThemes, createTailwindCssVar, createTailwindRgbVar, createThemeStyle, createUserConsentProvider, deferredSignal, deleteCookie, easeElastic, easeIn, easeInOut, easeLinear, easeOut, easeOutBack, easeOutBackStrong, elementCanScroll, equal, firstElementSignal, focusElement, forceReflow, formatRuntimeError, fromNextFrame, getCookie, getDomain, getElementScrollCoordinates, getFocusableElements, getFormGroupValue, getGroupMatchPoints, getGroupMatchScore, getHeadingElement, getKnockoutMatchScore, getMatchScoreSubLine, getObjectProperty, getScrollContainerTarget, getScrollItemTarget, getScrollSnapTarget, hasCookie, htmlToMarkdown, inferMimeType, initials, injectAngularRootElement, injectAnimatedBlockSize, injectBoundaryElement, injectBreakpointInput, injectBreakpointIsMatched, injectBreakpointObserver, injectCanHover, injectColorThemes, injectColorThemesPrefix, injectCurrentBreakpoint, injectDeviceInputType, injectDisplayOrientation, injectErrorTheme, injectFocusVisibleTracker, injectFragment, injectHasPrecisionInput, injectHasTouchInput, injectHostElement, injectIs2Xl, injectIsLandscape, injectIsLg, injectIsMd, injectIsPortrait, injectIsRouterInitialized, injectIsSm, injectIsXl, injectIsXs, injectLinkStore, injectLinkStoreConfig, injectLocale, injectMediaQueryIsMatched, injectMetaConfig, injectMetaStore, injectObserveBreakpoint, injectObserveMediaQuery, injectOverlayRuntime, injectPathParam, injectPathParamChanges, injectPathParams, injectPrefersReducedMotion, injectQueryParam, injectQueryParamChanges, injectQueryParams, injectRenderer, injectRoute, injectRouteData, injectRouteDataItem, injectRouteTitle, injectRouterEvent, injectRouterState, injectScrollbarDimensions, injectStructuredDataConfig, injectStructuredDataStore, injectStyleManager, injectSuccessTheme, injectSurfaceContextTracker, injectSurfaceThemes, injectSurfaceThemesPrefix, injectTemplateRef, injectTitleConfig, injectTitleStore, injectUrl, injectViewportConfig, injectViewportDimensions, injectViewportSize, injectWarningTheme, isAnimationDebugEnabled, isArray, isElementSignal, isElementVisible, isFocusable, isGroupMatch, isHTMLElement, isKnockoutMatch, isObject, markdownToHtml, maybeSignalValue, memoizeSignal, nextFrame, normalizeGameResultType, normalizeMatchParticipant, normalizeMatchParticipants, normalizeMatchScore, normalizeMatchState, normalizeMatchType, numberBreakpointAttribute, numberBreakpointTransform, previousSignalValue, provideBoundaryElement, provideBreakpointInstance, provideBreakpointObserver, provideColorThemes, provideColorThemesWithTailwind4, provideFocusVisibleTracker, provideLinkStore, provideLinkStoreConfig, provideLocale, provideMetaConfig, provideMetaStore, provideOverlayRuntime, provideRenderer, provideStructuredDataConfig, provideStructuredDataStore, provideStyleManager, provideSurfaceContextTracker, provideSurfaceThemesWithTailwind4, provideTitleConfig, provideTitleStore, provideViewportConfig, randomId, readFromClipboard, resetPositioningStyles, resolveAppRootColorProvider, resolveSurfaceByElevation, round, routerDisableScrollTop, scrollToElement, setBackdropStyles, setBaseElementStyles, setCookie, setInputSignal, setupFocusTrap, setupPositioning, setupScrollRestoration, signalAnimatedNumber, signalAttributes, signalClasses, signalElementChildren, signalElementDimensions, signalElementIntersection, signalElementLastScrollDirection, signalElementMutations, signalElementScrollState, signalHostAttributes, signalHostClasses, signalHostElementDimensions, signalHostElementIntersection, signalHostElementLastScrollDirection, signalHostElementMutations, signalHostElementScrollState, signalHostStyles, signalIsRendered, signalStyles, slugify, switchQueryListChanges, syncSignal, templateComputed, toArray, toArrayTrackByFn, toStringBinding, transformOrReturn, typedBreakpointTransform, unbindProps, useCursorDragScroll, writeScrollbarSizeToCssVariables, writeViewportSizeToCssVariables, ɵProvideColorThemes, ɵProvideColorThemesPrefix, ɵProvideSurfaceThemes, ɵProvideSurfaceThemesPrefix };
2995
- export type { AlternateLanguagesConfig, AlternateLink, AngularRenderer, AnimatedBlockSizeConfig, AnimatedLifecycleState, AnimatedNumberSignal, AnimatedOverlayComponentBase, AnimatedOverlayMountConfig, AnimatedOverlayState, AnimatedSizeAxis, AnimationEndEvent, AnyTemplateType, ArticleConfig, BindPropsOptions, BoolBreakpointSignal, Breakpoint, BreakpointInput, BreakpointMap, BuildMediaQueryOptions, BuildSignalEffectsConfig, ColorTheme, ColorThemeType, ComponentTemplate, ComponentTypeWithInputs, ConsentHandler, ControlValueSignalOptions, CreateLoggerConfig, CreatePropsOptions, CreateProviderOptions, CreateSessionMemoryConfig, CreateUserConsentProviderOptions, CurrentElementVisibility, CursorDragScrollDirection, CursorDragScrollOptions, DragMoveEvent, DragStartEvent, ElementDimensions, ElementLastScrollDirection, ElementLastScrollDirectionType, ElementRect, ElementScrollState, ElementSignal, ElementSignalValue, ElementSize, EthleteColorThemeNameRegistry, EthleteSurfaceThemeNameRegistry, FacebookCard, FlipAnimationConfig, HeadBinding, HostProps, InjectQueryParamConfig, InjectUtilConfig, InjectUtilTransformConfig, IntersectionObserverEntryWithDetails, IsElementVisibleOptions, LinkConfig, LinkStoreConfig, LogicalSize, MaybeObservable, MaybeSignal, MetaConfig, MetaTagConfig, NgClassType, NgTemplateTemplate, NormalizedGameResultType, NormalizedMatchParticipant, NormalizedMatchParticipants, NormalizedMatchScore, NullableElementDimensions, NumberBreakpointSignal, OnThemeColorMap, OpenGraph, OpenGraphConfig, OverlayRuntimeAnchoredPosition, OverlayRuntimeAnimationDelegate, OverlayRuntimeAnimationDelegateEnterContext, OverlayRuntimeAnimationDelegateLeaveContext, OverlayRuntimeAutoFocusTarget, OverlayRuntimeCenteredPosition, OverlayRuntimeCloseEvent, OverlayRuntimeCloseSource, OverlayRuntimeComponentBase, OverlayRuntimeElements, OverlayRuntimeGlobalPosition, OverlayRuntimeGlobalPositionAlignment, OverlayRuntimeMountConfig, OverlayRuntimePositionStrategy, OverlayRuntimeRef, OverlayRuntimeRole, OverlayRuntimeShiftOptions, OverlayRuntimeState, PropHandlers, Props, PropsAttachedElements, PropsAttachedElementsInternal, PropsInternal, ProviderResult, RegisteredColorThemeName, RegisteredSurfaceThemeName, ResizeEdge, ResizeMoveEvent, ResourceHintsConfig, RobotsConfig, RootProviderResult, RouterDisableScrollTopConfig, RouterState, ScrollContainerTarget, ScrollItemTarget, ScrollSnapOrigin, ScrollSnapTarget, ScrollToElementOptions, SeoConfig, SetupScrollRestorationConfig, SignalAnimatedNumberOptions, SignalElementBindingComplexType, SignalElementBindingType, SignalElementIntersectionOptions, SignalElementScrollStateOptions, SocialMediaConfig, StaticProviderResult, StringTemplate, StructuredDataConfig, StyleManager, SurfaceContextEntry, SurfaceContextTracker, SurfaceInteractionColor, SurfaceTheme, SurfaceThemeColor, SurfaceType, SwipeEndEvent, SwipeTracker, SwipeUpdateEvent, SyncSignalOptions, TemplateRefWithContext, ThemeColor, ThemeColorMap, ThemeHSLColor, ThemeInkColorMap, ThemeRGBColor, ThemeSwatch, TitleConfig, TitlePart, Translatable, TwitterCard, TwitterCardConfig, TypedBreakpointSignal, UnbindPropsOptions, ValidateAtLeastOneRequiredConfig, Vec2, ViewportConfig };
3034
+ /**
3035
+ * The value source an unsaved-changes tracker watches. In order of preference:
3036
+ *
3037
+ * - **`FieldTree<T>`** (signal forms — primary): read `field().value()`, restore `field().value.set(v)`.
3038
+ * - **`Signal<FieldTree<T> | null>`**: a late/async-created signal form — resolves once the field exists.
3039
+ * - **`AbstractControl`** (reactive forms — migration path): bridged via `controlValueSignal` + `setValue`.
3040
+ * - **`WritableSignal<T>`** (escape hatch for non-form state): read/write directly.
3041
+ */
3042
+ type UnsavedChangesSource<T> = FieldTree<T> | Signal<FieldTree<T> | null> | AbstractControl | WritableSignal<T>;
3043
+ /** A value source reduced to a read signal plus a writer, regardless of its original kind. */
3044
+ type NormalizedUnsavedChangesSource<T> = {
3045
+ /** The current value. `null` while a late/async source has not produced a value yet. */
3046
+ value: Signal<T | null>;
3047
+ /** Writes a value back to the source (used by `restoreDefaultValue`). No-op if the source isn't ready. */
3048
+ setValue: (value: T) => void;
3049
+ };
3050
+ /** Reduces any {@link UnsavedChangesSource} to a uniform read-signal + writer pair. */
3051
+ declare const normalizeUnsavedChangesSource: <T>(source: UnsavedChangesSource<T>) => NormalizedUnsavedChangesSource<T>;
3052
+
3053
+ /**
3054
+ * Decides whether a value with unsaved changes may be discarded. Called with the current value when
3055
+ * (and only when) changes exist. Return a truthy value / resolved Promise / emitted Observable value
3056
+ * to allow the discard, falsy to keep the changes. Typically opens a confirm dialog.
3057
+ */
3058
+ type UnsavedChangesConfirmFn<T> = (value: T) => boolean | Promise<boolean> | Observable<boolean> | unknown;
3059
+ type CreateUnsavedChangesTrackerConfig<T> = {
3060
+ /** The form / value to watch. See {@link UnsavedChangesSource}. */
3061
+ source: UnsavedChangesSource<T>;
3062
+ /**
3063
+ * The baseline the current value is compared against.
3064
+ * If omitted, the first non-null value the source produces is captured automatically (so
3065
+ * async-filled forms work without wiring). A function is evaluated once, eagerly.
3066
+ */
3067
+ defaultValue?: T | (() => T);
3068
+ /**
3069
+ * Required, per call site. Runs only when there are changes to discard.
3070
+ * @see UnsavedChangesConfirmFn
3071
+ */
3072
+ confirm: UnsavedChangesConfirmFn<T>;
3073
+ /**
3074
+ * Custom equality between the current value and the default. Deep-equal by default.
3075
+ *
3076
+ * Note: this is snapshot-vs-default comparison, deliberately **not** signal-forms' `dirty()`
3077
+ * (which means "was edited", so typing then deleting stays dirty — here it's clean again).
3078
+ */
3079
+ compareFn?: (current: T, defaultValue: T) => boolean;
3080
+ };
3081
+ type UnsavedChangesTrackerRef<T> = {
3082
+ /** Whether the current value differs from the default. */
3083
+ hasChanges: Signal<boolean>;
3084
+ /** The current baseline. `null` until a value (or explicit default) exists. */
3085
+ defaultValue: Signal<T | null>;
3086
+ /**
3087
+ * Resolves `true` if there are no changes or the user confirmed the discard, `false` otherwise.
3088
+ * Normalizes the `confirm` return (value / Promise / Observable) to a `Promise<boolean>`.
3089
+ */
3090
+ runCheck: () => Promise<boolean>;
3091
+ /** Re-baseline to the current value — e.g. after a save that keeps the form open. */
3092
+ refreshDefaultValue: () => void;
3093
+ /** Write the default back onto the source (revert edits). No-op if there is no default yet. */
3094
+ restoreDefaultValue: () => void;
3095
+ };
3096
+ /**
3097
+ * The framework-agnostic core of the unsaved-changes family: snapshots a default value, tracks
3098
+ * whether the watched form/value differs from it, and runs an async confirm before a discard.
3099
+ * Call from an injection context (a field initializer or constructor).
3100
+ *
3101
+ * Overlay and router flavors (`createOverlayUnsavedChangesGuard`, `createUnsavedChangesGuard`) build
3102
+ * on this — use them when you want the guard wired to a close/navigation event automatically.
3103
+ */
3104
+ declare const createUnsavedChangesTracker: <T>(config: CreateUnsavedChangesTrackerConfig<T>) => UnsavedChangesTrackerRef<T>;
3105
+
3106
+ type CreateUnsavedChangesGuardConfig<T> = CreateUnsavedChangesTrackerConfig<T>;
3107
+ type UnsavedChangesGuardRef<T> = UnsavedChangesTrackerRef<T> & {
3108
+ /**
3109
+ * A `CanDeactivateFn`-compatible check: resolves `true` when the route may be left (no changes, or
3110
+ * the user confirmed the discard), `false` to stay. Wire it into a route's `canDeactivate`.
3111
+ *
3112
+ * ```ts
3113
+ * export const editGuard: CanDeactivateFn<EditComponent> = (component) => component.guard.canDeactivate();
3114
+ * ```
3115
+ */
3116
+ canDeactivate: () => Promise<boolean>;
3117
+ };
3118
+ /**
3119
+ * The router / manual flavor of the unsaved-changes family: a {@link createUnsavedChangesTracker}
3120
+ * plus a `canDeactivate` bridge for Angular route guards. It touches no overlay APIs, so it also
3121
+ * serves as a standalone "does this form have unsaved changes, and may I discard them?" helper.
3122
+ * Call from an injection context.
3123
+ */
3124
+ declare const createUnsavedChangesGuard: <T>(config: CreateUnsavedChangesGuardConfig<T>) => UnsavedChangesGuardRef<T>;
3125
+
3126
+ export { ANIMATABLE_TOKEN, ANIMATED_IF_TOKEN, ANIMATED_LIFECYCLE_TOKEN, ANIMATION_DEBUG_STORAGE_KEY, AT_LEAST_ONE_REQUIRED, AnimatableDirective, AnimatedIfDirective, AnimatedLifecycleDirective, AnimatedOverlayDirective, AutoSurfaceDirective, BOUNDARY_ELEMENT_TOKEN, BREAKPOINT_INSTANCE_TOKEN, BREAKPOINT_ORDER, COLOR_PROVIDER, ClickOutsideDirective, ColorInteractiveContainerDirective, ColorInteractiveDirective, ColorInteractiveExcludeDirective, ColorInteractiveHasFocusDirective, DEFAULT_MULTI_INSTANCE_RELS, DEFAULT_MULTI_INSTANCE_TAGS, DEFAULT_VIEWPORT_CONFIG, DISABLE_LOGGER_PARAM, DragHandleDirective, ET_DISABLE_SCROLL_TOP, ET_DISABLE_SCROLL_TOP_AS_RETURN_ROUTE, ET_DISABLE_SCROLL_TOP_ON_PATH_PARAM_CHANGE, ET_PROPERTY_REMOVED, FOCUSABLE_SELECTOR, FOCUS_VISIBLE_TRACKER_TOKEN, HtmlToMarkdownPipe, IS_ARRAY_NOT_EMPTY, IS_EMAIL, InferMimeTypePipe, InitialsPipe, IsArrayNotEmpty, IsEmail, jsonLd_d as JsonLD, KeyPressManager, MUST_MATCH, MarkdownToHtmlPipe, MatchStateType, MustMatch, NormalizeGameResultTypePipe, NormalizeMatchParticipantsPipe, NormalizeMatchScorePipe, NormalizeMatchStatePipe, NormalizeMatchTypePipe, PropsDirective, ProvideColorDirective, ProvideSurfaceDirective, RUNTIME_ERROR_NO_DATA, RepeatDirective, ResizeHandlesComponent, RuntimeError, SEO_DIRECTIVE_TOKEN, SURFACE_PROVIDER, SURFACE_TYPE, ScrollObserverDirective, ScrollObserverEndDirective, ScrollObserverStartDirective, SeoDirective, SlugifyPipe, StructuredDataComponent, SurfaceInteractiveDirective, ToArrayPipe, TypedQueryList, ValidateAtLeastOneRequired, Validators, animationDebugLog, applyAlternateBinding, applyAlternateLanguagesBindings, applyArticleBindings, applyAuthorBinding, applyCanonicalBinding, applyCenteredPosition, applyDescriptionBinding, applyGlobalPosition, applyHeadBinding, applyHeadTitleBinding, applyHostListener, applyHostListeners, applyInitialFocus, applyKeywordsBinding, applyLinkBinding, applyMetaBinding, applyNextBinding, applyOgBinding, applyOpenGraphBindings, applyPrevBinding, applyResourceHintsBindings, applyRobotsBinding, applySocialMediaBindings, applyStructuredDataBinding, applyTwitterCardBindings, areScrollStatesEqual, bindProps, boolBreakpointTransform, booleanBreakpointAttribute, boundingClientRectToElementRect, breakpointTransformBase, buildElementSignal, buildSignalEffects, canUseSessionMemory, clamp, clone, cloneFormGroup, computedTillFalsy, computedTillTruthy, controlValueSignal, controlValueSignalWithPrevious, copyToClipboard, createAnchoredPositionCleanup, createArrayPropertyBinding, createAutoSessionMemoryKey, createBulkPropertyBinding, createCanAnimateSignal, createComponentId, createCssColorThemeName, createCssSurfaceName, createDependencyStash, createDestroy, createDocumentElementSignal, createElementDictionary, createElementDimensions, createEmptyElementSignal, createFlipAnimation, createFlipAnimationGroup, createHostProps, createIsRenderedSignal, createLogger, createOverlayRuntimeRef, createPropHandlers, createPropertyBinding, createProps, createProvider, createRootProvider, createRootThemeCss, createRoute, createRouterState, createRxHostListener, createSessionMemory, createSetup, createStaticProvider, createStaticRootProvider, createSwatchCss, createSwipeTracker, createTailwindColorThemes, createTailwindCssVar, createTailwindRgbVar, createThemeStyle, createUnsavedChangesGuard, createUnsavedChangesTracker, createUserConsentProvider, deferredSignal, deleteCookie, easeElastic, easeIn, easeInOut, easeLinear, easeOut, easeOutBack, easeOutBackStrong, elementCanScroll, equal, firstElementSignal, focusElement, forceReflow, formatRuntimeError, fromNextFrame, getCookie, getDomain, getElementScrollCoordinates, getFocusableElements, getFormGroupValue, getGroupMatchPoints, getGroupMatchScore, getHeadingElement, getKnockoutMatchScore, getMatchScoreSubLine, getObjectProperty, getScrollContainerTarget, getScrollItemTarget, getScrollSnapTarget, hasCookie, htmlToMarkdown, inferMimeType, initials, injectAngularRootElement, injectAnimatedBlockSize, injectBoundaryElement, injectBreakpointInput, injectBreakpointIsMatched, injectBreakpointObserver, injectCanHover, injectColorThemes, injectColorThemesPrefix, injectCurrentBreakpoint, injectDeviceInputType, injectDisplayOrientation, injectErrorTheme, injectFocusVisibleTracker, injectFragment, injectHasPrecisionInput, injectHasTouchInput, injectHostElement, injectIs2Xl, injectIsLandscape, injectIsLg, injectIsMd, injectIsPortrait, injectIsRouterInitialized, injectIsSm, injectIsXl, injectIsXs, injectLinkStore, injectLinkStoreConfig, injectLocale, injectMediaQueryIsMatched, injectMetaConfig, injectMetaStore, injectObserveBreakpoint, injectObserveMediaQuery, injectOverlayRuntime, injectPathParam, injectPathParamChanges, injectPathParams, injectPrefersReducedMotion, injectQueryParam, injectQueryParamChanges, injectQueryParams, injectRenderer, injectRoute, injectRouteData, injectRouteDataItem, injectRouteTitle, injectRouterEvent, injectRouterState, injectScrollbarDimensions, injectStructuredDataConfig, injectStructuredDataStore, injectStyleManager, injectSuccessTheme, injectSurfaceContextTracker, injectSurfaceThemes, injectSurfaceThemesPrefix, injectTemplateRef, injectTitleConfig, injectTitleStore, injectUrl, injectViewportConfig, injectViewportDimensions, injectViewportSize, injectWarningTheme, isAnimationDebugEnabled, isArray, isElementSignal, isElementVisible, isFocusable, isGroupMatch, isHTMLElement, isKnockoutMatch, isObject, markdownToHtml, maybeSignalValue, memoizeSignal, nextFrame, normalizeGameResultType, normalizeMatchParticipant, normalizeMatchParticipants, normalizeMatchScore, normalizeMatchState, normalizeMatchType, normalizeUnsavedChangesSource, numberBreakpointAttribute, numberBreakpointTransform, previousSignalValue, provideBoundaryElement, provideBreakpointInstance, provideBreakpointObserver, provideColorThemes, provideColorThemesWithTailwind4, provideFocusVisibleTracker, provideLinkStore, provideLinkStoreConfig, provideLocale, provideMetaConfig, provideMetaStore, provideOverlayRuntime, provideRenderer, provideStructuredDataConfig, provideStructuredDataStore, provideStyleManager, provideSurfaceContextTracker, provideSurfaceThemesWithTailwind4, provideTitleConfig, provideTitleStore, provideViewportConfig, randomId, readFromClipboard, resetPositioningStyles, resolveAppRootColorProvider, resolveSurfaceByElevation, round, routerDisableScrollTop, scrollToElement, setBackdropStyles, setBaseElementStyles, setCookie, setInputSignal, setupFocusTrap, setupPositioning, setupScrollRestoration, signalAnimatedNumber, signalAttributes, signalClasses, signalElementChildren, signalElementDimensions, signalElementIntersection, signalElementLastScrollDirection, signalElementMutations, signalElementScrollState, signalHostAttributes, signalHostClasses, signalHostElementDimensions, signalHostElementIntersection, signalHostElementLastScrollDirection, signalHostElementMutations, signalHostElementScrollState, signalHostStyles, signalIsRendered, signalStyles, slugify, switchQueryListChanges, syncSignal, templateComputed, toArray, toArrayTrackByFn, toStringBinding, transformOrReturn, typedBreakpointTransform, unbindProps, useCursorDragScroll, writeScrollbarSizeToCssVariables, writeViewportSizeToCssVariables, ɵProvideColorThemes, ɵProvideColorThemesPrefix, ɵProvideSurfaceThemes, ɵProvideSurfaceThemesPrefix };
3127
+ export type { AlternateLanguagesConfig, AlternateLink, AngularRenderer, AnimatedBlockSizeConfig, AnimatedLifecycleState, AnimatedNumberSignal, AnimatedOverlayComponentBase, AnimatedOverlayMountConfig, AnimatedOverlayState, AnimatedSizeAxis, AnimationEndEvent, AnyTemplateType, ArticleConfig, BindPropsOptions, BoolBreakpointSignal, Breakpoint, BreakpointInput, BreakpointMap, BuildMediaQueryOptions, BuildSignalEffectsConfig, ColorTheme, ColorThemeType, ComponentTemplate, ComponentTypeWithInputs, ConsentHandler, ControlValueSignalOptions, CreateLoggerConfig, CreatePropsOptions, CreateProviderOptions, CreateSessionMemoryConfig, CreateUnsavedChangesGuardConfig, CreateUnsavedChangesTrackerConfig, CreateUserConsentProviderOptions, CurrentElementVisibility, CursorDragScrollDirection, CursorDragScrollOptions, DragMoveEvent, DragStartEvent, ElementDimensions, ElementLastScrollDirection, ElementLastScrollDirectionType, ElementRect, ElementScrollState, ElementSignal, ElementSignalValue, ElementSize, EthleteColorThemeNameRegistry, EthleteSurfaceThemeNameRegistry, FacebookCard, FlipAnimationConfig, HeadBinding, HostProps, InjectQueryParamConfig, InjectUtilConfig, InjectUtilTransformConfig, IntersectionObserverEntryWithDetails, IsElementVisibleOptions, LinkConfig, LinkStoreConfig, LogicalSize, MaybeObservable, MaybeSignal, MetaConfig, MetaTagConfig, NgClassType, NgTemplateTemplate, NormalizedGameResultType, NormalizedMatchParticipant, NormalizedMatchParticipants, NormalizedMatchScore, NormalizedUnsavedChangesSource, NullableElementDimensions, NumberBreakpointSignal, OnThemeColorMap, OpenGraph, OpenGraphConfig, OverlayRuntimeAnchoredPosition, OverlayRuntimeAnimationDelegate, OverlayRuntimeAnimationDelegateEnterContext, OverlayRuntimeAnimationDelegateLeaveContext, OverlayRuntimeAutoFocusTarget, OverlayRuntimeCenteredPosition, OverlayRuntimeCloseEvent, OverlayRuntimeCloseGuard, OverlayRuntimeCloseSource, OverlayRuntimeComponentBase, OverlayRuntimeElements, OverlayRuntimeGlobalPosition, OverlayRuntimeGlobalPositionAlignment, OverlayRuntimeMountConfig, OverlayRuntimePositionStrategy, OverlayRuntimeRef, OverlayRuntimeRole, OverlayRuntimeShiftOptions, OverlayRuntimeState, PropHandlers, Props, PropsAttachedElements, PropsAttachedElementsInternal, PropsInternal, ProviderResult, RegisteredColorThemeName, RegisteredSurfaceThemeName, ResizeEdge, ResizeMoveEvent, ResourceHintsConfig, RobotsConfig, RootProviderResult, RouterDisableScrollTopConfig, RouterState, ScrollContainerTarget, ScrollItemTarget, ScrollSnapOrigin, ScrollSnapTarget, ScrollToElementOptions, SeoConfig, SetupScrollRestorationConfig, SignalAnimatedNumberOptions, SignalElementBindingComplexType, SignalElementBindingType, SignalElementIntersectionOptions, SignalElementScrollStateOptions, SocialMediaConfig, StaticProviderResult, StringTemplate, StructuredDataConfig, StyleManager, SurfaceContextEntry, SurfaceContextSurface, SurfaceContextTracker, SurfaceInteractionColor, SurfaceTheme, SurfaceThemeColor, SurfaceType, SwipeEndEvent, SwipeTracker, SwipeUpdateEvent, SyncSignalOptions, TemplateRefWithContext, ThemeColor, ThemeColorMap, ThemeHSLColor, ThemeInkColorMap, ThemeRGBColor, ThemeSwatch, TitleConfig, TitlePart, Translatable, TwitterCard, TwitterCardConfig, TypedBreakpointSignal, UnbindPropsOptions, UnsavedChangesConfirmFn, UnsavedChangesGuardRef, UnsavedChangesSource, UnsavedChangesTrackerRef, ValidateAtLeastOneRequiredConfig, Vec2, ViewportConfig };