1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-12 01:50:52 +01:00

Switched to new RxJS API

This commit is contained in:
squidfunk 2021-11-13 12:05:24 +01:00
parent 9ef21503ca
commit 76035dee40
58 changed files with 265 additions and 220 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -228,7 +228,7 @@
</script>
{% endblock %}
{% block scripts %}
<script src="{{ 'assets/javascripts/bundle.6273739e.min.js' | url }}"></script>
<script src="{{ 'assets/javascripts/bundle.0d86bc28.min.js' | url }}"></script>
{% for path in config["extra_javascript"] %}
<script src="{{ path | url }}"></script>
{% endfor %}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -16,5 +16,5 @@
{% endblock %}
{% block scripts %}
{{ super() }}
<script src="{{ 'overrides/assets/javascripts/bundle.35fbbc46.min.js' | url }}"></script>
<script src="{{ 'overrides/assets/javascripts/bundle.2a83b894.min.js' | url }}"></script>
{% endblock %}

View File

@ -20,8 +20,12 @@
* IN THE SOFTWARE.
*/
import { ReplaySubject, Subject, fromEvent } from "rxjs"
import { mapTo } from "rxjs/operators"
import {
ReplaySubject,
Subject,
fromEvent,
mapTo
} from "rxjs"
/* ----------------------------------------------------------------------------
* Functions

View File

@ -20,8 +20,13 @@
* IN THE SOFTWARE.
*/
import { Observable, fromEvent, merge } from "rxjs"
import { map, startWith } from "rxjs/operators"
import {
Observable,
fromEvent,
map,
merge,
startWith
} from "rxjs"
import { getActiveElement } from "../_"

View File

@ -20,12 +20,14 @@
* IN THE SOFTWARE.
*/
import { Observable, fromEvent, merge } from "rxjs"
import {
Observable,
distinctUntilChanged,
fromEvent,
map,
merge,
startWith
} from "rxjs/operators"
} from "rxjs"
import {
getElementContentSize,

View File

@ -25,17 +25,15 @@ import {
Observable,
Subject,
defer,
of
} from "rxjs"
import {
filter,
finalize,
map,
of,
shareReplay,
startWith,
switchMap,
tap
} from "rxjs/operators"
} from "rxjs"
/* ----------------------------------------------------------------------------
* Types

View File

@ -20,8 +20,13 @@
* IN THE SOFTWARE.
*/
import { Observable, fromEvent } from "rxjs"
import { filter, map, share } from "rxjs/operators"
import {
Observable,
filter,
fromEvent,
map,
share
} from "rxjs"
import { getActiveElement } from "../element"
import { getToggle } from "../toggle"

View File

@ -20,13 +20,14 @@
* IN THE SOFTWARE.
*/
import { Observable, fromEvent } from "rxjs"
import {
Observable,
filter,
fromEvent,
map,
shareReplay,
startWith
} from "rxjs/operators"
} from "rxjs"
import { getElement } from "~/browser"
import { h } from "~/utilities"

View File

@ -25,13 +25,11 @@ import {
Observable,
fromEvent,
fromEventPattern,
merge
} from "rxjs"
import {
mapTo,
merge,
startWith,
switchMap
} from "rxjs/operators"
} from "rxjs"
/* ----------------------------------------------------------------------------
* Functions

View File

@ -20,14 +20,16 @@
* IN THE SOFTWARE.
*/
import { EMPTY, Observable, from } from "rxjs"
import {
EMPTY,
Observable,
catchError,
filter,
from,
map,
shareReplay,
switchMap
} from "rxjs/operators"
} from "rxjs"
/* ----------------------------------------------------------------------------
* Functions

View File

@ -20,8 +20,12 @@
* IN THE SOFTWARE.
*/
import { Observable, fromEvent } from "rxjs"
import { map, startWith } from "rxjs/operators"
import {
Observable,
fromEvent,
map,
startWith
} from "rxjs"
import { getElementOrThrow } from "../element"

View File

@ -20,12 +20,13 @@
* IN THE SOFTWARE.
*/
import { Observable, combineLatest } from "rxjs"
import {
Observable,
combineLatest,
distinctUntilKeyChanged,
map,
shareReplay
} from "rxjs/operators"
} from "rxjs"
import { Header } from "~/components"

View File

@ -20,8 +20,13 @@
* IN THE SOFTWARE.
*/
import { Observable, fromEvent, merge } from "rxjs"
import { map, startWith } from "rxjs/operators"
import {
Observable,
fromEvent,
map,
merge,
startWith
} from "rxjs"
/* ----------------------------------------------------------------------------
* Types

View File

@ -20,8 +20,12 @@
* IN THE SOFTWARE.
*/
import { Observable, fromEvent } from "rxjs"
import { map, startWith } from "rxjs/operators"
import {
Observable,
fromEvent,
map,
startWith
} from "rxjs"
/* ----------------------------------------------------------------------------
* Types

View File

@ -20,14 +20,16 @@
* IN THE SOFTWARE.
*/
import { Observable, Subject, fromEvent } from "rxjs"
import {
Observable,
Subject,
fromEvent,
map,
share,
switchMapTo,
tap,
throttle
} from "rxjs/operators"
} from "rxjs"
/* ----------------------------------------------------------------------------
* Types

View File

@ -21,15 +21,18 @@
*/
import "focus-visible"
import { NEVER, Subject, defer, merge } from "rxjs"
import {
NEVER,
Subject,
defer,
delay,
filter,
map,
merge,
mergeWith,
shareReplay,
switchMap
} from "rxjs/operators"
} from "rxjs"
import { configuration, feature } from "./_"
import {

View File

@ -25,22 +25,20 @@ import {
NEVER,
Observable,
Subject,
fromEvent,
merge,
of
} from "rxjs"
import {
combineLatestWith,
distinctUntilKeyChanged,
finalize,
fromEvent,
map,
merge,
mergeWith,
of,
switchMap,
take,
takeWhile,
tap,
withLatestFrom
} from "rxjs/operators"
} from "rxjs"
import { feature } from "~/_"
import { resetFocusable, setFocusable } from "~/actions"

View File

@ -20,14 +20,16 @@
* IN THE SOFTWARE.
*/
import { Observable, Subject, merge } from "rxjs"
import {
Observable,
Subject,
filter,
finalize,
map,
mapTo,
merge,
tap
} from "rxjs/operators"
} from "rxjs"
import { Component } from "../../_"

View File

@ -20,10 +20,22 @@
* IN THE SOFTWARE.
*/
import { NEVER, Observable, Subject, fromEvent, merge } from "rxjs"
import { finalize, map, mapTo, tap } from "rxjs/operators"
import {
NEVER,
Observable,
Subject,
finalize,
fromEvent,
map,
mapTo,
merge,
tap
} from "rxjs"
import { getElementOrThrow, getElements } from "~/browser"
import {
getElementOrThrow,
getElements
} from "~/browser"
import { Component } from "../../_"

View File

@ -24,17 +24,15 @@ import {
Observable,
Subject,
animationFrameScheduler,
merge,
of
} from "rxjs"
import {
delay,
finalize,
map,
merge,
observeOn,
of,
switchMap,
tap
} from "rxjs/operators"
} from "rxjs"
import {
resetDialogState,

View File

@ -24,22 +24,20 @@ import {
Observable,
Subject,
animationFrameScheduler,
combineLatest,
defer,
of
} from "rxjs"
import {
bufferCount,
combineLatest,
combineLatestWith,
defer,
distinctUntilChanged,
distinctUntilKeyChanged,
filter,
map,
observeOn,
of,
shareReplay,
startWith,
switchMap
} from "rxjs/operators"
} from "rxjs"
import { feature } from "~/_"
import { resetHeaderState, setHeaderState } from "~/actions"

View File

@ -24,15 +24,13 @@ import {
NEVER,
Observable,
Subject,
animationFrameScheduler
} from "rxjs"
import {
animationFrameScheduler,
distinctUntilKeyChanged,
finalize,
map,
observeOn,
tap
} from "rxjs/operators"
} from "rxjs"
import {
resetHeaderTitleState,

View File

@ -22,14 +22,12 @@
import {
Observable,
combineLatest
} from "rxjs"
import {
combineLatest,
distinctUntilChanged,
distinctUntilKeyChanged,
map,
switchMap
} from "rxjs/operators"
} from "rxjs"
import { Viewport, watchElementSize } from "~/browser"

View File

@ -23,18 +23,16 @@
import {
Observable,
Subject,
fromEvent,
of
} from "rxjs"
import {
finalize,
fromEvent,
map,
mapTo,
mergeMap,
of,
shareReplay,
startWith,
tap
} from "rxjs/operators"
} from "rxjs"
import { getElements } from "~/browser"

View File

@ -20,8 +20,16 @@
* IN THE SOFTWARE.
*/
import { NEVER, Observable, ObservableInput, merge } from "rxjs"
import { filter, mergeWith, sample, take } from "rxjs/operators"
import {
NEVER,
Observable,
ObservableInput,
filter,
merge,
mergeWith,
sample,
take
} from "rxjs"
import { configuration } from "~/_"
import {

View File

@ -23,9 +23,11 @@
import {
Observable,
ObservableInput,
combineLatest
combineLatest,
filter,
map,
startWith
} from "rxjs"
import { filter, map, startWith } from "rxjs/operators"
import { getLocation } from "~/browser"
import {

View File

@ -24,23 +24,21 @@ import {
Observable,
Subject,
combineLatest,
fromEvent,
merge
} from "rxjs"
import {
delay,
distinctUntilChanged,
distinctUntilKeyChanged,
filter,
finalize,
fromEvent,
map,
merge,
shareReplay,
startWith,
take,
takeLast,
takeUntil,
tap
} from "rxjs/operators"
} from "rxjs"
import {
resetSearchQueryPlaceholder,

View File

@ -24,22 +24,20 @@ import {
Observable,
Subject,
animationFrameScheduler,
merge,
of
} from "rxjs"
import {
bufferCount,
filter,
finalize,
map,
merge,
observeOn,
of,
skipUntil,
switchMap,
take,
tap,
withLatestFrom,
zipWith
} from "rxjs/operators"
} from "rxjs"
import {
addToSearchResultList,

View File

@ -23,13 +23,11 @@
import {
Observable,
Subject,
fromEvent
} from "rxjs"
import {
finalize,
fromEvent,
map,
tap
} from "rxjs/operators"
} from "rxjs"
import { getLocation } from "~/browser"

View File

@ -24,18 +24,16 @@ import {
Observable,
Subject,
asyncScheduler,
fromEvent,
merge
} from "rxjs"
import {
combineLatestWith,
distinctUntilChanged,
filter,
finalize,
fromEvent,
map,
merge,
observeOn,
tap
} from "rxjs/operators"
} from "rxjs"
import { Keyboard } from "~/browser"
import {

View File

@ -24,16 +24,14 @@ import {
Observable,
Subject,
animationFrameScheduler,
combineLatest
} from "rxjs"
import {
combineLatest,
distinctUntilChanged,
finalize,
map,
observeOn,
tap,
withLatestFrom
} from "rxjs/operators"
} from "rxjs"
import {
resetSidebarHeight,

View File

@ -20,15 +20,19 @@
* IN THE SOFTWARE.
*/
import { NEVER, Observable, Subject, defer, of } from "rxjs"
import {
NEVER,
Observable,
Subject,
catchError,
defer,
filter,
finalize,
map,
of,
shareReplay,
tap
} from "rxjs/operators"
} from "rxjs"
import { setSourceFacts, setSourceState } from "~/actions"
import { renderSourceFacts } from "~/templates"

View File

@ -21,8 +21,12 @@
*/
import { Repo, User } from "github-types"
import { Observable, zip } from "rxjs"
import { defaultIfEmpty, map } from "rxjs/operators"
import {
Observable,
defaultIfEmpty,
map,
zip
} from "rxjs"
import { requestJSON } from "~/browser"

View File

@ -21,8 +21,11 @@
*/
import { ProjectSchema } from "gitlab"
import { Observable } from "rxjs"
import { defaultIfEmpty, map } from "rxjs/operators"
import {
Observable,
defaultIfEmpty,
map
} from "rxjs"
import { requestJSON } from "~/browser"

View File

@ -24,16 +24,14 @@ import {
Observable,
Subject,
animationFrameScheduler,
of
} from "rxjs"
import {
distinctUntilKeyChanged,
finalize,
map,
observeOn,
of,
switchMap,
tap
} from "rxjs/operators"
} from "rxjs"
import { feature } from "~/_"
import { resetTabsState, setTabsState } from "~/actions"

View File

@ -24,22 +24,20 @@ import {
Observable,
Subject,
animationFrameScheduler,
bufferCount,
combineLatest,
defer,
of
} from "rxjs"
import {
bufferCount,
distinctUntilChanged,
distinctUntilKeyChanged,
finalize,
map,
observeOn,
of,
scan,
startWith,
switchMap,
tap
} from "rxjs/operators"
} from "rxjs"
import { feature } from "~/_"
import {

View File

@ -24,10 +24,8 @@ import {
Observable,
Subject,
animationFrameScheduler,
combineLatest
} from "rxjs"
import {
bufferCount,
combineLatest,
distinctUntilChanged,
distinctUntilKeyChanged,
finalize,
@ -35,7 +33,7 @@ import {
observeOn,
tap,
withLatestFrom
} from "rxjs/operators"
} from "rxjs"
import {
resetBackToTopOffset,

View File

@ -25,11 +25,6 @@ import {
NEVER,
Observable,
Subject,
fromEvent,
merge,
of
} from "rxjs"
import {
bufferCount,
catchError,
concatMap,
@ -37,13 +32,16 @@ import {
distinctUntilChanged,
distinctUntilKeyChanged,
filter,
fromEvent,
map,
merge,
of,
sample,
share,
skip,
skipUntil,
switchMap
} from "rxjs/operators"
} from "rxjs"
import { configuration, feature } from "~/_"
import {

View File

@ -20,8 +20,13 @@
* IN THE SOFTWARE.
*/
import { ObservableInput, Subject, from } from "rxjs"
import { map, share } from "rxjs/operators"
import {
ObservableInput,
Subject,
from,
map,
share
} from "rxjs"
import { configuration, feature, translation } from "~/_"
import { WorkerHandler, watchWorker } from "~/browser"

View File

@ -20,8 +20,7 @@
* IN THE SOFTWARE.
*/
import { combineLatest } from "rxjs"
import { map } from "rxjs/operators"
import { combineLatest, map } from "rxjs"
import { configuration } from "~/_"
import {

View File

@ -20,15 +20,17 @@
* IN THE SOFTWARE.
*/
import { Observable, fromEvent, of } from "rxjs"
import {
Observable,
fromEvent,
mapTo,
mergeMap,
of,
switchMap,
takeWhile,
tap,
withLatestFrom
} from "rxjs/operators"
} from "rxjs"
import { getElements } from "~/browser"

View File

@ -20,14 +20,16 @@
* IN THE SOFTWARE.
*/
import { Observable, fromEvent, of } from "rxjs"
import {
Observable,
filter,
fromEvent,
mapTo,
mergeMap,
of,
switchMap,
tap
} from "rxjs/operators"
} from "rxjs"
import { getElements } from "~/browser"

View File

@ -24,15 +24,13 @@ import {
Observable,
animationFrameScheduler,
combineLatest,
of
} from "rxjs"
import {
delay,
map,
observeOn,
of,
switchMap,
withLatestFrom
} from "rxjs/operators"
} from "rxjs"
import { resetScrollLock, setScrollLock } from "~/actions"
import { Viewport, watchToggle } from "~/browser"

View File

@ -20,8 +20,7 @@
* IN THE SOFTWARE.
*/
import { merge } from "rxjs"
import { switchMap } from "rxjs/operators"
import { merge, switchMap } from "rxjs"
import {
getComponentElements,

View File

@ -23,16 +23,14 @@
import {
Observable,
combineLatest,
fromEvent,
merge
} from "rxjs"
import {
delay,
distinctUntilChanged,
filter,
fromEvent,
map,
merge,
withLatestFrom
} from "rxjs/operators"
} from "rxjs"
import { watchElementFocus } from "~/browser"

View File

@ -25,22 +25,20 @@ import {
Observable,
Subject,
animationFrameScheduler,
combineLatest,
merge,
of
} from "rxjs"
import {
bufferCount,
combineLatest,
distinctUntilKeyChanged,
filter,
finalize,
map,
merge,
observeOn,
of,
switchMap,
tap,
withLatestFrom,
zipWith
} from "rxjs/operators"
} from "rxjs"
import {
addToSearchResultList,

View File

@ -20,8 +20,7 @@
* IN THE SOFTWARE.
*/
import { Observable } from "rxjs"
import { map } from "rxjs/operators"
import { Observable, map } from "rxjs"
import { getElementOrThrow, requestJSON } from "~/browser"

View File

@ -28,16 +28,14 @@ import {
from,
fromEvent,
identity,
defer,
of
} from "rxjs"
import {
catchError,
defer,
mapTo,
mergeWith,
of,
switchMap,
tap
} from "rxjs/operators"
} from "rxjs"
import glob from "tiny-glob"
/* ----------------------------------------------------------------------------

View File

@ -22,8 +22,13 @@
import * as fs from "fs/promises"
import * as path from "path"
import { Observable, from } from "rxjs"
import { mapTo, mergeMap, switchMap } from "rxjs/operators"
import {
Observable,
from,
mapTo,
mergeMap,
switchMap
} from "rxjs"
import { mkdir, read, resolve, write } from "../_"

View File

@ -22,17 +22,22 @@
import { minify as minhtml } from "html-minifier"
import * as path from "path"
import { concat, defer, EMPTY, merge, of, zip } from "rxjs"
import {
EMPTY,
concat,
concatMap,
defer,
map,
merge,
of,
reduce,
scan,
startWith,
switchMap,
switchMapTo,
toArray
} from "rxjs/operators"
toArray,
zip
} from "rxjs"
import {
extendDefaultPlugins,
optimize

View File

@ -27,17 +27,15 @@ import postcss from "postcss"
import {
NEVER,
Observable,
catchError,
concat,
defer,
merge,
of
} from "rxjs"
import {
catchError,
endWith,
ignoreElements,
merge,
of,
switchMap
} from "rxjs/operators"
} from "rxjs"
import { render as sass } from "sass"
import { promisify } from "util"