diff --git a/Cargo.lock b/Cargo.lock index e70356486b16ce06a2f46cda493253c2637b18fb..c282a360f85a35be7fb6aafb94a2d2c0b669e779 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -417,7 +417,6 @@ dependencies = [ "js-sys", "sys-locale", "unicode-segmentation", - "util", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -3182,14 +3181,6 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" -[[package]] -name = "util" -version = "0.1.0" -dependencies = [ - "bevy", - "bevy_cosmic_edit", -] - [[package]] name = "uuid" version = "1.7.0" diff --git a/Cargo.toml b/Cargo.toml index 2c425e21aa9fe12f9ddf1d57732b6403f91dc97c..a3d03582168743a3f35581eba5d1d64a7e84bcb4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,4 +1,3 @@ -workspace = { members = ["util"] } [package] name = "bevy_cosmic_edit" version = "0.19.0" @@ -52,4 +51,3 @@ web-sys = { version = "0.3.67", features = [ [dev-dependencies] insta = "1.29.0" -util = { path = "./util/" } diff --git a/src/lib.rs b/src/lib.rs index f877f2aae8b33865262b4980af3768ccad9605e2..2892bfdf92ba52253ef04857c36109cc65f3e0c7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,11 +2,12 @@ mod buffer; mod cursor; -pub mod focus; +mod focus; mod input; -pub mod password; -pub mod placeholder; +mod password; +mod placeholder; mod render; +pub mod util; mod widget; use std::{path::PathBuf, time::Duration}; diff --git a/util/src/lib.rs b/src/util.rs similarity index 98% rename from util/src/lib.rs rename to src/util.rs index e1e1dd1cb5a16a1422ad7e7dfc7a8c6dc26668bc..65d687ba7c32dd37aff3fe7dc0b62c0ef182a5c4 100644 --- a/util/src/lib.rs +++ b/src/util.rs @@ -1,6 +1,7 @@ // Common functions for examples use bevy::{prelude::*, window::PrimaryWindow}; -use bevy_cosmic_edit::{focus::FocusedWidget, *}; + +use crate::*; pub fn deselect_editor_on_esc(i: Res<ButtonInput<KeyCode>>, mut focus: ResMut<FocusedWidget>) { if i.just_pressed(KeyCode::Escape) { diff --git a/util/Cargo.toml b/util/Cargo.toml deleted file mode 100644 index 51de83365dfe6af657fa3258f3c808e5a1af1b7c..0000000000000000000000000000000000000000 --- a/util/Cargo.toml +++ /dev/null @@ -1,22 +0,0 @@ -[package] -name = "util" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -bevy = { version = "0.13", default-features = false, features = [ - "bevy_asset", - "bevy_core_pipeline", - "bevy_render", - "bevy_scene", - "bevy_sprite", - "bevy_text", - "bevy_ui", - "bevy_winit", - "png", - "x11", - "webgpu", -] } -bevy_cosmic_edit = { version = "*", path = "../" }