@ng-doc/app 22.0.0-beta.1 → 22.0.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.
- package/README.md +20 -29
- package/fesm2022/ng-doc-app-classes-content-anchor-controller.mjs +363 -0
- package/fesm2022/ng-doc-app-classes-content-anchor-controller.mjs.map +1 -0
- package/fesm2022/ng-doc-app-classes-content-controller.mjs +299 -0
- package/fesm2022/ng-doc-app-classes-content-controller.mjs.map +1 -0
- package/fesm2022/ng-doc-app-classes-default-search-engine.mjs +51 -35
- package/fesm2022/ng-doc-app-classes-default-search-engine.mjs.map +1 -1
- package/fesm2022/ng-doc-app-classes-root-page.mjs.map +1 -1
- package/fesm2022/ng-doc-app-classes-search-engine.mjs.map +1 -1
- package/fesm2022/ng-doc-app-classes.mjs +2 -0
- package/fesm2022/ng-doc-app-classes.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-api-list.mjs +178 -68
- package/fesm2022/ng-doc-app-components-api-list.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-breadcrumb.mjs +13 -10
- package/fesm2022/ng-doc-app-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-code.mjs +152 -25
- package/fesm2022/ng-doc-app-components-code.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-command-palette.mjs +498 -0
- package/fesm2022/ng-doc-app-components-command-palette.mjs.map +1 -0
- package/fesm2022/ng-doc-app-components-copy-button.mjs +38 -21
- package/fesm2022/ng-doc-app-components-copy-button.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-demo-displayer.mjs +36 -29
- package/fesm2022/ng-doc-app-components-demo-displayer.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-demo-pane.mjs +39 -36
- package/fesm2022/ng-doc-app-components-demo-pane.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-demo.mjs +129 -44
- package/fesm2022/ng-doc-app-components-demo.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-fullscreen-button.mjs +12 -9
- package/fesm2022/ng-doc-app-components-fullscreen-button.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-fullscreen-toggle.mjs +79 -0
- package/fesm2022/ng-doc-app-components-fullscreen-toggle.mjs.map +1 -0
- package/fesm2022/ng-doc-app-components-heading-anchor.mjs +54 -21
- package/fesm2022/ng-doc-app-components-heading-anchor.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-image-viewer.mjs +187 -91
- package/fesm2022/ng-doc-app-components-image-viewer.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-kind-icon.mjs +42 -25
- package/fesm2022/ng-doc-app-components-kind-icon.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-link.mjs +12 -9
- package/fesm2022/ng-doc-app-components-link.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-members.mjs +30 -0
- package/fesm2022/ng-doc-app-components-members.mjs.map +1 -0
- package/fesm2022/ng-doc-app-components-mermaid-viewer.mjs +69 -24
- package/fesm2022/ng-doc-app-components-mermaid-viewer.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-navbar.mjs +39 -49
- package/fesm2022/ng-doc-app-components-navbar.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-page-header.mjs +73 -10
- package/fesm2022/ng-doc-app-components-page-header.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-page-link.mjs +123 -31
- package/fesm2022/ng-doc-app-components-page-link.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-page-navigation.mjs +17 -19
- package/fesm2022/ng-doc-app-components-page-navigation.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-page-wrapper.mjs +56 -35
- package/fesm2022/ng-doc-app-components-page-wrapper.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-page.mjs +168 -24
- package/fesm2022/ng-doc-app-components-page.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-playground.mjs +392 -263
- package/fesm2022/ng-doc-app-components-playground.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-root.mjs +48 -31
- package/fesm2022/ng-doc-app-components-root.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-search-result.mjs +22 -21
- package/fesm2022/ng-doc-app-components-search-result.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-search.mjs +64 -33
- package/fesm2022/ng-doc-app-components-search.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-sidebar.mjs +90 -63
- package/fesm2022/ng-doc-app-components-sidebar.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-tabs.mjs +18 -12
- package/fesm2022/ng-doc-app-components-tabs.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-theme-toggle.mjs +33 -21
- package/fesm2022/ng-doc-app-components-theme-toggle.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-toc.mjs +268 -90
- package/fesm2022/ng-doc-app-components-toc.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components.mjs +3 -1
- package/fesm2022/ng-doc-app-components.mjs.map +1 -1
- package/fesm2022/ng-doc-app-defaults-default-processors.mjs +2 -1
- package/fesm2022/ng-doc-app-defaults-default-processors.mjs.map +1 -1
- package/fesm2022/ng-doc-app-directives-code-highlighter.mjs +14 -7
- package/fesm2022/ng-doc-app-directives-code-highlighter.mjs.map +1 -1
- package/fesm2022/ng-doc-app-directives-members-filter.mjs +276 -0
- package/fesm2022/ng-doc-app-directives-members-filter.mjs.map +1 -0
- package/fesm2022/ng-doc-app-directives-route-active.mjs +34 -30
- package/fesm2022/ng-doc-app-directives-route-active.mjs.map +1 -1
- package/fesm2022/ng-doc-app-directives.mjs +1 -0
- package/fesm2022/ng-doc-app-directives.mjs.map +1 -1
- package/fesm2022/ng-doc-app-helpers.mjs +285 -1
- package/fesm2022/ng-doc-app-helpers.mjs.map +1 -1
- package/fesm2022/ng-doc-app-pipes-decode-uri-component.mjs +6 -4
- package/fesm2022/ng-doc-app-pipes-decode-uri-component.mjs.map +1 -1
- package/fesm2022/ng-doc-app-pipes-extract-value.mjs +6 -4
- package/fesm2022/ng-doc-app-pipes-extract-value.mjs.map +1 -1
- package/fesm2022/ng-doc-app-pipes-filter-by-text.mjs +7 -4
- package/fesm2022/ng-doc-app-pipes-filter-by-text.mjs.map +1 -1
- package/fesm2022/ng-doc-app-pipes-sanitize-html.mjs +8 -5
- package/fesm2022/ng-doc-app-pipes-sanitize-html.mjs.map +1 -1
- package/fesm2022/ng-doc-app-processors-page-processor.mjs +86 -23
- package/fesm2022/ng-doc-app-processors-page-processor.mjs.map +1 -1
- package/fesm2022/ng-doc-app-processors-processors-tooltip.mjs +26 -25
- package/fesm2022/ng-doc-app-processors-processors-tooltip.mjs.map +1 -1
- package/fesm2022/ng-doc-app-processors-processors.mjs +12 -1
- package/fesm2022/ng-doc-app-processors-processors.mjs.map +1 -1
- package/fesm2022/ng-doc-app-providers-ng-doc-app.mjs +31 -2
- package/fesm2022/ng-doc-app-providers-ng-doc-app.mjs.map +1 -1
- package/fesm2022/ng-doc-app-services-content-scroll-intent.mjs +122 -0
- package/fesm2022/ng-doc-app-services-content-scroll-intent.mjs.map +1 -0
- package/fesm2022/ng-doc-app-services-content-state.mjs +57 -0
- package/fesm2022/ng-doc-app-services-content-state.mjs.map +1 -0
- package/fesm2022/ng-doc-app-services-fullscreen-route.mjs +74 -0
- package/fesm2022/ng-doc-app-services-fullscreen-route.mjs.map +1 -0
- package/fesm2022/ng-doc-app-services-highlighter.mjs +83 -14
- package/fesm2022/ng-doc-app-services-highlighter.mjs.map +1 -1
- package/fesm2022/ng-doc-app-services-route-preloader.mjs +360 -0
- package/fesm2022/ng-doc-app-services-route-preloader.mjs.map +1 -0
- package/fesm2022/ng-doc-app-services-shortcuts.mjs +214 -0
- package/fesm2022/ng-doc-app-services-shortcuts.mjs.map +1 -0
- package/fesm2022/ng-doc-app-services-sidebar.mjs +59 -25
- package/fesm2022/ng-doc-app-services-sidebar.mjs.map +1 -1
- package/fesm2022/ng-doc-app-services-store.mjs +8 -8
- package/fesm2022/ng-doc-app-services-store.mjs.map +1 -1
- package/fesm2022/ng-doc-app-services-theme.mjs +32 -12
- package/fesm2022/ng-doc-app-services-theme.mjs.map +1 -1
- package/fesm2022/ng-doc-app-services.mjs +143 -0
- package/fesm2022/ng-doc-app-services.mjs.map +1 -1
- package/fesm2022/ng-doc-app-tokens.mjs +7 -28
- package/fesm2022/ng-doc-app-tokens.mjs.map +1 -1
- package/fesm2022/ng-doc-app-type-controls-boolean-control.mjs +18 -9
- package/fesm2022/ng-doc-app-type-controls-boolean-control.mjs.map +1 -1
- package/fesm2022/ng-doc-app-type-controls-number-control.mjs +12 -9
- package/fesm2022/ng-doc-app-type-controls-number-control.mjs.map +1 -1
- package/fesm2022/ng-doc-app-type-controls-string-control.mjs +12 -9
- package/fesm2022/ng-doc-app-type-controls-string-control.mjs.map +1 -1
- package/fesm2022/ng-doc-app-type-controls-type-alias-control.mjs +22 -16
- package/fesm2022/ng-doc-app-type-controls-type-alias-control.mjs.map +1 -1
- package/package.json +74 -32
- package/styles/global.css +1129 -205
- package/styles/main.css +1129 -205
- package/styles/themes/dark.css +78 -56
- package/types/ng-doc-app-classes-content-anchor-controller.d.ts +54 -0
- package/types/ng-doc-app-classes-content-controller.d.ts +94 -0
- package/types/ng-doc-app-classes-default-search-engine.d.ts +9 -1
- package/types/ng-doc-app-classes-root-page.d.ts +6 -1
- package/types/ng-doc-app-classes-search-engine.d.ts +5 -0
- package/types/ng-doc-app-classes.d.ts +2 -0
- package/types/ng-doc-app-components-api-list.d.ts +69 -20
- package/types/ng-doc-app-components-breadcrumb.d.ts +8 -3
- package/types/ng-doc-app-components-code.d.ts +46 -12
- package/types/ng-doc-app-components-command-palette.d.ts +147 -0
- package/types/ng-doc-app-components-copy-button.d.ts +18 -6
- package/types/ng-doc-app-components-demo-displayer.d.ts +23 -10
- package/types/ng-doc-app-components-demo-pane.d.ts +19 -15
- package/types/ng-doc-app-components-demo.d.ts +62 -15
- package/types/ng-doc-app-components-fullscreen-button.d.ts +4 -2
- package/types/ng-doc-app-components-fullscreen-toggle.d.ts +24 -0
- package/types/ng-doc-app-components-heading-anchor.d.ts +26 -7
- package/types/ng-doc-app-components-image-viewer.d.ts +71 -7
- package/types/ng-doc-app-components-kind-icon.d.ts +28 -7
- package/types/ng-doc-app-components-link.d.ts +6 -2
- package/types/ng-doc-app-components-members.d.ts +13 -0
- package/types/ng-doc-app-components-mermaid-viewer.d.ts +21 -6
- package/types/ng-doc-app-components-navbar.d.ts +25 -15
- package/types/ng-doc-app-components-page-header.d.ts +28 -4
- package/types/ng-doc-app-components-page-link.d.ts +34 -15
- package/types/ng-doc-app-components-page-navigation.d.ts +10 -5
- package/types/ng-doc-app-components-page-wrapper.d.ts +35 -11
- package/types/ng-doc-app-components-page.d.ts +57 -6
- package/types/ng-doc-app-components-playground.d.ts +146 -78
- package/types/ng-doc-app-components-root.d.ts +28 -7
- package/types/ng-doc-app-components-search-result.d.ts +14 -6
- package/types/ng-doc-app-components-search.d.ts +19 -7
- package/types/ng-doc-app-components-tabs.d.ts +13 -4
- package/types/ng-doc-app-components-theme-toggle.d.ts +18 -5
- package/types/ng-doc-app-components-toc.d.ts +76 -29
- package/types/ng-doc-app-components.d.ts +3 -1
- package/types/ng-doc-app-directives-code-highlighter.d.ts +8 -4
- package/types/ng-doc-app-directives-members-filter.d.ts +61 -0
- package/types/ng-doc-app-directives-route-active.d.ts +21 -7
- package/types/ng-doc-app-directives.d.ts +1 -0
- package/types/ng-doc-app-helpers.d.ts +124 -3
- package/types/ng-doc-app-interfaces.d.ts +48 -28
- package/types/ng-doc-app-pipes-decode-uri-component.d.ts +3 -0
- package/types/ng-doc-app-pipes-extract-value.d.ts +3 -0
- package/types/ng-doc-app-pipes-filter-by-text.d.ts +4 -0
- package/types/ng-doc-app-pipes-sanitize-html.d.ts +4 -2
- package/types/ng-doc-app-processors-page-processor.d.ts +39 -10
- package/types/ng-doc-app-processors-processors-tooltip.d.ts +11 -10
- package/types/ng-doc-app-processors-processors.d.ts +5 -1
- package/types/ng-doc-app-providers-ng-doc-app.d.ts +17 -0
- package/types/ng-doc-app-providers-playground-demo.d.ts +1 -1
- package/types/ng-doc-app-providers-type-control.d.ts +2 -2
- package/types/ng-doc-app-services-content-scroll-intent.d.ts +52 -0
- package/types/ng-doc-app-services-content-state.d.ts +40 -0
- package/types/ng-doc-app-services-fullscreen-route.d.ts +35 -0
- package/types/ng-doc-app-services-highlighter.d.ts +40 -5
- package/types/ng-doc-app-services-route-preloader.d.ts +109 -0
- package/types/ng-doc-app-services-shortcuts.d.ts +96 -0
- package/types/ng-doc-app-services-sidebar.d.ts +24 -4
- package/types/ng-doc-app-services-store.d.ts +24 -1
- package/types/ng-doc-app-services-theme.d.ts +19 -3
- package/types/ng-doc-app-services.d.ts +77 -0
- package/types/ng-doc-app-tokens.d.ts +10 -30
- package/types/ng-doc-app-type-controls-boolean-control.d.ts +11 -6
- package/types/ng-doc-app-type-controls-number-control.d.ts +5 -3
- package/types/ng-doc-app-type-controls-string-control.d.ts +5 -3
- package/types/ng-doc-app-type-controls-type-alias-control.d.ts +13 -6
- package/fesm2022/ng-doc-app-components-search-dialog.mjs +0 -78
- package/fesm2022/ng-doc-app-components-search-dialog.mjs.map +0 -1
- package/types/ng-doc-app-components-search-dialog.d.ts +0 -28
package/README.md
CHANGED
|
@@ -1,37 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
<h1 align="center" style="margin-bottom: 0; border-bottom: 0">NgDoc</h1>
|
|
9
|
-
<p align="center">
|
|
10
|
-
Create user-friendly documentation for your projects with ease!
|
|
11
|
-
<br />
|
|
12
|
-
<a href="https://ng-doc.com/">Documentation</a>
|
|
13
|
-
·
|
|
14
|
-
<a href="https://github.com/ng-doc/ng-doc/issues/new/choose">Report Bug</a>
|
|
15
|
-
·
|
|
16
|
-
<a href="https://github.com/ng-doc/ng-doc/issues/new/choose">Request Feature</a>
|
|
17
|
-
|
|
18
|
-
[![GitHub Workflow Status][build-shield]][build-url]
|
|
1
|
+
# 🖥️ @ng-doc/app
|
|
2
|
+
|
|
3
|
+
The Angular components and providers that make up an NgDoc documentation site.
|
|
4
|
+
|
|
5
|
+
It's part of [NgDoc](https://ng-doc.com/) 📚, the documentation engine for Angular projects.
|
|
6
|
+
|
|
19
7
|
[![NPM][npm-shield]][npm-url]
|
|
20
8
|
[![MIT License][license-shield]][license-url]
|
|
21
9
|
|
|
22
|
-
|
|
23
|
-
|
|
10
|
+
## 🚀 Getting started
|
|
11
|
+
|
|
12
|
+
You don't need to install this package by hand. Add NgDoc to your project and it sets up
|
|
13
|
+
everything it needs:
|
|
24
14
|
|
|
25
|
-
|
|
15
|
+
```bash
|
|
16
|
+
ng add @ng-doc/add
|
|
17
|
+
```
|
|
26
18
|
|
|
27
|
-
##
|
|
19
|
+
## 📖 Learn more
|
|
28
20
|
|
|
29
|
-
|
|
30
|
-
|
|
21
|
+
- [Documentation](https://ng-doc.com/)
|
|
22
|
+
- [GitHub repository](https://github.com/ng-doc/ng-doc)
|
|
23
|
+
- [Report a bug or request a feature](https://github.com/ng-doc/ng-doc/issues/new/choose)
|
|
31
24
|
|
|
32
|
-
[npm-shield]: https://img.shields.io/npm/v
|
|
33
|
-
[npm-url]: https://www.npmjs.com/package/@ng-doc/
|
|
25
|
+
[npm-shield]: https://img.shields.io/npm/v/%40ng-doc%2Fapp.svg?style=for-the-badge
|
|
26
|
+
[npm-url]: https://www.npmjs.com/package/@ng-doc/app
|
|
34
27
|
[license-shield]: https://img.shields.io/github/license/ng-doc/ng-doc.svg?style=for-the-badge
|
|
35
|
-
[license-url]: https://github.com/
|
|
36
|
-
[build-shield]: https://img.shields.io/github/actions/workflow/status/ng-doc/ng-doc/release.yml?style=for-the-badge&branch=release
|
|
37
|
-
[build-url]: https://github.com/ng-doc/ng-doc/actions
|
|
28
|
+
[license-url]: https://github.com/ng-doc/ng-doc/blob/main/LICENSE
|
|
@@ -0,0 +1,363 @@
|
|
|
1
|
+
import { DOCUMENT, ViewportScroller, isPlatformBrowser } from '@angular/common';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { inject, ApplicationRef, ElementRef, NgZone, PLATFORM_ID, DestroyRef, Injectable } from '@angular/core';
|
|
4
|
+
import { Router, Scroll, NavigationStart, NavigationEnd } from '@angular/router';
|
|
5
|
+
import { NgDocContentScrollIntent } from '@ng-doc/app/services/content-scroll-intent';
|
|
6
|
+
import { NgDocContentState } from '@ng-doc/app/services/content-state';
|
|
7
|
+
import { NG_DOC_CONTENT_ANCHOR_SCROLLING, NG_DOC_CONTENT_SCROLL_POSITION_RESTORATION } from '@ng-doc/app/tokens';
|
|
8
|
+
|
|
9
|
+
const overflowAnchorLeases = new WeakMap();
|
|
10
|
+
/** Coordinates one missed router anchor with the accepted asynchronous content pass. */
|
|
11
|
+
class NgDocContentAnchorController {
|
|
12
|
+
constructor() {
|
|
13
|
+
this.applicationRef = inject(ApplicationRef);
|
|
14
|
+
this.document = inject(DOCUMENT);
|
|
15
|
+
this.contentState = inject(NgDocContentState);
|
|
16
|
+
this.initialScrollIntent = inject(NgDocContentScrollIntent);
|
|
17
|
+
this.anchorScrolling = inject(NG_DOC_CONTENT_ANCHOR_SCROLLING);
|
|
18
|
+
this.positionRestoration = inject(NG_DOC_CONTENT_SCROLL_POSITION_RESTORATION);
|
|
19
|
+
this.host = inject(ElementRef).nativeElement;
|
|
20
|
+
this.zone = inject(NgZone);
|
|
21
|
+
this.router = inject(Router);
|
|
22
|
+
this.viewport = inject(ViewportScroller);
|
|
23
|
+
this.browser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
24
|
+
this.active = false;
|
|
25
|
+
this.bodyProcessed = false;
|
|
26
|
+
this.destroyed = false;
|
|
27
|
+
this.latestNavigationId = 0;
|
|
28
|
+
this.sequence = 0;
|
|
29
|
+
this.viewportListening = false;
|
|
30
|
+
this.userInput = () => {
|
|
31
|
+
if (this.latestNavigationId > 0)
|
|
32
|
+
this.suppressedNavigationId = this.latestNavigationId;
|
|
33
|
+
if (this.pending)
|
|
34
|
+
this.clear();
|
|
35
|
+
};
|
|
36
|
+
this.keyInput = (event) => {
|
|
37
|
+
if (SCROLL_KEYS.has(event.key))
|
|
38
|
+
this.userInput();
|
|
39
|
+
};
|
|
40
|
+
this.viewportScroll = () => {
|
|
41
|
+
if (this.pending &&
|
|
42
|
+
this.pending.armed &&
|
|
43
|
+
!samePosition(this.viewport.getScrollPosition(), this.pending.observedPosition)) {
|
|
44
|
+
this.userInput();
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
this.subscription = this.router.events.subscribe((event) => {
|
|
48
|
+
if (event instanceof Scroll)
|
|
49
|
+
this.observeScroll(event);
|
|
50
|
+
else if (event instanceof NavigationStart) {
|
|
51
|
+
this.latestNavigationId = Math.max(this.latestNavigationId, event.id);
|
|
52
|
+
this.suppressedNavigationId = undefined;
|
|
53
|
+
this.clear();
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
inject(DestroyRef).onDestroy(() => this.destroy());
|
|
57
|
+
}
|
|
58
|
+
/** Limits delayed replay to pages backed by an asynchronous content source. */
|
|
59
|
+
activate() {
|
|
60
|
+
this.active = true;
|
|
61
|
+
this.unsubscribeIntent ??= this.initialScrollIntent.subscribe((intent) => this.observeInitialIntent(intent));
|
|
62
|
+
if ((this.anchorScrolling || this.positionRestoration === 'enabled') &&
|
|
63
|
+
this.browser &&
|
|
64
|
+
this.document.defaultView &&
|
|
65
|
+
!this.viewportListening) {
|
|
66
|
+
this.viewportListening = true;
|
|
67
|
+
this.document.defaultView.addEventListener('scroll', this.viewportScroll, {
|
|
68
|
+
capture: true,
|
|
69
|
+
passive: true,
|
|
70
|
+
});
|
|
71
|
+
this.document.defaultView.addEventListener('wheel', this.userInput, { passive: true });
|
|
72
|
+
this.document.defaultView.addEventListener('touchmove', this.userInput, { passive: true });
|
|
73
|
+
this.document.defaultView.addEventListener('keydown', this.keyInput);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
/** Marks the current asynchronous body and its processors as accepted. */
|
|
77
|
+
contentProcessed() {
|
|
78
|
+
this.bodyProcessed = true;
|
|
79
|
+
const pending = this.pending;
|
|
80
|
+
if (!pending || !pending.armed || pending.scheduled)
|
|
81
|
+
return;
|
|
82
|
+
pending.scheduled = true;
|
|
83
|
+
void this.replayAfterStable(pending);
|
|
84
|
+
}
|
|
85
|
+
/** Cancels a missed anchor when the current body fails. */
|
|
86
|
+
contentFailed() {
|
|
87
|
+
this.bodyProcessed = false;
|
|
88
|
+
this.clear();
|
|
89
|
+
}
|
|
90
|
+
observeScroll(event) {
|
|
91
|
+
if (event.routerEvent.id < this.latestNavigationId)
|
|
92
|
+
return;
|
|
93
|
+
this.latestNavigationId = event.routerEvent.id;
|
|
94
|
+
this.clear();
|
|
95
|
+
if (this.suppressedNavigationId === event.routerEvent.id)
|
|
96
|
+
return;
|
|
97
|
+
const sequence = ++this.sequence;
|
|
98
|
+
if (!this.active ||
|
|
99
|
+
!this.browser ||
|
|
100
|
+
event.scrollBehavior === 'manual' ||
|
|
101
|
+
(event.position && this.positionRestoration !== 'enabled')) {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
const observedPosition = this.viewport.getScrollPosition();
|
|
105
|
+
if (event.position) {
|
|
106
|
+
if (samePosition(observedPosition, event.position))
|
|
107
|
+
return;
|
|
108
|
+
this.pending = {
|
|
109
|
+
armed: false,
|
|
110
|
+
kind: 'position',
|
|
111
|
+
navigationId: event.routerEvent.id,
|
|
112
|
+
observedPosition,
|
|
113
|
+
position: [event.position[0], event.position[1]],
|
|
114
|
+
sequence,
|
|
115
|
+
url: this.eventUrl(event.routerEvent),
|
|
116
|
+
scheduled: false,
|
|
117
|
+
};
|
|
118
|
+
const pending = this.pending;
|
|
119
|
+
this.acquireOverflowAnchor(pending);
|
|
120
|
+
queueMicrotask(() => {
|
|
121
|
+
if (this.destroyed || this.pending !== pending || pending.sequence !== this.sequence)
|
|
122
|
+
return;
|
|
123
|
+
pending.observedPosition = this.viewport.getScrollPosition();
|
|
124
|
+
pending.armed = true;
|
|
125
|
+
if (samePosition(pending.observedPosition, pending.position)) {
|
|
126
|
+
this.clear();
|
|
127
|
+
}
|
|
128
|
+
else if (this.bodyProcessed) {
|
|
129
|
+
this.contentProcessed();
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
if (!this.anchorScrolling || !event.anchor || this.target(event.anchor))
|
|
135
|
+
return;
|
|
136
|
+
this.pending = {
|
|
137
|
+
armed: true,
|
|
138
|
+
kind: 'anchor',
|
|
139
|
+
anchor: event.anchor,
|
|
140
|
+
initial: false,
|
|
141
|
+
navigationId: event.routerEvent.id,
|
|
142
|
+
observedPosition,
|
|
143
|
+
sequence,
|
|
144
|
+
url: this.eventUrl(event.routerEvent),
|
|
145
|
+
scheduled: false,
|
|
146
|
+
};
|
|
147
|
+
if (this.bodyProcessed)
|
|
148
|
+
this.contentProcessed();
|
|
149
|
+
}
|
|
150
|
+
async replayAfterStable(pending) {
|
|
151
|
+
try {
|
|
152
|
+
await this.applicationRef.whenStable();
|
|
153
|
+
}
|
|
154
|
+
catch {
|
|
155
|
+
if (this.pending === pending)
|
|
156
|
+
this.clear();
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
if (this.destroyed || this.pending !== pending || pending.sequence !== this.sequence)
|
|
160
|
+
return;
|
|
161
|
+
if (pending.kind === 'anchor' && pending.initial && !(await this.afterScrollOpportunity())) {
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
if (this.destroyed || this.pending !== pending || pending.sequence !== this.sequence)
|
|
165
|
+
return;
|
|
166
|
+
const target = pending.kind === 'anchor' ? this.target(pending.anchor) : undefined;
|
|
167
|
+
const position = this.viewport.getScrollPosition();
|
|
168
|
+
this.pending = undefined;
|
|
169
|
+
if (pending.kind === 'anchor' && pending.initial) {
|
|
170
|
+
this.initialScrollIntent.settle(pending.navigationId);
|
|
171
|
+
}
|
|
172
|
+
try {
|
|
173
|
+
if (this.router.url !== pending.url ||
|
|
174
|
+
pending.navigationId !== this.latestNavigationId ||
|
|
175
|
+
this.contentState.currentFailure() ||
|
|
176
|
+
(pending.kind === 'anchor' && !target) ||
|
|
177
|
+
!samePosition(position, pending.observedPosition)) {
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
if (pending.kind === 'anchor') {
|
|
181
|
+
this.viewport.scrollToAnchor(pending.anchor);
|
|
182
|
+
}
|
|
183
|
+
else
|
|
184
|
+
this.viewport.scrollToPosition(pending.position);
|
|
185
|
+
}
|
|
186
|
+
finally {
|
|
187
|
+
this.releaseOverflowAnchor(pending);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
observeInitialIntent(intent) {
|
|
191
|
+
if (this.pending?.kind === 'anchor' && this.pending.initial)
|
|
192
|
+
this.clear();
|
|
193
|
+
if (!intent ||
|
|
194
|
+
!this.active ||
|
|
195
|
+
!this.browser ||
|
|
196
|
+
!this.anchorScrolling ||
|
|
197
|
+
this.suppressedNavigationId === intent.navigationId) {
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
if (this.target(intent.anchor)) {
|
|
201
|
+
this.initialScrollIntent.settle(intent.navigationId);
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
this.pending = {
|
|
205
|
+
armed: true,
|
|
206
|
+
kind: 'anchor',
|
|
207
|
+
anchor: intent.anchor,
|
|
208
|
+
initial: true,
|
|
209
|
+
navigationId: intent.navigationId,
|
|
210
|
+
observedPosition: this.viewport.getScrollPosition(),
|
|
211
|
+
sequence: ++this.sequence,
|
|
212
|
+
url: intent.url,
|
|
213
|
+
scheduled: false,
|
|
214
|
+
};
|
|
215
|
+
this.latestNavigationId = Math.max(this.latestNavigationId, intent.navigationId);
|
|
216
|
+
if (this.bodyProcessed)
|
|
217
|
+
this.contentProcessed();
|
|
218
|
+
}
|
|
219
|
+
afterScrollOpportunity() {
|
|
220
|
+
const window = this.document.defaultView;
|
|
221
|
+
if (!window)
|
|
222
|
+
return Promise.resolve(false);
|
|
223
|
+
this.cancelFrameWait();
|
|
224
|
+
return this.zone.runOutsideAngular(() => new Promise((resolve) => {
|
|
225
|
+
const wait = {
|
|
226
|
+
settle: (value) => {
|
|
227
|
+
if (this.frameWait !== wait)
|
|
228
|
+
return;
|
|
229
|
+
this.frameWait = undefined;
|
|
230
|
+
resolve(value);
|
|
231
|
+
},
|
|
232
|
+
};
|
|
233
|
+
this.frameWait = wait;
|
|
234
|
+
wait.first = window.requestAnimationFrame(() => {
|
|
235
|
+
wait.first = undefined;
|
|
236
|
+
wait.second = window.requestAnimationFrame(() => {
|
|
237
|
+
wait.second = undefined;
|
|
238
|
+
wait.settle(true);
|
|
239
|
+
});
|
|
240
|
+
});
|
|
241
|
+
}));
|
|
242
|
+
}
|
|
243
|
+
eventUrl(event) {
|
|
244
|
+
return event instanceof NavigationEnd ? event.urlAfterRedirects : event.url;
|
|
245
|
+
}
|
|
246
|
+
target(anchor) {
|
|
247
|
+
const scope = this.pageWrapper();
|
|
248
|
+
if (!scope || scope.ownerDocument !== this.document)
|
|
249
|
+
return undefined;
|
|
250
|
+
const local = scope.id === anchor || scope.getAttribute('name') === anchor
|
|
251
|
+
? scope
|
|
252
|
+
: Array.from(scope.querySelectorAll('[id], [name]')).find((element) => element.id === anchor || element.getAttribute('name') === anchor);
|
|
253
|
+
const global = this.document.getElementById(anchor) ?? this.document.getElementsByName(anchor)[0];
|
|
254
|
+
return local && global === local ? local : undefined;
|
|
255
|
+
}
|
|
256
|
+
clear() {
|
|
257
|
+
const pending = this.pending;
|
|
258
|
+
this.cancelFrameWait();
|
|
259
|
+
this.sequence++;
|
|
260
|
+
this.pending = undefined;
|
|
261
|
+
if (pending)
|
|
262
|
+
this.releaseOverflowAnchor(pending);
|
|
263
|
+
if (pending?.kind === 'anchor' && pending.initial) {
|
|
264
|
+
this.initialScrollIntent.settle(pending.navigationId);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
acquireOverflowAnchor(owner) {
|
|
268
|
+
const element = this.pageWrapper();
|
|
269
|
+
if (!element)
|
|
270
|
+
return;
|
|
271
|
+
let lease = overflowAnchorLeases.get(element);
|
|
272
|
+
if (!lease) {
|
|
273
|
+
lease = {
|
|
274
|
+
owners: new Set(),
|
|
275
|
+
previousPriority: element.style.getPropertyPriority('overflow-anchor'),
|
|
276
|
+
previousValue: element.style.getPropertyValue('overflow-anchor'),
|
|
277
|
+
};
|
|
278
|
+
overflowAnchorLeases.set(element, lease);
|
|
279
|
+
element.style.setProperty('overflow-anchor', 'none');
|
|
280
|
+
}
|
|
281
|
+
lease.owners.add(owner);
|
|
282
|
+
this.overflowAnchorLease = { element, owner };
|
|
283
|
+
}
|
|
284
|
+
releaseOverflowAnchor(owner) {
|
|
285
|
+
const current = this.overflowAnchorLease;
|
|
286
|
+
if (!current || current.owner !== owner)
|
|
287
|
+
return;
|
|
288
|
+
this.overflowAnchorLease = undefined;
|
|
289
|
+
const lease = overflowAnchorLeases.get(current.element);
|
|
290
|
+
if (!lease)
|
|
291
|
+
return;
|
|
292
|
+
lease.owners.delete(owner);
|
|
293
|
+
if (lease.owners.size > 0)
|
|
294
|
+
return;
|
|
295
|
+
overflowAnchorLeases.delete(current.element);
|
|
296
|
+
if (current.element.style.getPropertyValue('overflow-anchor') !== 'none' ||
|
|
297
|
+
current.element.style.getPropertyPriority('overflow-anchor') !== '') {
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
300
|
+
if (lease.previousValue) {
|
|
301
|
+
current.element.style.setProperty('overflow-anchor', lease.previousValue, lease.previousPriority);
|
|
302
|
+
}
|
|
303
|
+
else {
|
|
304
|
+
current.element.style.removeProperty('overflow-anchor');
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
pageWrapper() {
|
|
308
|
+
return this.host.closest('ng-doc-page-wrapper') ?? undefined;
|
|
309
|
+
}
|
|
310
|
+
cancelFrameWait() {
|
|
311
|
+
const wait = this.frameWait;
|
|
312
|
+
if (!wait)
|
|
313
|
+
return;
|
|
314
|
+
const window = this.document.defaultView;
|
|
315
|
+
if (wait.first !== undefined)
|
|
316
|
+
window?.cancelAnimationFrame(wait.first);
|
|
317
|
+
if (wait.second !== undefined)
|
|
318
|
+
window?.cancelAnimationFrame(wait.second);
|
|
319
|
+
wait.settle(false);
|
|
320
|
+
}
|
|
321
|
+
destroy() {
|
|
322
|
+
if (this.destroyed)
|
|
323
|
+
return;
|
|
324
|
+
this.destroyed = true;
|
|
325
|
+
this.clear();
|
|
326
|
+
if (this.viewportListening) {
|
|
327
|
+
this.document.defaultView?.removeEventListener('scroll', this.viewportScroll, true);
|
|
328
|
+
this.document.defaultView?.removeEventListener('wheel', this.userInput);
|
|
329
|
+
this.document.defaultView?.removeEventListener('touchmove', this.userInput);
|
|
330
|
+
this.document.defaultView?.removeEventListener('keydown', this.keyInput);
|
|
331
|
+
this.viewportListening = false;
|
|
332
|
+
}
|
|
333
|
+
this.unsubscribeIntent?.();
|
|
334
|
+
this.unsubscribeIntent = undefined;
|
|
335
|
+
this.subscription.unsubscribe();
|
|
336
|
+
}
|
|
337
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocContentAnchorController, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
338
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocContentAnchorController }); }
|
|
339
|
+
}
|
|
340
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocContentAnchorController, decorators: [{
|
|
341
|
+
type: Injectable
|
|
342
|
+
}], ctorParameters: () => [] });
|
|
343
|
+
const SCROLL_KEYS = new Set([
|
|
344
|
+
' ',
|
|
345
|
+
'ArrowDown',
|
|
346
|
+
'ArrowLeft',
|
|
347
|
+
'ArrowRight',
|
|
348
|
+
'ArrowUp',
|
|
349
|
+
'End',
|
|
350
|
+
'Home',
|
|
351
|
+
'PageDown',
|
|
352
|
+
'PageUp',
|
|
353
|
+
]);
|
|
354
|
+
function samePosition(first, second) {
|
|
355
|
+
return first[0] === second[0] && first[1] === second[1];
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* Generated bundle index. Do not edit.
|
|
360
|
+
*/
|
|
361
|
+
|
|
362
|
+
export { NgDocContentAnchorController };
|
|
363
|
+
//# sourceMappingURL=ng-doc-app-classes-content-anchor-controller.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ng-doc-app-classes-content-anchor-controller.mjs","sources":["../../../../libs/app/classes/content-anchor-controller/content-anchor-controller.ts","../../../../libs/app/classes/content-anchor-controller/ng-doc-app-classes-content-anchor-controller.ts"],"sourcesContent":["import { DOCUMENT, isPlatformBrowser, ViewportScroller } from '@angular/common';\nimport {\n ApplicationRef,\n DestroyRef,\n ElementRef,\n inject,\n Injectable,\n NgZone,\n PLATFORM_ID,\n} from '@angular/core';\nimport { NavigationEnd, NavigationSkipped, NavigationStart, Router, Scroll } from '@angular/router';\nimport {\n NgDocContentScrollIntent,\n NgDocInitialContentScrollIntent,\n} from '@ng-doc/app/services/content-scroll-intent';\nimport { NgDocContentState } from '@ng-doc/app/services/content-state';\nimport {\n NG_DOC_CONTENT_ANCHOR_SCROLLING,\n NG_DOC_CONTENT_SCROLL_POSITION_RESTORATION,\n} from '@ng-doc/app/tokens';\nimport { Subscription } from 'rxjs';\n\ntype PendingScroll = {\n armed: boolean;\n readonly navigationId: number;\n observedPosition: readonly [number, number];\n readonly sequence: number;\n readonly url: string;\n scheduled: boolean;\n} & (\n | { readonly kind: 'anchor'; readonly anchor: string; readonly initial: boolean }\n | { readonly kind: 'position'; readonly position: [number, number] }\n);\n\ninterface FrameWait {\n first?: number;\n second?: number;\n settle(value: boolean): void;\n}\n\ninterface OverflowAnchorLease {\n readonly owners: Set<object>;\n readonly previousPriority: string;\n readonly previousValue: string;\n}\n\nconst overflowAnchorLeases = new WeakMap<HTMLElement, OverflowAnchorLease>();\n\n/** Coordinates one missed router anchor with the accepted asynchronous content pass. */\n@Injectable()\nexport class NgDocContentAnchorController {\n private readonly applicationRef = inject(ApplicationRef);\n private readonly document = inject(DOCUMENT);\n private readonly contentState = inject(NgDocContentState);\n private readonly initialScrollIntent = inject(NgDocContentScrollIntent);\n private readonly anchorScrolling = inject(NG_DOC_CONTENT_ANCHOR_SCROLLING);\n private readonly positionRestoration = inject(NG_DOC_CONTENT_SCROLL_POSITION_RESTORATION);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n private readonly zone = inject(NgZone);\n private readonly router = inject(Router);\n private readonly viewport = inject(ViewportScroller);\n private readonly browser = isPlatformBrowser(inject(PLATFORM_ID));\n private active = false;\n private bodyProcessed = false;\n private destroyed = false;\n private latestNavigationId = 0;\n private pending?: PendingScroll;\n private sequence = 0;\n private readonly subscription: Subscription;\n private viewportListening = false;\n private frameWait?: FrameWait;\n private overflowAnchorLease?: { readonly element: HTMLElement; readonly owner: object };\n private suppressedNavigationId?: number;\n private unsubscribeIntent?: () => void;\n private readonly userInput = () => {\n if (this.latestNavigationId > 0) this.suppressedNavigationId = this.latestNavigationId;\n if (this.pending) this.clear();\n };\n private readonly keyInput = (event: KeyboardEvent) => {\n if (SCROLL_KEYS.has(event.key)) this.userInput();\n };\n private readonly viewportScroll = () => {\n if (\n this.pending &&\n this.pending.armed &&\n !samePosition(this.viewport.getScrollPosition(), this.pending.observedPosition)\n ) {\n this.userInput();\n }\n };\n\n constructor() {\n this.subscription = this.router.events.subscribe((event) => {\n if (event instanceof Scroll) this.observeScroll(event);\n else if (event instanceof NavigationStart) {\n this.latestNavigationId = Math.max(this.latestNavigationId, event.id);\n this.suppressedNavigationId = undefined;\n this.clear();\n }\n });\n inject(DestroyRef).onDestroy(() => this.destroy());\n }\n\n /** Limits delayed replay to pages backed by an asynchronous content source. */\n activate(): void {\n this.active = true;\n this.unsubscribeIntent ??= this.initialScrollIntent.subscribe((intent) =>\n this.observeInitialIntent(intent),\n );\n if (\n (this.anchorScrolling || this.positionRestoration === 'enabled') &&\n this.browser &&\n this.document.defaultView &&\n !this.viewportListening\n ) {\n this.viewportListening = true;\n this.document.defaultView.addEventListener('scroll', this.viewportScroll, {\n capture: true,\n passive: true,\n });\n this.document.defaultView.addEventListener('wheel', this.userInput, { passive: true });\n this.document.defaultView.addEventListener('touchmove', this.userInput, { passive: true });\n this.document.defaultView.addEventListener('keydown', this.keyInput);\n }\n }\n\n /** Marks the current asynchronous body and its processors as accepted. */\n contentProcessed(): void {\n this.bodyProcessed = true;\n const pending = this.pending;\n if (!pending || !pending.armed || pending.scheduled) return;\n pending.scheduled = true;\n void this.replayAfterStable(pending);\n }\n\n /** Cancels a missed anchor when the current body fails. */\n contentFailed(): void {\n this.bodyProcessed = false;\n this.clear();\n }\n\n private observeScroll(event: Scroll): void {\n if (event.routerEvent.id < this.latestNavigationId) return;\n this.latestNavigationId = event.routerEvent.id;\n this.clear();\n if (this.suppressedNavigationId === event.routerEvent.id) return;\n const sequence = ++this.sequence;\n if (\n !this.active ||\n !this.browser ||\n event.scrollBehavior === 'manual' ||\n (event.position && this.positionRestoration !== 'enabled')\n ) {\n return;\n }\n\n const observedPosition = this.viewport.getScrollPosition();\n if (event.position) {\n if (samePosition(observedPosition, event.position)) return;\n this.pending = {\n armed: false,\n kind: 'position',\n navigationId: event.routerEvent.id,\n observedPosition,\n position: [event.position[0], event.position[1]],\n sequence,\n url: this.eventUrl(event.routerEvent),\n scheduled: false,\n };\n const pending = this.pending;\n this.acquireOverflowAnchor(pending);\n queueMicrotask(() => {\n if (this.destroyed || this.pending !== pending || pending.sequence !== this.sequence)\n return;\n pending.observedPosition = this.viewport.getScrollPosition();\n pending.armed = true;\n if (samePosition(pending.observedPosition, pending.position)) {\n this.clear();\n } else if (this.bodyProcessed) {\n this.contentProcessed();\n }\n });\n return;\n }\n if (!this.anchorScrolling || !event.anchor || this.target(event.anchor)) return;\n\n this.pending = {\n armed: true,\n kind: 'anchor',\n anchor: event.anchor,\n initial: false,\n navigationId: event.routerEvent.id,\n observedPosition,\n sequence,\n url: this.eventUrl(event.routerEvent),\n scheduled: false,\n };\n if (this.bodyProcessed) this.contentProcessed();\n }\n\n private async replayAfterStable(pending: PendingScroll): Promise<void> {\n try {\n await this.applicationRef.whenStable();\n } catch {\n if (this.pending === pending) this.clear();\n return;\n }\n if (this.destroyed || this.pending !== pending || pending.sequence !== this.sequence) return;\n if (pending.kind === 'anchor' && pending.initial && !(await this.afterScrollOpportunity())) {\n return;\n }\n if (this.destroyed || this.pending !== pending || pending.sequence !== this.sequence) return;\n\n const target = pending.kind === 'anchor' ? this.target(pending.anchor) : undefined;\n const position = this.viewport.getScrollPosition();\n this.pending = undefined;\n if (pending.kind === 'anchor' && pending.initial) {\n this.initialScrollIntent.settle(pending.navigationId);\n }\n try {\n if (\n this.router.url !== pending.url ||\n pending.navigationId !== this.latestNavigationId ||\n this.contentState.currentFailure() ||\n (pending.kind === 'anchor' && !target) ||\n !samePosition(position, pending.observedPosition)\n ) {\n return;\n }\n if (pending.kind === 'anchor') {\n this.viewport.scrollToAnchor(pending.anchor);\n } else this.viewport.scrollToPosition(pending.position);\n } finally {\n this.releaseOverflowAnchor(pending);\n }\n }\n\n private observeInitialIntent(intent: NgDocInitialContentScrollIntent | undefined): void {\n if (this.pending?.kind === 'anchor' && this.pending.initial) this.clear();\n if (\n !intent ||\n !this.active ||\n !this.browser ||\n !this.anchorScrolling ||\n this.suppressedNavigationId === intent.navigationId\n ) {\n return;\n }\n if (this.target(intent.anchor)) {\n this.initialScrollIntent.settle(intent.navigationId);\n return;\n }\n this.pending = {\n armed: true,\n kind: 'anchor',\n anchor: intent.anchor,\n initial: true,\n navigationId: intent.navigationId,\n observedPosition: this.viewport.getScrollPosition(),\n sequence: ++this.sequence,\n url: intent.url,\n scheduled: false,\n };\n this.latestNavigationId = Math.max(this.latestNavigationId, intent.navigationId);\n if (this.bodyProcessed) this.contentProcessed();\n }\n\n private afterScrollOpportunity(): Promise<boolean> {\n const window = this.document.defaultView;\n if (!window) return Promise.resolve(false);\n this.cancelFrameWait();\n return this.zone.runOutsideAngular(\n () =>\n new Promise<boolean>((resolve) => {\n const wait: FrameWait = {\n settle: (value: boolean) => {\n if (this.frameWait !== wait) return;\n this.frameWait = undefined;\n resolve(value);\n },\n };\n this.frameWait = wait;\n wait.first = window.requestAnimationFrame(() => {\n wait.first = undefined;\n wait.second = window.requestAnimationFrame(() => {\n wait.second = undefined;\n wait.settle(true);\n });\n });\n }),\n );\n }\n\n private eventUrl(event: NavigationEnd | NavigationSkipped): string {\n return event instanceof NavigationEnd ? event.urlAfterRedirects : event.url;\n }\n\n private target(anchor: string): Element | undefined {\n const scope = this.pageWrapper();\n if (!scope || scope.ownerDocument !== this.document) return undefined;\n const local =\n scope.id === anchor || scope.getAttribute('name') === anchor\n ? scope\n : Array.from(scope.querySelectorAll('[id], [name]')).find(\n (element) => element.id === anchor || element.getAttribute('name') === anchor,\n );\n const global =\n this.document.getElementById(anchor) ?? this.document.getElementsByName(anchor)[0];\n return local && global === local ? local : undefined;\n }\n\n private clear(): void {\n const pending = this.pending;\n this.cancelFrameWait();\n this.sequence++;\n this.pending = undefined;\n if (pending) this.releaseOverflowAnchor(pending);\n if (pending?.kind === 'anchor' && pending.initial) {\n this.initialScrollIntent.settle(pending.navigationId);\n }\n }\n\n private acquireOverflowAnchor(owner: object): void {\n const element = this.pageWrapper();\n if (!element) return;\n let lease = overflowAnchorLeases.get(element);\n if (!lease) {\n lease = {\n owners: new Set(),\n previousPriority: element.style.getPropertyPriority('overflow-anchor'),\n previousValue: element.style.getPropertyValue('overflow-anchor'),\n };\n overflowAnchorLeases.set(element, lease);\n element.style.setProperty('overflow-anchor', 'none');\n }\n lease.owners.add(owner);\n this.overflowAnchorLease = { element, owner };\n }\n\n private releaseOverflowAnchor(owner: object): void {\n const current = this.overflowAnchorLease;\n if (!current || current.owner !== owner) return;\n this.overflowAnchorLease = undefined;\n const lease = overflowAnchorLeases.get(current.element);\n if (!lease) return;\n lease.owners.delete(owner);\n if (lease.owners.size > 0) return;\n overflowAnchorLeases.delete(current.element);\n if (\n current.element.style.getPropertyValue('overflow-anchor') !== 'none' ||\n current.element.style.getPropertyPriority('overflow-anchor') !== ''\n ) {\n return;\n }\n if (lease.previousValue) {\n current.element.style.setProperty(\n 'overflow-anchor',\n lease.previousValue,\n lease.previousPriority,\n );\n } else {\n current.element.style.removeProperty('overflow-anchor');\n }\n }\n\n private pageWrapper(): HTMLElement | undefined {\n return this.host.closest<HTMLElement>('ng-doc-page-wrapper') ?? undefined;\n }\n\n private cancelFrameWait(): void {\n const wait = this.frameWait;\n if (!wait) return;\n const window = this.document.defaultView;\n if (wait.first !== undefined) window?.cancelAnimationFrame(wait.first);\n if (wait.second !== undefined) window?.cancelAnimationFrame(wait.second);\n wait.settle(false);\n }\n\n private destroy(): void {\n if (this.destroyed) return;\n this.destroyed = true;\n this.clear();\n if (this.viewportListening) {\n this.document.defaultView?.removeEventListener('scroll', this.viewportScroll, true);\n this.document.defaultView?.removeEventListener('wheel', this.userInput);\n this.document.defaultView?.removeEventListener('touchmove', this.userInput);\n this.document.defaultView?.removeEventListener('keydown', this.keyInput);\n this.viewportListening = false;\n }\n this.unsubscribeIntent?.();\n this.unsubscribeIntent = undefined;\n this.subscription.unsubscribe();\n }\n}\n\nconst SCROLL_KEYS = new Set([\n ' ',\n 'ArrowDown',\n 'ArrowLeft',\n 'ArrowRight',\n 'ArrowUp',\n 'End',\n 'Home',\n 'PageDown',\n 'PageUp',\n]);\n\nfunction samePosition(\n first: readonly [number, number],\n second: readonly [number, number],\n): boolean {\n return first[0] === second[0] && first[1] === second[1];\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AA8CA,MAAM,oBAAoB,GAAG,IAAI,OAAO,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