Skip to content

Commit

Permalink
Deployed 510384f with MkDocs version: 1.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ajalt committed Jan 10, 2024
1 parent 64c879d commit 7bb0398
Show file tree
Hide file tree
Showing 45 changed files with 320 additions and 179 deletions.
2 changes: 1 addition & 1 deletion 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -1940,7 +1940,7 @@ <h1>404 - Not found</h1>
<div class="md-copyright">

<div class="md-copyright__highlight">
Copyright &copy; 2022 AJ Alt
Copyright &copy; 2018 AJ Alt
</div>


Expand Down
7 changes: 5 additions & 2 deletions advanced/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2409,9 +2409,12 @@ <h2 id="command-aliases">Command Aliases<a class="headerlink" href="#command-ali
</div>
</div>
</div>
<p>Note that aliases are not expanded recursively: none of the tokens that
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Aliases are not expanded recursively: none of the tokens that
an alias expands to will be expanded again, even if they match another
alias.</p>
</div>
<p>You also use this functionality to implement command prefixes:</p>
<div class="tabbed-set tabbed-alternate" data-tabs="5:2"><input checked="checked" id="__tabbed_5_1" name="__tabbed_5" type="radio" /><input id="__tabbed_5_2" name="__tabbed_5" type="radio" /><div class="tabbed-labels"><label for="__tabbed_5_1">Example</label><label for="__tabbed_5_2">Usage</label></div>
<div class="tabbed-content">
Expand Down Expand Up @@ -2606,7 +2609,7 @@ <h3 id="browser-javascript">Browser JavaScript<a class="headerlink" href="#brows
<div class="md-copyright">

<div class="md-copyright__highlight">
Copyright &copy; 2022 AJ Alt
Copyright &copy; 2018 AJ Alt
</div>


Expand Down
6 changes: 5 additions & 1 deletion api/images/anchor-copy-button.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion api/images/arrow_down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion api/images/burger.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion api/images/copy-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion api/images/copy-successful-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion api/images/footer-go-to-link.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion api/images/go-to-top-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion api/images/logo-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions api/images/nav-icons/abstract-class-kotlin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions api/images/nav-icons/annotation-kotlin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions api/images/nav-icons/class-kotlin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions api/images/nav-icons/enum-kotlin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions api/images/nav-icons/field-value.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions api/images/nav-icons/field-variable.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions api/images/nav-icons/interface-kotlin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions api/images/nav-icons/object.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions api/images/nav-icons/typealias-kotlin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion api/images/theme-toggle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions api/scripts/clipboard.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/*
* Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

window.addEventListener('load', () => {
document.querySelectorAll('span.copy-icon').forEach(element => {
element.addEventListener('click', (el) => copyElementsContentToClipboard(element));
Expand Down
4 changes: 4 additions & 0 deletions api/scripts/navigation-loader.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/*
* Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

navigationPageText = fetch(pathToRoot + "navigation.html").then(response => response.text())

displayNavigationFromPage = () => {
Expand Down
4 changes: 4 additions & 0 deletions api/scripts/platform-content-handler.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/*
* Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

filteringContext = {
dependencies: {},
restrictedDependencies: [],
Expand Down
2 changes: 1 addition & 1 deletion api/scripts/sourceset_dependencies.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

119 changes: 50 additions & 69 deletions api/scripts/symbol-parameters-wrapper_deferred.js
Original file line number Diff line number Diff line change
@@ -1,83 +1,64 @@
/*
* Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

// helps with some corner cases where <wbr> starts working already,
// but the signature is not yet long enough to be wrapped
const leftPaddingPx = 60

const symbolResizeObserver = new ResizeObserver(entries => {
entries.forEach(entry => {
const symbolElement = entry.target
symbolResizeObserver.unobserve(symbolElement) // only need it once, otherwise will be executed multiple times
wrapSymbolParameters(symbolElement);
})
});

const wrapAllSymbolParameters = () => {
document.querySelectorAll("div.symbol").forEach(symbol => wrapSymbolParameters(symbol))
}
(function() {
const leftPaddingPx = 60;

const wrapSymbolParameters = (symbol) => {
let parametersBlock = symbol.querySelector("span.parameters")
if (parametersBlock == null) {
return // nothing to wrap
function createNbspIndent() {
let indent = document.createElement("span");
indent.append(document.createTextNode("\u00A0\u00A0\u00A0\u00A0"));
indent.classList.add("nbsp-indent");
return indent;
}

let symbolBlockWidth = symbol.clientWidth
function wrapSymbolParameters(entry) {
const symbol = entry.target;
const symbolBlockWidth = entry.borderBoxSize && entry.borderBoxSize[0] && entry.borderBoxSize[0].inlineSize;

// Even though the script is marked as `defer` and we wait for `DOMContentLoaded` event,
// it can happen that `symbolBlockWidth` is 0, indicating that something hasn't been loaded.
// In this case, just retry once all styles have been applied and it has been resized correctly.
if (symbolBlockWidth === 0) {
symbolResizeObserver.observe(symbol)
return
}
// Even though the script is marked as `defer` and we wait for `DOMContentLoaded` event,
// or if this block is a part of hidden tab, it can happen that `symbolBlockWidth` is 0,
// indicating that something hasn't been loaded.
// In this case, observer will be triggered onсe again when it will be ready.
if (symbolBlockWidth > 0) {
const node = symbol.querySelector(".parameters");

let innerTextWidth = Array.from(symbol.children)
.filter(it => !it.classList.contains("block")) // blocks are usually on their own (like annotations), so ignore it
.map(it => it.getBoundingClientRect().width).reduce((a, b) => a + b, 0)
if (node) {
// if window resize happened and observer was triggered, reset previously wrapped
// parameters as they might not need wrapping anymore, and check again
node.classList.remove("wrapped");
node.querySelectorAll(".parameter .nbsp-indent")
.forEach(indent => indent.remove());

// if signature text takes up more than a single line, wrap params for readability
let shouldWrapParams = innerTextWidth > (symbolBlockWidth - leftPaddingPx)
if (shouldWrapParams) {
parametersBlock.classList.add("wrapped")
parametersBlock.querySelectorAll("span.parameter").forEach(param => {
// has to be a physical indent so that it can be copied. styles like
// paddings and `::before { content: " " }` do not work for that
param.prepend(createNbspIndent())
})
}
}
const innerTextWidth = Array.from(symbol.children)
.filter(it => !it.classList.contains("block")) // blocks are usually on their own (like annotations), so ignore it
.map(it => it.getBoundingClientRect().width)
.reduce((a, b) => a + b, 0);

const createNbspIndent = () => {
let indent = document.createElement("span")
indent.append(document.createTextNode("\u00A0\u00A0\u00A0\u00A0"))
indent.classList.add("nbsp-indent")
return indent
}
// if signature text takes up more than a single line, wrap params for readability
if (innerTextWidth > (symbolBlockWidth - leftPaddingPx)) {
node.classList.add("wrapped");
node.querySelectorAll(".parameter").forEach(param => {
// has to be a physical indent so that it can be copied. styles like
// paddings and `::before { content: " " }` do not work for that
param.prepend(createNbspIndent());
});
}
}
}
}

const resetAllSymbolParametersWrapping = () => {
document.querySelectorAll("div.symbol").forEach(symbol => resetSymbolParametersWrapping(symbol))
}
const symbolsObserver = new ResizeObserver(entries => entries.forEach(wrapSymbolParameters));

const resetSymbolParametersWrapping = (symbol) => {
let parameters = symbol.querySelector("span.parameters")
if (parameters != null) {
parameters.classList.remove("wrapped")
parameters.querySelectorAll("span.parameter").forEach(param => {
let indent = param.querySelector("span.nbsp-indent")
if (indent != null) indent.remove()
})
function initHandlers() {
document.querySelectorAll("div.symbol").forEach(symbol => symbolsObserver.observe(symbol));
}
}

if (document.readyState === 'loading') {
window.addEventListener('DOMContentLoaded', () => {
wrapAllSymbolParameters()
})
} else {
wrapAllSymbolParameters()
}
if (document.readyState === 'loading') window.addEventListener('DOMContentLoaded', initHandlers);
else initHandlers();

window.onresize = event => {
// need to re-calculate if params need to be wrapped after resize
resetAllSymbolParametersWrapping()
wrapAllSymbolParameters()
}
// ToDo: Add `unobserve` if dokka will be SPA-like:
// https://github.com/w3c/csswg-drafts/issues/5155
})();
4 changes: 4 additions & 0 deletions api/styles/font-jb-sans-auto.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/*
* Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

/* Light weight */
@font-face {
font-family: 'JetBrains Sans';
Expand Down
Loading

0 comments on commit 7bb0398

Please sign in to comment.