|
1 | 1 | {
|
2 | 2 | "properties": {
|
3 |
| - "library_version": "1.4.2", |
4 |
| - "api_version": "0.0.14-SNAPSHOT" |
| 3 | + "libraryVersion": "1.4.2", |
| 4 | + "apiVersion": "0.0.17-SNAPSHOT", |
| 5 | + "isolatedFrame": "" |
5 | 6 | },
|
6 | 7 | "link": "https://github.com/JetBrains/lets-plot-kotlin",
|
7 | 8 | "repositories": [
|
8 | 9 | "https://jetbrains.bintray.com/lets-plot-maven"
|
9 | 10 | ],
|
10 | 11 | "dependencies": [
|
11 |
| - "org.jetbrains.lets-plot:lets-plot-kotlin-api:$api_version" |
| 12 | + "org.jetbrains.lets-plot:lets-plot-kotlin-api:$apiVersion" |
12 | 13 | ],
|
13 | 14 | "imports": [
|
14 | 15 | "jetbrains.letsPlot.*",
|
|
17 | 18 | ],
|
18 | 19 | "init": [
|
19 | 20 | "import jetbrains.letsPlot.LetsPlot",
|
20 |
| - "import jetbrains.letsPlot.notebook.jupyter.KotlinJupyterFrontendContext", |
21 |
| - "// Setup lets-plot frontend context", |
22 |
| - "LetsPlot.frontendContext = KotlinJupyterFrontendContext {DISPLAY(HTML(it))}", |
23 |
| - "LetsPlot.libraryVersion = \"$library_version\"", |
24 |
| - "LetsPlot.apiVersion = \"$api_version\"", |
| 21 | + "import jetbrains.letsPlot.frontend.NotebookFrontendContext", |
| 22 | + "val isolatedFrameParam = if(\"$isolatedFrame\".isNotEmpty()) \"$isolatedFrame\".toBoolean() else null", |
| 23 | + "val frontendContext = LetsPlot.setupNotebook(\"$libraryVersion\", isolatedFrameParam) {DISPLAY(HTML(it))}", |
| 24 | + "LetsPlot.apiVersion = \"$apiVersion\"", |
25 | 25 | "// Load library JS",
|
26 |
| - "DISPLAY(HTML(KotlinJupyterFrontendContext.getConfigureHtml(\"$library_version\")))" |
| 26 | + "DISPLAY(HTML(frontendContext.getConfigureHtml()))" |
27 | 27 | ],
|
28 | 28 | "renderers": {
|
29 |
| - "jetbrains.letsPlot.intern.Plot": "HTML(KotlinJupyterFrontendContext.getHtml($it))", |
30 |
| - "jetbrains.letsPlot.GGBunch": "HTML(KotlinJupyterFrontendContext.getHtml($it))" |
| 29 | + "jetbrains.letsPlot.intern.Plot": "HTML(frontendContext.getHtml($it))", |
| 30 | + "jetbrains.letsPlot.GGBunch": "HTML(frontendContext.getHtml($it))" |
31 | 31 | }
|
32 | 32 | }
|
0 commit comments