Rebrand to Galaxy, major improvements to Bedrock support, still needs some TLC though
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use warpui::{AppContext, Entity, ModelContext, SingletonEntity};
|
||||
use galaxyui::{AppContext, Entity, ModelContext, SingletonEntity};
|
||||
|
||||
use crate::{
|
||||
ai::document::ai_document_model::AIDocumentId,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
//! Shared context menu implementation for notebooks.
|
||||
|
||||
use pathfinder_geometry::vector::Vector2F;
|
||||
use warp_core::context_flag::ContextFlag;
|
||||
use warpui::{
|
||||
use galaxy_core::context_flag::ContextFlag;
|
||||
use galaxyui::{
|
||||
elements::{ChildAnchor, OffsetPositioning, ParentAnchor, ParentOffsetBounds, Stack},
|
||||
keymap::Trigger,
|
||||
presenter::ChildView,
|
||||
@@ -248,7 +248,7 @@ where
|
||||
|
||||
#[cfg(test)]
|
||||
/// List out the context menu items by name.
|
||||
pub fn item_names<'a>(&self, ctx: &'a impl warpui::ViewAsRef) -> Vec<&'a str> {
|
||||
pub fn item_names<'a>(&self, ctx: &'a impl galaxyui::ViewAsRef) -> Vec<&'a str> {
|
||||
self.menu
|
||||
.as_ref(ctx)
|
||||
.items()
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use string_offset::ByteOffset;
|
||||
use warp_core::ui::appearance::Appearance;
|
||||
use warp_editor::model::CoreEditorModel;
|
||||
use warpui::{platform::WindowStyle, App};
|
||||
use galaxy_core::ui::appearance::Appearance;
|
||||
use galaxy_editor::model::CoreEditorModel;
|
||||
use galaxyui::{platform::WindowStyle, App};
|
||||
|
||||
use crate::search::files::model::FileSearchModel;
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
use warp_editor::content::text::BufferBlockItem;
|
||||
use warpui::{
|
||||
use galaxy_editor::content::text::BufferBlockItem;
|
||||
use galaxyui::{
|
||||
elements::{
|
||||
AnchorPair, Border, Container, CornerRadius, MouseStateHandle, OffsetPositioning,
|
||||
OffsetType, PositionedElementOffsetBounds, PositioningAxis, Radius, SavePosition, Stack,
|
||||
@@ -98,7 +98,7 @@ impl BlockInsertionMenuState {
|
||||
MenuItemFields::new(block_type.label())
|
||||
.with_icon(block_type.icon())
|
||||
.with_on_select_action(EditorViewAction::InsertBlock(
|
||||
warp_editor::content::text::BlockType::Text(block_type.into()),
|
||||
galaxy_editor::content::text::BlockType::Text(block_type.into()),
|
||||
))
|
||||
.into_item(),
|
||||
);
|
||||
@@ -117,7 +117,7 @@ impl BlockInsertionMenuState {
|
||||
let mut item_fields = MenuItemFields::new(block_type.label())
|
||||
.with_icon(block_type.icon())
|
||||
.with_on_select_action(EditorViewAction::InsertBlock(
|
||||
warp_editor::content::text::BlockType::Text(block_type.into()),
|
||||
galaxy_editor::content::text::BlockType::Text(block_type.into()),
|
||||
));
|
||||
if let Some(icon_fill) = block_type.icon_color(appearance) {
|
||||
item_fields = item_fields.with_override_icon_color(icon_fill);
|
||||
@@ -129,7 +129,7 @@ impl BlockInsertionMenuState {
|
||||
MenuItemFields::new("Divider")
|
||||
.with_icon(Icon::HorizontalRuleBlock)
|
||||
.with_on_select_action(EditorViewAction::InsertBlock(
|
||||
warp_editor::content::text::BlockType::Item(BufferBlockItem::HorizontalRule),
|
||||
galaxy_editor::content::text::BlockType::Item(BufferBlockItem::HorizontalRule),
|
||||
))
|
||||
.with_override_icon_color(Fill::Solid(appearance.theme().ui_warning_color()))
|
||||
.into_item(),
|
||||
@@ -222,7 +222,7 @@ impl RichTextEditorView {
|
||||
/// Insert an embedded workflow block at the current insertion menu source.
|
||||
fn insert_embedded_workflow(&mut self, id: &SyncId, ctx: &mut ViewContext<Self>) {
|
||||
self.insert_block(
|
||||
warp_editor::content::text::BlockType::Item(BufferBlockItem::Embedded {
|
||||
galaxy_editor::content::text::BlockType::Item(BufferBlockItem::Embedded {
|
||||
item: Arc::new(EmbeddedWorkflow::new(
|
||||
id.sqlite_uid_hash(ObjectIdType::Workflow),
|
||||
)),
|
||||
|
||||
@@ -6,8 +6,8 @@ use pathfinder_color::ColorU;
|
||||
use pathfinder_geometry::vector::{vec2f, Vector2F};
|
||||
use serde_yaml::Mapping;
|
||||
use string_offset::ByteOffset;
|
||||
use warp_core::ui::appearance::Appearance;
|
||||
use warp_editor::{
|
||||
use galaxy_core::ui::appearance::Appearance;
|
||||
use galaxy_editor::{
|
||||
content::{markdown::MarkdownStyle, text::TextStylesWithMetadata},
|
||||
editor::EmbeddedItemModel,
|
||||
extract_block,
|
||||
@@ -22,11 +22,11 @@ use warp_editor::{
|
||||
BLOCK_FOOTER_HEIGHT,
|
||||
},
|
||||
};
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
elements::{Border, Empty},
|
||||
SingletonEntity,
|
||||
};
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
elements::{ConstrainedBox, CornerRadius, Margin, Padding, Radius},
|
||||
text_layout::TextFrame,
|
||||
units::{IntoPixels, Pixels},
|
||||
@@ -467,7 +467,7 @@ impl RenderableEmbeddedWorkflow {
|
||||
)
|
||||
};
|
||||
let workflow_icon = ConstrainedBox::new(
|
||||
icon.to_warpui_icon(icon_color.into())
|
||||
icon.to_galaxyui_icon(icon_color.into())
|
||||
.with_opacity(1.0)
|
||||
.finish(),
|
||||
)
|
||||
@@ -616,7 +616,7 @@ impl RenderableBlock for RenderableEmbeddedWorkflow {
|
||||
);
|
||||
}
|
||||
|
||||
ctx.paint.scene.start_layer(warpui::ClipBounds::ActiveLayer);
|
||||
ctx.paint.scene.start_layer(galaxyui::ClipBounds::ActiveLayer);
|
||||
|
||||
// Position the block footer right below the content area, flush with its right-hand edge.
|
||||
// This gives the footer some padding relative to the visible area with a background.
|
||||
@@ -631,15 +631,15 @@ impl RenderableBlock for RenderableEmbeddedWorkflow {
|
||||
ctx.paint.scene.stop_layer();
|
||||
}
|
||||
|
||||
fn after_layout(&mut self, ctx: &mut warpui::AfterLayoutContext, app: &warpui::AppContext) {
|
||||
fn after_layout(&mut self, ctx: &mut galaxyui::AfterLayoutContext, app: &galaxyui::AppContext) {
|
||||
self.footer.after_layout(ctx, app);
|
||||
}
|
||||
|
||||
fn dispatch_event(
|
||||
&mut self,
|
||||
_model: &warp_editor::render::model::RenderState,
|
||||
event: &warpui::event::DispatchedEvent,
|
||||
ctx: &mut warpui::EventContext,
|
||||
_model: &galaxy_editor::render::model::RenderState,
|
||||
event: &galaxyui::event::DispatchedEvent,
|
||||
ctx: &mut galaxyui::EventContext,
|
||||
app: &AppContext,
|
||||
) -> bool {
|
||||
self.footer.dispatch_event(event, ctx, app)
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
use std::{borrow::Cow, mem, ops::Range, sync::Arc};
|
||||
|
||||
use string_offset::{ByteOffset, CharOffset};
|
||||
use warp_completer::signatures::CommandRegistry;
|
||||
use warp_editor::{
|
||||
use galaxy_completer::signatures::CommandRegistry;
|
||||
use galaxy_editor::{
|
||||
content::{anchor::Anchor, buffer::Buffer, selection_model::BufferSelectionModel},
|
||||
editor::EmbeddedItemModel,
|
||||
};
|
||||
use warp_util::user_input::UserInput;
|
||||
use warpui::{
|
||||
use galaxy_util::user_input::UserInput;
|
||||
use galaxyui::{
|
||||
elements::{
|
||||
Align, Border, Container, CrossAxisAlignment, Empty, Flex, MainAxisAlignment,
|
||||
MouseStateHandle, ParentElement, Shrinkable,
|
||||
|
||||
@@ -2,11 +2,11 @@ use std::{fmt::Write, time::Duration};
|
||||
|
||||
use async_channel::Sender;
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use warp_editor::{
|
||||
use galaxy_editor::{
|
||||
render::model::{AutoScrollMode, Decoration},
|
||||
search::{SearchEvent, Searcher},
|
||||
};
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
accessibility::{AccessibilityContent, ActionAccessibilityContent, WarpA11yRole},
|
||||
elements::{
|
||||
Border, ChildAnchor, Clipped, ConstrainedBox, Container, CornerRadius, CrossAxisAlignment,
|
||||
@@ -259,7 +259,7 @@ impl FindBar {
|
||||
.ui_builder()
|
||||
.button(ButtonVariant::Text, mouse_state_handle)
|
||||
// The fill here doesn't matter, since it's overridden by the button text color.
|
||||
.with_icon_label(icon.to_warpui_icon(crate::themes::theme::Fill::white()))
|
||||
.with_icon_label(icon.to_galaxyui_icon(crate::themes::theme::Fill::white()))
|
||||
.with_style(base_styles)
|
||||
.with_hovered_styles(UiComponentStyles {
|
||||
background: Some(appearance.theme().foreground_button_color().into()),
|
||||
@@ -356,7 +356,7 @@ impl View for FindBar {
|
||||
"FindBar"
|
||||
}
|
||||
|
||||
fn render(&self, app: &warpui::AppContext) -> Box<dyn warpui::Element> {
|
||||
fn render(&self, app: &galaxyui::AppContext) -> Box<dyn galaxyui::Element> {
|
||||
let appearance = Appearance::as_ref(app);
|
||||
let searcher = self.searcher.as_ref(app);
|
||||
let theme = appearance.theme();
|
||||
@@ -364,7 +364,7 @@ impl View for FindBar {
|
||||
let has_matches = searcher.match_count() > 0;
|
||||
|
||||
let find_icon = Container::new(
|
||||
ConstrainedBox::new(Icon::Find.to_warpui_icon(theme.active_ui_detail()).finish())
|
||||
ConstrainedBox::new(Icon::Find.to_galaxyui_icon(theme.active_ui_detail()).finish())
|
||||
.with_height(editor_height)
|
||||
.with_width(editor_height)
|
||||
.finish(),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use warpui::{Entity, ModelContext};
|
||||
use galaxyui::{Entity, ModelContext};
|
||||
|
||||
use crate::editor::InteractionState;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//! Utilities for notebook keybindings.
|
||||
|
||||
use warpui::{Entity, ModelContext, SingletonEntity};
|
||||
use galaxyui::{Entity, ModelContext, SingletonEntity};
|
||||
|
||||
use crate::{
|
||||
settings_view::keybindings::{KeybindingChangedEvent, KeybindingChangedNotifier},
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use warp_editor::{editor::NavigationKey, model::RichTextEditorModel, render::model::RenderState};
|
||||
use warpui::{
|
||||
use galaxy_editor::{editor::NavigationKey, model::RichTextEditorModel, render::model::RenderState};
|
||||
use galaxyui::{
|
||||
elements::{
|
||||
AnchorPair, Container, Flex, MouseStateHandle, OffsetPositioning, OffsetType,
|
||||
ParentElement, PositionedElementOffsetBounds, PositioningAxis, XAxisAnchor, YAxisAnchor,
|
||||
@@ -201,7 +201,7 @@ impl View for LinkEditor {
|
||||
}
|
||||
}
|
||||
|
||||
fn render(&self, app: &warpui::AppContext) -> Box<dyn Element> {
|
||||
fn render(&self, app: &galaxyui::AppContext) -> Box<dyn Element> {
|
||||
let appearance = Appearance::as_ref(app);
|
||||
let mut editors = Flex::column();
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@ use std::sync::Arc;
|
||||
|
||||
use markdown_parser::markdown_parser::CODE_BLOCK_DEFAULT_MARKDOWN_LANG;
|
||||
use pathfinder_color::ColorU;
|
||||
use warp_core::ui::{builder::CHECK_SVG_PATH, theme::color::internal_colors};
|
||||
use warp_editor::{
|
||||
use galaxy_core::ui::{builder::CHECK_SVG_PATH, theme::color::internal_colors};
|
||||
use galaxy_editor::{
|
||||
content::text::{
|
||||
BlockHeaderSize, BlockType as ContentBlockType, BufferBlockStyle, CodeBlockType,
|
||||
},
|
||||
@@ -14,8 +14,8 @@ use warp_editor::{
|
||||
ParagraphStyles, RichTextStyles, TableStyle, PARAGRAPH_MIN_HEIGHT,
|
||||
},
|
||||
};
|
||||
use warp_util::user_input::UserInput;
|
||||
use warpui::{elements::Border, fonts::FamilyId, ui_components::checkbox::HOVER_BACKGROUND_COLOR};
|
||||
use galaxy_util::user_input::UserInput;
|
||||
use galaxyui::{elements::Border, fonts::FamilyId, ui_components::checkbox::HOVER_BACKGROUND_COLOR};
|
||||
|
||||
use crate::{
|
||||
appearance::Appearance,
|
||||
@@ -40,7 +40,7 @@ mod omnibar;
|
||||
pub mod view;
|
||||
|
||||
pub use block_insertion_menu::BlockInsertionSource;
|
||||
use warpui::elements::ListIndentLevel;
|
||||
use galaxyui::elements::ListIndentLevel;
|
||||
|
||||
const NOTEBOOK_LINE_HEIGHT_RATIO: f32 = 1.6;
|
||||
const NOTEBOOK_BASELINE_RATIO: f32 = 0.7;
|
||||
|
||||
@@ -9,7 +9,7 @@ use num_traits::SaturatingSub;
|
||||
use regex::Regex;
|
||||
use url::Url;
|
||||
use vec1::{vec1, Vec1};
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
accessibility::{AccessibilityContent, ActionAccessibilityContent, WarpA11yRole},
|
||||
clipboard::ClipboardContent,
|
||||
AppContext, Entity, ModelAsRef, ModelContext, ModelHandle, SingletonEntity, WindowId,
|
||||
@@ -26,14 +26,14 @@ use crate::{
|
||||
terminal::ShellLaunchData,
|
||||
};
|
||||
use string_offset::CharOffset;
|
||||
use warp_core::features::FeatureFlag;
|
||||
use warp_core::semantic_selection::SemanticSelection;
|
||||
use warp_editor::{
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxy_core::semantic_selection::SemanticSelection;
|
||||
use galaxy_editor::{
|
||||
content::{buffer::ShouldAutoscroll, selection_model::BufferSelectionModel},
|
||||
model::BufferUpdateWrapper,
|
||||
render::model::{BlockItem, StyleUpdateAction},
|
||||
};
|
||||
use warp_editor::{
|
||||
use galaxy_editor::{
|
||||
content::{
|
||||
buffer::{
|
||||
AutoScrollBehavior, Buffer, BufferEditAction, BufferEvent, BufferSelectAction,
|
||||
@@ -49,7 +49,7 @@ use warp_editor::{
|
||||
search::Searcher,
|
||||
selection::{SelectionMode, SelectionModel, TextDirection, TextUnit},
|
||||
};
|
||||
use warpui::elements::ListIndentLevel;
|
||||
use galaxyui::elements::ListIndentLevel;
|
||||
|
||||
use super::{
|
||||
super::telemetry::SelectionMode as TelemetrySelectionMode, embedding_model::NotebookEmbed,
|
||||
|
||||
@@ -37,21 +37,21 @@ use markdown_parser::{
|
||||
use pathfinder_geometry::vector::Vector2F;
|
||||
use string_offset::CharOffset;
|
||||
use vec1::vec1;
|
||||
use warp_core::features::FeatureFlag;
|
||||
use warp_editor::content::buffer::{AutoScrollBehavior, BufferSelectAction, SelectionOffsets};
|
||||
use warp_editor::content::text::{BlockType, BufferBlockStyle, CodeBlockType, TextStyles};
|
||||
use warp_editor::model::{CoreEditorModel, RichTextEditorModel};
|
||||
use warp_editor::render::model::viewport::SizeInfo;
|
||||
use warp_editor::render::model::BlockItem;
|
||||
use warp_editor::render::model::RenderEvent;
|
||||
use warp_editor::selection::{TextDirection, TextUnit};
|
||||
use warpui::elements::ListIndentLevel;
|
||||
use warpui::platform::WindowStyle;
|
||||
use warpui::presenter::ChildView;
|
||||
use warpui::r#async::{block_on, FutureId};
|
||||
use warpui::text::word_boundaries::WordBoundariesPolicy;
|
||||
use warpui::{r#async::Timer, App, Entity, ModelHandle, SingletonEntity, TypedActionView};
|
||||
use warpui::{AddSingletonModel, AppContext, Element, View, ViewHandle};
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxy_editor::content::buffer::{AutoScrollBehavior, BufferSelectAction, SelectionOffsets};
|
||||
use galaxy_editor::content::text::{BlockType, BufferBlockStyle, CodeBlockType, TextStyles};
|
||||
use galaxy_editor::model::{CoreEditorModel, RichTextEditorModel};
|
||||
use galaxy_editor::render::model::viewport::SizeInfo;
|
||||
use galaxy_editor::render::model::BlockItem;
|
||||
use galaxy_editor::render::model::RenderEvent;
|
||||
use galaxy_editor::selection::{TextDirection, TextUnit};
|
||||
use galaxyui::elements::ListIndentLevel;
|
||||
use galaxyui::platform::WindowStyle;
|
||||
use galaxyui::presenter::ChildView;
|
||||
use galaxyui::r#async::{block_on, FutureId};
|
||||
use galaxyui::text::word_boundaries::WordBoundariesPolicy;
|
||||
use galaxyui::{r#async::Timer, App, Entity, ModelHandle, SingletonEntity, TypedActionView};
|
||||
use galaxyui::{AddSingletonModel, AppContext, Element, View, ViewHandle};
|
||||
|
||||
/// Container for a [`RichTextEditorView`] in unit tests.
|
||||
struct TestView {
|
||||
@@ -67,7 +67,7 @@ impl View for TestView {
|
||||
"TestView"
|
||||
}
|
||||
|
||||
fn render(&self, _app: &warpui::AppContext) -> Box<dyn warpui::Element> {
|
||||
fn render(&self, _app: &galaxyui::AppContext) -> Box<dyn galaxyui::Element> {
|
||||
ChildView::new(&self.editor).finish()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,8 +11,8 @@ use syntect::{
|
||||
parsing::SyntaxSet,
|
||||
util::LinesWithEndings,
|
||||
};
|
||||
use warp_completer::signatures::CommandRegistry;
|
||||
use warp_editor::{
|
||||
use galaxy_completer::signatures::CommandRegistry;
|
||||
use galaxy_editor::{
|
||||
content::{
|
||||
anchor::Anchor,
|
||||
buffer::{Buffer, BufferEvent, EditOrigin},
|
||||
@@ -26,9 +26,9 @@ use warp_editor::{
|
||||
};
|
||||
|
||||
use markdown_parser::markdown_parser::CODE_BLOCK_DEFAULT_MARKDOWN_LANG;
|
||||
use warp_util::user_input::UserInput;
|
||||
use warpui::{elements::Align, r#async::SpawnedFutureHandle, AppContext};
|
||||
use warpui::{
|
||||
use galaxy_util::user_input::UserInput;
|
||||
use galaxyui::{elements::Align, r#async::SpawnedFutureHandle, AppContext};
|
||||
use galaxyui::{
|
||||
elements::{
|
||||
Border, Container, CrossAxisAlignment, Empty, Flex, MainAxisAlignment, MouseStateHandle,
|
||||
ParentElement, Shrinkable, Text,
|
||||
@@ -603,7 +603,7 @@ impl RunnableCommandModel for NotebookCommand {
|
||||
appearance.ui_font_size(),
|
||||
)
|
||||
.with_style(Properties {
|
||||
weight: warpui::fonts::Weight::Light,
|
||||
weight: galaxyui::fonts::Weight::Light,
|
||||
..Default::default()
|
||||
})
|
||||
.with_color(
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
use itertools::Itertools;
|
||||
use pathfinder_geometry::{rect::RectF, vector::Vector2F};
|
||||
use warp_editor::{
|
||||
use galaxy_editor::{
|
||||
content::text::{
|
||||
BlockType as ContentBlockType, BufferBlockStyle, BufferTextStyle, TextStyles,
|
||||
TextStylesWithMetadata,
|
||||
@@ -11,7 +11,7 @@ use warp_editor::{
|
||||
model::RichTextEditorModel,
|
||||
render::model::RenderState,
|
||||
};
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
accessibility::{AccessibilityContent, ActionAccessibilityContent, WarpA11yRole},
|
||||
elements::{
|
||||
AnchorPair, Border, ConstrainedBox, Container, CornerRadius, DropShadow, Flex,
|
||||
@@ -263,7 +263,7 @@ impl View for Omnibar {
|
||||
"Omnibar"
|
||||
}
|
||||
|
||||
fn render(&self, app: &warpui::AppContext) -> Box<dyn Element> {
|
||||
fn render(&self, app: &galaxyui::AppContext) -> Box<dyn Element> {
|
||||
let appearance = Appearance::as_ref(app);
|
||||
let mut actions = Flex::row().with_main_axis_size(MainAxisSize::Min);
|
||||
|
||||
@@ -488,9 +488,9 @@ impl Compact {
|
||||
impl Element for Compact {
|
||||
fn layout(
|
||||
&mut self,
|
||||
constraint: warpui::SizeConstraint,
|
||||
ctx: &mut warpui::LayoutContext,
|
||||
app: &warpui::AppContext,
|
||||
constraint: galaxyui::SizeConstraint,
|
||||
ctx: &mut galaxyui::LayoutContext,
|
||||
app: &galaxyui::AppContext,
|
||||
) -> Vector2F {
|
||||
self.child.layout(
|
||||
SizeConstraint {
|
||||
@@ -505,8 +505,8 @@ impl Element for Compact {
|
||||
fn paint(
|
||||
&mut self,
|
||||
origin: Vector2F,
|
||||
ctx: &mut warpui::PaintContext,
|
||||
app: &warpui::AppContext,
|
||||
ctx: &mut galaxyui::PaintContext,
|
||||
app: &galaxyui::AppContext,
|
||||
) {
|
||||
self.child.paint(origin, ctx, app)
|
||||
}
|
||||
@@ -521,18 +521,18 @@ impl Element for Compact {
|
||||
|
||||
fn dispatch_event(
|
||||
&mut self,
|
||||
event: &warpui::event::DispatchedEvent,
|
||||
ctx: &mut warpui::EventContext,
|
||||
app: &warpui::AppContext,
|
||||
event: &galaxyui::event::DispatchedEvent,
|
||||
ctx: &mut galaxyui::EventContext,
|
||||
app: &galaxyui::AppContext,
|
||||
) -> bool {
|
||||
self.child.dispatch_event(event, ctx, app)
|
||||
}
|
||||
|
||||
fn after_layout(&mut self, ctx: &mut warpui::AfterLayoutContext, app: &AppContext) {
|
||||
fn after_layout(&mut self, ctx: &mut galaxyui::AfterLayoutContext, app: &AppContext) {
|
||||
self.child.after_layout(ctx, app)
|
||||
}
|
||||
|
||||
fn z_index(&self) -> Option<warpui::elements::ZIndex> {
|
||||
fn z_index(&self) -> Option<galaxyui::elements::ZIndex> {
|
||||
self.child.z_index()
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ use std::{
|
||||
use markdown_parser::{parse_html, parse_markdown, FormattedText};
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use string_offset::CharOffset;
|
||||
use warp_editor::{
|
||||
use galaxy_editor::{
|
||||
content::{
|
||||
anchor::Anchor,
|
||||
text::{BufferTextStyle, CodeBlockType, TextStyles},
|
||||
@@ -26,8 +26,8 @@ use warp_editor::{
|
||||
selection::{TextDirection, TextUnit},
|
||||
};
|
||||
|
||||
use warp_util::{path::LineAndColumnArg, user_input::UserInput};
|
||||
use warpui::{
|
||||
use galaxy_util::{path::LineAndColumnArg, user_input::UserInput};
|
||||
use galaxyui::{
|
||||
accessibility::{AccessibilityContent, ActionAccessibilityContent, WarpA11yRole},
|
||||
assets::asset_cache::{AssetCache, AssetHandle, AssetState},
|
||||
clipboard::ClipboardContent,
|
||||
@@ -52,8 +52,8 @@ use warpui::{
|
||||
windowing, AppContext, BlurContext, CursorInfo, Element, Entity, FocusContext, ModelHandle,
|
||||
SingletonEntity, TypedActionView, View, ViewContext, ViewHandle, WeakViewHandle,
|
||||
};
|
||||
use warpui::{actions::StandardAction, elements::Hoverable};
|
||||
use warpui::{keymap::PerPlatformKeystroke, windowing::WindowManager};
|
||||
use galaxyui::{actions::StandardAction, elements::Hoverable};
|
||||
use galaxyui::{keymap::PerPlatformKeystroke, windowing::WindowManager};
|
||||
|
||||
use crate::{
|
||||
appearance::Appearance,
|
||||
@@ -80,7 +80,7 @@ use crate::{
|
||||
use crate::util::link_detection::{detect_file_paths, get_word_range_at_offset, DetectedLinkType};
|
||||
|
||||
#[cfg(feature = "local_fs")]
|
||||
use warpui::text::word_boundaries::WordBoundariesPolicy;
|
||||
use galaxyui::text::word_boundaries::WordBoundariesPolicy;
|
||||
|
||||
use super::{
|
||||
block_insertion_menu::{BlockInsertionMenuState, BlockInsertionSource},
|
||||
@@ -103,7 +103,7 @@ const MAX_EDITOR_TIP_WIDTH: f32 = 300.;
|
||||
const GUTTER_WIDTH: f32 = ICON_DIMENSIONS + 4.;
|
||||
|
||||
pub fn init(app: &mut AppContext) {
|
||||
use warpui::keymap::macros::*;
|
||||
use galaxyui::keymap::macros::*;
|
||||
|
||||
// Context for text entry/navigation/selection:
|
||||
// - The editor is focused
|
||||
@@ -847,7 +847,7 @@ pub enum EditorViewAction {
|
||||
Redo,
|
||||
OpenBlockInsertionMenu,
|
||||
/// Insert a block of the given type after the hovered location.
|
||||
InsertBlock(warp_editor::content::text::BlockType),
|
||||
InsertBlock(galaxy_editor::content::text::BlockType),
|
||||
Indent,
|
||||
Unindent,
|
||||
Tab,
|
||||
@@ -1977,7 +1977,7 @@ impl RichTextEditorView {
|
||||
/// Inserts a new `block_type` block after the hovered block.
|
||||
pub(super) fn insert_block(
|
||||
&mut self,
|
||||
block_type: warp_editor::content::text::BlockType,
|
||||
block_type: galaxy_editor::content::text::BlockType,
|
||||
ctx: &mut ViewContext<Self>,
|
||||
) {
|
||||
enum InsertionMode {
|
||||
@@ -2030,7 +2030,7 @@ impl RichTextEditorView {
|
||||
model.insert_block_after(insertion_offset + 1, block_type, ctx);
|
||||
}
|
||||
InsertionMode::DeleteSlashAndRestyleLine(cursor_position) => match block_type {
|
||||
warp_editor::content::text::BlockType::Item(item) => {
|
||||
galaxy_editor::content::text::BlockType::Item(item) => {
|
||||
// Set one more offset position to the left to avoid additional linebreaks.
|
||||
// Note: We can use `set_last_selection_head` because the menu cannot
|
||||
// be opened when there are multiple selections.
|
||||
@@ -2038,7 +2038,7 @@ impl RichTextEditorView {
|
||||
model.insert_block_item(item, ctx);
|
||||
model.cursor_at(cursor_position + 1, ctx);
|
||||
}
|
||||
warp_editor::content::text::BlockType::Text(style) => {
|
||||
galaxy_editor::content::text::BlockType::Text(style) => {
|
||||
// Note: We can use `set_last_selection_head` because the menu cannot
|
||||
// be opened when there are multiple selections.
|
||||
model.set_last_selection_head(cursor_position, ctx);
|
||||
@@ -2409,7 +2409,7 @@ impl RichTextEditorView {
|
||||
appearance: &Appearance,
|
||||
ctx: &AppContext,
|
||||
) -> Box<dyn Element> {
|
||||
use warpui::EventContext;
|
||||
use galaxyui::EventContext;
|
||||
type FilePathTooltipLinks = Vec<TooltipLink<Box<dyn Fn(&mut EventContext)>>>;
|
||||
|
||||
let path = selected_file_path.path.clone();
|
||||
@@ -2647,7 +2647,7 @@ impl View for RichTextEditorView {
|
||||
stack.finish()
|
||||
}
|
||||
|
||||
fn active_cursor_position(&self, ctx: &ViewContext<Self>) -> Option<warpui::CursorInfo> {
|
||||
fn active_cursor_position(&self, ctx: &ViewContext<Self>) -> Option<galaxyui::CursorInfo> {
|
||||
let model = self.model.as_ref(ctx);
|
||||
let render_state = model.render_state().as_ref(ctx);
|
||||
let font_size = model.cursor_font_size(ctx);
|
||||
@@ -2658,7 +2658,7 @@ impl View for RichTextEditorView {
|
||||
})
|
||||
}
|
||||
|
||||
fn keymap_context(&self, ctx: &AppContext) -> warpui::keymap::Context {
|
||||
fn keymap_context(&self, ctx: &AppContext) -> galaxyui::keymap::Context {
|
||||
let mut context = Self::default_keymap_context();
|
||||
|
||||
if self.is_editable(ctx) {
|
||||
@@ -3222,7 +3222,7 @@ impl TypedActionView for RichTextEditorView {
|
||||
}
|
||||
}
|
||||
|
||||
impl warp_editor::editor::EditorView for RichTextEditorView {
|
||||
impl galaxy_editor::editor::EditorView for RichTextEditorView {
|
||||
type RichTextAction = EditorViewAction;
|
||||
|
||||
fn runnable_command_at<'a>(
|
||||
|
||||
@@ -2,17 +2,17 @@ use crate::features::FeatureFlag;
|
||||
use async_channel::TryRecvError;
|
||||
use std::sync::Arc;
|
||||
use string_offset::CharOffset;
|
||||
use warp_editor::render::{
|
||||
use galaxy_editor::render::{
|
||||
element::RichTextAction,
|
||||
model::{HitTestBlockType, Location, RenderEvent},
|
||||
};
|
||||
use warp_util::user_input::UserInput;
|
||||
use galaxy_util::user_input::UserInput;
|
||||
|
||||
use warpui::event::ModifiersState;
|
||||
use warpui::r#async::block_on;
|
||||
use warpui::windowing::WindowManager;
|
||||
use warpui::{platform::WindowStyle, presenter::ChildView, App, Element, Entity, View, ViewHandle};
|
||||
use warpui::{SingletonEntity, TypedActionView, WindowId};
|
||||
use galaxyui::event::ModifiersState;
|
||||
use galaxyui::r#async::block_on;
|
||||
use galaxyui::windowing::WindowManager;
|
||||
use galaxyui::{platform::WindowStyle, presenter::ChildView, App, Element, Entity, View, ViewHandle};
|
||||
use galaxyui::{SingletonEntity, TypedActionView, WindowId};
|
||||
|
||||
use super::{EditorViewAction, RichTextEditorConfig, RichTextEditorView};
|
||||
use crate::appearance::Appearance;
|
||||
@@ -52,7 +52,7 @@ impl View for TestView {
|
||||
"TestView"
|
||||
}
|
||||
|
||||
fn render(&self, _app: &warpui::AppContext) -> Box<dyn warpui::Element> {
|
||||
fn render(&self, _app: &galaxyui::AppContext) -> Box<dyn galaxyui::Element> {
|
||||
ChildView::new(&self.editor).finish()
|
||||
}
|
||||
}
|
||||
@@ -136,7 +136,7 @@ async fn reset_editor_with_markdown(
|
||||
|
||||
fn rendered_mermaid_block_range(
|
||||
editor: &RichTextEditorView,
|
||||
ctx: &warpui::AppContext,
|
||||
ctx: &galaxyui::AppContext,
|
||||
) -> Option<std::ops::Range<CharOffset>> {
|
||||
let render_state = editor.model.as_ref(ctx).render_state().clone();
|
||||
let render_state = render_state.as_ref(ctx);
|
||||
@@ -147,7 +147,7 @@ fn rendered_mermaid_block_range(
|
||||
let block_end = block_start + block.content_length();
|
||||
if matches!(
|
||||
block,
|
||||
warp_editor::render::model::BlockItem::MermaidDiagram { .. }
|
||||
galaxy_editor::render::model::BlockItem::MermaidDiagram { .. }
|
||||
) {
|
||||
return Some(block_start..block_end);
|
||||
}
|
||||
@@ -247,7 +247,7 @@ fn test_appearance_changes() {
|
||||
|
||||
// Simulate an appearance change.
|
||||
Appearance::handle(&app).update(&mut app, |appearance, ctx| {
|
||||
appearance.set_monospace_font_family(warpui::fonts::FamilyId(123), ctx);
|
||||
appearance.set_monospace_font_family(galaxyui::fonts::FamilyId(123), ctx);
|
||||
ctx.notify()
|
||||
});
|
||||
|
||||
@@ -258,7 +258,7 @@ fn test_appearance_changes() {
|
||||
// The render model's style should be updated.
|
||||
assert_eq!(
|
||||
model.styles().code_text.font_family,
|
||||
warpui::fonts::FamilyId(123)
|
||||
galaxyui::fonts::FamilyId(123)
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@ use std::{
|
||||
};
|
||||
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use warp_util::path::user_friendly_path;
|
||||
use galaxy_util::path::user_friendly_path;
|
||||
#[cfg(feature = "local_fs")]
|
||||
use warpui::clipboard::ClipboardContent;
|
||||
use warpui::{
|
||||
use galaxyui::clipboard::ClipboardContent;
|
||||
use galaxyui::{
|
||||
accessibility::{AccessibilityContent, WarpA11yRole},
|
||||
elements::{
|
||||
Align, Container, CrossAxisAlignment, DispatchEventResult, Empty, EventHandler, Flex,
|
||||
@@ -64,12 +64,12 @@ use super::{
|
||||
use crate::code::editor_management::CodeSource;
|
||||
#[cfg(feature = "local_fs")]
|
||||
use crate::util::openable_file_type::FileTarget;
|
||||
use warp_core::ui::icons::ICON_DIMENSIONS;
|
||||
use warp_editor::model::CoreEditorModel;
|
||||
use galaxy_core::ui::icons::ICON_DIMENSIONS;
|
||||
use galaxy_editor::model::CoreEditorModel;
|
||||
#[cfg(feature = "local_fs")]
|
||||
use warp_files::{FileModel, FileModelEvent};
|
||||
use galaxy_files::{FileModel, FileModelEvent};
|
||||
#[cfg(feature = "local_fs")]
|
||||
use warp_util::file::FileId;
|
||||
use galaxy_util::file::FileId;
|
||||
|
||||
pub use crate::util::openable_file_type::is_markdown_file;
|
||||
|
||||
@@ -120,7 +120,7 @@ pub enum FileNotebookEvent {
|
||||
OpenFileWithTarget {
|
||||
path: PathBuf,
|
||||
target: FileTarget,
|
||||
line_col: Option<warp_util::path::LineAndColumnArg>,
|
||||
line_col: Option<galaxy_util::path::LineAndColumnArg>,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -153,7 +153,7 @@ impl From<ContextMenuAction> for FileNotebookAction {
|
||||
}
|
||||
|
||||
/// Information about the notebook's backing file.
|
||||
// TODO: This should probably build on the `warp_files` abstractions.
|
||||
// TODO: This should probably build on the `galaxy_files` abstractions.
|
||||
#[derive(Debug, Clone)]
|
||||
enum SourceFile {
|
||||
Local {
|
||||
@@ -214,7 +214,7 @@ impl FileState {
|
||||
}
|
||||
|
||||
pub fn init(app: &mut AppContext) {
|
||||
use warpui::keymap::macros::*;
|
||||
use galaxyui::keymap::macros::*;
|
||||
|
||||
app.register_editable_bindings([
|
||||
EditableBinding::new(
|
||||
@@ -741,7 +741,7 @@ impl FileNotebookView {
|
||||
TextAndIcon::new(
|
||||
TextAndIconAlignment::TextFirst,
|
||||
"Try again".to_string(),
|
||||
Icon::Refresh.to_warpui_icon(error_text_color),
|
||||
Icon::Refresh.to_galaxyui_icon(error_text_color),
|
||||
MainAxisSize::Min,
|
||||
MainAxisAlignment::Center,
|
||||
vec2f(16., 16.),
|
||||
@@ -1024,7 +1024,7 @@ impl BackingView for FileNotebookView {
|
||||
let title_text = render_pane_header_title_text(
|
||||
title,
|
||||
appearance,
|
||||
warpui::text_layout::ClipConfig::start(),
|
||||
galaxyui::text_layout::ClipConfig::start(),
|
||||
);
|
||||
|
||||
view::HeaderContent::Custom {
|
||||
@@ -1047,7 +1047,7 @@ impl BackingView for FileNotebookView {
|
||||
title,
|
||||
title_secondary: None,
|
||||
title_style: None,
|
||||
title_clip_config: warpui::text_layout::ClipConfig::start(),
|
||||
title_clip_config: galaxyui::text_layout::ClipConfig::start(),
|
||||
title_max_width: None,
|
||||
left_of_title: None,
|
||||
right_of_title: None,
|
||||
|
||||
@@ -5,10 +5,10 @@ use pathfinder_geometry::vector::vec2f;
|
||||
#[cfg(feature = "local_fs")]
|
||||
use repo_metadata::RepoMetadataModel;
|
||||
use repo_metadata::{repositories::DetectedRepositories, watcher::DirectoryWatcher};
|
||||
use warp_core::ui::appearance::Appearance;
|
||||
use galaxy_core::ui::appearance::Appearance;
|
||||
#[cfg(feature = "local_fs")]
|
||||
use warp_files::FileModel;
|
||||
use warpui::{platform::WindowStyle, App, SingletonEntity, View};
|
||||
use galaxy_files::FileModel;
|
||||
use galaxyui::{platform::WindowStyle, App, SingletonEntity, View};
|
||||
|
||||
use crate::server::server_api::team::MockTeamClient;
|
||||
use crate::server::server_api::workspace::MockWorkspaceClient;
|
||||
|
||||
@@ -10,8 +10,8 @@ use std::{
|
||||
|
||||
use futures_util::future::Either;
|
||||
use url::Url;
|
||||
use warp_util::path::{CleanPathResult, LineAndColumnArg};
|
||||
use warpui::{
|
||||
use galaxy_util::path::{CleanPathResult, LineAndColumnArg};
|
||||
use galaxyui::{
|
||||
r#async::SpawnedFutureHandle, AppContext, Entity, ModelContext, ModelHandle, SingletonEntity,
|
||||
WindowId,
|
||||
};
|
||||
|
||||
@@ -8,8 +8,8 @@ use lazy_static::lazy_static;
|
||||
use parking_lot::Mutex;
|
||||
use tempfile::tempdir;
|
||||
use url::Url;
|
||||
use warp_util::path::LineAndColumnArg;
|
||||
use warpui::{App, ModelHandle, WindowId};
|
||||
use galaxy_util::path::LineAndColumnArg;
|
||||
use galaxyui::{App, ModelHandle, WindowId};
|
||||
|
||||
use crate::{
|
||||
notebooks::{file::is_markdown_file, link::LinkEvent},
|
||||
|
||||
@@ -3,7 +3,7 @@ use std::sync::Arc;
|
||||
|
||||
use futures_util::stream::AbortHandle;
|
||||
use markdown_parser::markdown_parser::parse_markdown_to_raw_text;
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
r#async::SpawnedFutureHandle, Entity, EntityId, ModelContext, SingletonEntity, WeakViewHandle,
|
||||
WindowId,
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use std::sync::mpsc;
|
||||
|
||||
use warp_core::ui::appearance::Appearance;
|
||||
use warpui::{
|
||||
use galaxy_core::ui::appearance::Appearance;
|
||||
use galaxyui::{
|
||||
platform::WindowStyle, AddSingletonModel, App, EntityId, ModelHandle, ViewContext, ViewHandle,
|
||||
};
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ use async_trait::async_trait;
|
||||
use anyhow::Result;
|
||||
use itertools::Itertools;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use warpui::AppContext;
|
||||
use galaxyui::AppContext;
|
||||
|
||||
use crate::server::cloud_objects::update_manager::InitiatedBy;
|
||||
use crate::{
|
||||
@@ -269,7 +269,7 @@ pub fn post_process_notebook(data: &str) -> String {
|
||||
/// * Includes extra context for embedded objects.
|
||||
#[cfg_attr(not(feature = "local_fs"), allow(dead_code))]
|
||||
pub fn export_notebook(data: &str, ctx: &AppContext) -> anyhow::Result<String> {
|
||||
use warp_editor::content::{buffer::Buffer, markdown::MarkdownStyle};
|
||||
use galaxy_editor::content::{buffer::Buffer, markdown::MarkdownStyle};
|
||||
|
||||
// Parse the Markdown directly rather than using [`Buffer::from_markdown`] so that we can
|
||||
// report errors to the exporter.
|
||||
|
||||
@@ -6,16 +6,16 @@ use regex::Regex;
|
||||
use settings::Setting as _;
|
||||
use std::{sync::Arc, time::Duration};
|
||||
use url::Url;
|
||||
use warp_core::context_flag::ContextFlag;
|
||||
use galaxy_core::context_flag::ContextFlag;
|
||||
|
||||
#[cfg(target_family = "wasm")]
|
||||
use crate::uri::web_intent_parser::open_url_on_desktop;
|
||||
|
||||
use warp_editor::{
|
||||
use galaxy_editor::{
|
||||
editor::NavigationKey,
|
||||
model::{CoreEditorModel, RichTextEditorModel},
|
||||
};
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
accessibility::{AccessibilityContent, WarpA11yRole},
|
||||
clipboard::ClipboardContent,
|
||||
elements::{
|
||||
@@ -156,7 +156,7 @@ lazy_static! {
|
||||
}
|
||||
|
||||
pub fn init(app: &mut AppContext) {
|
||||
use warpui::keymap::macros::*;
|
||||
use galaxyui::keymap::macros::*;
|
||||
|
||||
app.register_editable_bindings([
|
||||
EditableBinding::new(
|
||||
@@ -1443,7 +1443,7 @@ impl NotebookView {
|
||||
);
|
||||
}
|
||||
|
||||
if !warpui::platform::is_mobile_device()
|
||||
if !galaxyui::platform::is_mobile_device()
|
||||
&& !ContextFlag::HideOpenOnDesktopButton.is_enabled()
|
||||
&& *UserAppInstallDetectionSettings::as_ref(ctx)
|
||||
.user_app_installation_detected
|
||||
@@ -1943,7 +1943,7 @@ impl NotebookView {
|
||||
.with_children([
|
||||
ConstrainedBox::new(
|
||||
icons::Icon::Trash
|
||||
.to_warpui_icon(appearance.theme().foreground())
|
||||
.to_galaxyui_icon(appearance.theme().foreground())
|
||||
.finish(),
|
||||
)
|
||||
.with_width(16.)
|
||||
@@ -2203,7 +2203,7 @@ impl View for NotebookView {
|
||||
}
|
||||
}
|
||||
|
||||
fn render(&self, app: &AppContext) -> Box<dyn warpui::Element> {
|
||||
fn render(&self, app: &AppContext) -> Box<dyn galaxyui::Element> {
|
||||
let mut content = Flex::column();
|
||||
content.extend(self.render_trash_banner(app));
|
||||
content.add_child(self.render_title(app));
|
||||
@@ -2256,7 +2256,7 @@ impl View for NotebookView {
|
||||
SavePosition::new(stack.finish(), &self.view_position_id).finish()
|
||||
}
|
||||
|
||||
fn keymap_context(&self, app: &AppContext) -> warpui::keymap::Context {
|
||||
fn keymap_context(&self, app: &AppContext) -> galaxyui::keymap::Context {
|
||||
let mut context = Self::default_keymap_context();
|
||||
|
||||
match self.mode_app_ctx(app) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//! Components for the notebook header.
|
||||
|
||||
use warp_core::features::FeatureFlag;
|
||||
use warpui::{
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
use galaxyui::{
|
||||
elements::{
|
||||
Container, CrossAxisAlignment, Flex, Highlight, MainAxisAlignment, MainAxisSize,
|
||||
MouseStateHandle, ParentElement, Shrinkable,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use warpui::{App, SingletonEntity};
|
||||
use galaxyui::{App, SingletonEntity};
|
||||
|
||||
use crate::{
|
||||
auth::UserUid,
|
||||
|
||||
@@ -3,9 +3,9 @@ use std::sync::Arc;
|
||||
use chrono::{Duration, Utc};
|
||||
use futures_util::future::BoxFuture;
|
||||
use itertools::Itertools;
|
||||
use warp_core::ui::appearance::Appearance;
|
||||
use warp_editor::editor::EditorView;
|
||||
use warpui::{
|
||||
use galaxy_core::ui::appearance::Appearance;
|
||||
use galaxy_editor::editor::EditorView;
|
||||
use galaxyui::{
|
||||
platform::WindowStyle, presenter::ChildView, r#async::Timer, telemetry::EventPayload,
|
||||
AddSingletonModel, App, AppContext, Element, Entity, SingletonEntity, TypedActionView, View,
|
||||
ViewHandle, WindowId,
|
||||
@@ -391,7 +391,7 @@ fn test_focus_tracking() {
|
||||
#[ignore]
|
||||
fn test_edit_telemetry() {
|
||||
fn edit_events() -> Vec<serde_json::Value> {
|
||||
warpui::telemetry::flush_events()
|
||||
galaxyui::telemetry::flush_events()
|
||||
.into_iter()
|
||||
.filter_map(|event| match event.payload {
|
||||
EventPayload::NamedEvent { name, value, .. } if name == "Notebook Edited" => value,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//! Shared styles for notebooks.
|
||||
|
||||
use warpui::{
|
||||
use galaxyui::{
|
||||
elements::{
|
||||
Container, CrossAxisAlignment, Flex, Hoverable, MainAxisAlignment, MouseStateHandle,
|
||||
ParentElement,
|
||||
|
||||
Reference in New Issue
Block a user