diff --git a/404.html b/404.html index ac7b1f72..57e1718e 100755 --- a/404.html +++ b/404.html @@ -1940,7 +1940,7 @@

404 - Not found

You also use this functionality to implement command prefixes:

@@ -2606,7 +2609,7 @@

Browser JavaScript diff --git a/api/images/anchor-copy-button.svg b/api/images/anchor-copy-button.svg index bab9d747..19c1fa3f 100755 --- a/api/images/anchor-copy-button.svg +++ b/api/images/anchor-copy-button.svg @@ -1,4 +1,8 @@ + + - \ No newline at end of file + diff --git a/api/images/arrow_down.svg b/api/images/arrow_down.svg index c0388dee..639aaf12 100755 --- a/api/images/arrow_down.svg +++ b/api/images/arrow_down.svg @@ -1,3 +1,7 @@ + + - \ No newline at end of file + diff --git a/api/images/burger.svg b/api/images/burger.svg index d6dcefcc..fcca732b 100755 --- a/api/images/burger.svg +++ b/api/images/burger.svg @@ -1,5 +1,9 @@ + + - \ No newline at end of file + diff --git a/api/images/copy-icon.svg b/api/images/copy-icon.svg index 61440f0a..2cb02ec6 100755 --- a/api/images/copy-icon.svg +++ b/api/images/copy-icon.svg @@ -1,3 +1,7 @@ + + - \ No newline at end of file + diff --git a/api/images/copy-successful-icon.svg b/api/images/copy-successful-icon.svg index 1865f739..c4b95383 100755 --- a/api/images/copy-successful-icon.svg +++ b/api/images/copy-successful-icon.svg @@ -1,3 +1,7 @@ + + - \ No newline at end of file + diff --git a/api/images/footer-go-to-link.svg b/api/images/footer-go-to-link.svg index 0137e223..a87add7a 100755 --- a/api/images/footer-go-to-link.svg +++ b/api/images/footer-go-to-link.svg @@ -1,3 +1,7 @@ + + - \ No newline at end of file + diff --git a/api/images/go-to-top-icon.svg b/api/images/go-to-top-icon.svg index d987f3ea..abc3d1ce 100755 --- a/api/images/go-to-top-icon.svg +++ b/api/images/go-to-top-icon.svg @@ -1,4 +1,8 @@ + + - \ No newline at end of file + diff --git a/api/images/logo-icon.svg b/api/images/logo-icon.svg index 1fea0877..e42f9570 100755 --- a/api/images/logo-icon.svg +++ b/api/images/logo-icon.svg @@ -1,3 +1,7 @@ + + @@ -7,4 +11,4 @@ - \ No newline at end of file + diff --git a/api/images/nav-icons/abstract-class-kotlin.svg b/api/images/nav-icons/abstract-class-kotlin.svg index a2069b8f..19d6148c 100755 --- a/api/images/nav-icons/abstract-class-kotlin.svg +++ b/api/images/nav-icons/abstract-class-kotlin.svg @@ -1,3 +1,7 @@ + + diff --git a/api/images/nav-icons/annotation-kotlin.svg b/api/images/nav-icons/annotation-kotlin.svg index 932f1d3d..b90f508c 100755 --- a/api/images/nav-icons/annotation-kotlin.svg +++ b/api/images/nav-icons/annotation-kotlin.svg @@ -1,3 +1,7 @@ + + diff --git a/api/images/nav-icons/class-kotlin.svg b/api/images/nav-icons/class-kotlin.svg index 46a21f65..797a2423 100755 --- a/api/images/nav-icons/class-kotlin.svg +++ b/api/images/nav-icons/class-kotlin.svg @@ -1,3 +1,7 @@ + + diff --git a/api/images/nav-icons/enum-kotlin.svg b/api/images/nav-icons/enum-kotlin.svg index 4a854596..775a7cc9 100755 --- a/api/images/nav-icons/enum-kotlin.svg +++ b/api/images/nav-icons/enum-kotlin.svg @@ -1,3 +1,7 @@ + + diff --git a/api/images/nav-icons/field-value.svg b/api/images/nav-icons/field-value.svg index 20449c94..2771ee56 100755 --- a/api/images/nav-icons/field-value.svg +++ b/api/images/nav-icons/field-value.svg @@ -1,3 +1,7 @@ + + diff --git a/api/images/nav-icons/field-variable.svg b/api/images/nav-icons/field-variable.svg index 3b074500..e2d2bbd0 100755 --- a/api/images/nav-icons/field-variable.svg +++ b/api/images/nav-icons/field-variable.svg @@ -1,3 +1,7 @@ + + diff --git a/api/images/nav-icons/interface-kotlin.svg b/api/images/nav-icons/interface-kotlin.svg index bf07a148..5e163260 100755 --- a/api/images/nav-icons/interface-kotlin.svg +++ b/api/images/nav-icons/interface-kotlin.svg @@ -1,3 +1,7 @@ + + diff --git a/api/images/nav-icons/object.svg b/api/images/nav-icons/object.svg index 9f427de4..31f0ee3e 100755 --- a/api/images/nav-icons/object.svg +++ b/api/images/nav-icons/object.svg @@ -1,3 +1,7 @@ + + diff --git a/api/images/nav-icons/typealias-kotlin.svg b/api/images/nav-icons/typealias-kotlin.svg index 4795069b..f4bb238b 100755 --- a/api/images/nav-icons/typealias-kotlin.svg +++ b/api/images/nav-icons/typealias-kotlin.svg @@ -1,3 +1,7 @@ + + diff --git a/api/images/theme-toggle.svg b/api/images/theme-toggle.svg index dad3ff2a..df86202b 100755 --- a/api/images/theme-toggle.svg +++ b/api/images/theme-toggle.svg @@ -1,3 +1,7 @@ + + - \ No newline at end of file + diff --git a/api/scripts/clipboard.js b/api/scripts/clipboard.js index b00ce246..7a4f33c5 100755 --- a/api/scripts/clipboard.js +++ b/api/scripts/clipboard.js @@ -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)); diff --git a/api/scripts/navigation-loader.js b/api/scripts/navigation-loader.js index 92464911..3df7ac8c 100755 --- a/api/scripts/navigation-loader.js +++ b/api/scripts/navigation-loader.js @@ -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 = () => { diff --git a/api/scripts/platform-content-handler.js b/api/scripts/platform-content-handler.js index 7c5e8af7..8c4ca538 100755 --- a/api/scripts/platform-content-handler.js +++ b/api/scripts/platform-content-handler.js @@ -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: [], diff --git a/api/scripts/sourceset_dependencies.js b/api/scripts/sourceset_dependencies.js index 91da9765..82938d3b 100755 --- a/api/scripts/sourceset_dependencies.js +++ b/api/scripts/sourceset_dependencies.js @@ -1 +1 @@ -sourceset_dependencies='{":clikt:dokkaHtml/commonMain":[],":clikt:dokkaHtml/jsMain":[":clikt:dokkaHtml/commonMain"],":clikt:dokkaHtml/jvmMain":[":clikt:dokkaHtml/commonMain"],":clikt:dokkaHtml/linuxX64Main":[":clikt:dokkaHtml/nativeMain",":clikt:dokkaHtml/commonMain"],":clikt:dokkaHtml/macosArm64Main":[":clikt:dokkaHtml/commonMain",":clikt:dokkaHtml/nativeDarwinMain"],":clikt:dokkaHtml/macosX64Main":[":clikt:dokkaHtml/commonMain",":clikt:dokkaHtml/nativeDarwinMain"],":clikt:dokkaHtml/mingwX64Main":[":clikt:dokkaHtml/nativeMain",":clikt:dokkaHtml/commonMain"],":clikt:dokkaHtml/nativeDarwinMain":[":clikt:dokkaHtml/nativeMain"],":clikt:dokkaHtml/nativeMain":[":clikt:dokkaHtml/commonMain"]}' +sourceset_dependencies='{":clikt:dokkaHtml/appleMain":[":clikt:dokkaHtml/nativeMain"],":clikt:dokkaHtml/commonMain":[],":clikt:dokkaHtml/jsMain":[":clikt:dokkaHtml/commonMain"],":clikt:dokkaHtml/jvmMain":[":clikt:dokkaHtml/commonMain"],":clikt:dokkaHtml/linuxMain":[":clikt:dokkaHtml/nativeMain"],":clikt:dokkaHtml/linuxX64Main":[":clikt:dokkaHtml/linuxMain"],":clikt:dokkaHtml/macosArm64Main":[":clikt:dokkaHtml/macosMain"],":clikt:dokkaHtml/macosMain":[":clikt:dokkaHtml/appleMain"],":clikt:dokkaHtml/macosX64Main":[":clikt:dokkaHtml/macosMain"],":clikt:dokkaHtml/mingwMain":[":clikt:dokkaHtml/nativeMain"],":clikt:dokkaHtml/mingwX64Main":[":clikt:dokkaHtml/mingwMain"],":clikt:dokkaHtml/nativeMain":[":clikt:dokkaHtml/commonMain"]}' diff --git a/api/scripts/symbol-parameters-wrapper_deferred.js b/api/scripts/symbol-parameters-wrapper_deferred.js index 248d0ab0..7ecae7a6 100755 --- a/api/scripts/symbol-parameters-wrapper_deferred.js +++ b/api/scripts/symbol-parameters-wrapper_deferred.js @@ -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 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 +})(); diff --git a/api/styles/font-jb-sans-auto.css b/api/styles/font-jb-sans-auto.css index 95d8ef83..bdc68723 100755 --- a/api/styles/font-jb-sans-auto.css +++ b/api/styles/font-jb-sans-auto.css @@ -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'; diff --git a/api/styles/main.css b/api/styles/main.css index 5aa04a49..ebe1ce12 100755 --- a/api/styles/main.css +++ b/api/styles/main.css @@ -1,4 +1,6 @@ -#pages-search{cursor:pointer;border:none;border-radius:50%;background:transparent;fill:#fff;fill:var(--dark-mode-and-search-icon-color)}#pages-search:focus{outline:none}#pages-search:hover{background:var(--white-10)}.search,.search [data-test=ring-select],.search [data-test=ring-tooltip],.search [data-test=ring-select_focus],.search #pages-search{display:inline-block;padding:0;margin:0;font-size:0;line-height:0}.search-hotkey-popup{background-color:var(--background-color) !important;padding:4px}.popup-wrapper{min-width:calc(100% - 322px) !important;border:1px solid rgba(255,255,255,.2) !important;background-color:#27282c !important}.popup-wrapper [class^=filterWrapper]{border-bottom:1px solid rgba(255,255,255,.2)}.popup-wrapper input{color:rgba(255,255,255,.8) !important;font-weight:normal !important}.popup-wrapper span[data-test-custom=ring-select-popup-filter-icon]{color:#fff}.popup-wrapper button[data-test=ring-input-clear]{color:#fff !important}@media screen and (max-width: 759px){.popup-wrapper{min-width:100% !important}}.template-wrapper{display:grid;height:32px;grid-template-columns:auto auto}.template-wrapper strong{color:rgba(255,255,255,.8)}.template-wrapper span{color:rgba(255,255,255,.8);line-height:32px}.template-wrapper span.template-description{color:rgba(255,255,255,.6);justify-self:end}@media screen and (max-width: 759px){.template-wrapper{display:flex;flex-direction:column;height:auto}.template-wrapper span{line-height:unset}}.template-name{justify-self:start}[class^=fade]{display:none}[class*=hover]{background-color:rgba(255,255,255,.1) !important} +/*! + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */#pages-search{cursor:pointer;border:none;border-radius:50%;background:transparent;fill:#fff;fill:var(--dark-mode-and-search-icon-color)}#pages-search:focus{outline:none}#pages-search:hover{background:var(--white-10)}.search,.search [data-test=ring-select],.search [data-test=ring-tooltip],.search [data-test=ring-select_focus],.search #pages-search{display:inline-block;padding:0;margin:0;font-size:0;line-height:0}.search-hotkey-popup{background-color:var(--background-color) !important;padding:4px}.popup-wrapper{min-width:calc(100% - 322px) !important;border:1px solid rgba(255,255,255,.2) !important;background-color:#27282c !important}.popup-wrapper [class^=filterWrapper]{border-bottom:1px solid rgba(255,255,255,.2)}.popup-wrapper input{color:rgba(255,255,255,.8) !important;font-weight:normal !important}.popup-wrapper span[data-test-custom=ring-select-popup-filter-icon]{color:#fff}.popup-wrapper button[data-test=ring-input-clear]{color:#fff !important}@media screen and (max-width: 759px){.popup-wrapper{min-width:100% !important}}.template-wrapper{display:grid;height:32px;grid-template-columns:auto auto}.template-wrapper strong{color:rgba(255,255,255,.8)}.template-wrapper span{color:rgba(255,255,255,.8);line-height:32px}.template-wrapper span.template-description{color:rgba(255,255,255,.6);justify-self:end}@media screen and (max-width: 759px){.template-wrapper{display:flex;flex-direction:column;height:auto}.template-wrapper span{line-height:unset}}.template-name{justify-self:start}[class^=fade]{display:none}[class*=hover]{background-color:rgba(255,255,255,.1) !important} /* stylelint-disable color-no-hex */ :root { @@ -113,6 +115,10 @@ --ring-alert-z-index: 6; } -html,.app-root{height:100%}.search-root{margin:0;padding:0;background:var(--ring-content-background-color);font-family:var(--ring-font-family);font-size:var(--ring-font-size);line-height:var(--ring-line-height)}.search-content{z-index:8} +/*! + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + *//*! + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */html,.app-root{height:100%}.search-root{margin:0;padding:0;background:var(--ring-content-background-color);font-family:var(--ring-font-family);font-size:var(--ring-font-size);line-height:var(--ring-line-height)}.search-content{z-index:8} /*# sourceMappingURL=main.css.map*/ \ No newline at end of file diff --git a/api/styles/prism.css b/api/styles/prism.css index 4287f6d1..2d3a091e 100755 --- a/api/styles/prism.css +++ b/api/styles/prism.css @@ -1,3 +1,7 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + /* * Custom Dokka styles */ diff --git a/api/styles/style.css b/api/styles/style.css index 7f6e4b0d..67a899a5 100755 --- a/api/styles/style.css +++ b/api/styles/style.css @@ -1,3 +1,7 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + @import url('./font-jb-sans-auto.css'); @import url('https://fonts.googleapis.com/css?family=JetBrains+Mono'); @@ -1476,4 +1480,4 @@ has only one header, and the header text is the same as the tab name, so no poin */ .main-content[data-page-type="package"] .tabs-section-body h2 { display: none; -} \ No newline at end of file +} diff --git a/arguments/index.html b/arguments/index.html index 69a2228e..0450cb55 100755 --- a/arguments/index.html +++ b/arguments/index.html @@ -2166,7 +2166,7 @@

Option-Like Arguments (Using -- diff --git a/autocomplete/index.html b/autocomplete/index.html index acc85cc6..0a5cd396 100755 --- a/autocomplete/index.html +++ b/autocomplete/index.html @@ -2367,7 +2367,7 @@

Limitations diff --git a/changelog/index.html b/changelog/index.html index fb7eeae5..65bc9f93 100755 --- a/changelog/index.html +++ b/changelog/index.html @@ -77,7 +77,7 @@
- + Skip to content @@ -1907,6 +1907,26 @@

-

Note that inferred names will always have a POSIX-style prefix like +

+

Note

+

Inferred names will always have a POSIX-style prefix like --name. If you want to use a different prefix, you should specify all option names manually.

+

Option Transformation Order

Clikt has a large number of extension functions that can modify options. When applying multiple functions to the same option, there’s only one valid order for the functions to be applied. For @@ -3692,7 +3701,7 @@

Option Transformation Order diff --git a/parameters/index.html b/parameters/index.html index 6daf9d8f..821c4d77 100755 --- a/parameters/index.html +++ b/parameters/index.html @@ -2579,7 +2579,7 @@

validate() diff --git a/quickstart/index.html b/quickstart/index.html index 44eedbbd..d523b184 100755 --- a/quickstart/index.html +++ b/quickstart/index.html @@ -2093,7 +2093,7 @@

Nesting Commands
-
class Database(name="db"): CliktCommand() {
+
class Database: CliktCommand(name="db") {
     override fun run() = Unit
 }
 
@@ -2209,7 +2209,7 @@ 

Developing Command Lin