From c888f6c732acf2c18fb81bfe4ab1e72dc99d6dff Mon Sep 17 00:00:00 2001 From: Ante Date: Thu, 15 Oct 2026 14:24:16 +1100 Subject: [PATCH 1/4] bump dioxus to 0.8.0-alpha.2 --- Cargo.toml | 4 ++-- code-editor/Cargo.toml | 2 +- docsite/Cargo.toml | 2 +- examples/basic/Cargo.toml | 2 +- examples/editor/Cargo.toml | 2 +- examples/live-input/Cargo.toml | 2 +- examples/macro-only/Cargo.toml | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index eccfc62..cdd6f5d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -305,7 +305,7 @@ lang-zsh = ["runtime", "arborium/lang-zsh", "dioxus-code-macro?/lang-zsh"] arborium = { version = "2.16.0", default-features = false } arborium-theme = "2.16.0" arborium-tree-sitter = { version = "2.16.0", optional = true } -dioxus = { version = "=0.8.0-alpha.0", default-features = false, features = ["lib"] } +dioxus = { version = "=0.8.0-alpha.2", default-features = false, features = ["lib"] } dioxus-code-macro = { version = "0.1.0", path = "dioxus-code-macro", default-features = false, optional = true } betlang = { version = "0.1.0", optional = true } @@ -313,6 +313,6 @@ betlang = { version = "0.1.0", optional = true } arborium = { version = "2.16.0", default-features = false } [dev-dependencies] -dioxus = { version = "=0.8.0-alpha.0", features = ["ssr"] } +dioxus = { version = "=0.8.0-alpha.2", features = ["ssr"] } dioxus-code = { path = ".", features = ["runtime"] } dioxus-code-editor = { workspace = true } diff --git a/code-editor/Cargo.toml b/code-editor/Cargo.toml index 4eb83d6..e9c3a23 100644 --- a/code-editor/Cargo.toml +++ b/code-editor/Cargo.toml @@ -16,7 +16,7 @@ rustdoc-args = ["--cfg", "docsrs"] targets = ["x86_64-unknown-linux-gnu", "wasm32-unknown-unknown"] [dependencies] -dioxus = { version = "=0.8.0-alpha.0", default-features = false, features = ["lib"] } +dioxus = { version = "=0.8.0-alpha.2", default-features = false, features = ["lib"] } dioxus-code = { workspace = true, features = ["runtime"] } [target.'cfg(target_arch = "wasm32")'.dependencies] diff --git a/docsite/Cargo.toml b/docsite/Cargo.toml index 9393bda..f53d086 100644 --- a/docsite/Cargo.toml +++ b/docsite/Cargo.toml @@ -10,7 +10,7 @@ categories.workspace = true publish = false [dependencies] -dioxus = { version = "=0.8.0-alpha.0", features = ["router"] } +dioxus = { version = "=0.8.0-alpha.2", features = ["router"] } dioxus-code = { workspace = true, features = ["detection", "detectable-languages"] } dioxus-code-editor = { workspace = true, features = ["detection", "detectable-languages"] } dioxus-primitives = { git = "https://github.com/DioxusLabs/components", branch = "0.8", default-features = false, features = ["router"] } diff --git a/examples/basic/Cargo.toml b/examples/basic/Cargo.toml index 40fb777..de9b718 100644 --- a/examples/basic/Cargo.toml +++ b/examples/basic/Cargo.toml @@ -10,7 +10,7 @@ categories.workspace = true publish = false [dependencies] -dioxus = { version = "=0.8.0-alpha.0" } +dioxus = { version = "=0.8.0-alpha.2" } dioxus-code = { workspace = true, features = ["runtime"] } [features] diff --git a/examples/editor/Cargo.toml b/examples/editor/Cargo.toml index 8f40374..201e524 100644 --- a/examples/editor/Cargo.toml +++ b/examples/editor/Cargo.toml @@ -10,7 +10,7 @@ categories.workspace = true publish = false [dependencies] -dioxus = { version = "=0.8.0-alpha.0" } +dioxus = { version = "=0.8.0-alpha.2" } dioxus-code = { workspace = true, features = ["runtime"] } dioxus-code-editor = { workspace = true } diff --git a/examples/live-input/Cargo.toml b/examples/live-input/Cargo.toml index 5f9f35d..ff2a0d0 100644 --- a/examples/live-input/Cargo.toml +++ b/examples/live-input/Cargo.toml @@ -10,7 +10,7 @@ categories.workspace = true publish = false [dependencies] -dioxus = { version = "=0.8.0-alpha.0" } +dioxus = { version = "=0.8.0-alpha.2" } dioxus-code = { workspace = true, features = ["runtime"] } [features] diff --git a/examples/macro-only/Cargo.toml b/examples/macro-only/Cargo.toml index 9ac2411..462af25 100644 --- a/examples/macro-only/Cargo.toml +++ b/examples/macro-only/Cargo.toml @@ -10,7 +10,7 @@ categories.workspace = true publish = false [dependencies] -dioxus = { version = "=0.8.0-alpha.0" } +dioxus = { version = "=0.8.0-alpha.2" } dioxus-code = { workspace = true } [features] From 809c50c8063b18a92dfbf97f1f64d02711c7f0c5 Mon Sep 17 00:00:00 2001 From: Ante Date: Thu, 15 Oct 2026 14:34:02 +1100 Subject: [PATCH 2/4] update editor event attributes for dioxus 0.8 --- code-editor/src/edit_capture.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/code-editor/src/edit_capture.rs b/code-editor/src/edit_capture.rs index b363547..db40982 100644 --- a/code-editor/src/edit_capture.rs +++ b/code-editor/src/edit_capture.rs @@ -89,16 +89,15 @@ pub fn use_input_edit_attributes( mut on_value: impl FnMut(String) + 'static, ) -> Vec { let mount_tracker = tracker.clone(); - vec![ - onmounted(move |event: MountedEvent| { + Vec::::new() + .onmounted(move |event: MountedEvent| { mount_tracker.borrow_mut().mount(event); - }), - oninput(move |event: FormEvent| { + }) + .oninput(move |event: FormEvent| { let value = event.value(); tracker.borrow_mut().input(value.clone()); on_value(value); - }), - ] + }) } #[cfg(any(target_arch = "wasm32", test))] From c735c80f5f2183741b1695a5ee3be33dc31fa27f Mon Sep 17 00:00:00 2001 From: Ante Date: Thu, 15 Oct 2026 14:39:24 +1100 Subject: [PATCH 3/4] remove obsolete editor props example --- code-editor/src/lib.rs | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/code-editor/src/lib.rs b/code-editor/src/lib.rs index b6af587..733d7d0 100644 --- a/code-editor/src/lib.rs +++ b/code-editor/src/lib.rs @@ -22,16 +22,6 @@ mod edit_capture; pub const CODE_EDITOR_CSS: Asset = asset!("/assets/dioxus-code-editor.css"); /// Props for [`CodeEditor`]. -/// -/// ```rust,no_run -/// use dioxus_code::{CodeTheme, Theme}; -/// use dioxus_code_editor::{CodeEditorProps, Language}; -/// let _props = CodeEditorProps::builder() -/// .value("fn main() {}") -/// .language(Language::Rust) -/// .theme(CodeTheme::fixed(Theme::TOKYO_NIGHT)) -/// .build(); -/// ``` #[derive(Props, Clone, PartialEq)] pub struct CodeEditorProps { /// The current editor contents. From 2372137876e1061d82a2d99d2926fbe7ff7a33fe Mon Sep 17 00:00:00 2001 From: Ante Date: Thu, 15 Oct 2026 18:07:53 +1100 Subject: [PATCH 4/4] centralize dioxus workspace dependency --- Cargo.toml | 5 +++-- code-editor/Cargo.toml | 2 +- docsite/Cargo.toml | 2 +- examples/basic/Cargo.toml | 2 +- examples/editor/Cargo.toml | 2 +- examples/live-input/Cargo.toml | 2 +- examples/macro-only/Cargo.toml | 2 +- 7 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index cdd6f5d..f024250 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,6 +21,7 @@ keywords = ["dioxus", "code", "highlighting", "editor"] categories = ["gui", "web-programming"] [workspace.dependencies] +dioxus = { version = "=0.8.0-alpha.2", default-features = false, features = ["lib"] } dioxus-code = { version = "0.1.1", path = "." } dioxus-code-editor = { version = "0.1.2", path = "code-editor", default-features = false } @@ -305,7 +306,7 @@ lang-zsh = ["runtime", "arborium/lang-zsh", "dioxus-code-macro?/lang-zsh"] arborium = { version = "2.16.0", default-features = false } arborium-theme = "2.16.0" arborium-tree-sitter = { version = "2.16.0", optional = true } -dioxus = { version = "=0.8.0-alpha.2", default-features = false, features = ["lib"] } +dioxus.workspace = true dioxus-code-macro = { version = "0.1.0", path = "dioxus-code-macro", default-features = false, optional = true } betlang = { version = "0.1.0", optional = true } @@ -313,6 +314,6 @@ betlang = { version = "0.1.0", optional = true } arborium = { version = "2.16.0", default-features = false } [dev-dependencies] -dioxus = { version = "=0.8.0-alpha.2", features = ["ssr"] } +dioxus = { workspace = true, features = ["launch", "devtools", "logger", "ssr"] } dioxus-code = { path = ".", features = ["runtime"] } dioxus-code-editor = { workspace = true } diff --git a/code-editor/Cargo.toml b/code-editor/Cargo.toml index e9c3a23..bbcb430 100644 --- a/code-editor/Cargo.toml +++ b/code-editor/Cargo.toml @@ -16,7 +16,7 @@ rustdoc-args = ["--cfg", "docsrs"] targets = ["x86_64-unknown-linux-gnu", "wasm32-unknown-unknown"] [dependencies] -dioxus = { version = "=0.8.0-alpha.2", default-features = false, features = ["lib"] } +dioxus.workspace = true dioxus-code = { workspace = true, features = ["runtime"] } [target.'cfg(target_arch = "wasm32")'.dependencies] diff --git a/docsite/Cargo.toml b/docsite/Cargo.toml index f53d086..54c0c15 100644 --- a/docsite/Cargo.toml +++ b/docsite/Cargo.toml @@ -10,7 +10,7 @@ categories.workspace = true publish = false [dependencies] -dioxus = { version = "=0.8.0-alpha.2", features = ["router"] } +dioxus = { workspace = true, features = ["launch", "devtools", "logger", "router"] } dioxus-code = { workspace = true, features = ["detection", "detectable-languages"] } dioxus-code-editor = { workspace = true, features = ["detection", "detectable-languages"] } dioxus-primitives = { git = "https://github.com/DioxusLabs/components", branch = "0.8", default-features = false, features = ["router"] } diff --git a/examples/basic/Cargo.toml b/examples/basic/Cargo.toml index de9b718..2540586 100644 --- a/examples/basic/Cargo.toml +++ b/examples/basic/Cargo.toml @@ -10,7 +10,7 @@ categories.workspace = true publish = false [dependencies] -dioxus = { version = "=0.8.0-alpha.2" } +dioxus = { workspace = true, features = ["launch", "devtools", "logger"] } dioxus-code = { workspace = true, features = ["runtime"] } [features] diff --git a/examples/editor/Cargo.toml b/examples/editor/Cargo.toml index 201e524..1f43a94 100644 --- a/examples/editor/Cargo.toml +++ b/examples/editor/Cargo.toml @@ -10,7 +10,7 @@ categories.workspace = true publish = false [dependencies] -dioxus = { version = "=0.8.0-alpha.2" } +dioxus = { workspace = true, features = ["launch", "devtools", "logger"] } dioxus-code = { workspace = true, features = ["runtime"] } dioxus-code-editor = { workspace = true } diff --git a/examples/live-input/Cargo.toml b/examples/live-input/Cargo.toml index ff2a0d0..4b771a0 100644 --- a/examples/live-input/Cargo.toml +++ b/examples/live-input/Cargo.toml @@ -10,7 +10,7 @@ categories.workspace = true publish = false [dependencies] -dioxus = { version = "=0.8.0-alpha.2" } +dioxus = { workspace = true, features = ["launch", "devtools", "logger"] } dioxus-code = { workspace = true, features = ["runtime"] } [features] diff --git a/examples/macro-only/Cargo.toml b/examples/macro-only/Cargo.toml index 462af25..7bb1c92 100644 --- a/examples/macro-only/Cargo.toml +++ b/examples/macro-only/Cargo.toml @@ -10,7 +10,7 @@ categories.workspace = true publish = false [dependencies] -dioxus = { version = "=0.8.0-alpha.2" } +dioxus = { workspace = true, features = ["launch", "devtools", "logger"] } dioxus-code = { workspace = true } [features]