@lukfel/ng-scaffold 22.1.2 → 22.1.4

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": "@lukfel/ng-scaffold",
3
- "version": "22.1.2",
3
+ "version": "22.1.4",
4
4
  "description": "This Angular library provides a basic UI scaffold and services for modern web and mobile apps",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -6,6 +6,7 @@ import { MatCheckboxChange } from '@angular/material/checkbox';
6
6
  import * as rxjs from 'rxjs';
7
7
  import { Observable } from 'rxjs';
8
8
  import * as _angular_cdk_layout from '@angular/cdk/layout';
9
+ import { MediaMatcher } from '@angular/cdk/layout';
9
10
  import { MatDialogConfig } from '@angular/material/dialog';
10
11
  import { MatSnackBarConfig } from '@angular/material/snack-bar';
11
12
  import { HttpInterceptor, HttpRequest, HttpHandler, HttpEvent } from '@angular/common/http';
@@ -145,6 +146,7 @@ interface ScaffoldLibraryConfig {
145
146
  production?: boolean;
146
147
  debugging?: boolean;
147
148
  language?: TranslationConfig;
149
+ ssrBreakpoints?: boolean;
148
150
  }
149
151
 
150
152
  interface ListItem {
@@ -551,6 +553,29 @@ declare class Logger {
551
553
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<Logger>;
552
554
  }
553
555
 
556
+ /**
557
+ * Answers media queries during SSR from the incoming request rather than matching nothing, so
558
+ * breakpoint driven markup is server rendered for the requesting device class instead of always
559
+ * falling back to desktop. On the browser it defers to the platform implementation.
560
+ *
561
+ * Opt in with `provideScaffold({ ssrBreakpoints: true })`. Doing so makes the SSR response depend
562
+ * on the request, so whatever serves it must `Vary` on `Sec-CH-UA-Mobile` and `User-Agent` or a
563
+ * cached mobile render will be handed to a desktop client.
564
+ */
565
+ declare class ScaffoldMediaMatcher extends MediaMatcher {
566
+ private platformId;
567
+ private request;
568
+ matchMedia(query: string): MediaQueryList;
569
+ private isMobileRequest;
570
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ScaffoldMediaMatcher, never>;
571
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<ScaffoldMediaMatcher>;
572
+ }
573
+ /**
574
+ * Evaluates the width and orientation parts of a media query against an assumed viewport.
575
+ * Conditions a request cannot answer, such as `prefers-color-scheme`, never match.
576
+ */
577
+ declare function matchesMediaQuery(query: string, width: number, height: number): boolean;
578
+
554
579
  declare class OverlayService {
555
580
  libraryConfig: ScaffoldLibraryConfig | null;
556
581
  private overlay;
@@ -744,5 +769,5 @@ declare class ScaffoldLoadingInterceptor implements HttpInterceptor {
744
769
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<ScaffoldLoadingInterceptor>;
745
770
  }
746
771
 
747
- export { BreakpointService, CONFIG, ColorPickerComponent, DialogService, FileUploadComponent, ListComponent, ListItemAvatarDirective, ListItemButtonsDirective, ListItemSubtitleDirective, ListItemTitleDirective, LocalStorageService, Logger, NotificationComponent, OverlayService, PlaceholderComponent, RouterService, ScaffoldComponent, ScaffoldLoadingInterceptor, ScaffoldService, SeoService, SnackbarService, ThemeService, TranslationService, provideScaffold };
772
+ export { BreakpointService, CONFIG, ColorPickerComponent, DialogService, FileUploadComponent, ListComponent, ListItemAvatarDirective, ListItemButtonsDirective, ListItemSubtitleDirective, ListItemTitleDirective, LocalStorageService, Logger, NotificationComponent, OverlayService, PlaceholderComponent, RouterService, ScaffoldComponent, ScaffoldLoadingInterceptor, ScaffoldMediaMatcher, ScaffoldService, SeoService, SnackbarService, ThemeService, TranslationService, matchesMediaQuery, provideScaffold };
748
773
  export type { BottomBarConfig, Button, ConfirmDialogConfig, ContentTitleCardConfig, DrawerConfig, FloatingButtonConfig, FooterConfig, HeaderConfig, HeaderInputConfig, HeaderResponsiveConfig, ListConfig, ListHeader, ListItem, LoadingOverlayConfig, MenuButton, NavbarConfig, NavigationLink, PlaceholderConfig, ScaffoldConfig, ScaffoldLibraryConfig, SeoConfig, TransMap, TranslationConfig };