diff options
author | Ignat Beresnev <ignat.beresnev@jetbrains.com> | 2023-08-31 20:16:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-31 20:16:01 +0200 |
commit | 02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33 (patch) | |
tree | 66f6d6f089a93b863bf1144666491eca6729ad05 /plugins/base/src/main/kotlin/renderers/html/NavigationPage.kt | |
parent | 6a181a7a2b03ec263788d137610e86937a57d434 (diff) | |
download | dokka-02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33.tar.gz dokka-02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33.tar.bz2 dokka-02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33.zip |
Enable explicit API mode (#3139)
Diffstat (limited to 'plugins/base/src/main/kotlin/renderers/html/NavigationPage.kt')
-rw-r--r-- | plugins/base/src/main/kotlin/renderers/html/NavigationPage.kt | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/plugins/base/src/main/kotlin/renderers/html/NavigationPage.kt b/plugins/base/src/main/kotlin/renderers/html/NavigationPage.kt index c4d53588..eae43daf 100644 --- a/plugins/base/src/main/kotlin/renderers/html/NavigationPage.kt +++ b/plugins/base/src/main/kotlin/renderers/html/NavigationPage.kt @@ -16,19 +16,19 @@ import org.jetbrains.dokka.model.WithChildren import org.jetbrains.dokka.pages.* import org.jetbrains.dokka.plugability.DokkaContext -class NavigationPage( - val root: NavigationNode, - val moduleName: String, - val context: DokkaContext +public class NavigationPage( + public val root: NavigationNode, + public val moduleName: String, + public val context: DokkaContext ) : RendererSpecificPage { - override val name = "navigation" + override val name: String = "navigation" - override val children = emptyList<PageNode>() + override val children: List<PageNode> = emptyList() - override fun modified(name: String, children: List<PageNode>) = this + override fun modified(name: String, children: List<PageNode>): NavigationPage = this - override val strategy = RenderingStrategy<HtmlRenderer> { + override val strategy: RenderingStrategy = RenderingStrategy<HtmlRenderer> { createHTML().visit(root, this) } @@ -86,7 +86,7 @@ class NavigationPage( } } -data class NavigationNode( +public data class NavigationNode( val name: String, val dri: DRI, val sourceSets: Set<DisplaySourceSet>, @@ -99,7 +99,7 @@ data class NavigationNode( * [CLASS] represents a neutral (a.k.a Java-style) icon, * whereas [CLASS_KT] should be Kotlin-styled */ -enum class NavigationNodeIcon( +public enum class NavigationNodeIcon( private val cssClass: String ) { CLASS("class"), @@ -122,8 +122,8 @@ enum class NavigationNodeIcon( internal fun style(): String = "nav-icon $cssClass" } -fun NavigationPage.transform(block: (NavigationNode) -> NavigationNode) = +public fun NavigationPage.transform(block: (NavigationNode) -> NavigationNode): NavigationPage = NavigationPage(root.transform(block), moduleName, context) -fun NavigationNode.transform(block: (NavigationNode) -> NavigationNode) = +public fun NavigationNode.transform(block: (NavigationNode) -> NavigationNode): NavigationNode = run(block).let { NavigationNode(it.name, it.dri, it.sourceSets, it.icon, it.styles, it.children.map(block)) } |