mkdocs-material/typings/_/index.d.ts

76 lines
2.8 KiB
TypeScript
Raw Normal View History

2019-10-27 20:02:05 +03:00
/*
2021-02-14 18:54:27 +03:00
* Copyright (c) 2016-2021 Martin Donath <martin.donath@squidfunk.com>
2019-10-27 20:02:05 +03:00
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
2021-02-21 13:59:38 +03:00
import { Observable, Subject } from "rxjs"
import { Keyboard, Viewport } from "~/browser"
import { Component } from "~/components"
import {
SearchIndex,
SearchTransformFn
} from "~/integrations"
Squashed commit of the following: commit 9b5b80380fc81f5a68828e22754f0e7d53b0dea0 Author: squidfunk <martin.donath@squidfunk.com> Date: Sun Feb 7 16:25:06 2021 +0100 Refactored more stuff commit 5a2108254f1222db7de08690e13c24e972ea19c0 Author: squidfunk <martin.donath@squidfunk.com> Date: Sun Feb 7 13:48:16 2021 +0100 Refactored more stuff commit b3a112f4bddefebcf9dbd1d0ffe240d86fc9aa08 Author: squidfunk <martin.donath@squidfunk.com> Date: Sun Feb 7 12:02:42 2021 +0100 Refactored more stuff commit bff323b6b81571021c0ac9be6f637de7728447a5 Author: squidfunk <martin.donath@squidfunk.com> Date: Sat Feb 6 18:14:52 2021 +0100 Refactored search result list commit 27b7e7e2da3b725797ad769e4411260ffd35b9f8 Author: squidfunk <martin.donath@squidfunk.com> Date: Sat Feb 6 17:12:36 2021 +0100 Refactored more components commit 3747e5ba6d084ed513a2659f48f161449b760076 Author: squidfunk <martin.donath@squidfunk.com> Date: Sun Jan 24 18:56:26 2021 +0100 Implemented new architecture for several components commit ea2851ab0f27113b080c2539a94a88dc0332be84 Author: squidfunk <martin.donath@squidfunk.com> Date: Sun Jan 24 14:53:42 2021 +0100 Removed unnecessary height declaration for sidebars commit 3c3f83ab4ef392dbabf1a11afba2556e529b1674 Merge: 91d239d8 13024179 Author: squidfunk <martin.donath@squidfunk.com> Date: Sun Jan 24 13:04:49 2021 +0100 Merge branch 'master' into refactor/observable-architecture commit 91d239d86649b9571b376011669bc73a7865b186 Author: squidfunk <martin.donath@squidfunk.com> Date: Sat Jan 9 13:11:04 2021 +0100 Started refactoring observable architecture
2021-02-07 18:27:51 +03:00
2019-11-27 21:12:49 +03:00
/* ----------------------------------------------------------------------------
2021-02-21 13:59:38 +03:00
* Global types
2019-11-27 21:12:49 +03:00
* ------------------------------------------------------------------------- */
/**
Squashed commit of the following: commit 9b5b80380fc81f5a68828e22754f0e7d53b0dea0 Author: squidfunk <martin.donath@squidfunk.com> Date: Sun Feb 7 16:25:06 2021 +0100 Refactored more stuff commit 5a2108254f1222db7de08690e13c24e972ea19c0 Author: squidfunk <martin.donath@squidfunk.com> Date: Sun Feb 7 13:48:16 2021 +0100 Refactored more stuff commit b3a112f4bddefebcf9dbd1d0ffe240d86fc9aa08 Author: squidfunk <martin.donath@squidfunk.com> Date: Sun Feb 7 12:02:42 2021 +0100 Refactored more stuff commit bff323b6b81571021c0ac9be6f637de7728447a5 Author: squidfunk <martin.donath@squidfunk.com> Date: Sat Feb 6 18:14:52 2021 +0100 Refactored search result list commit 27b7e7e2da3b725797ad769e4411260ffd35b9f8 Author: squidfunk <martin.donath@squidfunk.com> Date: Sat Feb 6 17:12:36 2021 +0100 Refactored more components commit 3747e5ba6d084ed513a2659f48f161449b760076 Author: squidfunk <martin.donath@squidfunk.com> Date: Sun Jan 24 18:56:26 2021 +0100 Implemented new architecture for several components commit ea2851ab0f27113b080c2539a94a88dc0332be84 Author: squidfunk <martin.donath@squidfunk.com> Date: Sun Jan 24 14:53:42 2021 +0100 Removed unnecessary height declaration for sidebars commit 3c3f83ab4ef392dbabf1a11afba2556e529b1674 Merge: 91d239d8 13024179 Author: squidfunk <martin.donath@squidfunk.com> Date: Sun Jan 24 13:04:49 2021 +0100 Merge branch 'master' into refactor/observable-architecture commit 91d239d86649b9571b376011669bc73a7865b186 Author: squidfunk <martin.donath@squidfunk.com> Date: Sat Jan 9 13:11:04 2021 +0100 Started refactoring observable architecture
2021-02-07 18:27:51 +03:00
* Global search configuration
2019-11-27 21:12:49 +03:00
*/
Squashed commit of the following: commit 9b5b80380fc81f5a68828e22754f0e7d53b0dea0 Author: squidfunk <martin.donath@squidfunk.com> Date: Sun Feb 7 16:25:06 2021 +0100 Refactored more stuff commit 5a2108254f1222db7de08690e13c24e972ea19c0 Author: squidfunk <martin.donath@squidfunk.com> Date: Sun Feb 7 13:48:16 2021 +0100 Refactored more stuff commit b3a112f4bddefebcf9dbd1d0ffe240d86fc9aa08 Author: squidfunk <martin.donath@squidfunk.com> Date: Sun Feb 7 12:02:42 2021 +0100 Refactored more stuff commit bff323b6b81571021c0ac9be6f637de7728447a5 Author: squidfunk <martin.donath@squidfunk.com> Date: Sat Feb 6 18:14:52 2021 +0100 Refactored search result list commit 27b7e7e2da3b725797ad769e4411260ffd35b9f8 Author: squidfunk <martin.donath@squidfunk.com> Date: Sat Feb 6 17:12:36 2021 +0100 Refactored more components commit 3747e5ba6d084ed513a2659f48f161449b760076 Author: squidfunk <martin.donath@squidfunk.com> Date: Sun Jan 24 18:56:26 2021 +0100 Implemented new architecture for several components commit ea2851ab0f27113b080c2539a94a88dc0332be84 Author: squidfunk <martin.donath@squidfunk.com> Date: Sun Jan 24 14:53:42 2021 +0100 Removed unnecessary height declaration for sidebars commit 3c3f83ab4ef392dbabf1a11afba2556e529b1674 Merge: 91d239d8 13024179 Author: squidfunk <martin.donath@squidfunk.com> Date: Sun Jan 24 13:04:49 2021 +0100 Merge branch 'master' into refactor/observable-architecture commit 91d239d86649b9571b376011669bc73a7865b186 Author: squidfunk <martin.donath@squidfunk.com> Date: Sat Jan 9 13:11:04 2021 +0100 Started refactoring observable architecture
2021-02-07 18:27:51 +03:00
export interface GlobalSearchConfig {
transform?: SearchTransformFn /* Transformation function */
index?: Promise<SearchIndex> /* Alternate index */
}
/* ------------------------------------------------------------------------- */
declare global {
/**
2021-02-21 13:59:38 +03:00
* Global search configuration
*/
2021-02-21 13:59:38 +03:00
const __search: GlobalSearchConfig | undefined
/**
* Google Analytics
*/
function ga(...args: string[]): void
2019-11-27 21:12:49 +03:00
}
2021-02-21 13:59:38 +03:00
/* ----------------------------------------------------------------------------
* Types
* ------------------------------------------------------------------------- */
declare global {
interface Window {
document$: Observable<Document> /* Document observable */
location$: Subject<URL> /* Location subject */
target$: Observable<HTMLElement> /* Location target observable */
keyboard$: Observable<Keyboard> /* Keyboard observable */
viewport$: Observable<Viewport> /* Viewport obsevable */
tablet$: Observable<boolean> /* Tablet breakpoint observable */
screen$: Observable<boolean> /* Screen breakpoint observable */
print$: Observable<void> /* Print mode observable */
component$: Observable<Component> /* Component observable */
}
}