diff --git a/.editorconfig b/.editorconfig
index 0b1cbd9..6bb2ed3 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -1,5 +1,9 @@
+# noinspection EditorConfigKeyCorrectness
[*.kt]
ktlint_standard_filename = disabled
-[**/build/generated/**]
+# noinspection EditorConfigKeyCorrectness
+[**/generated/**]
ktlint = disabled
+generated_code = true
+ij_formatter_enabled = false
diff --git a/.idea/misc.xml b/.idea/misc.xml
index d1bfd10..63390b3 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -4,7 +4,7 @@
-
+
\ No newline at end of file
diff --git a/README.md b/README.md
index 07cac28..010df89 100644
--- a/README.md
+++ b/README.md
@@ -12,6 +12,7 @@ Each integration lives in the `integrations/` directory and has its own README.
- [IntelliJ Platform](integrations/intellij-platform/README.md) — interactive access to IntelliJ Platform APIs from a running IDE process.
- [HTTP Utilities](integrations/http-util/README.md) — JSON/serialization helpers and Ktor HTTP client wrappers for notebooks.
- [Database](integrations/database/README.md) — helpers for configuring JDBC DataSources and working with Databases.
+- [Widgets](integrations/widgets/README.md) — ipywidgets API for Kotlin notebooks.
## Contributing
diff --git a/build.gradle.kts b/build.gradle.kts
index b57bbdd..f7422e5 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -3,7 +3,7 @@ plugins {
alias(libs.plugins.publisher)
alias(libs.plugins.buildconfig)
alias(libs.plugins.kotlin.serialization) apply false
- alias(libs.plugins.ktlint) apply false
+ alias(libs.plugins.ktlint)
}
version =
@@ -16,6 +16,13 @@ allprojects {
version = rootProject.version
plugins.apply("org.jlleitschuh.gradle.ktlint")
+ ktlint {
+ filter {
+ exclude { entry ->
+ entry.file.toString().contains("generated")
+ }
+ }
+ }
repositories {
mavenCentral()
@@ -23,6 +30,7 @@ allprojects {
tasks.withType {
useJUnitPlatform()
+ maxHeapSize = "4G"
outputs.upToDateWhen { false }
}
}
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 403a25a..dd93335 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -3,7 +3,7 @@
# https://intellij-support.jetbrains.com/hc/en-us/articles/206544879-Selecting-the-JDK-version-the-IDE-will-run-under
jvmTarget = "17"
kotlin = "2.2.20"
-kotlin-jupyter = "0.15.1-668"
+kotlin-jupyter = "0.15.3-779-1"
publishPlugin = "2.2.0-dev-71"
intellijPlatformGradlePlugin = "2.10.3"
intellijPlatform = "253-EAP-SNAPSHOT" # TODO: lower to 2025.1.3 GA whenever released with required changes
diff --git a/integrations/intellij-platform/build.gradle.kts b/integrations/intellij-platform/build.gradle.kts
index 7683683..ff623d4 100644
--- a/integrations/intellij-platform/build.gradle.kts
+++ b/integrations/intellij-platform/build.gradle.kts
@@ -12,10 +12,6 @@ plugins {
val spaceUsername: String by properties
val spaceToken: String by properties
-allprojects {
- version = rootProject.version
-}
-
tasks.processJupyterApiResources {
libraryProducers = listOf("org.jetbrains.kotlinx.jupyter.intellij.IntelliJPlatformJupyterIntegration")
}
diff --git a/integrations/intellij-platform/src/main/kotlin/org/jetbrains/kotlinx/jupyter/intellij/IntelliJPlatformJupyterIntegration.kt b/integrations/intellij-platform/src/main/kotlin/org/jetbrains/kotlinx/jupyter/intellij/IntelliJPlatformJupyterIntegration.kt
index 29623bf..d3f3128 100644
--- a/integrations/intellij-platform/src/main/kotlin/org/jetbrains/kotlinx/jupyter/intellij/IntelliJPlatformJupyterIntegration.kt
+++ b/integrations/intellij-platform/src/main/kotlin/org/jetbrains/kotlinx/jupyter/intellij/IntelliJPlatformJupyterIntegration.kt
@@ -3,7 +3,6 @@
package org.jetbrains.kotlinx.jupyter.intellij
import com.intellij.jupyter.core.executor.JupyterExecutionListener
-import com.intellij.jupyter.core.jupyter.connections.action.JupyterRestartKernelListener
import com.intellij.jupyter.core.jupyter.connections.execution.core.JupyterNotebookSession
import com.intellij.openapi.application.ApplicationInfo
import com.intellij.openapi.application.ApplicationNamesInfo
@@ -48,7 +47,7 @@ class IntelliJPlatformJupyterIntegration : JupyterIntegration() {
val productVersion = ApplicationInfo.getInstance().run { "$majorVersion.$minorVersion" }
if (productVersion.toVersion() >= MINIMAL_SUPPORTED_IDE_VERSION) {
- initializeDisposable(notebook)
+ initializeDisposable()
initializeIntelliJPlatformClassloader(notebook)
} else {
val productName = ApplicationNamesInfo.getInstance().fullProductName
@@ -95,7 +94,7 @@ class IntelliJPlatformJupyterIntegration : JupyterIntegration() {
}.excludeUnwantedClasspathEntries()
}
- private fun KotlinKernelHost.initializeDisposable(notebook: Notebook) {
+ private fun KotlinKernelHost.initializeDisposable() {
fun disposeIntegration() {
Disposer.dispose(notebookDisposable)
displayText("IntelliJ Platform integration is disposed")
@@ -112,16 +111,6 @@ class IntelliJPlatformJupyterIntegration : JupyterIntegration() {
},
)
} catch (_: LinkageError) {
- val topic = JupyterRestartKernelListener.TOPIC
- requireNotNull(currentProjectFromNotebook(notebook))
- .messageBus
- .connect(notebookDisposable)
- .subscribe(
- topic,
- JupyterRestartKernelListener {
- disposeIntegration()
- },
- )
}
}
diff --git a/integrations/widgets/AGENTS.md b/integrations/widgets/AGENTS.md
new file mode 100644
index 0000000..fc2734c
--- /dev/null
+++ b/integrations/widgets/AGENTS.md
@@ -0,0 +1,84 @@
+### Kotlin Jupyter Widgets Project Requirements & Guidelines
+
+This document summarizes the key architectural decisions, requirements, and technical details discovered and implemented during the widget development session. This information is intended for other agents working on this project.
+
+#### 1. Core Architecture
+- **Modules**:
+ - `widgets-api`: Core logic, protocol implementation, and base classes.
+ - `widgets-generator`: Automates code generation from `schema.json`.
+ - `widgets-jupyter`: Integration with Kotlin Jupyter Notebook.
+ - `widgets-tests`: Integration and REPL tests.
+- **Comm Targets**:
+ - `jupyter.widget`: Main target for widget instance synchronization.
+ - `jupyter.widget.control`: Used for global control messages like `request_states`.
+- **State Synchronization**: Bi-directional sync via Jupyter Comms. Properties use delegation to track changes and sync with the frontend.
+ - `echoUpdateEnabled`: (Default: `false`) Controls whether frontend-initiated updates are echoed back. Useful for multi-frontend sync or backend overrides.
+- **Binary Data**: Handled via binary buffers, not JSON-encoded. `ByteArray` properties are serialized as `null` in JSON and transferred via binary buffers, with paths specified in `buffer_paths`.
+
+#### 2. Code Generation Guidelines
+- **Naming Conventions**:
+ - Use `toPascalCase()` for class and file names.
+ - Use `toCamelCase()` for property and factory method names.
+ - Widgets should always end with the `Widget` suffix (e.g., `IntSliderWidget`). Use `String.toWidgetClassName()` from `StringUtil.kt`.
+ - Handle abbreviations correctly (e.g., `HtmlWidget`, `VBoxWidget`).
+ - **Splitting Logic**: `StringUtil.splitIntoParts()` handles underscores, hyphens, spaces, and CASE transitions. It specifically allows single-letter parts followed by lowercase (e.g., `V` + `Box` -> `VBox`).
+- **Base Widgets**:
+ - Some widgets (e.g., `OutputWidget`) are generated as `abstract Base` classes (e.g., `OutputWidgetBase`) to allow manual extensions.
+ - Base widgets have `internal` visibility for their `WidgetSpec`.
+ - No factory or manager extension methods are generated for base widgets.
+- **Trait-based Inheritance**:
+ - Use `traits` in `WidgetGenerator.kt` to match widgets by property names and types.
+ - This allows common logic for selection widgets to be moved to specialized base classes like `SingleNullableSelectionWidgetBase`.
+
+#### 3. Selection Widget System
+- **Specialized Bases**:
+ - `OptionWidgetBase`: Core logic for mapping labels (frontend) to values (backend).
+ - `SingleSelectionWidgetBase`: Non-nullable single selection (`index: Int`).
+ - `SingleNullableSelectionWidgetBase`: Nullable single selection (`index: Int?`).
+ - `MultipleSelectionWidgetBase`: Multiple selection (`index: List`).
+ - `SelectionRangeWidgetBase`: Range selection (`index: IntRange?`).
+- **Key Properties**:
+ - `options`: `List>`.
+ - `simpleOptions`: `List` (labels used as values).
+ - `value`: High-level selection value(s) (e.g., `Any?` or `Pair?`).
+ - `label` / `labels`: Frontend labels for selection.
+
+#### 4. Type System & Serialization
+- **Custom Types**:
+ - `IntRange`, `ClosedRange`: Serialized as 2-element lists `[start, end]`.
+ - `Pair`: Serialized as 2-element lists.
+ - `WidgetModel`: Serialized as strings with `IPY_MODEL_` prefix.
+- **Type Overrides**:
+ - Use `assignedPropertyTypes` in `PropertyType.kt` to override schema-defined types (e.g., changing an `array` type to `IntRange` for `IntRangeSliderWidget.value`).
+- **Dates & Times**:
+ - `Instant`, `LocalDate`, `LocalTime`: Serialized as ISO-8601 strings.
+- **Union Types**:
+ - Generated as sealed interfaces with inline value classes for different types.
+ - Handled by `UnionType` with multiple deserializers attempted in order.
+
+#### 5. Messaging & Lifecycle
+- **Custom Messages**:
+ - Use `WidgetModel.sendCustomMessage(content, metadata, buffers)` for actions not covered by property sync.
+ - Register listeners via `WidgetModel.addCustomMessageListener { content, metadata, buffers -> ... }`.
+ - Example: `OutputWidget.clearOutput()` uses a custom message with `method = "clear_output"`.
+- **Closing Widgets**:
+ - `WidgetManager.closeWidget(widget)` sends a `comm_close` message and removes the widget from the manager's internal maps.
+
+#### 6. Testing Requirements
+- **Assertions**: EXCLUSIVELY use Kotest `should*` notation (e.g., `result shouldBe 42`). Do not use `assert*`.
+- **Naming**: Test method names MUST NOT be in camelCase. Use descriptive names in backticks (e.g., ``fun `should have 42`()`` or ``fun `check that 42 is returned`()``).
+- **REPL Tests**: Inherit from `AbstractWidgetReplTest`. Use `shouldHaveNextOpenEvent`, `shouldHaveNextUpdateEvent`, etc., to verify the sequence of Comm events.
+- **Type Tests**: `TypesTest.kt` covers all property serialization/deserialization. Use `TestWidgetManager.INSTANCE` for tests that don't need real manager logic.
+- **Gradle Tasks**:
+ - `:generateWidgets`: Regenerates all widgets from `schema.json`.
+ - `:compileKotlin`: Verifies that manual and generated code are compatible.
+
+#### 7. Documentation & Style
+- **KDocs**: Always use multiline format:
+ ```kotlin
+ /**
+ * Description here.
+ */
+ ```
+- **Thread Safety**: Property updates are generally safe as long as the underlying messaging protocol is thread-safe, but explicit concurrency guarantees are not provided.
+- **Generated Code**: NEVER manually edit files in `src/generated`. Update the `WidgetGenerator` instead.
diff --git a/integrations/widgets/README.md b/integrations/widgets/README.md
new file mode 100644
index 0000000..ce6dc3b
--- /dev/null
+++ b/integrations/widgets/README.md
@@ -0,0 +1,139 @@
+[](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
+[](https://kotlinlang.org/docs/components-stability.html)
+
+# Kotlin Notebook Widgets Integration
+
+This integration provides a collection of interactive widgets for Kotlin Notebooks, such as sliders, labels, and more. It allows you to create a richer, more interactive experience within your notebooks.
+
+## Usage
+
+Use this API through the `%use widgets` magic command in a Kotlin Notebook.
+
+### Basic Widgets
+
+```kotlin
+%use widgets
+
+val slider = intSliderWidget {
+ min = 0
+ max = 100
+ value = 50
+ description = "Select a value:"
+}
+
+val label = labelWidget {
+ value = "Current value: ${slider.value}"
+}
+
+// Display the slider
+slider
+```
+
+### Layouts and Containers
+
+Arrange widgets using `hBox`, `vBox`, `accordion`, or `tab`:
+
+```kotlin
+val slider = intSliderWidget { description = "Slider" }
+val text = textWidget { description = "Text" }
+
+val accordion = accordionWidget {
+ children = listOf(slider, text)
+ titles = listOf("Controls", "Input")
+}
+
+accordion
+```
+
+### Linking Widgets
+
+You can link properties of different widgets together:
+
+```kotlin
+val play = playWidget {
+ min = 0
+ max = 100
+ step = 1
+ interval = 500
+}
+
+val slider = intSliderWidget()
+
+linkWidget {
+ source = play to "value"
+ target = slider to "value"
+}
+
+hBoxWidget { children = listOf(play, slider) }
+```
+
+### Output Widget
+
+The `OutputWidget` can capture and display standard output and rich results:
+
+```kotlin
+val out = outputWidget()
+out // Display the widget
+
+out.withScope {
+ println("This will be printed inside the output widget")
+ DISPLAY("Rich output works too")
+}
+```
+
+### Selection Widgets
+
+Various selection widgets like `dropdown`, `selectMultiple`, and `radioButtons` are available:
+
+```kotlin
+val dropdown = dropdownWidget {
+ options = listOf(
+ "Option 1" to 1,
+ "Option 2" to 2,
+ "Option 3" to 3
+ )
+ value = 2
+ description = "Choose:"
+}
+```
+
+### Event Listeners
+
+You can react to widget property changes or custom messages from the frontend:
+
+```kotlin
+val slider = intSliderWidget { description = "Slider" }
+val label = labelWidget { value = "Value is 0" }
+
+// Listen to all property changes
+slider.addChangeListener { patch, fromFrontend ->
+ if ("value" in patch) {
+ label.value = "Value is ${slider.value}"
+ }
+}
+
+// Listen to a specific property change
+slider.getProperty("value")?.addChangeListener { newValue, fromFrontend ->
+ println("Value changed to $newValue")
+}
+
+vBoxWidget { children = listOf(slider, label) }
+```
+
+## Module structure
+
+This project consists of the following modules:
+
+- `widgets-api`: Contains the core widget implementations, protocols, and model definitions.
+- `widgets-jupyter`: Provides the integration logic and useful helpers for Kotlin Jupyter notebooks.
+- `widgets-generator`: Generates widget models from `schema.json`.
+- `widgets-tests`: Contains integration tests for widgets.
+
+## Development
+
+Most widgets are automatically generated from a schema.
+To regenerate widgets after changing `schema.json` or the generator itself, run:
+
+```bash
+./gradlew :integrations:widgets:widgets-generator:generateWidgets
+```
diff --git a/integrations/widgets/build.gradle.kts b/integrations/widgets/build.gradle.kts
new file mode 100644
index 0000000..929ff19
--- /dev/null
+++ b/integrations/widgets/build.gradle.kts
@@ -0,0 +1,24 @@
+import org.jetbrains.kotlinx.publisher.apache2
+import org.jetbrains.kotlinx.publisher.githubRepo
+
+plugins {
+ alias(libs.plugins.publisher)
+}
+
+kotlinPublications {
+ pom {
+ githubRepo("Kotlin", "kotlin-notebook-integrations")
+ inceptionYear = "2025"
+ licenses {
+ apache2()
+ }
+ developers {
+ developer {
+ id.set("kotlin-jupyter-team")
+ name.set("Kotlin Jupyter Team")
+ organization.set("JetBrains")
+ organizationUrl.set("https://www.jetbrains.com")
+ }
+ }
+ }
+}
diff --git a/integrations/widgets/notebooks/WidgetArch.png b/integrations/widgets/notebooks/WidgetArch.png
new file mode 100644
index 0000000..9fadae7
Binary files /dev/null and b/integrations/widgets/notebooks/WidgetArch.png differ
diff --git a/integrations/widgets/notebooks/output.ipynb b/integrations/widgets/notebooks/output.ipynb
new file mode 100644
index 0000000..c62b119
--- /dev/null
+++ b/integrations/widgets/notebooks/output.ipynb
@@ -0,0 +1,152 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "id": "1dc6dfe0338edca7",
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-16T10:53:58.196356Z",
+ "start_time": "2026-01-16T10:53:57.656370Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_3_jupyter",
+ "Line_4_jupyter",
+ "Line_5_jupyter",
+ "Line_6_jupyter",
+ "Line_7_jupyter"
+ ]
+ },
+ "tags": [
+ "skiptest"
+ ]
+ },
+ "outputs": [],
+ "source": [
+ "USE {\n",
+ " repositories { mavenLocal() }\n",
+ " dependencies {\n",
+ " implementation(\"org.jetbrains.kotlinx:kotlin-jupyter-widgets-jupyter:0.3.0-1-SNAPSHOT\")\n",
+ " }\n",
+ "}"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "id": "fc0a3dd0f8d182da",
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-16T10:54:15.513572Z",
+ "start_time": "2026-01-16T10:54:15.442978Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_8_jupyter"
+ ]
+ }
+ },
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "b3cd2c4b-33e9-4410-9dc4-863a95686d8b",
+ "version_major": 1,
+ "version_minor": 0
+ },
+ "text/html": [
+ "OutputModel(id=b3cd2c4b-33e9-4410-9dc4-863a95686d8b)"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data",
+ "jetTransient": {}
+ }
+ ],
+ "source": [
+ "val out = outputWidget()\n",
+ "DISPLAY(out)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "id": "b15d36a922b1c5cf",
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-16T10:54:41.738265Z",
+ "start_time": "2026-01-16T10:54:41.684457Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_9_jupyter"
+ ]
+ }
+ },
+ "outputs": [],
+ "source": [
+ "out.withScope {\n",
+ " DISPLAY(\"helloo\")\n",
+ "}"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "id": "a44f5399f0d67f60",
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-16T10:54:48.619173Z",
+ "start_time": "2026-01-16T10:54:48.572730Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_10_jupyter"
+ ]
+ }
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[{output_type=display_data, data={text/plain=helloo}, metadata={}}]"
+ ]
+ },
+ "execution_count": 4,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "out.outputs"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "90094eb07622bfb5",
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Kotlin",
+ "language": "kotlin",
+ "name": "kotlin"
+ },
+ "language_info": {
+ "codemirror_mode": "text/x-kotlin",
+ "file_extension": ".kt",
+ "mimetype": "text/x-kotlin",
+ "name": "kotlin",
+ "nbconvert_exporter": "",
+ "pygments_lexer": "kotlin",
+ "version": "2.2.20"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/integrations/widgets/notebooks/widgets.ipynb b/integrations/widgets/notebooks/widgets.ipynb
new file mode 100644
index 0000000..7bf9ad4
--- /dev/null
+++ b/integrations/widgets/notebooks/widgets.ipynb
@@ -0,0 +1,2115 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "metadata": {
+ "collapsed": true,
+ "tags": [
+ "skiptest"
+ ],
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:44.409009Z",
+ "start_time": "2026-01-18T22:13:43.790007Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_3_jupyter",
+ "Line_4_jupyter",
+ "Line_5_jupyter",
+ "Line_6_jupyter",
+ "Line_7_jupyter"
+ ]
+ }
+ },
+ "source": [
+ "USE {\n",
+ " repositories { mavenLocal() }\n",
+ " dependencies {\n",
+ " implementation(\"org.jetbrains.kotlinx:kotlin-jupyter-widgets-jupyter:0.3.0-1-SNAPSHOT\")\n",
+ " }\n",
+ "}\n",
+ "// TODO should use %use widgets"
+ ],
+ "id": "6ab15dfc5a6675e5",
+ "outputs": [],
+ "execution_count": 1
+ },
+ {
+ "metadata": {},
+ "cell_type": "markdown",
+ "source": "### Int slider",
+ "id": "63fa34c201973f98"
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:44.537519Z",
+ "start_time": "2026-01-18T22:13:44.411631Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_8_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "intSliderWidget {\n",
+ " value = 7\n",
+ " min = 0\n",
+ " max = 10\n",
+ " step = 1\n",
+ " description = \"Test:\"\n",
+ " disabled = false\n",
+ " continuousUpdate = false\n",
+ " orientation = Orientation.Horizontal\n",
+ " readout = true\n",
+ " readoutFormat = \"d\"\n",
+ "}"
+ ],
+ "id": "7d8980a6695140f2",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "IntSliderModel(id=2beff9c2-a593-4884-8676-2c812692e96d)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "2beff9c2-a593-4884-8676-2c812692e96d"
+ }
+ },
+ "execution_count": 2,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 2
+ },
+ {
+ "metadata": {},
+ "cell_type": "markdown",
+ "source": "### Float sliders",
+ "id": "d26fb9406897d05e"
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:44.664769Z",
+ "start_time": "2026-01-18T22:13:44.561589Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_9_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "floatSliderWidget {\n",
+ " value = 7.5\n",
+ " min = 0.0\n",
+ " max = 10.0\n",
+ " step = 0.1\n",
+ " description = \"Test:\"\n",
+ " disabled = false\n",
+ " continuousUpdate = false\n",
+ " orientation = Orientation.Horizontal\n",
+ " readout = true\n",
+ " readoutFormat = \".1f\"\n",
+ "}"
+ ],
+ "id": "719e237baf9a7645",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "FloatSliderModel(id=02cf7eaa-0536-40d9-9401-5f46e161fe91)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "02cf7eaa-0536-40d9-9401-5f46e161fe91"
+ }
+ },
+ "execution_count": 3,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 3
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:44.769802Z",
+ "start_time": "2026-01-18T22:13:44.673546Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_10_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "widgetManager.floatSlider {\n",
+ " value = 7.5\n",
+ " min = 0.0\n",
+ " max = 10.0\n",
+ " step = 0.1\n",
+ " description = \"Test:\"\n",
+ " disabled = false\n",
+ " continuousUpdate = false\n",
+ " orientation = Orientation.Vertical\n",
+ " readout = true\n",
+ " readoutFormat = \".1f\"\n",
+ "}"
+ ],
+ "id": "465b6176acc93b39",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "FloatSliderModel(id=17cfff46-3515-47ba-bcbc-2adc4b915e6e)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "17cfff46-3515-47ba-bcbc-2adc4b915e6e"
+ }
+ },
+ "execution_count": 4,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 4
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:44.904526Z",
+ "start_time": "2026-01-18T22:13:44.806822Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_11_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "widgetManager.floatLogSlider {\n",
+ " value = 10.0\n",
+ " base = 10.0\n",
+ " min = -10.0\n",
+ " max = 10.0\n",
+ " step = 0.2\n",
+ " description = \"Log Slider\"\n",
+ "}"
+ ],
+ "id": "4e3b541642ba45fb",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "FloatLogSliderModel(id=071b2966-1217-4fae-afd2-cdd6cdfe8f30)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "071b2966-1217-4fae-afd2-cdd6cdfe8f30"
+ }
+ },
+ "execution_count": 5,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 5
+ },
+ {
+ "metadata": {},
+ "cell_type": "markdown",
+ "source": "### Range sliders and progress",
+ "id": "d5b3fcbb446aaaea"
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:45.010888Z",
+ "start_time": "2026-01-18T22:13:44.919832Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_12_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "widgetManager.intRangeSlider {\n",
+ " value = 5..7\n",
+ " min = 0\n",
+ " max = 10\n",
+ " step = 1\n",
+ " description = \"Test:\"\n",
+ " disabled = false\n",
+ " continuousUpdate = false\n",
+ " orientation = Orientation.Horizontal\n",
+ " readout = true\n",
+ " readoutFormat = \"d\"\n",
+ "}"
+ ],
+ "id": "cfa7a6afe5a1cd8e",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "IntRangeSliderModel(id=2b7a6895-6fd0-4aba-821a-19b6dbfdae68)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "2b7a6895-6fd0-4aba-821a-19b6dbfdae68"
+ }
+ },
+ "execution_count": 6,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 6
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:45.150337Z",
+ "start_time": "2026-01-18T22:13:45.018304Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_13_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "widgetManager.floatRangeSlider {\n",
+ " value = 5.0..7.5\n",
+ " min = 0.0\n",
+ " max = 10.0\n",
+ " step = 0.1\n",
+ " description = \"Test:\"\n",
+ " disabled = false\n",
+ " continuousUpdate = false\n",
+ " orientation = Orientation.Horizontal\n",
+ " readout = true\n",
+ " readoutFormat = \".1f\"\n",
+ "}"
+ ],
+ "id": "c6c708d7d5dc0408",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "FloatRangeSliderModel(id=b020ca20-b87b-46b6-a56c-03c4fd0dc471)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "b020ca20-b87b-46b6-a56c-03c4fd0dc471"
+ }
+ },
+ "execution_count": 7,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 7
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:45.275831Z",
+ "start_time": "2026-01-18T22:13:45.151738Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_14_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "widgetManager.intProgress {\n",
+ " value = 7\n",
+ " min = 0\n",
+ " max = 10\n",
+ " description = \"Loading:\"\n",
+ " barStyle = BarStyle.Default\n",
+ " style = progressStyleWidget { barColor = \"maroon\" }\n",
+ " orientation = Orientation.Horizontal\n",
+ "}"
+ ],
+ "id": "b0a3e1d64136bd5f",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "IntProgressModel(id=b8328c0e-ff0e-4019-bc21-f645ae1c5056)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "b8328c0e-ff0e-4019-bc21-f645ae1c5056"
+ }
+ },
+ "execution_count": 8,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 8
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:45.383545Z",
+ "start_time": "2026-01-18T22:13:45.293128Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_15_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "widgetManager.floatProgress {\n",
+ " value = 7.5\n",
+ " min = 0.0\n",
+ " max = 10.0\n",
+ " description = \"Loading:\"\n",
+ " barStyle = BarStyle.Info\n",
+ " style = progressStyleWidget { barColor = \"#ffff00\" }\n",
+ " orientation = Orientation.Horizontal\n",
+ "}"
+ ],
+ "id": "b49509a1211a8cfa",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "FloatProgressModel(id=18b9d44e-6737-4385-93f9-2be6016710ef)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "18b9d44e-6737-4385-93f9-2be6016710ef"
+ }
+ },
+ "execution_count": 9,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 9
+ },
+ {
+ "metadata": {},
+ "cell_type": "markdown",
+ "source": "### Numeric text widgets",
+ "id": "a2af3067b942194c"
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:45.489610Z",
+ "start_time": "2026-01-18T22:13:45.396652Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_16_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "widgetManager.boundedIntText {\n",
+ " value = 7\n",
+ " min = 0\n",
+ " max = 10\n",
+ " step = 1\n",
+ " description = \"Text:\"\n",
+ " disabled = false\n",
+ "}"
+ ],
+ "id": "f11a495a144fb1d5",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "BoundedIntTextModel(id=f78de841-a05e-4eef-8fa7-24ccd3165dce)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "f78de841-a05e-4eef-8fa7-24ccd3165dce"
+ }
+ },
+ "execution_count": 10,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 10
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:45.576228Z",
+ "start_time": "2026-01-18T22:13:45.501428Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_17_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "widgetManager.boundedFloatText {\n",
+ " value = 7.5\n",
+ " min = 0.0\n",
+ " max = 10.0\n",
+ " step = 0.1\n",
+ " description = \"Text:\"\n",
+ " disabled = false\n",
+ "}"
+ ],
+ "id": "1cd1107695839b6b",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "BoundedFloatTextModel(id=18a18e6b-f010-4c35-a15c-23589b3eced0)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "18a18e6b-f010-4c35-a15c-23589b3eced0"
+ }
+ },
+ "execution_count": 11,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 11
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:45.656626Z",
+ "start_time": "2026-01-18T22:13:45.585507Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_18_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "widgetManager.intText {\n",
+ " value = 7\n",
+ " description = \"Any:\"\n",
+ " disabled = false\n",
+ "}"
+ ],
+ "id": "3d14109c2231e5d6",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "IntTextModel(id=1ccf7c5d-adf8-427e-9d58-ccd1348f7571)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "1ccf7c5d-adf8-427e-9d58-ccd1348f7571"
+ }
+ },
+ "execution_count": 12,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 12
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:45.734466Z",
+ "start_time": "2026-01-18T22:13:45.661564Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_19_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "widgetManager.floatText {\n",
+ " value = 7.5\n",
+ " description = \"Any:\"\n",
+ " disabled = false\n",
+ "}"
+ ],
+ "id": "fe16e2446b324d07",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "FloatTextModel(id=1120a735-d885-4a4e-890b-b2e81ac73a71)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "1120a735-d885-4a4e-890b-b2e81ac73a71"
+ }
+ },
+ "execution_count": 13,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 13
+ },
+ {
+ "metadata": {},
+ "cell_type": "markdown",
+ "source": "### Toggles and indicators",
+ "id": "8708733dab4a1b59"
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:45.841725Z",
+ "start_time": "2026-01-18T22:13:45.757363Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_20_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "widgetManager.toggleButton {\n",
+ " value = false\n",
+ " description = \"Click me\"\n",
+ " disabled = false\n",
+ " buttonStyle = ButtonStyle.Default\n",
+ " tooltip = \"Description\"\n",
+ " icon = \"check\"\n",
+ "}"
+ ],
+ "id": "37f7ecb542781ae4",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "ToggleButtonModel(id=975f7a55-44cc-4fa3-8134-8cc9d87c31c7)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "975f7a55-44cc-4fa3-8134-8cc9d87c31c7"
+ }
+ },
+ "execution_count": 14,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 14
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:45.916126Z",
+ "start_time": "2026-01-18T22:13:45.847366Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_21_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "widgetManager.checkbox {\n",
+ " value = false\n",
+ " description = \"Check me\"\n",
+ " disabled = false\n",
+ " indent = false\n",
+ "}"
+ ],
+ "id": "e552b6ba50a265d6",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "CheckboxModel(id=66e4d792-969d-42aa-aa12-5284ad52b179)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "66e4d792-969d-42aa-aa12-5284ad52b179"
+ }
+ },
+ "execution_count": 15,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 15
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:46.010032Z",
+ "start_time": "2026-01-18T22:13:45.923520Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_22_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "widgetManager.valid {\n",
+ " value = false\n",
+ " description = \"Valid!\"\n",
+ "}"
+ ],
+ "id": "34b9135d70d55416",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "ValidModel(id=36285d8d-8b99-46f0-9833-45d4e8551f8f)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "36285d8d-8b99-46f0-9833-45d4e8551f8f"
+ }
+ },
+ "execution_count": 16,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 16
+ },
+ {
+ "metadata": {},
+ "cell_type": "markdown",
+ "source": "### Dropdowns and radios",
+ "id": "944ae603572ca0d"
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:46.113672Z",
+ "start_time": "2026-01-18T22:13:46.019102Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_23_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "widgetManager.dropdown {\n",
+ " simpleOptions = listOf(\"1\", \"2\", \"3\")\n",
+ " label = \"2\"\n",
+ " description = \"Number:\"\n",
+ " disabled = false\n",
+ "}"
+ ],
+ "id": "f3eee24176b49d65",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "DropdownModel(id=8eee81f1-1535-4d3c-b1d0-2599435d4adf)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "8eee81f1-1535-4d3c-b1d0-2599435d4adf"
+ }
+ },
+ "execution_count": 17,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 17
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:46.293740Z",
+ "start_time": "2026-01-18T22:13:46.115515Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_24_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "widgetManager.dropdown {\n",
+ " options = listOf(\n",
+ " \"One\" to 1,\n",
+ " \"Two\" to 2,\n",
+ " \"Three\" to 3\n",
+ " )\n",
+ " value = 2\n",
+ " description = \"Number:\"\n",
+ "}"
+ ],
+ "id": "66bd24565306e996",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "DropdownModel(id=3fcc46de-9c26-47c3-b1a5-10d255cf1f13)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "3fcc46de-9c26-47c3-b1a5-10d255cf1f13"
+ }
+ },
+ "execution_count": 18,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 18
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:46.475548Z",
+ "start_time": "2026-01-18T22:13:46.305372Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_25_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "widgetManager.radioButtons {\n",
+ " options = listOf(\"pepperoni\", \"pineapple\", \"anchovies\").mapIndexed { index, string -> string to index }\n",
+ " value = 1 // defaults to \"pineapple\"\n",
+ " // layout = layoutWidget { width = \"max-content\" } // If the items' names are long\n",
+ " description = \"Pizza topping:\"\n",
+ " disabled = false\n",
+ "}"
+ ],
+ "id": "8486485821a47409",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "RadioButtonsModel(id=34ce08ca-70f0-4e8a-b0fb-5c72e65a62e4)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "34ce08ca-70f0-4e8a-b0fb-5c72e65a62e4"
+ }
+ },
+ "execution_count": 19,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 19
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:46.575255Z",
+ "start_time": "2026-01-18T22:13:46.485658Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_26_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "widgetManager.box {\n",
+ " children = listOf(\n",
+ " labelWidget { value = \"Pizza topping with a very long label:\" },\n",
+ " radioButtonsWidget {\n",
+ " simpleOptions = listOf(\n",
+ " \"pepperoni\",\n",
+ " \"pineapple\",\n",
+ " \"anchovies\",\n",
+ " \"and the long name that will fit fine and the long name that will fit fine and the long name that will fit fine \"\n",
+ " )\n",
+ " layout = layoutWidget { width = \"max-content\" }\n",
+ " },\n",
+ " )\n",
+ "}"
+ ],
+ "id": "7074395b4f01df8e",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "BoxModel(id=3472e4e8-0b36-4bdc-addf-d8296a0c7062)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "3472e4e8-0b36-4bdc-addf-d8296a0c7062"
+ }
+ },
+ "execution_count": 20,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 20
+ },
+ {
+ "metadata": {},
+ "cell_type": "markdown",
+ "source": "### Selection widgets",
+ "id": "c90807bc3a1a6c55"
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:46.680692Z",
+ "start_time": "2026-01-18T22:13:46.583604Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_27_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "widgetManager.select {\n",
+ " simpleOptions = listOf(\"Linux\", \"Windows\", \"OSX\")\n",
+ " value = \"OSX\"\n",
+ " // rows = 10\n",
+ " description = \"OS:\"\n",
+ " disabled = false\n",
+ "}"
+ ],
+ "id": "ebc7cfc1d931c989",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "SelectModel(id=e4d2cb79-9af1-4481-85f7-a8bffd40415a)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "e4d2cb79-9af1-4481-85f7-a8bffd40415a"
+ }
+ },
+ "execution_count": 21,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 21
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:46.802546Z",
+ "start_time": "2026-01-18T22:13:46.681704Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_28_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "widgetManager.selectionSlider {\n",
+ " simpleOptions = listOf(\"scrambled\", \"sunny side up\", \"poached\", \"over easy\")\n",
+ " value = \"poached\"\n",
+ " description = \"I like my eggs ...\"\n",
+ " disabled = false\n",
+ " continuousUpdate = false\n",
+ " orientation = Orientation.Horizontal\n",
+ " readout = true\n",
+ "}"
+ ],
+ "id": "122d78fe94761ed7",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "SelectionSliderModel(id=13b5d59f-6c61-4543-b1fa-d5b63be15239)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "13b5d59f-6c61-4543-b1fa-d5b63be15239"
+ }
+ },
+ "execution_count": 22,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 22
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:46.951425Z",
+ "start_time": "2026-01-18T22:13:46.839521Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_29_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": "%use datetime",
+ "id": "58be58f6c94660d3",
+ "outputs": [],
+ "execution_count": 23
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:47.209563Z",
+ "start_time": "2026-01-18T22:13:46.966622Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_30_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "val dates = (1..12).map { LocalDate(2015, it, 1) }\n",
+ "val opts = dates.map { it.month.name.lowercase().replaceFirstChar(Char::titlecase) to it }\n",
+ "widgetManager.selectionRangeSlider {\n",
+ " options = opts\n",
+ " index = 3..11\n",
+ " description = \"Months (2015)\"\n",
+ " disabled = false\n",
+ "}"
+ ],
+ "id": "f38082b2530e9f48",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "SelectionRangeSliderModel(id=c6c28cad-39e5-4aba-9813-e397aba1f89a)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "c6c28cad-39e5-4aba-9813-e397aba1f89a"
+ }
+ },
+ "execution_count": 24,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 24
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:47.344599Z",
+ "start_time": "2026-01-18T22:13:47.210807Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_31_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "widgetManager.toggleButtons {\n",
+ " simpleOptions = listOf(\"Slow\", \"Regular\", \"Fast\")\n",
+ " description = \"Speed:\"\n",
+ " disabled = false\n",
+ " buttonStyle = ButtonStyle.Default\n",
+ " tooltips = listOf(\"Description of slow\", \"Description of regular\", \"Description of fast\")\n",
+ " icons = List(3) { \"check\" }\n",
+ "}"
+ ],
+ "id": "156574c3a11c494a",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "ToggleButtonsModel(id=1c7b1a22-7879-4260-9b65-f63e4e58f22b)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "1c7b1a22-7879-4260-9b65-f63e4e58f22b"
+ }
+ },
+ "execution_count": 25,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 25
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:47.469131Z",
+ "start_time": "2026-01-18T22:13:47.371549Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_32_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "widgetManager.selectMultiple {\n",
+ " simpleOptions = listOf(\"Apples\", \"Oranges\", \"Pears\")\n",
+ " value = listOf(\"Apples\", \"Pears\")\n",
+ " // rows = 10\n",
+ " description = \"Fruits\"\n",
+ " disabled = false\n",
+ "}"
+ ],
+ "id": "f6966f30072a8585",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "SelectMultipleModel(id=55628fe2-1ce3-4078-bc11-ba4f75d4073d)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "55628fe2-1ce3-4078-bc11-ba4f75d4073d"
+ }
+ },
+ "execution_count": 26,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 26
+ },
+ {
+ "metadata": {},
+ "cell_type": "markdown",
+ "source": "### Text inputs",
+ "id": "1fbe79704b88d2ae"
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:47.578085Z",
+ "start_time": "2026-01-18T22:13:47.481173Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_33_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "widgetManager.text {\n",
+ " value = \"Hello World\"\n",
+ " placeholder = \"Type something\"\n",
+ " description = \"String:\"\n",
+ " disabled = false\n",
+ "}"
+ ],
+ "id": "182cf59aa6c69f6d",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "TextModel(id=983b111d-6689-4edf-b0c4-0647309af6ab)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "983b111d-6689-4edf-b0c4-0647309af6ab"
+ }
+ },
+ "execution_count": 27,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 27
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:47.672650Z",
+ "start_time": "2026-01-18T22:13:47.588850Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_34_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "widgetManager.textarea {\n",
+ " value = \"Hello World\"\n",
+ " placeholder = \"Type something\"\n",
+ " description = \"String:\"\n",
+ " disabled = false\n",
+ "}"
+ ],
+ "id": "7ba3e11760ce57d5",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "TextareaModel(id=a3ae7dd3-7915-4c63-a262-9eac89970997)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "a3ae7dd3-7915-4c63-a262-9eac89970997"
+ }
+ },
+ "execution_count": 28,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 28
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:47.768028Z",
+ "start_time": "2026-01-18T22:13:47.683382Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_35_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "widgetManager.combobox {\n",
+ " // value = \"John\"\n",
+ " options = listOf(\"Paul\", \"John\", \"George\", \"Ringo\")\n",
+ " placeholder = \"Choose Someone\"\n",
+ " description = \"Combobox:\"\n",
+ " ensureOption = true\n",
+ " disabled = false\n",
+ "}"
+ ],
+ "id": "5a6049d5c96b0faa",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "ComboboxModel(id=1edda0f9-631f-4db0-a94c-85a30f44e9d8)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "1edda0f9-631f-4db0-a94c-85a30f44e9d8"
+ }
+ },
+ "execution_count": 29,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 29
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:47.866596Z",
+ "start_time": "2026-01-18T22:13:47.772575Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_36_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "widgetManager.password {\n",
+ " value = \"password\"\n",
+ " placeholder = \"Enter password\"\n",
+ " description = \"Password:\"\n",
+ " disabled = false\n",
+ "}"
+ ],
+ "id": "227d7a996bd13bab",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "PasswordModel(id=cd003eaf-4b67-4603-9141-3f66720e9b03)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "cd003eaf-4b67-4603-9141-3f66720e9b03"
+ }
+ },
+ "execution_count": 30,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 30
+ },
+ {
+ "metadata": {},
+ "cell_type": "markdown",
+ "source": "### Layout helpers and HTML",
+ "id": "fed007d44a9f7de6"
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:48.011475Z",
+ "start_time": "2026-01-18T22:13:47.896169Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_37_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "widgetManager.hBox {\n",
+ " children = listOf(\n",
+ " labelWidget { value = \"The label\" },\n",
+ " floatSliderWidget()\n",
+ " )\n",
+ "}"
+ ],
+ "id": "e5ecefad4cdb16a1",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "HBoxModel(id=002598e1-b53f-4f0e-93a7-d990c61c8c64)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "002598e1-b53f-4f0e-93a7-d990c61c8c64"
+ }
+ },
+ "execution_count": 31,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 31
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:48.107451Z",
+ "start_time": "2026-01-18T22:13:48.021879Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_38_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "widgetManager.html {\n",
+ " value = \"Hello World\"\n",
+ " placeholder = \"Some HTML\"\n",
+ " description = \"Some HTML\"\n",
+ "}"
+ ],
+ "id": "cabd831c9db4b4a9",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "HTMLModel(id=a2a54670-56ba-4a65-96e4-c61e45dae00b)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "a2a54670-56ba-4a65-96e4-c61e45dae00b"
+ }
+ },
+ "execution_count": 32,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 32
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:48.264844Z",
+ "start_time": "2026-01-18T22:13:48.120856Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_39_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "widgetManager.htmlMath {\n",
+ " value = \"SomeHTML\"\n",
+ " placeholder = \"Some HTML\"\n",
+ " description = \"Some HTML\"\n",
+ "}"
+ ],
+ "id": "2ddcc29c3f0f6b6d",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "HTMLMathModel(id=c14d2ed3-5d7f-4792-bcf4-8a18137ad91e)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "c14d2ed3-5d7f-4792-bcf4-8a18137ad91e"
+ }
+ },
+ "execution_count": 33,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 33
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:48.393896Z",
+ "start_time": "2026-01-18T22:13:48.269970Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_40_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "import java.io.File\n",
+ "val image = File(\"WidgetArch.png\").readBytes()\n",
+ "widgetManager.image {\n",
+ " value = image\n",
+ " format = \"png\"\n",
+ " width = \"25%\" // TODO should probably be Int\n",
+ " height = \"100%\"\n",
+ "}"
+ ],
+ "id": "dc4787e9b83175a0",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "ImageModel(id=aa83aa34-fdc8-4040-a9c4-4dc8788a3aea)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "aa83aa34-fdc8-4040-a9c4-4dc8788a3aea"
+ }
+ },
+ "execution_count": 34,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 34
+ },
+ {
+ "metadata": {},
+ "cell_type": "markdown",
+ "source": "### Buttons and links",
+ "id": "b7da8a77f3932bd6"
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:48.479383Z",
+ "start_time": "2026-01-18T22:13:48.406272Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_41_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "val button = widgetManager.button {\n",
+ " description = \"Click me\"\n",
+ " disabled = false\n",
+ " buttonStyle = ButtonStyle.Default\n",
+ " tooltip = \"Click me\"\n",
+ " icon = \"check\" // FontAwesome names without the `fa-` prefix)\n",
+ "}\n",
+ "button"
+ ],
+ "id": "84b15e73fc086d7c",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "ButtonModel(id=1eb97c6c-7177-4290-a2d4-ffbea7a72ac9)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "1eb97c6c-7177-4290-a2d4-ffbea7a72ac9"
+ }
+ },
+ "execution_count": 35,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 35
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:48.633585Z",
+ "start_time": "2026-01-18T22:13:48.487053Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_42_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "val play = widgetManager.play {\n",
+ " value = 50\n",
+ " min = 0\n",
+ " max = 100\n",
+ " step = 1\n",
+ " interval = 500\n",
+ " description = \"Press play\"\n",
+ " disabled = false\n",
+ "}\n",
+ "val slider = widgetManager.intSlider()\n",
+ "\n",
+ "widgetManager.linkProperties(play, PlayWidget::value, slider, IntSliderWidget::value)\n",
+ "widgetManager.hBox { children = listOf(play, slider) }"
+ ],
+ "id": "f3f2a0075cb9f768",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "HBoxModel(id=93170ac1-1e51-4f59-815b-9e5c3b661f87)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "93170ac1-1e51-4f59-815b-9e5c3b661f87"
+ }
+ },
+ "execution_count": 36,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 36
+ },
+ {
+ "metadata": {},
+ "cell_type": "markdown",
+ "source": "### Pickers and upload",
+ "id": "3604ee1ffee0754e"
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:48.737991Z",
+ "start_time": "2026-01-18T22:13:48.635425Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_43_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "widgetManager.datePicker {\n",
+ " description = \"Pick a Date\"\n",
+ " disabled = false\n",
+ "}"
+ ],
+ "id": "3103c8817b8cad",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "DatePickerModel(id=4f33f11d-46dc-4b0c-ae67-24030a30e7d5)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "4f33f11d-46dc-4b0c-ae67-24030a30e7d5"
+ }
+ },
+ "execution_count": 37,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 37
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:48.856995Z",
+ "start_time": "2026-01-18T22:13:48.754601Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_44_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "widgetManager.colorPicker {\n",
+ " concise = false\n",
+ " description = \"Pick a color\"\n",
+ " value = \"blue\"\n",
+ " disabled = false\n",
+ "}"
+ ],
+ "id": "524abb0ad2c65791",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "ColorPickerModel(id=28ecf566-a1ff-437c-a1b4-31f82ab1d70e)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "28ecf566-a1ff-437c-a1b4-31f82ab1d70e"
+ }
+ },
+ "execution_count": 38,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 38
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:48.958830Z",
+ "start_time": "2026-01-18T22:13:48.869420Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_45_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "widgetManager.fileUpload {\n",
+ " accept = \"\" // Accepted file extension e.g. '.txt', '.pdf', 'image/*', 'image/*,.pdf'\n",
+ " multiple = false // true to accept multiple files upload else false\n",
+ "}"
+ ],
+ "id": "ae665e6f4e1e087e",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "FileUploadModel(id=17c89e21-53dc-4331-b22c-cfc6a8deb500)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "17c89e21-53dc-4331-b22c-cfc6a8deb500"
+ }
+ },
+ "execution_count": 39,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 39
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:49.075660Z",
+ "start_time": "2026-01-18T22:13:48.977011Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_46_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": "widgetManager.controller { index = 0 }",
+ "id": "1a5cb37612d9dfaf",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "ControllerModel(id=665a2075-0423-4830-8ec7-c31a09e2b64d)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "665a2075-0423-4830-8ec7-c31a09e2b64d"
+ }
+ },
+ "execution_count": 40,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 40
+ },
+ {
+ "metadata": {},
+ "cell_type": "markdown",
+ "source": "### Containers",
+ "id": "85985638d7934753"
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:49.210587Z",
+ "start_time": "2026-01-18T22:13:49.077977Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_47_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "val itemsBox = List(4) { widgetManager.label { value = it.toString() } }\n",
+ "widgetManager.box {\n",
+ " children = itemsBox\n",
+ "}"
+ ],
+ "id": "8b3a0c4b6f75fc91",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "BoxModel(id=4db56928-4e60-4571-b028-4b553a2038cd)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "4db56928-4e60-4571-b028-4b553a2038cd"
+ }
+ },
+ "execution_count": 41,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 41
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:49.397449Z",
+ "start_time": "2026-01-18T22:13:49.225410Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_48_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "val itemsHBox = List(4) { widgetManager.label { value = it.toString() } }\n",
+ "widgetManager.hBox {\n",
+ " children = itemsHBox\n",
+ "}"
+ ],
+ "id": "82a5be299d770824",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "HBoxModel(id=9cb0aa10-188e-4dc8-b88f-f1e276cdf509)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "9cb0aa10-188e-4dc8-b88f-f1e276cdf509"
+ }
+ },
+ "execution_count": 42,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 42
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:49.649200Z",
+ "start_time": "2026-01-18T22:13:49.432858Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_49_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "val items = List(4) { widgetManager.label { value = it.toString()} }\n",
+ "val leftBox = widgetManager.vBox { children = listOf(items[0], items[1]) }\n",
+ "val rightBox = widgetManager.vBox { children = listOf(items[2], items[3]) }\n",
+ "widgetManager.hBox { children = listOf(leftBox, rightBox) }"
+ ],
+ "id": "a58e9ad4d7045767",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "HBoxModel(id=6074d969-3734-4458-a591-b5d4126a90ea)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "6074d969-3734-4458-a591-b5d4126a90ea"
+ }
+ },
+ "execution_count": 43,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 43
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:49.786575Z",
+ "start_time": "2026-01-18T22:13:49.664644Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_50_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "val gridItems = List(8) { widgetManager.label { value = it.toString() } }\n",
+ "widgetManager.gridBox {\n",
+ " children = gridItems\n",
+ " layout = layoutWidget { gridTemplateColumns = \"repeat(3, 100px)\" }\n",
+ "}"
+ ],
+ "id": "6dfe8d1005f5a4db",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "GridBoxModel(id=6957578b-7078-4cd9-ba6f-69f96630aba1)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "6957578b-7078-4cd9-ba6f-69f96630aba1"
+ }
+ },
+ "execution_count": 44,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 44
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:49.852137Z",
+ "start_time": "2026-01-18T22:13:49.788161Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_51_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "val accordion = widgetManager.accordion {\n",
+ " children = listOf(widgetManager.intSlider(), widgetManager.text())\n",
+ " titles = listOf(\"Slider\", \"Text\")\n",
+ "}\n",
+ "accordion"
+ ],
+ "id": "34115b127676780e",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "AccordionModel(id=ca774091-8e8d-431c-9084-eeab840bb9c5)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "ca774091-8e8d-431c-9084-eeab840bb9c5"
+ }
+ },
+ "execution_count": 45,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 45
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:49.982073Z",
+ "start_time": "2026-01-18T22:13:49.862972Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_52_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "val tabContents = listOf(\"P0\", \"P1\", \"P2\", \"P3\", \"P4\")\n",
+ "val _children = tabContents.map { widgetManager.text { description = it } }\n",
+ "val tab = widgetManager.tab {\n",
+ " this.children = _children\n",
+ " titles = _children.indices.map { it.toString() }\n",
+ "}\n",
+ "tab"
+ ],
+ "id": "186a75cace0fe4e0",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "TabModel(id=715c57fb-a5c1-4fe4-ba08-1da35de0661b)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "715c57fb-a5c1-4fe4-ba08-1da35de0661b"
+ }
+ },
+ "execution_count": 46,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 46
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:50.134009Z",
+ "start_time": "2026-01-18T22:13:50.010792Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_53_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "val tabNest = widgetManager.tab {\n",
+ " children = listOf(accordion, accordion)\n",
+ " titles = listOf(\"An accordion\", \"Copy of the accordion\")\n",
+ "}\n",
+ "tabNest\n"
+ ],
+ "id": "38d9ca87e8b67277",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "TabModel(id=fdbdb01a-86c2-489e-8d0a-ab53b363dd9c)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "fdbdb01a-86c2-489e-8d0a-ab53b363dd9c"
+ }
+ },
+ "execution_count": 47,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 47
+ },
+ {
+ "metadata": {},
+ "cell_type": "markdown",
+ "source": "### Event listeners",
+ "id": "3adb73c3a78c541b"
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:50.405434Z",
+ "start_time": "2026-01-18T22:13:50.174255Z"
+ },
+ "executionRelatedData": {
+ "compiledClasses": [
+ "Line_54_jupyter"
+ ]
+ }
+ },
+ "cell_type": "code",
+ "source": [
+ "val slider = intSliderWidget { description = \"Slider\" }\n",
+ "val label = labelWidget { value = \"Value is 0\" }\n",
+ "\n",
+ "// Listen to all property changes\n",
+ "slider.addChangeListener { patch, fromFrontend ->\n",
+ " if (\"value\" in patch) {\n",
+ " label.value = \"Value is ${slider.value}\"\n",
+ " }\n",
+ "}\n",
+ "\n",
+ "// Listen to a specific property change\n",
+ "slider.getProperty(\"value\")?.addChangeListener { newValue, fromFrontend ->\n",
+ " // This will be printed to the kernel log\n",
+ " println(\"Value changed to $newValue\")\n",
+ "}\n",
+ "\n",
+ "vBoxWidget { children = listOf(slider, label) }"
+ ],
+ "id": "65438dd5cac5b471",
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "VBoxModel(id=f65ac5d5-1b09-4779-bf1d-416696609bbb)"
+ ],
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "f65ac5d5-1b09-4779-bf1d-416696609bbb"
+ }
+ },
+ "execution_count": 48,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "execution_count": 48
+ },
+ {
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2026-01-18T22:13:50.501048Z",
+ "start_time": "2026-01-18T22:13:50.472438Z"
+ }
+ },
+ "cell_type": "code",
+ "source": "",
+ "id": "b101611ea5d4b4e0",
+ "outputs": [],
+ "execution_count": 49
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Kotlin",
+ "language": "kotlin",
+ "name": "kotlin"
+ },
+ "language_info": {
+ "name": "kotlin",
+ "version": "2.2.20",
+ "mimetype": "text/x-kotlin",
+ "file_extension": ".kt",
+ "pygments_lexer": "kotlin",
+ "codemirror_mode": "text/x-kotlin",
+ "nbconvert_exporter": ""
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/integrations/widgets/widgets-api/build.gradle.kts b/integrations/widgets/widgets-api/build.gradle.kts
new file mode 100644
index 0000000..00cbe8a
--- /dev/null
+++ b/integrations/widgets/widgets-api/build.gradle.kts
@@ -0,0 +1,40 @@
+plugins {
+ alias(libs.plugins.kotlin.jvm)
+ alias(libs.plugins.publisher)
+ alias(libs.plugins.kotlin.serialization)
+ alias(libs.plugins.kotlin.jupyter.api)
+}
+
+dependencies {
+ api(libs.kotlinx.serialization.json)
+ implementation(libs.kotlin.reflect)
+
+ testImplementation(libs.kotlin.test)
+ testImplementation(libs.test.kotlintest.assertions)
+ testImplementation(libs.kotlinx.serialization.json)
+}
+
+tasks.test {
+ useJUnitPlatform()
+}
+
+kotlin {
+ jvmToolchain(
+ libs.versions.jvm.toolchain
+ .get()
+ .toInt(),
+ )
+ explicitApi()
+}
+
+sourceSets {
+ main {
+ kotlin.srcDir("src/generated/kotlin")
+ }
+}
+
+kotlinPublications {
+ publication {
+ description.set("Kotlin APIs for IPython Widgets")
+ }
+}
diff --git a/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/AccordionWidget.kt b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/AccordionWidget.kt
new file mode 100644
index 0000000..bc987af
--- /dev/null
+++ b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/AccordionWidget.kt
@@ -0,0 +1,73 @@
+// Generated by widgets-generator. Do not edit manually.
+package org.jetbrains.kotlinx.jupyter.widget.library
+
+import org.jetbrains.kotlinx.jupyter.widget.WidgetManager
+import org.jetbrains.kotlinx.jupyter.widget.library.enums.BoxStyle
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetFactory
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetModel
+import org.jetbrains.kotlinx.jupyter.widget.model.WidgetModel
+import org.jetbrains.kotlinx.jupyter.widget.model.WidgetSpec
+import org.jetbrains.kotlinx.jupyter.widget.model.createAndRegisterWidget
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.ArrayType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.NullableType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.enums.WidgetEnumEntry
+import org.jetbrains.kotlinx.jupyter.widget.model.types.enums.WidgetEnumType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.BooleanType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.IntType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.StringType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.widget.WidgetReferenceType
+
+private val accordionSpec = WidgetSpec(
+ modelName = "AccordionModel",
+ modelModule = "@jupyter-widgets/controls",
+ modelModuleVersion = "2.0.0",
+ viewName = "AccordionView",
+ viewModule = "@jupyter-widgets/controls",
+ viewModuleVersion = "2.0.0",
+)
+
+public fun WidgetManager.accordion(setup: AccordionWidget.() -> Unit = {}): AccordionWidget =
+ createAndRegisterWidget(AccordionWidget.Factory).apply(setup)
+
+public class AccordionWidget internal constructor(
+ widgetManager: WidgetManager,
+ fromFrontend: Boolean,
+) : DefaultWidgetModel(accordionSpec, widgetManager) {
+ internal object Factory : DefaultWidgetFactory(accordionSpec, ::AccordionWidget)
+
+ /**
+ * CSS classes applied to widget DOM element
+ */
+ public var domClasses: List by prop("_dom_classes", ArrayType(StringType), emptyList())
+
+ /**
+ * Use a predefined styling for the box.
+ */
+ public var boxStyle: WidgetEnumEntry by prop("box_style", WidgetEnumType(BoxStyle, BoxStyle.Default), BoxStyle.Default)
+
+ /**
+ * List of widget children
+ */
+ public var children: List by prop("children", ArrayType(NullableType(WidgetReferenceType())), emptyList())
+ public var layout: LayoutWidget? by nullableWidgetProp("layout", if (fromFrontend) null else widgetManager.layout())
+
+ /**
+ * The index of the selected page. This is either an integer selecting a particular sub-widget, or None to have no widgets selected.
+ */
+ public var selectedIndex: Int? by nullableIntProp("selected_index", null)
+
+ /**
+ * Is widget tabbable?
+ */
+ public var tabbable: Boolean? by nullableBoolProp("tabbable", null)
+
+ /**
+ * Titles of the pages
+ */
+ public var titles: List by prop("titles", ArrayType(StringType), emptyList())
+
+ /**
+ * A tooltip caption.
+ */
+ public var tooltip: String? by nullableStringProp("tooltip", null)
+}
diff --git a/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/AudioWidget.kt b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/AudioWidget.kt
new file mode 100644
index 0000000..3b7b786
--- /dev/null
+++ b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/AudioWidget.kt
@@ -0,0 +1,74 @@
+// Generated by widgets-generator. Do not edit manually.
+package org.jetbrains.kotlinx.jupyter.widget.library
+
+import org.jetbrains.kotlinx.jupyter.widget.WidgetManager
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetFactory
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetModel
+import org.jetbrains.kotlinx.jupyter.widget.model.WidgetSpec
+import org.jetbrains.kotlinx.jupyter.widget.model.createAndRegisterWidget
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.ArrayType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.NullableType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.BooleanType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.BytesType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.StringType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.widget.WidgetReferenceType
+
+private val audioSpec = WidgetSpec(
+ modelName = "AudioModel",
+ modelModule = "@jupyter-widgets/controls",
+ modelModuleVersion = "2.0.0",
+ viewName = "AudioView",
+ viewModule = "@jupyter-widgets/controls",
+ viewModuleVersion = "2.0.0",
+)
+
+public fun WidgetManager.audio(setup: AudioWidget.() -> Unit = {}): AudioWidget =
+ createAndRegisterWidget(AudioWidget.Factory).apply(setup)
+
+public class AudioWidget internal constructor(
+ widgetManager: WidgetManager,
+ fromFrontend: Boolean,
+) : DefaultWidgetModel(audioSpec, widgetManager) {
+ internal object Factory : DefaultWidgetFactory(audioSpec, ::AudioWidget)
+
+ /**
+ * CSS classes applied to widget DOM element
+ */
+ public var domClasses: List by prop("_dom_classes", ArrayType(StringType), emptyList())
+
+ /**
+ * When true, the audio starts when it's displayed
+ */
+ public var autoplay: Boolean by boolProp("autoplay", true)
+
+ /**
+ * Specifies that audio controls should be displayed (such as a play/pause button etc)
+ */
+ public var controls: Boolean by boolProp("controls", true)
+
+ /**
+ * The format of the audio.
+ */
+ public var format: String by stringProp("format", "mp3")
+ public var layout: LayoutWidget? by nullableWidgetProp("layout", if (fromFrontend) null else widgetManager.layout())
+
+ /**
+ * When true, the audio will start from the beginning after finishing
+ */
+ public var loop: Boolean by boolProp("loop", true)
+
+ /**
+ * Is widget tabbable?
+ */
+ public var tabbable: Boolean? by nullableBoolProp("tabbable", null)
+
+ /**
+ * A tooltip caption.
+ */
+ public var tooltip: String? by nullableStringProp("tooltip", null)
+
+ /**
+ * The media data as a memory view of bytes.
+ */
+ public var value: ByteArray by bytesProp("value", byteArrayOf())
+}
diff --git a/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/BoundedFloatTextWidget.kt b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/BoundedFloatTextWidget.kt
new file mode 100644
index 0000000..d509422
--- /dev/null
+++ b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/BoundedFloatTextWidget.kt
@@ -0,0 +1,94 @@
+// Generated by widgets-generator. Do not edit manually.
+package org.jetbrains.kotlinx.jupyter.widget.library
+
+import org.jetbrains.kotlinx.jupyter.widget.WidgetManager
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetFactory
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetModel
+import org.jetbrains.kotlinx.jupyter.widget.model.WidgetSpec
+import org.jetbrains.kotlinx.jupyter.widget.model.createAndRegisterWidget
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.ArrayType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.NullableType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.BooleanType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.FloatType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.StringType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.widget.WidgetReferenceType
+
+private val boundedFloatTextSpec = WidgetSpec(
+ modelName = "BoundedFloatTextModel",
+ modelModule = "@jupyter-widgets/controls",
+ modelModuleVersion = "2.0.0",
+ viewName = "FloatTextView",
+ viewModule = "@jupyter-widgets/controls",
+ viewModuleVersion = "2.0.0",
+)
+
+public fun WidgetManager.boundedFloatText(setup: BoundedFloatTextWidget.() -> Unit = {}): BoundedFloatTextWidget =
+ createAndRegisterWidget(BoundedFloatTextWidget.Factory).apply(setup)
+
+public class BoundedFloatTextWidget internal constructor(
+ widgetManager: WidgetManager,
+ fromFrontend: Boolean,
+) : DefaultWidgetModel(boundedFloatTextSpec, widgetManager) {
+ internal object Factory : DefaultWidgetFactory(boundedFloatTextSpec, ::BoundedFloatTextWidget)
+
+ /**
+ * CSS classes applied to widget DOM element
+ */
+ public var domClasses: List by prop("_dom_classes", ArrayType(StringType), emptyList())
+
+ /**
+ * Update the value as the user types. If False, update on submission, e.g., pressing Enter or navigating away.
+ */
+ public var continuousUpdate: Boolean by boolProp("continuous_update", false)
+
+ /**
+ * Description of the control.
+ */
+ public var description: String by stringProp("description", "")
+
+ /**
+ * Accept HTML in the description.
+ */
+ public var descriptionAllowHtml: Boolean by boolProp("description_allow_html", false)
+
+ /**
+ * Enable or disable user changes
+ */
+ public var disabled: Boolean by boolProp("disabled", false)
+ public var layout: LayoutWidget? by nullableWidgetProp("layout", if (fromFrontend) null else widgetManager.layout())
+
+ /**
+ * Max value
+ */
+ public var max: Double by doubleProp("max", 100.0)
+
+ /**
+ * Min value
+ */
+ public var min: Double by doubleProp("min", 0.0)
+
+ /**
+ * Minimum step to increment the value
+ */
+ public var step: Double? by nullableDoubleProp("step", null)
+
+ /**
+ * Styling customizations
+ */
+ public var style: DescriptionStyleWidget? by nullableWidgetProp("style", if (fromFrontend) null else widgetManager.descriptionStyle())
+
+ /**
+ * Is widget tabbable?
+ */
+ public var tabbable: Boolean? by nullableBoolProp("tabbable", null)
+
+ /**
+ * A tooltip caption.
+ */
+ public var tooltip: String? by nullableStringProp("tooltip", null)
+
+ /**
+ * Float value
+ */
+ public var value: Double by doubleProp("value", 0.0)
+}
diff --git a/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/BoundedIntTextWidget.kt b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/BoundedIntTextWidget.kt
new file mode 100644
index 0000000..bdd663b
--- /dev/null
+++ b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/BoundedIntTextWidget.kt
@@ -0,0 +1,94 @@
+// Generated by widgets-generator. Do not edit manually.
+package org.jetbrains.kotlinx.jupyter.widget.library
+
+import org.jetbrains.kotlinx.jupyter.widget.WidgetManager
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetFactory
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetModel
+import org.jetbrains.kotlinx.jupyter.widget.model.WidgetSpec
+import org.jetbrains.kotlinx.jupyter.widget.model.createAndRegisterWidget
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.ArrayType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.NullableType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.BooleanType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.IntType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.StringType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.widget.WidgetReferenceType
+
+private val boundedIntTextSpec = WidgetSpec(
+ modelName = "BoundedIntTextModel",
+ modelModule = "@jupyter-widgets/controls",
+ modelModuleVersion = "2.0.0",
+ viewName = "IntTextView",
+ viewModule = "@jupyter-widgets/controls",
+ viewModuleVersion = "2.0.0",
+)
+
+public fun WidgetManager.boundedIntText(setup: BoundedIntTextWidget.() -> Unit = {}): BoundedIntTextWidget =
+ createAndRegisterWidget(BoundedIntTextWidget.Factory).apply(setup)
+
+public class BoundedIntTextWidget internal constructor(
+ widgetManager: WidgetManager,
+ fromFrontend: Boolean,
+) : DefaultWidgetModel(boundedIntTextSpec, widgetManager) {
+ internal object Factory : DefaultWidgetFactory(boundedIntTextSpec, ::BoundedIntTextWidget)
+
+ /**
+ * CSS classes applied to widget DOM element
+ */
+ public var domClasses: List by prop("_dom_classes", ArrayType(StringType), emptyList())
+
+ /**
+ * Update the value as the user types. If False, update on submission, e.g., pressing Enter or navigating away.
+ */
+ public var continuousUpdate: Boolean by boolProp("continuous_update", false)
+
+ /**
+ * Description of the control.
+ */
+ public var description: String by stringProp("description", "")
+
+ /**
+ * Accept HTML in the description.
+ */
+ public var descriptionAllowHtml: Boolean by boolProp("description_allow_html", false)
+
+ /**
+ * Enable or disable user changes
+ */
+ public var disabled: Boolean by boolProp("disabled", false)
+ public var layout: LayoutWidget? by nullableWidgetProp("layout", if (fromFrontend) null else widgetManager.layout())
+
+ /**
+ * Max value
+ */
+ public var max: Int by intProp("max", 100)
+
+ /**
+ * Min value
+ */
+ public var min: Int by intProp("min", 0)
+
+ /**
+ * Minimum step to increment the value
+ */
+ public var step: Int by intProp("step", 1)
+
+ /**
+ * Styling customizations
+ */
+ public var style: DescriptionStyleWidget? by nullableWidgetProp("style", if (fromFrontend) null else widgetManager.descriptionStyle())
+
+ /**
+ * Is widget tabbable?
+ */
+ public var tabbable: Boolean? by nullableBoolProp("tabbable", null)
+
+ /**
+ * A tooltip caption.
+ */
+ public var tooltip: String? by nullableStringProp("tooltip", null)
+
+ /**
+ * Int value
+ */
+ public var value: Int by intProp("value", 0)
+}
diff --git a/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/BoxWidget.kt b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/BoxWidget.kt
new file mode 100644
index 0000000..c8c1169
--- /dev/null
+++ b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/BoxWidget.kt
@@ -0,0 +1,62 @@
+// Generated by widgets-generator. Do not edit manually.
+package org.jetbrains.kotlinx.jupyter.widget.library
+
+import org.jetbrains.kotlinx.jupyter.widget.WidgetManager
+import org.jetbrains.kotlinx.jupyter.widget.library.enums.BoxStyle
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetFactory
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetModel
+import org.jetbrains.kotlinx.jupyter.widget.model.WidgetModel
+import org.jetbrains.kotlinx.jupyter.widget.model.WidgetSpec
+import org.jetbrains.kotlinx.jupyter.widget.model.createAndRegisterWidget
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.ArrayType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.NullableType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.enums.WidgetEnumEntry
+import org.jetbrains.kotlinx.jupyter.widget.model.types.enums.WidgetEnumType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.BooleanType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.StringType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.widget.WidgetReferenceType
+
+private val boxSpec = WidgetSpec(
+ modelName = "BoxModel",
+ modelModule = "@jupyter-widgets/controls",
+ modelModuleVersion = "2.0.0",
+ viewName = "BoxView",
+ viewModule = "@jupyter-widgets/controls",
+ viewModuleVersion = "2.0.0",
+)
+
+public fun WidgetManager.box(setup: BoxWidget.() -> Unit = {}): BoxWidget =
+ createAndRegisterWidget(BoxWidget.Factory).apply(setup)
+
+public class BoxWidget internal constructor(
+ widgetManager: WidgetManager,
+ fromFrontend: Boolean,
+) : DefaultWidgetModel(boxSpec, widgetManager) {
+ internal object Factory : DefaultWidgetFactory(boxSpec, ::BoxWidget)
+
+ /**
+ * CSS classes applied to widget DOM element
+ */
+ public var domClasses: List by prop("_dom_classes", ArrayType(StringType), emptyList())
+
+ /**
+ * Use a predefined styling for the box.
+ */
+ public var boxStyle: WidgetEnumEntry by prop("box_style", WidgetEnumType(BoxStyle, BoxStyle.Default), BoxStyle.Default)
+
+ /**
+ * List of widget children
+ */
+ public var children: List by prop("children", ArrayType(NullableType(WidgetReferenceType())), emptyList())
+ public var layout: LayoutWidget? by nullableWidgetProp("layout", if (fromFrontend) null else widgetManager.layout())
+
+ /**
+ * Is widget tabbable?
+ */
+ public var tabbable: Boolean? by nullableBoolProp("tabbable", null)
+
+ /**
+ * A tooltip caption.
+ */
+ public var tooltip: String? by nullableStringProp("tooltip", null)
+}
diff --git a/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/ButtonStyleWidget.kt b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/ButtonStyleWidget.kt
new file mode 100644
index 0000000..30a950e
--- /dev/null
+++ b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/ButtonStyleWidget.kt
@@ -0,0 +1,69 @@
+// Generated by widgets-generator. Do not edit manually.
+package org.jetbrains.kotlinx.jupyter.widget.library
+
+import org.jetbrains.kotlinx.jupyter.widget.WidgetManager
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetFactory
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetModel
+import org.jetbrains.kotlinx.jupyter.widget.model.WidgetSpec
+import org.jetbrains.kotlinx.jupyter.widget.model.createAndRegisterWidget
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.NullableType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.StringType
+
+private val buttonStyleSpec = WidgetSpec(
+ modelName = "ButtonStyleModel",
+ modelModule = "@jupyter-widgets/controls",
+ modelModuleVersion = "2.0.0",
+ viewName = "StyleView",
+ viewModule = "@jupyter-widgets/base",
+ viewModuleVersion = "2.0.0",
+)
+
+public fun WidgetManager.buttonStyle(setup: ButtonStyleWidget.() -> Unit = {}): ButtonStyleWidget =
+ createAndRegisterWidget(ButtonStyleWidget.Factory).apply(setup)
+
+public class ButtonStyleWidget internal constructor(
+ widgetManager: WidgetManager,
+ fromFrontend: Boolean,
+) : DefaultWidgetModel(buttonStyleSpec, widgetManager) {
+ internal object Factory : DefaultWidgetFactory(buttonStyleSpec, ::ButtonStyleWidget)
+
+ /**
+ * Color of the button
+ */
+ public var buttonColor: String? by nullableStringProp("button_color", null)
+
+ /**
+ * Button text font family.
+ */
+ public var fontFamily: String? by nullableStringProp("font_family", null)
+
+ /**
+ * Button text font size.
+ */
+ public var fontSize: String? by nullableStringProp("font_size", null)
+
+ /**
+ * Button text font style.
+ */
+ public var fontStyle: String? by nullableStringProp("font_style", null)
+
+ /**
+ * Button text font variant.
+ */
+ public var fontVariant: String? by nullableStringProp("font_variant", null)
+
+ /**
+ * Button text font weight.
+ */
+ public var fontWeight: String? by nullableStringProp("font_weight", null)
+
+ /**
+ * Button text color.
+ */
+ public var textColor: String? by nullableStringProp("text_color", null)
+
+ /**
+ * Button text decoration.
+ */
+ public var textDecoration: String? by nullableStringProp("text_decoration", null)
+}
diff --git a/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/ButtonWidget.kt b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/ButtonWidget.kt
new file mode 100644
index 0000000..432c16d
--- /dev/null
+++ b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/ButtonWidget.kt
@@ -0,0 +1,72 @@
+// Generated by widgets-generator. Do not edit manually.
+package org.jetbrains.kotlinx.jupyter.widget.library
+
+import org.jetbrains.kotlinx.jupyter.widget.WidgetManager
+import org.jetbrains.kotlinx.jupyter.widget.library.enums.ButtonStyle
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetFactory
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetModel
+import org.jetbrains.kotlinx.jupyter.widget.model.WidgetSpec
+import org.jetbrains.kotlinx.jupyter.widget.model.createAndRegisterWidget
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.ArrayType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.NullableType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.enums.WidgetEnumEntry
+import org.jetbrains.kotlinx.jupyter.widget.model.types.enums.WidgetEnumType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.BooleanType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.StringType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.widget.WidgetReferenceType
+
+private val buttonSpec = WidgetSpec(
+ modelName = "ButtonModel",
+ modelModule = "@jupyter-widgets/controls",
+ modelModuleVersion = "2.0.0",
+ viewName = "ButtonView",
+ viewModule = "@jupyter-widgets/controls",
+ viewModuleVersion = "2.0.0",
+)
+
+public fun WidgetManager.button(setup: ButtonWidget.() -> Unit = {}): ButtonWidget =
+ createAndRegisterWidget(ButtonWidget.Factory).apply(setup)
+
+public class ButtonWidget internal constructor(
+ widgetManager: WidgetManager,
+ fromFrontend: Boolean,
+) : DefaultWidgetModel(buttonSpec, widgetManager) {
+ internal object Factory : DefaultWidgetFactory(buttonSpec, ::ButtonWidget)
+
+ /**
+ * CSS classes applied to widget DOM element
+ */
+ public var domClasses: List by prop("_dom_classes", ArrayType(StringType), emptyList())
+
+ /**
+ * Use a predefined styling for the button.
+ */
+ public var buttonStyle: WidgetEnumEntry by prop("button_style", WidgetEnumType(ButtonStyle, ButtonStyle.Default), ButtonStyle.Default)
+
+ /**
+ * Button label.
+ */
+ public var description: String by stringProp("description", "")
+
+ /**
+ * Enable or disable user changes.
+ */
+ public var disabled: Boolean by boolProp("disabled", false)
+
+ /**
+ * Font-awesome icon names, without the 'fa-' prefix.
+ */
+ public var icon: String by stringProp("icon", "")
+ public var layout: LayoutWidget? by nullableWidgetProp("layout", if (fromFrontend) null else widgetManager.layout())
+ public var style: ButtonStyleWidget? by nullableWidgetProp("style", if (fromFrontend) null else widgetManager.buttonStyle())
+
+ /**
+ * Is widget tabbable?
+ */
+ public var tabbable: Boolean? by nullableBoolProp("tabbable", null)
+
+ /**
+ * A tooltip caption.
+ */
+ public var tooltip: String? by nullableStringProp("tooltip", null)
+}
diff --git a/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/CheckboxStyleWidget.kt b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/CheckboxStyleWidget.kt
new file mode 100644
index 0000000..cfb9e8e
--- /dev/null
+++ b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/CheckboxStyleWidget.kt
@@ -0,0 +1,39 @@
+// Generated by widgets-generator. Do not edit manually.
+package org.jetbrains.kotlinx.jupyter.widget.library
+
+import org.jetbrains.kotlinx.jupyter.widget.WidgetManager
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetFactory
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetModel
+import org.jetbrains.kotlinx.jupyter.widget.model.WidgetSpec
+import org.jetbrains.kotlinx.jupyter.widget.model.createAndRegisterWidget
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.NullableType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.StringType
+
+private val checkboxStyleSpec = WidgetSpec(
+ modelName = "CheckboxStyleModel",
+ modelModule = "@jupyter-widgets/controls",
+ modelModuleVersion = "2.0.0",
+ viewName = "StyleView",
+ viewModule = "@jupyter-widgets/base",
+ viewModuleVersion = "2.0.0",
+)
+
+public fun WidgetManager.checkboxStyle(setup: CheckboxStyleWidget.() -> Unit = {}): CheckboxStyleWidget =
+ createAndRegisterWidget(CheckboxStyleWidget.Factory).apply(setup)
+
+public class CheckboxStyleWidget internal constructor(
+ widgetManager: WidgetManager,
+ fromFrontend: Boolean,
+) : DefaultWidgetModel(checkboxStyleSpec, widgetManager) {
+ internal object Factory : DefaultWidgetFactory(checkboxStyleSpec, ::CheckboxStyleWidget)
+
+ /**
+ * Background specifications.
+ */
+ public var background: String? by nullableStringProp("background", null)
+
+ /**
+ * Width of the description to the side of the control.
+ */
+ public var descriptionWidth: String by stringProp("description_width", "")
+}
diff --git a/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/CheckboxWidget.kt b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/CheckboxWidget.kt
new file mode 100644
index 0000000..175d606
--- /dev/null
+++ b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/CheckboxWidget.kt
@@ -0,0 +1,78 @@
+// Generated by widgets-generator. Do not edit manually.
+package org.jetbrains.kotlinx.jupyter.widget.library
+
+import org.jetbrains.kotlinx.jupyter.widget.WidgetManager
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetFactory
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetModel
+import org.jetbrains.kotlinx.jupyter.widget.model.WidgetSpec
+import org.jetbrains.kotlinx.jupyter.widget.model.createAndRegisterWidget
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.ArrayType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.NullableType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.BooleanType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.StringType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.widget.WidgetReferenceType
+
+private val checkboxSpec = WidgetSpec(
+ modelName = "CheckboxModel",
+ modelModule = "@jupyter-widgets/controls",
+ modelModuleVersion = "2.0.0",
+ viewName = "CheckboxView",
+ viewModule = "@jupyter-widgets/controls",
+ viewModuleVersion = "2.0.0",
+)
+
+public fun WidgetManager.checkbox(setup: CheckboxWidget.() -> Unit = {}): CheckboxWidget =
+ createAndRegisterWidget(CheckboxWidget.Factory).apply(setup)
+
+public class CheckboxWidget internal constructor(
+ widgetManager: WidgetManager,
+ fromFrontend: Boolean,
+) : DefaultWidgetModel(checkboxSpec, widgetManager) {
+ internal object Factory : DefaultWidgetFactory(checkboxSpec, ::CheckboxWidget)
+
+ /**
+ * CSS classes applied to widget DOM element
+ */
+ public var domClasses: List by prop("_dom_classes", ArrayType(StringType), emptyList())
+
+ /**
+ * Description of the control.
+ */
+ public var description: String by stringProp("description", "")
+
+ /**
+ * Accept HTML in the description.
+ */
+ public var descriptionAllowHtml: Boolean by boolProp("description_allow_html", false)
+
+ /**
+ * Enable or disable user changes.
+ */
+ public var disabled: Boolean by boolProp("disabled", false)
+
+ /**
+ * Indent the control to align with other controls with a description.
+ */
+ public var indent: Boolean by boolProp("indent", true)
+ public var layout: LayoutWidget? by nullableWidgetProp("layout", if (fromFrontend) null else widgetManager.layout())
+
+ /**
+ * Styling customizations
+ */
+ public var style: CheckboxStyleWidget? by nullableWidgetProp("style", if (fromFrontend) null else widgetManager.checkboxStyle())
+
+ /**
+ * Is widget tabbable?
+ */
+ public var tabbable: Boolean? by nullableBoolProp("tabbable", null)
+
+ /**
+ * A tooltip caption.
+ */
+ public var tooltip: String? by nullableStringProp("tooltip", null)
+
+ /**
+ * Bool value
+ */
+ public var value: Boolean by boolProp("value", false)
+}
diff --git a/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/ColorPickerWidget.kt b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/ColorPickerWidget.kt
new file mode 100644
index 0000000..18e33fb
--- /dev/null
+++ b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/ColorPickerWidget.kt
@@ -0,0 +1,78 @@
+// Generated by widgets-generator. Do not edit manually.
+package org.jetbrains.kotlinx.jupyter.widget.library
+
+import org.jetbrains.kotlinx.jupyter.widget.WidgetManager
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetFactory
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetModel
+import org.jetbrains.kotlinx.jupyter.widget.model.WidgetSpec
+import org.jetbrains.kotlinx.jupyter.widget.model.createAndRegisterWidget
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.ArrayType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.NullableType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.BooleanType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.StringType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.widget.WidgetReferenceType
+
+private val colorPickerSpec = WidgetSpec(
+ modelName = "ColorPickerModel",
+ modelModule = "@jupyter-widgets/controls",
+ modelModuleVersion = "2.0.0",
+ viewName = "ColorPickerView",
+ viewModule = "@jupyter-widgets/controls",
+ viewModuleVersion = "2.0.0",
+)
+
+public fun WidgetManager.colorPicker(setup: ColorPickerWidget.() -> Unit = {}): ColorPickerWidget =
+ createAndRegisterWidget(ColorPickerWidget.Factory).apply(setup)
+
+public class ColorPickerWidget internal constructor(
+ widgetManager: WidgetManager,
+ fromFrontend: Boolean,
+) : DefaultWidgetModel(colorPickerSpec, widgetManager) {
+ internal object Factory : DefaultWidgetFactory(colorPickerSpec, ::ColorPickerWidget)
+
+ /**
+ * CSS classes applied to widget DOM element
+ */
+ public var domClasses: List by prop("_dom_classes", ArrayType(StringType), emptyList())
+
+ /**
+ * Display short version with just a color selector.
+ */
+ public var concise: Boolean by boolProp("concise", false)
+
+ /**
+ * Description of the control.
+ */
+ public var description: String by stringProp("description", "")
+
+ /**
+ * Accept HTML in the description.
+ */
+ public var descriptionAllowHtml: Boolean by boolProp("description_allow_html", false)
+
+ /**
+ * Enable or disable user changes.
+ */
+ public var disabled: Boolean by boolProp("disabled", false)
+ public var layout: LayoutWidget? by nullableWidgetProp("layout", if (fromFrontend) null else widgetManager.layout())
+
+ /**
+ * Styling customizations
+ */
+ public var style: DescriptionStyleWidget? by nullableWidgetProp("style", if (fromFrontend) null else widgetManager.descriptionStyle())
+
+ /**
+ * Is widget tabbable?
+ */
+ public var tabbable: Boolean? by nullableBoolProp("tabbable", null)
+
+ /**
+ * A tooltip caption.
+ */
+ public var tooltip: String? by nullableStringProp("tooltip", null)
+
+ /**
+ * The color value.
+ */
+ public var value: String by stringProp("value", "black")
+}
diff --git a/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/ColorsInputWidget.kt b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/ColorsInputWidget.kt
new file mode 100644
index 0000000..4009ef6
--- /dev/null
+++ b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/ColorsInputWidget.kt
@@ -0,0 +1,72 @@
+// Generated by widgets-generator. Do not edit manually.
+package org.jetbrains.kotlinx.jupyter.widget.library
+
+import org.jetbrains.kotlinx.jupyter.widget.WidgetManager
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetFactory
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetModel
+import org.jetbrains.kotlinx.jupyter.widget.model.WidgetSpec
+import org.jetbrains.kotlinx.jupyter.widget.model.createAndRegisterWidget
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.ArrayType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.NullableType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.AnyType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.BooleanType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.StringType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.widget.WidgetReferenceType
+
+private val colorsInputSpec = WidgetSpec(
+ modelName = "ColorsInputModel",
+ modelModule = "@jupyter-widgets/controls",
+ modelModuleVersion = "2.0.0",
+ viewName = "ColorsInputView",
+ viewModule = "@jupyter-widgets/controls",
+ viewModuleVersion = "2.0.0",
+)
+
+public fun WidgetManager.colorsInput(setup: ColorsInputWidget.() -> Unit = {}): ColorsInputWidget =
+ createAndRegisterWidget(ColorsInputWidget.Factory).apply(setup)
+
+public class ColorsInputWidget internal constructor(
+ widgetManager: WidgetManager,
+ fromFrontend: Boolean,
+) : DefaultWidgetModel(colorsInputSpec, widgetManager) {
+ internal object Factory : DefaultWidgetFactory(colorsInputSpec, ::ColorsInputWidget)
+
+ /**
+ * CSS classes applied to widget DOM element
+ */
+ public var domClasses: List by prop("_dom_classes", ArrayType(StringType), emptyList())
+ public var allowDuplicates: Boolean by boolProp("allow_duplicates", true)
+ public var allowedTags: List by prop("allowed_tags", ArrayType(AnyType), emptyList())
+
+ /**
+ * Description of the control.
+ */
+ public var description: String by stringProp("description", "")
+
+ /**
+ * Accept HTML in the description.
+ */
+ public var descriptionAllowHtml: Boolean by boolProp("description_allow_html", false)
+ public var layout: LayoutWidget? by nullableWidgetProp("layout", if (fromFrontend) null else widgetManager.layout())
+ public var placeholder: String by stringProp("placeholder", "")
+
+ /**
+ * Styling customizations
+ */
+ public var style: DescriptionStyleWidget? by nullableWidgetProp("style", if (fromFrontend) null else widgetManager.descriptionStyle())
+
+ /**
+ * Is widget tabbable?
+ */
+ public var tabbable: Boolean? by nullableBoolProp("tabbable", null)
+
+ /**
+ * A tooltip caption.
+ */
+ public var tooltip: String? by nullableStringProp("tooltip", null)
+
+ /**
+ * List of string tags
+ */
+ public var value: List by prop("value", ArrayType(AnyType), emptyList())
+}
diff --git a/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/ComboboxWidget.kt b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/ComboboxWidget.kt
new file mode 100644
index 0000000..bcc0e67
--- /dev/null
+++ b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/ComboboxWidget.kt
@@ -0,0 +1,89 @@
+// Generated by widgets-generator. Do not edit manually.
+package org.jetbrains.kotlinx.jupyter.widget.library
+
+import org.jetbrains.kotlinx.jupyter.widget.WidgetManager
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetFactory
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetModel
+import org.jetbrains.kotlinx.jupyter.widget.model.WidgetSpec
+import org.jetbrains.kotlinx.jupyter.widget.model.createAndRegisterWidget
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.ArrayType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.NullableType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.BooleanType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.StringType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.widget.WidgetReferenceType
+
+private val comboboxSpec = WidgetSpec(
+ modelName = "ComboboxModel",
+ modelModule = "@jupyter-widgets/controls",
+ modelModuleVersion = "2.0.0",
+ viewName = "ComboboxView",
+ viewModule = "@jupyter-widgets/controls",
+ viewModuleVersion = "2.0.0",
+)
+
+public fun WidgetManager.combobox(setup: ComboboxWidget.() -> Unit = {}): ComboboxWidget =
+ createAndRegisterWidget(ComboboxWidget.Factory).apply(setup)
+
+public class ComboboxWidget internal constructor(
+ widgetManager: WidgetManager,
+ fromFrontend: Boolean,
+) : DefaultWidgetModel(comboboxSpec, widgetManager) {
+ internal object Factory : DefaultWidgetFactory(comboboxSpec, ::ComboboxWidget)
+
+ /**
+ * CSS classes applied to widget DOM element
+ */
+ public var domClasses: List by prop("_dom_classes", ArrayType(StringType), emptyList())
+
+ /**
+ * Update the value as the user types. If False, update on submission, e.g., pressing Enter or navigating away.
+ */
+ public var continuousUpdate: Boolean by boolProp("continuous_update", true)
+
+ /**
+ * Description of the control.
+ */
+ public var description: String by stringProp("description", "")
+
+ /**
+ * Accept HTML in the description.
+ */
+ public var descriptionAllowHtml: Boolean by boolProp("description_allow_html", false)
+
+ /**
+ * Enable or disable user changes
+ */
+ public var disabled: Boolean by boolProp("disabled", false)
+
+ /**
+ * If set, ensure value is in options. Implies continuous_update=False.
+ */
+ public var ensureOption: Boolean by boolProp("ensure_option", false)
+ public var layout: LayoutWidget? by nullableWidgetProp("layout", if (fromFrontend) null else widgetManager.layout())
+
+ /**
+ * Dropdown options for the combobox
+ */
+ public var options: List by prop("options", ArrayType(StringType), emptyList())
+
+ /**
+ * Placeholder text to display when nothing has been typed
+ */
+ public var placeholder: String by stringProp("placeholder", "")
+ public var style: TextStyleWidget? by nullableWidgetProp("style", if (fromFrontend) null else widgetManager.textStyle())
+
+ /**
+ * Is widget tabbable?
+ */
+ public var tabbable: Boolean? by nullableBoolProp("tabbable", null)
+
+ /**
+ * A tooltip caption.
+ */
+ public var tooltip: String? by nullableStringProp("tooltip", null)
+
+ /**
+ * String value
+ */
+ public var value: String by stringProp("value", "")
+}
diff --git a/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/ControllerAxisWidget.kt b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/ControllerAxisWidget.kt
new file mode 100644
index 0000000..b296c34
--- /dev/null
+++ b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/ControllerAxisWidget.kt
@@ -0,0 +1,54 @@
+// Generated by widgets-generator. Do not edit manually.
+package org.jetbrains.kotlinx.jupyter.widget.library
+
+import org.jetbrains.kotlinx.jupyter.widget.WidgetManager
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetFactory
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetModel
+import org.jetbrains.kotlinx.jupyter.widget.model.WidgetSpec
+import org.jetbrains.kotlinx.jupyter.widget.model.createAndRegisterWidget
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.ArrayType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.NullableType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.BooleanType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.FloatType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.StringType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.widget.WidgetReferenceType
+
+private val controllerAxisSpec = WidgetSpec(
+ modelName = "ControllerAxisModel",
+ modelModule = "@jupyter-widgets/controls",
+ modelModuleVersion = "2.0.0",
+ viewName = "ControllerAxisView",
+ viewModule = "@jupyter-widgets/controls",
+ viewModuleVersion = "2.0.0",
+)
+
+public fun WidgetManager.controllerAxis(setup: ControllerAxisWidget.() -> Unit = {}): ControllerAxisWidget =
+ createAndRegisterWidget(ControllerAxisWidget.Factory).apply(setup)
+
+public class ControllerAxisWidget internal constructor(
+ widgetManager: WidgetManager,
+ fromFrontend: Boolean,
+) : DefaultWidgetModel(controllerAxisSpec, widgetManager) {
+ internal object Factory : DefaultWidgetFactory(controllerAxisSpec, ::ControllerAxisWidget)
+
+ /**
+ * CSS classes applied to widget DOM element
+ */
+ public var domClasses: List by prop("_dom_classes", ArrayType(StringType), emptyList())
+ public var layout: LayoutWidget? by nullableWidgetProp("layout", if (fromFrontend) null else widgetManager.layout())
+
+ /**
+ * Is widget tabbable?
+ */
+ public var tabbable: Boolean? by nullableBoolProp("tabbable", null)
+
+ /**
+ * A tooltip caption.
+ */
+ public var tooltip: String? by nullableStringProp("tooltip", null)
+
+ /**
+ * The value of the axis.
+ */
+ public var value: Double by doubleProp("value", 0.0)
+}
diff --git a/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/ControllerButtonWidget.kt b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/ControllerButtonWidget.kt
new file mode 100644
index 0000000..0b9ec13
--- /dev/null
+++ b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/ControllerButtonWidget.kt
@@ -0,0 +1,59 @@
+// Generated by widgets-generator. Do not edit manually.
+package org.jetbrains.kotlinx.jupyter.widget.library
+
+import org.jetbrains.kotlinx.jupyter.widget.WidgetManager
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetFactory
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetModel
+import org.jetbrains.kotlinx.jupyter.widget.model.WidgetSpec
+import org.jetbrains.kotlinx.jupyter.widget.model.createAndRegisterWidget
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.ArrayType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.NullableType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.BooleanType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.FloatType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.StringType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.widget.WidgetReferenceType
+
+private val controllerButtonSpec = WidgetSpec(
+ modelName = "ControllerButtonModel",
+ modelModule = "@jupyter-widgets/controls",
+ modelModuleVersion = "2.0.0",
+ viewName = "ControllerButtonView",
+ viewModule = "@jupyter-widgets/controls",
+ viewModuleVersion = "2.0.0",
+)
+
+public fun WidgetManager.controllerButton(setup: ControllerButtonWidget.() -> Unit = {}): ControllerButtonWidget =
+ createAndRegisterWidget(ControllerButtonWidget.Factory).apply(setup)
+
+public class ControllerButtonWidget internal constructor(
+ widgetManager: WidgetManager,
+ fromFrontend: Boolean,
+) : DefaultWidgetModel(controllerButtonSpec, widgetManager) {
+ internal object Factory : DefaultWidgetFactory(controllerButtonSpec, ::ControllerButtonWidget)
+
+ /**
+ * CSS classes applied to widget DOM element
+ */
+ public var domClasses: List by prop("_dom_classes", ArrayType(StringType), emptyList())
+ public var layout: LayoutWidget? by nullableWidgetProp("layout", if (fromFrontend) null else widgetManager.layout())
+
+ /**
+ * Whether the button is pressed.
+ */
+ public var pressed: Boolean by boolProp("pressed", false)
+
+ /**
+ * Is widget tabbable?
+ */
+ public var tabbable: Boolean? by nullableBoolProp("tabbable", null)
+
+ /**
+ * A tooltip caption.
+ */
+ public var tooltip: String? by nullableStringProp("tooltip", null)
+
+ /**
+ * The value of the button.
+ */
+ public var value: Double by doubleProp("value", 0.0)
+}
diff --git a/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/ControllerWidget.kt b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/ControllerWidget.kt
new file mode 100644
index 0000000..3ab68b5
--- /dev/null
+++ b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/ControllerWidget.kt
@@ -0,0 +1,85 @@
+// Generated by widgets-generator. Do not edit manually.
+package org.jetbrains.kotlinx.jupyter.widget.library
+
+import org.jetbrains.kotlinx.jupyter.widget.WidgetManager
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetFactory
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetModel
+import org.jetbrains.kotlinx.jupyter.widget.model.WidgetSpec
+import org.jetbrains.kotlinx.jupyter.widget.model.createAndRegisterWidget
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.ArrayType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.NullableType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.BooleanType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.FloatType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.IntType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.StringType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.widget.WidgetReferenceType
+
+private val controllerSpec = WidgetSpec(
+ modelName = "ControllerModel",
+ modelModule = "@jupyter-widgets/controls",
+ modelModuleVersion = "2.0.0",
+ viewName = "ControllerView",
+ viewModule = "@jupyter-widgets/controls",
+ viewModuleVersion = "2.0.0",
+)
+
+public fun WidgetManager.controller(setup: ControllerWidget.() -> Unit = {}): ControllerWidget =
+ createAndRegisterWidget(ControllerWidget.Factory).apply(setup)
+
+public class ControllerWidget internal constructor(
+ widgetManager: WidgetManager,
+ fromFrontend: Boolean,
+) : DefaultWidgetModel(controllerSpec, widgetManager) {
+ internal object Factory : DefaultWidgetFactory(controllerSpec, ::ControllerWidget)
+
+ /**
+ * CSS classes applied to widget DOM element
+ */
+ public var domClasses: List by prop("_dom_classes", ArrayType(StringType), emptyList())
+
+ /**
+ * The axes on the gamepad.
+ */
+ public var axes: List by prop("axes", ArrayType(NullableType(WidgetReferenceType())), emptyList())
+
+ /**
+ * The buttons on the gamepad.
+ */
+ public var buttons: List by prop("buttons", ArrayType(NullableType(WidgetReferenceType())), emptyList())
+
+ /**
+ * Whether the gamepad is connected.
+ */
+ public var connected: Boolean by boolProp("connected", false)
+
+ /**
+ * The id number of the controller.
+ */
+ public var index: Int by intProp("index", 0)
+ public var layout: LayoutWidget? by nullableWidgetProp("layout", if (fromFrontend) null else widgetManager.layout())
+
+ /**
+ * The name of the control mapping.
+ */
+ public var mapping: String by stringProp("mapping", "")
+
+ /**
+ * The name of the controller.
+ */
+ public var name: String by stringProp("name", "")
+
+ /**
+ * Is widget tabbable?
+ */
+ public var tabbable: Boolean? by nullableBoolProp("tabbable", null)
+
+ /**
+ * The last time the data from this gamepad was updated.
+ */
+ public var timestamp: Double by doubleProp("timestamp", 0.0)
+
+ /**
+ * A tooltip caption.
+ */
+ public var tooltip: String? by nullableStringProp("tooltip", null)
+}
diff --git a/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/DOMWidget.kt b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/DOMWidget.kt
new file mode 100644
index 0000000..8f84ee0
--- /dev/null
+++ b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/DOMWidget.kt
@@ -0,0 +1,54 @@
+// Generated by widgets-generator. Do not edit manually.
+package org.jetbrains.kotlinx.jupyter.widget.library
+
+import org.jetbrains.kotlinx.jupyter.widget.WidgetManager
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetFactory
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetModel
+import org.jetbrains.kotlinx.jupyter.widget.model.WidgetSpec
+import org.jetbrains.kotlinx.jupyter.widget.model.createAndRegisterWidget
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.ArrayType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.NullableType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.BooleanType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.BytesType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.StringType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.widget.WidgetReferenceType
+
+private val domWidgetSpec = WidgetSpec(
+ modelName = "DOMWidgetModel",
+ modelModule = "@jupyter-widgets/controls",
+ modelModuleVersion = "2.0.0",
+ viewName = null,
+ viewModule = "@jupyter-widgets/controls",
+ viewModuleVersion = "2.0.0",
+)
+
+public fun WidgetManager.domWidget(setup: DomWidget.() -> Unit = {}): DomWidget =
+ createAndRegisterWidget(DomWidget.Factory).apply(setup)
+
+public class DomWidget internal constructor(
+ widgetManager: WidgetManager,
+ fromFrontend: Boolean,
+) : DefaultWidgetModel(domWidgetSpec, widgetManager) {
+ internal object Factory : DefaultWidgetFactory(domWidgetSpec, ::DomWidget)
+
+ /**
+ * CSS classes applied to widget DOM element
+ */
+ public var domClasses: List by prop("_dom_classes", ArrayType(StringType), emptyList())
+ public var layout: LayoutWidget? by nullableWidgetProp("layout", if (fromFrontend) null else widgetManager.layout())
+
+ /**
+ * Is widget tabbable?
+ */
+ public var tabbable: Boolean? by nullableBoolProp("tabbable", null)
+
+ /**
+ * A tooltip caption.
+ */
+ public var tooltip: String? by nullableStringProp("tooltip", null)
+
+ /**
+ * The media data as a memory view of bytes.
+ */
+ public var value: ByteArray by bytesProp("value", byteArrayOf())
+}
diff --git a/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/DatePickerWidget.kt b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/DatePickerWidget.kt
new file mode 100644
index 0000000..86ffe1a
--- /dev/null
+++ b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/DatePickerWidget.kt
@@ -0,0 +1,107 @@
+// Generated by widgets-generator. Do not edit manually.
+package org.jetbrains.kotlinx.jupyter.widget.library
+
+import org.jetbrains.kotlinx.jupyter.widget.WidgetManager
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetFactory
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetModel
+import org.jetbrains.kotlinx.jupyter.widget.model.WidgetSpec
+import org.jetbrains.kotlinx.jupyter.widget.model.createAndRegisterWidget
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.ArrayType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.NullableType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.UnionType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.datetime.DateType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.BooleanType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.IntType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.StringType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.widget.WidgetReferenceType
+
+public sealed interface DatePickerWidgetStep {
+ @JvmInline public value class IntValue(public val value: Int) : DatePickerWidgetStep
+ public object AnyStep : DatePickerWidgetStep
+}
+
+
+private val DatePickerWidgetStepType_Option0 = IntType
+
+private val DatePickerWidgetStepType = UnionType(
+ name = "step",
+ default = DatePickerWidgetStep.IntValue(1),
+ serializer = { value, widgetManager ->
+ when (value) {
+ is DatePickerWidgetStep.IntValue -> DatePickerWidgetStepType_Option0.serialize(value.value, widgetManager)
+ is DatePickerWidgetStep.AnyStep -> "any"
+ }
+ },
+ deserializers = listOf(
+ { patch, widgetManager -> DatePickerWidgetStep.IntValue(DatePickerWidgetStepType_Option0.deserialize(patch, widgetManager)) },
+ { patch, _ ->
+ when (patch) {
+ "any" -> DatePickerWidgetStep.AnyStep
+ else -> throw Exception("Unknown enum value: $patch")
+ }
+ }
+ ),
+)
+
+private val datePickerSpec = WidgetSpec(
+ modelName = "DatePickerModel",
+ modelModule = "@jupyter-widgets/controls",
+ modelModuleVersion = "2.0.0",
+ viewName = "DatePickerView",
+ viewModule = "@jupyter-widgets/controls",
+ viewModuleVersion = "2.0.0",
+)
+
+public fun WidgetManager.datePicker(setup: DatePickerWidget.() -> Unit = {}): DatePickerWidget =
+ createAndRegisterWidget(DatePickerWidget.Factory).apply(setup)
+
+public class DatePickerWidget internal constructor(
+ widgetManager: WidgetManager,
+ fromFrontend: Boolean,
+) : DefaultWidgetModel(datePickerSpec, widgetManager) {
+ internal object Factory : DefaultWidgetFactory(datePickerSpec, ::DatePickerWidget)
+
+ /**
+ * CSS classes applied to widget DOM element
+ */
+ public var domClasses: List by prop("_dom_classes", ArrayType(StringType), emptyList())
+
+ /**
+ * Description of the control.
+ */
+ public var description: String by stringProp("description", "")
+
+ /**
+ * Accept HTML in the description.
+ */
+ public var descriptionAllowHtml: Boolean by boolProp("description_allow_html", false)
+
+ /**
+ * Enable or disable user changes.
+ */
+ public var disabled: Boolean by boolProp("disabled", false)
+ public var layout: LayoutWidget? by nullableWidgetProp("layout", if (fromFrontend) null else widgetManager.layout())
+ public var max: java.time.LocalDate? by nullableDateProp("max", null)
+ public var min: java.time.LocalDate? by nullableDateProp("min", null)
+
+ /**
+ * The date step to use for the picker, in days, or "any".
+ */
+ public var step: DatePickerWidgetStep by prop("step", DatePickerWidgetStepType, DatePickerWidgetStep.IntValue(1))
+
+ /**
+ * Styling customizations
+ */
+ public var style: DescriptionStyleWidget? by nullableWidgetProp("style", if (fromFrontend) null else widgetManager.descriptionStyle())
+
+ /**
+ * Is widget tabbable?
+ */
+ public var tabbable: Boolean? by nullableBoolProp("tabbable", null)
+
+ /**
+ * A tooltip caption.
+ */
+ public var tooltip: String? by nullableStringProp("tooltip", null)
+ public var value: java.time.LocalDate? by nullableDateProp("value", null)
+}
diff --git a/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/DatetimeWidget.kt b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/DatetimeWidget.kt
new file mode 100644
index 0000000..a66d636
--- /dev/null
+++ b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/DatetimeWidget.kt
@@ -0,0 +1,72 @@
+// Generated by widgets-generator. Do not edit manually.
+package org.jetbrains.kotlinx.jupyter.widget.library
+
+import org.jetbrains.kotlinx.jupyter.widget.WidgetManager
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetFactory
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetModel
+import org.jetbrains.kotlinx.jupyter.widget.model.WidgetSpec
+import org.jetbrains.kotlinx.jupyter.widget.model.createAndRegisterWidget
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.ArrayType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.NullableType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.datetime.DatetimeType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.BooleanType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.StringType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.widget.WidgetReferenceType
+
+private val datetimeSpec = WidgetSpec(
+ modelName = "DatetimeModel",
+ modelModule = "@jupyter-widgets/controls",
+ modelModuleVersion = "2.0.0",
+ viewName = "DatetimeView",
+ viewModule = "@jupyter-widgets/controls",
+ viewModuleVersion = "2.0.0",
+)
+
+public fun WidgetManager.datetime(setup: DatetimeWidget.() -> Unit = {}): DatetimeWidget =
+ createAndRegisterWidget(DatetimeWidget.Factory).apply(setup)
+
+public class DatetimeWidget internal constructor(
+ widgetManager: WidgetManager,
+ fromFrontend: Boolean,
+) : DefaultWidgetModel(datetimeSpec, widgetManager) {
+ internal object Factory : DefaultWidgetFactory(datetimeSpec, ::DatetimeWidget)
+
+ /**
+ * CSS classes applied to widget DOM element
+ */
+ public var domClasses: List by prop("_dom_classes", ArrayType(StringType), emptyList())
+
+ /**
+ * Description of the control.
+ */
+ public var description: String by stringProp("description", "")
+
+ /**
+ * Accept HTML in the description.
+ */
+ public var descriptionAllowHtml: Boolean by boolProp("description_allow_html", false)
+
+ /**
+ * Enable or disable user changes.
+ */
+ public var disabled: Boolean by boolProp("disabled", false)
+ public var layout: LayoutWidget? by nullableWidgetProp("layout", if (fromFrontend) null else widgetManager.layout())
+ public var max: java.time.Instant? by nullableDateTimeProp("max", null)
+ public var min: java.time.Instant? by nullableDateTimeProp("min", null)
+
+ /**
+ * Styling customizations
+ */
+ public var style: DescriptionStyleWidget? by nullableWidgetProp("style", if (fromFrontend) null else widgetManager.descriptionStyle())
+
+ /**
+ * Is widget tabbable?
+ */
+ public var tabbable: Boolean? by nullableBoolProp("tabbable", null)
+
+ /**
+ * A tooltip caption.
+ */
+ public var tooltip: String? by nullableStringProp("tooltip", null)
+ public var value: java.time.Instant? by nullableDateTimeProp("value", null)
+}
diff --git a/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/DescriptionStyleWidget.kt b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/DescriptionStyleWidget.kt
new file mode 100644
index 0000000..4a2e98b
--- /dev/null
+++ b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/DescriptionStyleWidget.kt
@@ -0,0 +1,33 @@
+// Generated by widgets-generator. Do not edit manually.
+package org.jetbrains.kotlinx.jupyter.widget.library
+
+import org.jetbrains.kotlinx.jupyter.widget.WidgetManager
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetFactory
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetModel
+import org.jetbrains.kotlinx.jupyter.widget.model.WidgetSpec
+import org.jetbrains.kotlinx.jupyter.widget.model.createAndRegisterWidget
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.StringType
+
+private val descriptionStyleSpec = WidgetSpec(
+ modelName = "DescriptionStyleModel",
+ modelModule = "@jupyter-widgets/controls",
+ modelModuleVersion = "2.0.0",
+ viewName = "StyleView",
+ viewModule = "@jupyter-widgets/base",
+ viewModuleVersion = "2.0.0",
+)
+
+public fun WidgetManager.descriptionStyle(setup: DescriptionStyleWidget.() -> Unit = {}): DescriptionStyleWidget =
+ createAndRegisterWidget(DescriptionStyleWidget.Factory).apply(setup)
+
+public class DescriptionStyleWidget internal constructor(
+ widgetManager: WidgetManager,
+ fromFrontend: Boolean,
+) : DefaultWidgetModel(descriptionStyleSpec, widgetManager) {
+ internal object Factory : DefaultWidgetFactory(descriptionStyleSpec, ::DescriptionStyleWidget)
+
+ /**
+ * Width of the description to the side of the control.
+ */
+ public var descriptionWidth: String by stringProp("description_width", "")
+}
diff --git a/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/DirectionalLinkWidget.kt b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/DirectionalLinkWidget.kt
new file mode 100644
index 0000000..67b427a
--- /dev/null
+++ b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/DirectionalLinkWidget.kt
@@ -0,0 +1,42 @@
+// Generated by widgets-generator. Do not edit manually.
+package org.jetbrains.kotlinx.jupyter.widget.library
+
+import org.jetbrains.kotlinx.jupyter.widget.WidgetManager
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetFactory
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetModel
+import org.jetbrains.kotlinx.jupyter.widget.model.WidgetModel
+import org.jetbrains.kotlinx.jupyter.widget.model.WidgetSpec
+import org.jetbrains.kotlinx.jupyter.widget.model.createAndRegisterWidget
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.NullableType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.PairType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.StringType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.widget.WidgetReferenceType
+
+private val directionalLinkSpec = WidgetSpec(
+ modelName = "DirectionalLinkModel",
+ modelModule = "@jupyter-widgets/controls",
+ modelModuleVersion = "2.0.0",
+ viewName = null,
+ viewModule = "@jupyter-widgets/controls",
+ viewModuleVersion = "2.0.0",
+)
+
+public fun WidgetManager.directionalLink(setup: DirectionalLinkWidget.() -> Unit = {}): DirectionalLinkWidget =
+ createAndRegisterWidget(DirectionalLinkWidget.Factory).apply(setup)
+
+public class DirectionalLinkWidget internal constructor(
+ widgetManager: WidgetManager,
+ fromFrontend: Boolean,
+) : DefaultWidgetModel(directionalLinkSpec, widgetManager) {
+ internal object Factory : DefaultWidgetFactory(directionalLinkSpec, ::DirectionalLinkWidget)
+
+ /**
+ * The source (widget, 'trait_name') pair
+ */
+ public var source: Pair? by prop("source", NullableType(PairType(NullableType(WidgetReferenceType()), StringType)), null to "")
+
+ /**
+ * The target (widget, 'trait_name') pair
+ */
+ public var target: Pair? by prop("target", NullableType(PairType(NullableType(WidgetReferenceType()), StringType)), null to "")
+}
diff --git a/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/DropdownWidget.kt b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/DropdownWidget.kt
new file mode 100644
index 0000000..52e7a91
--- /dev/null
+++ b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/DropdownWidget.kt
@@ -0,0 +1,69 @@
+// Generated by widgets-generator. Do not edit manually.
+package org.jetbrains.kotlinx.jupyter.widget.library
+
+import org.jetbrains.kotlinx.jupyter.widget.WidgetManager
+import org.jetbrains.kotlinx.jupyter.widget.library.options.SingleNullableSelectionWidgetBase
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetFactory
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetModel
+import org.jetbrains.kotlinx.jupyter.widget.model.WidgetSpec
+import org.jetbrains.kotlinx.jupyter.widget.model.createAndRegisterWidget
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.ArrayType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.NullableType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.BooleanType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.StringType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.widget.WidgetReferenceType
+
+private val dropdownSpec = WidgetSpec(
+ modelName = "DropdownModel",
+ modelModule = "@jupyter-widgets/controls",
+ modelModuleVersion = "2.0.0",
+ viewName = "DropdownView",
+ viewModule = "@jupyter-widgets/controls",
+ viewModuleVersion = "2.0.0",
+)
+
+public fun WidgetManager.dropdown(setup: DropdownWidget.() -> Unit = {}): DropdownWidget =
+ createAndRegisterWidget(DropdownWidget.Factory).apply(setup)
+
+public class DropdownWidget internal constructor(
+ widgetManager: WidgetManager,
+ fromFrontend: Boolean,
+) : SingleNullableSelectionWidgetBase(dropdownSpec, widgetManager) {
+ internal object Factory : DefaultWidgetFactory(dropdownSpec, ::DropdownWidget)
+
+ /**
+ * CSS classes applied to widget DOM element
+ */
+ public var domClasses: List by prop("_dom_classes", ArrayType(StringType), emptyList())
+
+ /**
+ * Description of the control.
+ */
+ public var description: String by stringProp("description", "")
+
+ /**
+ * Accept HTML in the description.
+ */
+ public var descriptionAllowHtml: Boolean by boolProp("description_allow_html", false)
+
+ /**
+ * Enable or disable user changes
+ */
+ public var disabled: Boolean by boolProp("disabled", false)
+ public var layout: LayoutWidget? by nullableWidgetProp("layout", if (fromFrontend) null else widgetManager.layout())
+
+ /**
+ * Styling customizations
+ */
+ public var style: DescriptionStyleWidget? by nullableWidgetProp("style", if (fromFrontend) null else widgetManager.descriptionStyle())
+
+ /**
+ * Is widget tabbable?
+ */
+ public var tabbable: Boolean? by nullableBoolProp("tabbable", null)
+
+ /**
+ * A tooltip caption.
+ */
+ public var tooltip: String? by nullableStringProp("tooltip", null)
+}
diff --git a/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/FileUploadWidget.kt b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/FileUploadWidget.kt
new file mode 100644
index 0000000..4d53ea9
--- /dev/null
+++ b/integrations/widgets/widgets-api/src/generated/kotlin/org/jetbrains/kotlinx/jupyter/widget/library/FileUploadWidget.kt
@@ -0,0 +1,98 @@
+// Generated by widgets-generator. Do not edit manually.
+package org.jetbrains.kotlinx.jupyter.widget.library
+
+import org.jetbrains.kotlinx.jupyter.widget.WidgetManager
+import org.jetbrains.kotlinx.jupyter.widget.library.enums.ButtonStyle
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetFactory
+import org.jetbrains.kotlinx.jupyter.widget.model.DefaultWidgetModel
+import org.jetbrains.kotlinx.jupyter.widget.model.WidgetSpec
+import org.jetbrains.kotlinx.jupyter.widget.model.createAndRegisterWidget
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.ArrayType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.NullableType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.compound.RawObjectType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.enums.WidgetEnumEntry
+import org.jetbrains.kotlinx.jupyter.widget.model.types.enums.WidgetEnumType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.BooleanType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.primitive.StringType
+import org.jetbrains.kotlinx.jupyter.widget.model.types.widget.WidgetReferenceType
+
+private val fileUploadSpec = WidgetSpec(
+ modelName = "FileUploadModel",
+ modelModule = "@jupyter-widgets/controls",
+ modelModuleVersion = "2.0.0",
+ viewName = "FileUploadView",
+ viewModule = "@jupyter-widgets/controls",
+ viewModuleVersion = "2.0.0",
+)
+
+public fun WidgetManager.fileUpload(setup: FileUploadWidget.() -> Unit = {}): FileUploadWidget =
+ createAndRegisterWidget(FileUploadWidget.Factory).apply(setup)
+
+public class FileUploadWidget internal constructor(
+ widgetManager: WidgetManager,
+ fromFrontend: Boolean,
+) : DefaultWidgetModel(fileUploadSpec, widgetManager) {
+ internal object Factory : DefaultWidgetFactory(fileUploadSpec, ::FileUploadWidget)
+
+ /**
+ * CSS classes applied to widget DOM element
+ */
+ public var domClasses: List by prop("_dom_classes", ArrayType(StringType), emptyList())
+
+ /**
+ * File types to accept, empty string for all
+ */
+ public var accept: String by stringProp("accept", "")
+
+ /**
+ * Use a predefined styling for the button.
+ */
+ public var buttonStyle: WidgetEnumEntry by prop("button_style", WidgetEnumType(ButtonStyle, ButtonStyle.Default), ButtonStyle.Default)
+
+ /**
+ * Description of the control.
+ */
+ public var description: String by stringProp("description", "")
+
+ /**
+ * Accept HTML in the description.
+ */
+ public var descriptionAllowHtml: Boolean by boolProp("description_allow_html", false)
+
+ /**
+ * Enable or disable button
+ */
+ public var disabled: Boolean by boolProp("disabled", false)
+
+ /**
+ * Error message
+ */
+ public var error: String by stringProp("error", "")
+
+ /**
+ * Font-awesome icon name, without the 'fa-' prefix.
+ */
+ public var icon: String by stringProp("icon", "upload")
+ public var layout: LayoutWidget? by nullableWidgetProp("layout", if (fromFrontend) null else widgetManager.layout())
+
+ /**
+ * If True, allow for multiple files upload
+ */
+ public var multiple: Boolean by boolProp("multiple", false)
+ public var style: ButtonStyleWidget? by nullableWidgetProp("style", if (fromFrontend) null else widgetManager.buttonStyle())
+
+ /**
+ * Is widget tabbable?
+ */
+ public var tabbable: Boolean? by nullableBoolProp("tabbable", null)
+
+ /**
+ * A tooltip caption.
+ */
+ public var tooltip: String? by nullableStringProp("tooltip", null)
+
+ /**
+ * The file upload value
+ */
+ public var value: List