Rebrand to Galaxy, major improvements to Bedrock support, still needs some TLC though
This commit is contained in:
@@ -12,9 +12,9 @@ use std::{
|
||||
collections::{HashMap, HashSet},
|
||||
sync::Arc,
|
||||
};
|
||||
use warpui::keymap::{BindingId, IsBindingValid};
|
||||
use warpui::platform::OperatingSystem;
|
||||
use warpui::{
|
||||
use galaxyui::keymap::{BindingId, IsBindingValid};
|
||||
use galaxyui::platform::OperatingSystem;
|
||||
use galaxyui::{
|
||||
actions::StandardAction,
|
||||
keymap::{
|
||||
BindingDescription, BindingLens, CustomTag, DescriptionContext, EditableBindingLens,
|
||||
@@ -22,7 +22,7 @@ use warpui::{
|
||||
},
|
||||
Action,
|
||||
};
|
||||
use warpui::{AppContext, SingletonEntity};
|
||||
use galaxyui::{AppContext, SingletonEntity};
|
||||
|
||||
pub const MAC_MENUS_CONTEXT: DescriptionContext = DescriptionContext::Custom("mac_menus");
|
||||
|
||||
@@ -797,7 +797,7 @@ fn materialize_description(desc: &BindingDescription, ctx: &AppContext) -> Bindi
|
||||
|
||||
/// Possible groups a Binding can be part of. The string representation (produced in
|
||||
/// [`BindingGroup::as_str`]) is used as the group identifier within
|
||||
/// [`warpui::keymap::FixedBinding`] or [`EditableBinding`].
|
||||
/// [`galaxyui::keymap::FixedBinding`] or [`EditableBinding`].
|
||||
#[derive(Copy, Clone, Debug, Sequence)]
|
||||
pub enum BindingGroup {
|
||||
Settings,
|
||||
@@ -857,8 +857,8 @@ impl BindingGroup {
|
||||
/// framework and we can't easily produce the shift-modified version of the key ourselves. In this case the recommended
|
||||
/// solution is to to create separate [`Keystroke`]s for the Mac and non-Mac cases. For example:
|
||||
/// ```
|
||||
/// use warpui::keymap::Keystroke;
|
||||
/// use warpui::platform::OperatingSystem;
|
||||
/// use galaxyui::keymap::Keystroke;
|
||||
/// use galaxyui::platform::OperatingSystem;
|
||||
/// let keystroke = if OperatingSystem::get().is_mac() {
|
||||
/// Keystroke::parse("cmd-[")
|
||||
/// } else {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use warpui::platform::OperatingSystem;
|
||||
use warpui::{
|
||||
use galaxyui::platform::OperatingSystem;
|
||||
use galaxyui::{
|
||||
keymap::{EditableBinding, Keystroke, Trigger},
|
||||
App,
|
||||
};
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use std::borrow::Cow;
|
||||
|
||||
use itertools::Itertools;
|
||||
use warp_util::path::ShellFamily;
|
||||
use warpui::clipboard::ClipboardContent;
|
||||
use galaxy_util::path::ShellFamily;
|
||||
use galaxyui::clipboard::ClipboardContent;
|
||||
|
||||
/// Returns a string representation of the ClipboardContent with any paths properly escaped if there is a known shell. If not, do not escape the paths.
|
||||
pub fn clipboard_content_with_escaped_paths(
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
pub use warp_core::ui::color::contrast::*;
|
||||
pub use warp_core::ui::color::*;
|
||||
pub use galaxy_core::ui::color::contrast::*;
|
||||
pub use galaxy_core::ui::color::*;
|
||||
|
||||
@@ -4,8 +4,8 @@ use std::io;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
#[cfg(windows)]
|
||||
use warp_util::path::is_network_resource;
|
||||
use warp_util::path::{CleanPathResult, LineAndColumnArg};
|
||||
use galaxy_util::path::is_network_resource;
|
||||
use galaxy_util::path::{CleanPathResult, LineAndColumnArg};
|
||||
|
||||
use crate::terminal::model::grid::grid_handler::{ContainsPoint, Link};
|
||||
use crate::terminal::model::index::Point;
|
||||
|
||||
@@ -7,8 +7,8 @@ use std::{
|
||||
|
||||
use command::blocking::Command;
|
||||
use freedesktop_desktop_entry::DesktopEntry;
|
||||
use warp_util::path::LineAndColumnArg;
|
||||
use warpui::AppContext;
|
||||
use galaxy_util::path::LineAndColumnArg;
|
||||
use galaxyui::AppContext;
|
||||
|
||||
use super::Editor;
|
||||
|
||||
@@ -78,7 +78,7 @@ impl EditorMetadata {
|
||||
///
|
||||
/// ```ignore
|
||||
/// use std::path::PathBuf;
|
||||
/// use warp::util::file::external_editor::linux::EditorMetadata;
|
||||
/// use galaxy::util::file::external_editor::linux::EditorMetadata;
|
||||
///
|
||||
/// let desktop_file_path = PathBuf::from("/var/lib/snapd/desktop/applications/webstorm_webstorm.desktop");
|
||||
/// let metadata = EditorMetadata::try_new(desktop_file_path)?;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use warp_util::path::LineAndColumnArg;
|
||||
use galaxy_util::path::LineAndColumnArg;
|
||||
|
||||
use super::{DesktopExecError, EditorMetadata};
|
||||
use std::path::PathBuf;
|
||||
|
||||
@@ -9,7 +9,7 @@ use cocoa::{
|
||||
foundation::{NSAutoreleasePool, NSString},
|
||||
};
|
||||
use command::r#async::Command;
|
||||
use warpui::{platform::mac::make_nsstring, ApplicationBundleInfo};
|
||||
use galaxyui::{platform::mac::make_nsstring, ApplicationBundleInfo};
|
||||
|
||||
use super::*;
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@ use std::path::PathBuf;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
use settings::EditorChoice;
|
||||
use warp_util::path::LineAndColumnArg;
|
||||
use warpui::{AppContext, SingletonEntity};
|
||||
use galaxy_util::path::LineAndColumnArg;
|
||||
use galaxyui::{AppContext, SingletonEntity};
|
||||
|
||||
pub use self::settings::{EditorLayout, EditorSettings};
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use std::path::PathBuf;
|
||||
|
||||
use warp_util::path::LineAndColumnArg;
|
||||
use galaxy_util::path::LineAndColumnArg;
|
||||
|
||||
use super::generate_editor_command;
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ use enum_iterator::{all, cardinality};
|
||||
use std::collections::HashMap;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::sync::OnceLock;
|
||||
use warp_util::path::LineAndColumnArg;
|
||||
use warpui::AppContext;
|
||||
use galaxy_util::path::LineAndColumnArg;
|
||||
use galaxyui::AppContext;
|
||||
use winreg::enums::{HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE};
|
||||
use winreg::RegKey;
|
||||
use winreg::HKEY;
|
||||
|
||||
+2
-2
@@ -698,7 +698,7 @@ pub async fn get_diff_for_commit_message(
|
||||
continue;
|
||||
}
|
||||
let check_len = bytes.len().min(BINARY_CHECK_BYTES);
|
||||
if warp_util::file_type::is_buffer_binary(&bytes[..check_len]) {
|
||||
if galaxy_util::file_type::is_buffer_binary(&bytes[..check_len]) {
|
||||
continue;
|
||||
}
|
||||
let Ok(content) = std::str::from_utf8(&bytes) else {
|
||||
@@ -1055,7 +1055,7 @@ fn count_lines_if_text_file(path: &Path) -> u32 {
|
||||
return 0;
|
||||
};
|
||||
let check_len = content.len().min(BINARY_CHECK_SIZE);
|
||||
if warp_util::file_type::is_buffer_binary(&content[..check_len]) {
|
||||
if galaxy_util::file_type::is_buffer_binary(&content[..check_len]) {
|
||||
return 0;
|
||||
}
|
||||
bytecount::count(&content, b'\n') as u32
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use std::collections::HashMap;
|
||||
use std::ops::Range;
|
||||
use urlocator::{UrlLocation, UrlLocator};
|
||||
use warpui::elements::PartialClickableElement;
|
||||
use galaxyui::elements::PartialClickableElement;
|
||||
|
||||
use warpui::platform::Cursor;
|
||||
use galaxyui::platform::Cursor;
|
||||
|
||||
use crate::ai::agent::{AIAgentActionType, AIAgentOutput, AIAgentTextSection, ReadFilesRequest};
|
||||
use crate::ai::blocklist::block::view_impl::output::LinkActionConstructors;
|
||||
@@ -11,16 +11,16 @@ use crate::ai::blocklist::block::TextLocation;
|
||||
use crate::terminal::links::should_directly_open_link;
|
||||
use crate::terminal::model::grid::grid_handler::FILE_LINK_SEPARATORS;
|
||||
use crate::terminal::ShellLaunchData;
|
||||
use warpui::elements::MouseStateHandle;
|
||||
use warpui::text::char_slice;
|
||||
use warpui::Action;
|
||||
use galaxyui::elements::MouseStateHandle;
|
||||
use galaxyui::text::char_slice;
|
||||
use galaxyui::Action;
|
||||
|
||||
cfg_if::cfg_if! {
|
||||
if #[cfg(feature = "local_fs")] {
|
||||
use std::collections::HashSet;
|
||||
use std::path::Path;
|
||||
use std::path::PathBuf;
|
||||
use warp_util::path::CleanPathResult;
|
||||
use galaxy_util::path::CleanPathResult;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ pub(crate) enum DetectedLinkType {
|
||||
#[cfg(feature = "local_fs")]
|
||||
FilePath {
|
||||
absolute_path: PathBuf,
|
||||
line_and_column_num: Option<warp_util::path::LineAndColumnArg>,
|
||||
line_and_column_num: Option<galaxy_util::path::LineAndColumnArg>,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -356,7 +356,7 @@ pub(crate) fn detect_file_paths(
|
||||
// Create a new DetectedLinkType with the same file path but with the line number
|
||||
let line_range_link = DetectedLinkType::FilePath {
|
||||
absolute_path: absolute_path.clone(),
|
||||
line_and_column_num: Some(warp_util::path::LineAndColumnArg {
|
||||
line_and_column_num: Some(galaxy_util::path::LineAndColumnArg {
|
||||
line_num: line_number as usize,
|
||||
column_num: None,
|
||||
}),
|
||||
@@ -374,8 +374,8 @@ pub(crate) fn detect_file_paths(
|
||||
}
|
||||
|
||||
use string_offset::CharOffset;
|
||||
use warp_editor::content::buffer::Buffer;
|
||||
use warpui::text::word_boundaries::WordBoundariesPolicy;
|
||||
use galaxy_editor::content::buffer::Buffer;
|
||||
use galaxyui::text::word_boundaries::WordBoundariesPolicy;
|
||||
|
||||
/// Returns the range of the word surrounding the given offset.
|
||||
pub(crate) fn get_word_range_at_offset(
|
||||
@@ -383,9 +383,9 @@ pub(crate) fn get_word_range_at_offset(
|
||||
offset: CharOffset,
|
||||
word_boundary_policy: Option<WordBoundariesPolicy>,
|
||||
) -> Option<Range<CharOffset>> {
|
||||
use warp_editor::content::buffer::{ToBufferCharOffset, ToBufferPoint};
|
||||
use warpui::text::words::is_default_word_boundary;
|
||||
use warpui::text::TextBuffer;
|
||||
use galaxy_editor::content::buffer::{ToBufferCharOffset, ToBufferPoint};
|
||||
use galaxyui::text::words::is_default_word_boundary;
|
||||
use galaxyui::text::TextBuffer;
|
||||
|
||||
let word_boundary_policy = word_boundary_policy.unwrap_or(WordBoundariesPolicy::Default);
|
||||
let mut word_found_at: Option<CharOffset> = None;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
use crate::util::file::external_editor::{settings::EditorChoice, Editor, EditorSettings};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::path::Path;
|
||||
pub use warp_util::file_type::{is_binary_file, is_file_content_binary, is_markdown_file};
|
||||
pub use galaxy_util::file_type::{is_binary_file, is_file_content_binary, is_markdown_file};
|
||||
|
||||
#[derive(
|
||||
Debug,
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#[cfg(feature = "local_fs")]
|
||||
use std::path::Path;
|
||||
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
elements::{
|
||||
Border, Container, CornerRadius, Flex, MouseStateHandle, ParentElement, Radius, Text,
|
||||
},
|
||||
@@ -249,7 +249,7 @@ pub fn should_show_open_in_warp_link(path: &Path, app: &AppContext) -> bool {
|
||||
notebooks::file::is_markdown_file,
|
||||
util::file::external_editor::{settings::EditorChoice, EditorSettings},
|
||||
};
|
||||
use warpui::SingletonEntity;
|
||||
use galaxyui::SingletonEntity;
|
||||
|
||||
let settings = EditorSettings::as_ref(app);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ mod linux_only {
|
||||
pub(super) use pathfinder_color::ColorU;
|
||||
pub(super) use pathfinder_geometry::vector::vec2f;
|
||||
pub(super) use std::sync::Arc;
|
||||
pub(super) use warpui::elements::{
|
||||
pub(super) use galaxyui::elements::{
|
||||
Align, Border, ChildAnchor, ConstrainedBox, Container, CornerRadius, Flex, Hoverable, Icon,
|
||||
OffsetPositioning, ParentAnchor, ParentElement, ParentOffsetBounds, Radius, Rect, Stack,
|
||||
};
|
||||
@@ -27,8 +27,8 @@ mod windows_only {
|
||||
pub(super) use crate::ui_components::icons::Icon as IconComponent;
|
||||
pub(super) use pathfinder_color::ColorU;
|
||||
pub(super) use pathfinder_geometry::vector::vec2f;
|
||||
pub(super) use warp_core::ui::theme;
|
||||
pub(super) use warpui::elements::{
|
||||
pub(super) use galaxy_core::ui::theme;
|
||||
pub(super) use galaxyui::elements::{
|
||||
Align, Border, ChildAnchor, ConstrainedBox, Container, CornerRadius, Hoverable,
|
||||
OffsetPositioning, ParentAnchor, ParentOffsetBounds, Radius, Rect, Stack,
|
||||
};
|
||||
@@ -47,12 +47,12 @@ mod windows_only {
|
||||
use windows_only::*;
|
||||
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
use warpui::elements::Empty;
|
||||
use galaxyui::elements::Empty;
|
||||
|
||||
use crate::themes::theme::WarpTheme;
|
||||
use warpui::elements::MouseStateHandle;
|
||||
use warpui::platform::FullscreenState;
|
||||
use warpui::{AppContext, Element, WindowId};
|
||||
use galaxyui::elements::MouseStateHandle;
|
||||
use galaxyui::platform::FullscreenState;
|
||||
use galaxyui::{AppContext, Element, WindowId};
|
||||
|
||||
#[cfg(any(target_os = "windows", target_os = "linux"))]
|
||||
const BUTTON_ICON_SIZE: f32 = 22.;
|
||||
@@ -135,7 +135,7 @@ impl TrafficLightData {
|
||||
/// Horizontal space needed for the traffic light buttons.
|
||||
///
|
||||
/// Normally, we don't need to manually adjust any sizes based on zoom level as it is handled
|
||||
/// by warpui. However, native traffic light buttons (e.g. on macOS) don't scale with zoom, so
|
||||
/// by galaxyui. However, native traffic light buttons (e.g. on macOS) don't scale with zoom, so
|
||||
/// we need to divide by the zoom factor to keep the padding constant.
|
||||
pub fn width(&self, zoom_factor: f32) -> f32 {
|
||||
if self.scales_with_zoom {
|
||||
@@ -410,7 +410,7 @@ impl TrafficLightData {
|
||||
fn render_windows_close_button_icon(icon_color: ColorU) -> Box<dyn Element> {
|
||||
ConstrainedBox::new(
|
||||
IconComponent::X
|
||||
.to_warpui_icon(theme::Fill::Solid(icon_color))
|
||||
.to_galaxyui_icon(theme::Fill::Solid(icon_color))
|
||||
.finish(),
|
||||
)
|
||||
.with_height(16.)
|
||||
|
||||
@@ -6,14 +6,14 @@ use crate::util::traffic_lights::{TrafficLightData, TrafficLightMouseStates};
|
||||
use crate::workspace::TOTAL_TAB_BAR_HEIGHT;
|
||||
use pathfinder_color::ColorU;
|
||||
use std::sync::Arc;
|
||||
use warp_core::ui::theme::{Fill, WarpTheme};
|
||||
use warpui::elements::{
|
||||
use galaxy_core::ui::theme::{Fill, WarpTheme};
|
||||
use galaxyui::elements::{
|
||||
Align, ConstrainedBox, Container, CrossAxisAlignment, Flex, Hoverable, MainAxisAlignment,
|
||||
MainAxisSize, MouseStateHandle, ParentElement, Text,
|
||||
};
|
||||
use warpui::fonts::FamilyId;
|
||||
use warpui::platform::FullscreenState;
|
||||
use warpui::{AppContext, Element, SingletonEntity};
|
||||
use galaxyui::fonts::FamilyId;
|
||||
use galaxyui::platform::FullscreenState;
|
||||
use galaxyui::{AppContext, Element, SingletonEntity};
|
||||
|
||||
/// Possible window traffic light icons.
|
||||
#[derive(Copy, Clone)]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//! Module containing the definition of [`RendererState`].
|
||||
|
||||
use warpui::fonts::FamilyId;
|
||||
use warpui::{AppContext, Entity, ModelContext, SingletonEntity};
|
||||
use galaxyui::fonts::FamilyId;
|
||||
use galaxyui::{AppContext, Entity, ModelContext, SingletonEntity};
|
||||
|
||||
/// Helper singleton model that stores the icon font used to render native window controls on
|
||||
/// Windows. Using a symbol font (as opposed to SVGs) produces windows controls that are better
|
||||
@@ -33,7 +33,7 @@ impl RendererState {
|
||||
}
|
||||
|
||||
fn load_symbol_font(symbol_font_to_load: &str, ctx: &mut AppContext) -> Option<FamilyId> {
|
||||
warpui::fonts::Cache::handle(ctx).update(ctx, |font_cache, _| {
|
||||
galaxyui::fonts::Cache::handle(ctx).update(ctx, |font_cache, _| {
|
||||
match font_cache.get_or_load_system_font(symbol_font_to_load) {
|
||||
Ok(family) => Some(family),
|
||||
Err(err) => {
|
||||
|
||||
@@ -3,7 +3,7 @@ use std::path::{Path, PathBuf};
|
||||
use std::sync::LazyLock;
|
||||
use std::{env, path};
|
||||
|
||||
use warpui::{AppContext, SingletonEntity};
|
||||
use galaxyui::{AppContext, SingletonEntity};
|
||||
|
||||
use crate::system::SystemInfo;
|
||||
use crate::util::path::{file_exists_and_is_executable, resolve_executable};
|
||||
|
||||
Reference in New Issue
Block a user