|
1 | 1 | package org.jetbrains.kotlinx.dataframe.jupyter |
2 | 2 |
|
3 | 3 | import org.jetbrains.kotlinx.dataframe.io.DisplayConfiguration |
4 | | -import org.jetbrains.kotlinx.dataframe.io.internallyRenderable |
5 | 4 | import org.jetbrains.kotlinx.dataframe.io.renderValueForHtml |
6 | 5 | import org.jetbrains.kotlinx.dataframe.io.tooltipLimit |
7 | | -import org.jetbrains.kotlinx.jupyter.api.MimeTypedResult |
8 | | -import org.jetbrains.kotlinx.jupyter.api.Notebook |
9 | | -import org.jetbrains.kotlinx.jupyter.api.Renderable |
10 | | -import org.jetbrains.kotlinx.jupyter.api.libraries.ExecutionHost |
11 | 6 |
|
12 | 7 | public data class RenderedContent( |
13 | 8 | val truncatedContent: String, |
@@ -69,22 +64,3 @@ public object DefaultCellRenderer : CellRenderer { |
69 | 64 | } |
70 | 65 | } |
71 | 66 |
|
72 | | -internal class JupyterCellRenderer( |
73 | | - private val notebook: Notebook, |
74 | | - private val host: ExecutionHost, |
75 | | -) : ChainedCellRenderer(DefaultCellRenderer) { |
76 | | - override fun maybeContent(value: Any?, configuration: DisplayConfiguration): RenderedContent? { |
77 | | - val renderersProcessor = notebook.renderersProcessor |
78 | | - if (internallyRenderable(value)) return null |
79 | | - val renderedVal = renderersProcessor.renderValue(host, value) |
80 | | - val finalVal = if (renderedVal is Renderable) renderedVal.render(notebook) else renderedVal |
81 | | - if (finalVal is MimeTypedResult && "text/html" in finalVal) return RenderedContent.media( |
82 | | - finalVal["text/html"] ?: "" |
83 | | - ) |
84 | | - return renderValueForHtml(finalVal, configuration.cellContentLimit, configuration.decimalFormat) |
85 | | - } |
86 | | - |
87 | | - override fun maybeTooltip(value: Any?, configuration: DisplayConfiguration): String? { |
88 | | - return null |
89 | | - } |
90 | | -} |
0 commit comments