Rebrand to Galaxy, major improvements to Bedrock support, still needs some TLC though

This commit is contained in:
Ryan Ward
2026-05-07 11:29:34 -05:00
parent f4e2475c60
commit a41cbd8cc7
2433 changed files with 14208 additions and 9409 deletions
+6 -6
View File
@@ -1,5 +1,5 @@
[package]
name = "warp_editor"
name = "galaxy_editor"
authors = ["Warp Team <dev@warp.dev>"]
version = "0.1.0"
edition = "2024"
@@ -46,9 +46,9 @@ sum_tree.workspace = true
thiserror.workspace = true
pathfinder_color = "0.5.0"
vec1.workspace = true
warpui.workspace = true
warp_core.workspace = true
warp_util.workspace = true
galaxyui.workspace = true
galaxy_core.workspace = true
galaxy_util.workspace = true
rayon.workspace = true
line-ending.workspace = true
vim.workspace = true
@@ -59,8 +59,8 @@ rust-embed.workspace = true
enclose = "1.1.8"
env_logger.workspace = true
sum_tree = { workspace = true, features = ["test-util"] }
warp_core = { workspace = true, features = ["test-util"] }
warpui = { workspace = true, features = ["test-util"] }
galaxy_core = { workspace = true, features = ["test-util"] }
galaxyui = { workspace = true, features = ["test-util"] }
criterion = { version = "0.5.1", features = ["html_reports"] }
[[bench]]
+2 -2
View File
@@ -2,10 +2,10 @@ use std::fs;
use criterion::{Criterion, criterion_group, criterion_main};
use rand::{SeedableRng, rngs::StdRng};
use warp_editor::content::{
use galaxy_editor::content::{
buffer::Buffer, selection_model::BufferSelectionModel, text::IndentBehavior,
};
use warpui::{App, ModelHandle};
use galaxyui::{App, ModelHandle};
const EDIT_SAMPLE_SIZE: usize = 10;
const MAX_EDIT_REPLACEMENT_LENGTH: usize = 20;
+1 -1
View File
@@ -1,7 +1,7 @@
use std::cmp::Ordering;
use sum_tree::SumTree;
use warpui::App;
use galaxyui::App;
use super::{AnchorSide, Anchors};
+6 -6
View File
@@ -17,7 +17,7 @@ use std::{
sync::Arc,
};
use vec1::{Vec1, vec1};
use warp_util::content_version::ContentVersion;
use galaxy_util::content_version::ContentVersion;
use super::{
anchor::{Anchor, AnchorSide, Anchors},
@@ -34,7 +34,7 @@ use super::{
undo::{NonAtomicType, UndoActionType, UndoArg, UndoStack},
validation::validate_content,
};
use warp_core::{platform::SessionPlatform, safe_error};
use galaxy_core::{platform::SessionPlatform, safe_error};
use crate::{
content::{
@@ -53,9 +53,9 @@ use crate::{
use enum_iterator::all;
use string_offset::{ByteOffset, CharOffset};
use sum_tree::{SeekBias, SumTree};
use warpui::{AppContext, Entity, ModelContext};
use warpui::{EntityId, ModelHandle, elements::ListIndentLevel};
use warpui::{
use galaxyui::{AppContext, Entity, ModelContext};
use galaxyui::{EntityId, ModelHandle, elements::ListIndentLevel};
use galaxyui::{
fonts::Weight,
text::{TextBuffer, char_slice, point::Point},
};
@@ -836,7 +836,7 @@ impl Buffer {
selection_model: ModelHandle<BufferSelectionModel>,
ctx: &mut ModelContext<Self>,
) -> Self {
let parse_fn = if warp_core::features::FeatureFlag::MarkdownTables.is_enabled() {
let parse_fn = if galaxy_core::features::FeatureFlag::MarkdownTables.is_enabled() {
parse_markdown_with_gfm_tables
} else {
parse_markdown
+3 -3
View File
@@ -12,7 +12,7 @@ use rand::SeedableRng;
use rand::rngs::StdRng;
use serde_yaml::{Mapping, Value};
use vec1::{Vec1, vec1};
use warpui::{App, AppContext, ModelContext, ModelHandle, ReadModel};
use galaxyui::{App, AppContext, ModelContext, ModelHandle, ReadModel};
use crate::content::buffer::{
AutoScrollBehavior, BufferEditAction, BufferSelectAction, EditOrigin, EmbeddedItemConversion,
@@ -39,8 +39,8 @@ use crate::render::model::{
};
use string_offset::ByteOffset;
use string_offset::CharOffset;
use warpui::elements::ListIndentLevel;
use warpui::text::point::Point;
use galaxyui::elements::ListIndentLevel;
use galaxyui::text::point::Point;
use crate::content::buffer::{Buffer, StyledBufferRun};
+1 -1
View File
@@ -23,7 +23,7 @@ use markdown_parser::{FormattedText, FormattedTextFragment, FormattedTextLine};
use std::ops::Range;
use string_offset::CharOffset;
use sum_tree::SumTree;
use warpui::elements::ListIndentLevel;
use galaxyui::elements::ListIndentLevel;
#[derive(Debug, Clone)]
pub struct CoreEditorAction {
+3 -3
View File
@@ -14,8 +14,8 @@ use rangemap::RangeSet;
use rayon::iter::{IndexedParallelIterator, IntoParallelIterator, ParallelIterator};
use urlocator::{UrlLocation, UrlLocator};
use vec1::Vec1;
use warp_core::{features::FeatureFlag, ui::theme::Fill as ThemeFill};
use warpui::{
use galaxy_core::{features::FeatureFlag, ui::theme::Fill as ThemeFill};
use galaxyui::{
AppContext,
assets::asset_cache::AssetSource,
fonts::Weight,
@@ -39,7 +39,7 @@ use crate::{
},
};
use string_offset::{ByteOffset, CharOffset};
use warpui::text::char_slice;
use galaxyui::text::char_slice;
use super::{
buffer::{StyledBufferBlock, StyledBufferRun, StyledTextBlock},
+2 -2
View File
@@ -15,8 +15,8 @@ use crate::{
};
use std::path::Path;
use string_offset::CharOffset;
use warp_core::features::FeatureFlag;
use warpui::{
use galaxy_core::features::FeatureFlag;
use galaxyui::{
App, SingletonEntity,
assets::asset_cache::{AssetCache, AssetSource, AssetState},
fonts::{Properties, Style, Weight},
+1 -1
View File
@@ -199,7 +199,7 @@ impl Engine {
buffer: &SumTree<BufferText>,
buffer_offset: CharOffset,
) -> anyhow::Result<Vec<Match>> {
warpui::r#async::block_on(self.find(buffer, buffer_offset))
galaxyui::r#async::block_on(self.find(buffer, buffer_offset))
}
/// Find all matches for this pattern in the given slice of content.
+1 -1
View File
@@ -4,7 +4,7 @@ use futures_lite::future;
use itertools::Itertools;
use rangemap::RangeSet;
use sum_tree::SumTree;
use warpui::App;
use galaxyui::App;
use crate::content::{
buffer::Buffer,
@@ -3,7 +3,7 @@ use std::ops::Range;
use rangemap::RangeSet;
use string_offset::CharOffset;
use warpui::{AppContext, Entity, ModelContext, ModelHandle};
use galaxyui::{AppContext, Entity, ModelContext, ModelHandle};
use crate::content::edit::EditDelta;
use crate::content::selection_model::BufferSelectionModel;
+3 -3
View File
@@ -15,11 +15,11 @@ use std::collections::VecDeque;
use std::fmt::Write;
use std::iter;
use std::{io, ops::Range};
use warpui::text::point::Point;
use warpui::{AppContext, ModelContext, ModelHandle};
use galaxyui::text::point::Point;
use galaxyui::{AppContext, ModelContext, ModelHandle};
use string_offset::CharOffset;
use warpui::elements::{ListIndentLevel, ListNumbering};
use galaxyui::elements::{ListIndentLevel, ListNumbering};
use crate::content::anchor::AnchorSide;
use crate::content::selection_model::BufferSelectionModel;
+3 -3
View File
@@ -4,7 +4,7 @@ use markdown_parser::{compute_formatted_text_delta, parse_markdown};
use serde_yaml::Value;
use string_offset::CharOffset;
use vec1::Vec1;
use warpui::{App, ReadModel};
use galaxyui::{App, ReadModel};
use crate::content::{
buffer::{
@@ -60,7 +60,7 @@ print_endline "Hello, World!"
#[test]
fn test_mermaid_markdown_round_trip() {
App::test((), |mut app| async move {
let _flag = warp_core::features::FeatureFlag::MarkdownMermaid.override_enabled(true);
let _flag = galaxy_core::features::FeatureFlag::MarkdownMermaid.override_enabled(true);
let markdown = "```mermaid\ngraph TD\nA --> B\n```\n";
let (buffer, _selection) = Buffer::mock_from_markdown(
markdown,
@@ -157,7 +157,7 @@ fn test_table_html_serialization() {
#[test]
fn test_gfm_table_html_serialization() {
App::test((), |mut app| async move {
let _flag = warp_core::features::FeatureFlag::MarkdownTables.override_enabled(true);
let _flag = galaxy_core::features::FeatureFlag::MarkdownTables.override_enabled(true);
let markdown = "\
| header 1 | header 2 |\n\
| --- | --- |\n\
+1 -1
View File
@@ -5,7 +5,7 @@ use std::{
use bytes::Bytes;
use mermaid_to_svg::MermaidTheme;
use warpui::{
use galaxyui::{
AppContext, SingletonEntity,
assets::asset_cache::{AssetCache, AssetSource, AssetState, AsyncAssetId, AsyncAssetType},
image_cache::ImageType,
+1 -1
View File
@@ -7,7 +7,7 @@ use crate::content::{
text::{BlockType, BufferBlockStyle, IndentBehavior, TextStyles},
};
use string_offset::CharOffset;
use warpui::App;
use galaxyui::App;
#[test]
fn test_no_blocks() {
+1 -1
View File
@@ -4,7 +4,7 @@
use anyhow::anyhow;
use string_offset::CharOffset;
use warpui::text::{TextBuffer, point::Point, word_boundaries::WordBoundariesPolicy};
use galaxyui::text::{TextBuffer, point::Point, word_boundaries::WordBoundariesPolicy};
use super::{
buffer::{Buffer, ToBufferCharOffset, ToBufferPoint},
@@ -1,14 +1,14 @@
use itertools::Itertools;
use markdown_parser::parse_markdown;
use string_offset::CharOffset;
use warp_core::features::FeatureFlag;
use galaxy_core::features::FeatureFlag;
use crate::content::{
buffer::{Buffer, EditOrigin},
selection_model::BufferSelectionModel,
text::IndentBehavior,
};
use warpui::{
use galaxyui::{
App,
text::{TextBuffer, point::Point, word_boundaries::WordBoundariesPolicy},
};
+2 -2
View File
@@ -3,7 +3,7 @@ use std::ops::Range;
use itertools::Itertools;
use string_offset::CharOffset;
use vec1::{Vec1, vec1};
use warpui::{AppContext, Entity, ModelHandle};
use galaxyui::{AppContext, Entity, ModelHandle};
use crate::content::{
anchor::{Anchor, AnchorSide, AnchorUpdate, Anchors},
@@ -309,7 +309,7 @@ impl BufferSelectionModel {
}
/// Validate the buffer content with this selection model's anchors.
pub fn validate_buffer(&self, ctx: &impl warpui::ModelAsRef) {
pub fn validate_buffer(&self, ctx: &impl galaxyui::ModelAsRef) {
self.buffer.as_ref(ctx).validate(&self.anchors);
}
+5 -5
View File
@@ -30,11 +30,11 @@ use std::{
};
use string_offset::{ByteOffset, CharOffset, impl_offset};
use sum_tree::{Cursor, SeekBias, SumTree};
use warp_core::features::FeatureFlag;
use warpui::elements::ListIndentLevel;
use warpui::text::BlockHeaderSize as HeaderSize;
use warpui::text::point::Point;
use warpui::{
use galaxy_core::features::FeatureFlag;
use galaxyui::elements::ListIndentLevel;
use galaxyui::text::BlockHeaderSize as HeaderSize;
use galaxyui::text::point::Point;
use galaxyui::{
AppContext,
fonts::{Properties, Style, Weight},
};
+2 -2
View File
@@ -1,8 +1,8 @@
use markdown_parser::CodeBlockText;
use warpui::fonts::Weight;
use galaxyui::fonts::Weight;
use markdown_parser::FormattedTable;
use warp_core::features::FeatureFlag;
use galaxy_core::features::FeatureFlag;
use super::{
BufferBlockItem, BufferTextStyle, CodeBlockType, MarkdownStyle, TextStyles,
+1 -1
View File
@@ -1,7 +1,7 @@
use std::{collections::VecDeque, time::Duration};
use instant::Instant;
use warp_util::content_version::ContentVersion;
use galaxy_util::content_version::ContentVersion;
use crate::render::model::RenderedSelectionSet;
@@ -5,7 +5,7 @@ use crate::content::{
},
};
use sum_tree::SumTree;
use warpui::elements::ListIndentLevel;
use galaxyui::elements::ListIndentLevel;
#[test]
#[should_panic(
+1 -1
View File
@@ -1,4 +1,4 @@
use warpui::ModelContext;
use galaxyui::ModelContext;
use crate::content::{buffer::BufferSnapshot, edit::PreciseDelta, version::BufferVersion};
+1 -1
View File
@@ -6,7 +6,7 @@ use std::{any::Any, cell::Ref, ops::Range};
use num_traits::SaturatingSub;
use pathfinder_color::ColorU;
use rangemap::{RangeMap, RangeSet};
use warpui::{
use galaxyui::{
Action, AppContext, Element, TypedActionView, View, elements::Border,
text_layout::PaintStyleOverride,
};
+2 -2
View File
@@ -3,7 +3,7 @@ use std::ops::Range;
use itertools::{Either, Itertools};
use line_ending::LineEnding;
use vec1::{Vec1, vec1};
use warpui::{
use galaxyui::{
AppContext, Entity, ModelAsRef, ModelContext, ModelHandle, clipboard::ClipboardContent,
};
@@ -22,7 +22,7 @@ use crate::{
selection::{SelectionMode, SelectionModel, TextDirection, TextUnit},
};
use string_offset::{ByteOffset, CharOffset};
use warpui::elements::ListIndentLevel;
use galaxyui::elements::ListIndentLevel;
/// A wrapper for a buffer that provides access to its internal update_content method.
/// It's important this is only returned from `CoreEditorModel::update_content` method
+1 -1
View File
@@ -47,7 +47,7 @@ use std::{
use itertools::Itertools as _;
use line_ending::LineEnding;
use warp_core::platform::SessionPlatform;
use galaxy_core::platform::SessionPlatform;
/// A line ending format. This is the compile-time equivalent to [`LineEnding`].
pub trait LineFormat {
+1 -1
View File
@@ -3,7 +3,7 @@
#![allow(clippy::disallowed_methods)]
use super::*;
use warp_core::platform::SessionPlatform;
use galaxy_core::platform::SessionPlatform;
#[test]
fn test_infer_line_ending_empty_file() {
@@ -1,4 +1,4 @@
use warpui::{
use galaxyui::{
AppContext, Element, SizeConstraint,
elements::{
Align, ConstrainedBox, Container, CornerRadius, CrossAxisAlignment, Empty, Flex, Icon,
@@ -79,8 +79,8 @@ impl RenderableBlock for RenderableBrokenEmbedding {
fn layout(
&mut self,
model: &crate::render::model::RenderState,
ctx: &mut warpui::LayoutContext,
app: &warpui::AppContext,
ctx: &mut galaxyui::LayoutContext,
app: &galaxyui::AppContext,
) {
self.row.layout(
SizeConstraint::strict(vec2f(
@@ -104,7 +104,7 @@ impl RenderableBlock for RenderableBrokenEmbedding {
&mut self,
model: &crate::render::model::RenderState,
ctx: &mut super::RenderContext,
app: &warpui::AppContext,
app: &galaxyui::AppContext,
) {
let content = model.content();
let broken_link = extract_block!(self.viewport_item, content, (block, BlockItem::Embedded(item)) => block.embedded(item));
@@ -154,21 +154,21 @@ impl RenderableBlock for RenderableBrokenEmbedding {
);
}
ctx.paint.scene.start_layer(warpui::ClipBounds::ActiveLayer);
ctx.paint.scene.start_layer(galaxyui::ClipBounds::ActiveLayer);
self.row
.paint(ctx.content_to_screen(content_origin), ctx.paint, app);
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.row.after_layout(ctx, app);
}
fn dispatch_event(
&mut self,
_model: &crate::render::model::RenderState,
event: &warpui::event::DispatchedEvent,
ctx: &mut warpui::EventContext,
event: &galaxyui::event::DispatchedEvent,
ctx: &mut galaxyui::EventContext,
app: &AppContext,
) -> bool {
self.row.dispatch_event(event, ctx, app)
+3 -3
View File
@@ -37,8 +37,8 @@ impl RenderableBlock for Empty {
fn layout(
&mut self,
model: &RenderState,
ctx: &mut warpui::LayoutContext,
app: &warpui::AppContext,
ctx: &mut galaxyui::LayoutContext,
app: &galaxyui::AppContext,
) {
self.placeholder
.layout(&self.viewport_item, model, ctx, app, |_| {
@@ -49,7 +49,7 @@ impl RenderableBlock for Empty {
});
}
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, _app: &warpui::AppContext) {
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, _app: &galaxyui::AppContext) {
let content = model.content();
let cursor = extract_block!(self.viewport_item, content, (block, BlockItem::TrailingNewLine(cursor)) => block.trailing_newline(cursor));
if self.placeholder.paint(cursor.content_origin(), model, ctx) {
+3 -3
View File
@@ -31,8 +31,8 @@ impl RenderableBlock for RenderableHeader {
fn layout(
&mut self,
model: &RenderState,
ctx: &mut warpui::LayoutContext,
app: &warpui::AppContext,
ctx: &mut galaxyui::LayoutContext,
app: &galaxyui::AppContext,
) {
self.placeholder
.layout(&self.viewport_item, model, ctx, app, |block| {
@@ -53,7 +53,7 @@ impl RenderableBlock for RenderableHeader {
});
}
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, _app: &warpui::AppContext) {
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, _app: &galaxyui::AppContext) {
let content = model.content();
let (paragraph, header_size) = extract_block!(
self.viewport_item, content,
@@ -3,10 +3,10 @@ use crate::render::model::BlockItem;
use super::super::model::{RenderState, viewport::ViewportItem};
use super::{RenderContext, RenderableBlock};
use warp_core::ui::appearance::Appearance;
use warp_core::ui::theme::color::internal_colors;
use warpui::elements::{CrossAxisAlignment, Empty, Flex, ParentElement};
use warpui::{
use galaxy_core::ui::appearance::Appearance;
use galaxy_core::ui::theme::color::internal_colors;
use galaxyui::elements::{CrossAxisAlignment, Empty, Flex, ParentElement};
use galaxyui::{
AfterLayoutContext, AppContext, Element, LayoutContext, SingletonEntity, SizeConstraint,
elements::Container, geometry::vector::vec2f,
};
@@ -71,8 +71,8 @@ impl RenderableBlock for RenderableHiddenSection {
fn dispatch_event(
&mut self,
_model: &RenderState,
event: &warpui::event::DispatchedEvent,
ctx: &mut warpui::EventContext,
event: &galaxyui::event::DispatchedEvent,
ctx: &mut galaxyui::EventContext,
app: &AppContext,
) -> bool {
self.element.dispatch_event(event, ctx, app)
@@ -1,4 +1,4 @@
use warpui::{
use galaxyui::{
elements::{CornerRadius, Radius},
geometry::{
rect::RectF,
@@ -77,12 +77,12 @@ impl RenderableBlock for HorizontalRule {
fn layout(
&mut self,
_model: &RenderState,
_ctx: &mut warpui::LayoutContext,
_app: &warpui::AppContext,
_ctx: &mut galaxyui::LayoutContext,
_app: &galaxyui::AppContext,
) {
}
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, _app: &warpui::AppContext) {
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, _app: &galaxyui::AppContext) {
let content = model.content();
let horizontal_rule = extract_block!(self.viewport_item, content, (block, BlockItem::HorizontalRule(rule)) => block.horizontal_rule(rule));
+5 -5
View File
@@ -1,4 +1,4 @@
use warpui::{
use galaxyui::{
Element, SizeConstraint,
elements::{CacheOption, Image},
geometry::vector::vec2f,
@@ -39,8 +39,8 @@ impl RenderableBlock for RenderableImage {
fn layout(
&mut self,
model: &RenderState,
ctx: &mut warpui::LayoutContext,
app: &warpui::AppContext,
ctx: &mut galaxyui::LayoutContext,
app: &galaxyui::AppContext,
) {
let content = model.content();
let (asset_source, config) = extract_block!(
@@ -60,7 +60,7 @@ impl RenderableBlock for RenderableImage {
self.image_element = Some(Box::new(image));
}
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, app: &warpui::AppContext) {
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, app: &galaxyui::AppContext) {
let content = model.content();
let positioned_image = extract_block!(
self.viewport_item,
@@ -83,7 +83,7 @@ impl RenderableBlock for RenderableImage {
}
if selected {
let rect_bounds = warpui::geometry::rect::RectF::new(screen_position, size);
let rect_bounds = galaxyui::geometry::rect::RectF::new(screen_position, size);
ctx.paint
.scene
.draw_rect_with_hit_recording(rect_bounds)
@@ -1,6 +1,6 @@
use std::ops::Range;
use warpui::{
use galaxyui::{
AfterLayoutContext, AppContext, Element, EventContext, LayoutContext, ModelHandle,
PaintContext, SizeConstraint, WeakViewHandle,
elements::Point,
+3 -3
View File
@@ -1,4 +1,4 @@
use warpui::{
use galaxyui::{
AppContext, Element, SizeConstraint,
elements::{Align, CacheOption, CornerRadius, Image, Radius, Text},
geometry::vector::vec2f,
@@ -33,7 +33,7 @@ impl RenderableBlock for RenderableMermaidDiagram {
&self.viewport_item
}
fn layout(&mut self, model: &RenderState, ctx: &mut warpui::LayoutContext, app: &AppContext) {
fn layout(&mut self, model: &RenderState, ctx: &mut galaxyui::LayoutContext, app: &AppContext) {
let content = model.content();
let (asset_source, config) = extract_block!(
self.viewport_item,
@@ -111,7 +111,7 @@ impl RenderableBlock for RenderableMermaidDiagram {
}
}
fn after_layout(&mut self, ctx: &mut warpui::AfterLayoutContext, app: &warpui::AppContext) {
fn after_layout(&mut self, ctx: &mut galaxyui::AfterLayoutContext, app: &galaxyui::AppContext) {
if let Some(ref mut image_element) = self.image_element {
image_element.after_layout(ctx, app);
}
+6 -6
View File
@@ -11,8 +11,8 @@ use std::{
};
use temporary_block::RenderableTemporaryBlock;
use vim::vim::VimMode;
use warp_core::ui::theme::Fill as ThemeFill;
use warpui::{
use galaxy_core::ui::theme::Fill as ThemeFill;
use galaxyui::{
AfterLayoutContext, AppContext, Element, Event, EventContext, LayoutContext, ModelHandle,
PaintContext, SizeConstraint, WeakViewHandle,
color::ColorU,
@@ -85,7 +85,7 @@ pub enum VerticalExpansionBehavior {
/// An element that renders rich text, with no additional UI or decorations.
///
/// This element caches the positions listed in [`super::model::saved_positions::SavedPositions`],
/// and the parent view can overlay UI controls on top of them using a [`warpui::elements::Stack`].
/// and the parent view can overlay UI controls on top of them using a [`galaxyui::elements::Stack`].
///
/// It additionally reserves horizontal gutters, which are considered in-bounds for content hit
/// testing.
@@ -1077,7 +1077,7 @@ impl<V: EditorView> Element for RichTextElement<V> {
return;
};
ctx.scene
.start_layer(warpui::ClipBounds::BoundedBy(clip_bounds));
.start_layer(galaxyui::ClipBounds::BoundedBy(clip_bounds));
// Save the clipped content layer z-index for hover detection.
self.content_z_index = Some(ctx.scene.z_index());
@@ -1236,7 +1236,7 @@ impl<V: EditorView> NewScrollableElement for RichTextElement<V> {
})
}
fn scroll(&mut self, delta: warpui::units::Pixels, axis: Axis, ctx: &mut EventContext) {
fn scroll(&mut self, delta: galaxyui::units::Pixels, axis: Axis, ctx: &mut EventContext) {
if let Some(action) = V::Action::scroll(delta, axis) {
ctx.dispatch_typed_action(action);
}
@@ -1257,7 +1257,7 @@ impl<V: EditorView> ScrollableElement for RichTextElement<V> {
Some(self.vertical_scroll_data(app))
}
fn scroll(&mut self, delta: warpui::units::Pixels, ctx: &mut EventContext) {
fn scroll(&mut self, delta: galaxyui::units::Pixels, ctx: &mut EventContext) {
if let Some(action) = V::Action::scroll(delta, Axis::Vertical) {
ctx.dispatch_typed_action(action);
}
@@ -8,8 +8,8 @@ use crate::{
model::{BlockItem, RenderState, viewport::ViewportItem},
},
};
use warpui::elements::ListIndentLevel;
use warpui::{geometry::vector::vec2f, text_layout::TextFrame};
use galaxyui::elements::ListIndentLevel;
use galaxyui::{geometry::vector::vec2f, text_layout::TextFrame};
use super::{
RenderableBlock,
@@ -44,8 +44,8 @@ impl RenderableBlock for RenderableOrderedListItem {
fn layout(
&mut self,
model: &RenderState,
ctx: &mut warpui::LayoutContext,
app: &warpui::AppContext,
ctx: &mut galaxyui::LayoutContext,
app: &galaxyui::AppContext,
) {
let text_layout = TextLayout::from_layout_context(ctx, app, model);
let block_style = BufferBlockStyle::OrderedList {
@@ -75,7 +75,7 @@ impl RenderableBlock for RenderableOrderedListItem {
});
}
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, _app: &warpui::AppContext) {
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, _app: &galaxyui::AppContext) {
let content = model.content();
let paragraph = extract_block!(self.viewport_item, content, (block, BlockItem::OrderedList{ paragraph: inner, ..}) => block.ordered_list(inner));
+2 -2
View File
@@ -2,8 +2,8 @@
use std::ops::Range;
use warp_core::ui::appearance::DEFAULT_UI_FONT_SIZE;
use warpui::{
use galaxy_core::ui::appearance::DEFAULT_UI_FONT_SIZE;
use galaxyui::{
PaintContext,
elements::{CornerRadius, Point, Radius},
geometry::{
@@ -47,8 +47,8 @@ impl RenderableBlock for RenderableParagraph {
fn layout(
&mut self,
model: &RenderState,
ctx: &mut warpui::LayoutContext,
app: &warpui::AppContext,
ctx: &mut galaxyui::LayoutContext,
app: &galaxyui::AppContext,
) {
self.placeholder
.layout(&self.viewport_item, model, ctx, app, |_| {
@@ -59,7 +59,7 @@ impl RenderableBlock for RenderableParagraph {
});
}
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, _app: &warpui::AppContext) {
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, _app: &galaxyui::AppContext) {
let content = model.content();
let paragraph = extract_block!(self.viewport_item, content, (block, BlockItem::Paragraph(inner)) => block.paragraph(inner));
@@ -1,6 +1,6 @@
use std::sync::Arc;
use warpui::{
use galaxyui::{
AppContext, LayoutContext,
geometry::vector::{Vector2F, vec2f},
text_layout::Line,
@@ -1,4 +1,4 @@
use warpui::{
use galaxyui::{
AppContext, Element, SizeConstraint,
elements::{Border, CornerRadius, Empty, Radius},
geometry::vector::vec2f,
@@ -48,7 +48,7 @@ impl RenderableBlock for RenderableRunnableCommand {
&self.viewport_item
}
fn layout(&mut self, _model: &RenderState, ctx: &mut warpui::LayoutContext, app: &AppContext) {
fn layout(&mut self, _model: &RenderState, ctx: &mut galaxyui::LayoutContext, app: &AppContext) {
self.footer.layout(
SizeConstraint::strict(vec2f(
self.viewport_item.content_size.x(),
@@ -87,7 +87,7 @@ impl RenderableBlock for RenderableRunnableCommand {
// Place the button at a higher z-index for event handling. See the comment on
// `RichTextElement::content_z_index` for context.
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.
@@ -102,15 +102,15 @@ impl RenderableBlock for RenderableRunnableCommand {
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: &crate::render::model::RenderState,
event: &warpui::event::DispatchedEvent,
ctx: &mut warpui::EventContext,
event: &galaxyui::event::DispatchedEvent,
ctx: &mut galaxyui::EventContext,
app: &AppContext,
) -> bool {
self.footer.dispatch_event(event, ctx, app)
+2 -2
View File
@@ -1,6 +1,6 @@
use std::ops::Range;
use string_offset::CharOffset;
use warpui::{
use galaxyui::{
AppContext, ClipBounds, Event, EventContext,
elements::{
Axis, CornerRadius, DEFAULT_SCROLL_WHEEL_PIXELS_PER_LINE, Radius, ScrollData,
@@ -121,7 +121,7 @@ impl RenderableBlock for RenderableTable {
&self.viewport_item
}
fn layout(&mut self, _: &RenderState, _: &mut warpui::LayoutContext, _: &AppContext) {}
fn layout(&mut self, _: &RenderState, _: &mut galaxyui::LayoutContext, _: &AppContext) {}
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, _app: &AppContext) {
let content = model.content();
@@ -1,7 +1,7 @@
use pathfinder_color::ColorU;
use std::{cell::Cell, sync::Arc};
use string_offset::CharOffset;
use warpui::{
use galaxyui::{
elements::{Axis, scroll_delta_for_pointer_movement},
fonts::FamilyId,
geometry::{rect::RectF, vector::vec2f},
@@ -214,7 +214,7 @@ fn cells_in_range_entire_table() {
}
fn single_line_cell_layout(char_count: usize, line_height: f32, line_width: f32) -> CellLayout {
use warpui::text_layout::CaretPosition;
use galaxyui::text_layout::CaretPosition;
let mut carets = Vec::with_capacity(char_count);
let char_width = if char_count > 0 {
line_width / char_count as f32
@@ -5,8 +5,8 @@ use crate::{
render::model::{BlockItem, RenderState, RichTextStyles, bounds, viewport::ViewportItem},
};
use pathfinder_color::ColorU;
use warpui::elements::ListIndentLevel;
use warpui::{
use galaxyui::elements::ListIndentLevel;
use galaxyui::{
AppContext, Element, SizeConstraint, WeakViewHandle,
elements::{
Align, Border, ConstrainedBox, Container, CornerRadius, Hoverable, Icon, MouseStateHandle,
@@ -112,8 +112,8 @@ impl RenderableBlock for RenderableTaskList {
fn layout(
&mut self,
model: &RenderState,
ctx: &mut warpui::LayoutContext,
app: &warpui::AppContext,
ctx: &mut galaxyui::LayoutContext,
app: &galaxyui::AppContext,
) {
self.task_list_icon.layout(
SizeConstraint::strict(vec2f(self.icon_size, self.icon_size)),
@@ -142,7 +142,7 @@ impl RenderableBlock for RenderableTaskList {
})
}
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, app: &warpui::AppContext) {
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, app: &galaxyui::AppContext) {
let content = model.content();
let task_list = extract_block!(self.viewport_item, content, (block, BlockItem::TaskList{ paragraph: inner, ..}) => block.task_list(inner));
let text_styling = &model.styles().base_text;
@@ -174,8 +174,8 @@ impl RenderableBlock for RenderableTaskList {
fn dispatch_event(
&mut self,
_model: &crate::render::model::RenderState,
event: &warpui::event::DispatchedEvent,
ctx: &mut warpui::EventContext,
event: &galaxyui::event::DispatchedEvent,
ctx: &mut galaxyui::EventContext,
app: &AppContext,
) -> bool {
self.task_list_icon.dispatch_event(event, ctx, app)
@@ -1,4 +1,4 @@
use warp_core::ui::theme::Fill;
use galaxy_core::ui::theme::Fill;
use crate::render::model::{BlockItem, Decoration, RenderState, viewport::ViewportItem};
@@ -36,12 +36,12 @@ impl RenderableBlock for RenderableTemporaryBlock {
fn layout(
&mut self,
_model: &RenderState,
_ctx: &mut warpui::LayoutContext,
_app: &warpui::AppContext,
_ctx: &mut galaxyui::LayoutContext,
_app: &galaxyui::AppContext,
) {
}
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, _app: &warpui::AppContext) {
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, _app: &galaxyui::AppContext) {
// We cannot use `extract_block` macro here since we need to locate the viewport item by content height instead of charoffset
// (temporary block has an offset of zero).
let content = model.content();
@@ -23,12 +23,12 @@ impl RenderableBlock for RenderableTextBlock {
fn layout(
&mut self,
_model: &RenderState,
_ctx: &mut warpui::LayoutContext,
_app: &warpui::AppContext,
_ctx: &mut galaxyui::LayoutContext,
_app: &galaxyui::AppContext,
) {
}
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, _app: &warpui::AppContext) {
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, _app: &galaxyui::AppContext) {
let content = model.content();
let text_block = extract_block!(
self.viewport_item,
@@ -3,8 +3,8 @@ use crate::{
extract_block,
render::model::{BlockItem, RenderState, RichTextStyles, bounds, viewport::ViewportItem},
};
use warpui::elements::ListIndentLevel;
use warpui::{
use galaxyui::elements::ListIndentLevel;
use galaxyui::{
Element, SizeConstraint,
elements::{Border, CornerRadius, Radius, Rect},
geometry::vector::vec2f,
@@ -67,8 +67,8 @@ impl RenderableBlock for RenderableBulletList {
fn layout(
&mut self,
model: &RenderState,
ctx: &mut warpui::LayoutContext,
app: &warpui::AppContext,
ctx: &mut galaxyui::LayoutContext,
app: &galaxyui::AppContext,
) {
self.bullet_point.layout(
SizeConstraint::strict(vec2f(self.bullet_size, self.bullet_size)),
@@ -88,7 +88,7 @@ impl RenderableBlock for RenderableBulletList {
})
}
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, app: &warpui::AppContext) {
fn paint(&mut self, model: &RenderState, ctx: &mut RenderContext, app: &galaxyui::AppContext) {
let content = model.content();
let unordered_list = extract_block!(self.viewport_item, content, (block, BlockItem::UnorderedList{ paragraph: inner, ..}) => block.unordered_list(inner));
+6 -6
View File
@@ -6,15 +6,15 @@ use std::ops::Range;
use std::sync::Arc;
use crate::content::text::{BufferBlockStyle, TextStylesWithMetadata};
use warpui::fonts::TextLayoutSystem;
use galaxyui::fonts::TextLayoutSystem;
#[cfg(test)]
use warpui::fonts::{Style, Weight};
use warpui::text_layout::{
use galaxyui::fonts::{Style, Weight};
use galaxyui::text_layout::{
ClipConfig, LayoutCache, Line, StyleAndFont, TextAlignment, TextBorder, TextStyle,
};
use warpui::units::{IntoPixels, Pixels};
use warpui::{AppContext, LayoutContext};
use warpui::{color::ColorU, text_layout::TextFrame};
use galaxyui::units::{IntoPixels, Pixels};
use galaxyui::{AppContext, LayoutContext};
use galaxyui::{color::ColorU, text_layout::TextFrame};
use super::model::{BlockSpacing, ParagraphStyles, RenderState, RichTextStyles};
+2 -2
View File
@@ -1,7 +1,7 @@
//! End-to-end editor tests.
use warp_core::features::FeatureFlag;
use warpui::{App, ModelHandle, ReadModel};
use galaxy_core::features::FeatureFlag;
use galaxyui::{App, ModelHandle, ReadModel};
use crate::content::{
buffer::{
+1 -1
View File
@@ -9,7 +9,7 @@
//! * The **reserved box** is the rectangle containing a block's content, padding, borders, and
//! margin - all space reserved for the block.
use warpui::{
use galaxyui::{
geometry::{
rect::RectF,
vector::{Vector2F, vec2f},
+1 -1
View File
@@ -2,7 +2,7 @@
use num_traits::SaturatingSub;
use sum_tree::SeekBias;
use warpui::units::{IntoPixels, Pixels};
use galaxyui::units::{IntoPixels, Pixels};
use string_offset::CharOffset;
@@ -16,10 +16,10 @@ use std::{cell::Cell, sync::Arc};
use string_offset::CharOffset;
use sum_tree::SumTree;
use warpui::assets::asset_cache::AssetSource;
use warpui::fonts::FamilyId;
use warpui::text_layout::{CaretPosition, TextFrame};
use warpui::units::IntoPixels;
use galaxyui::assets::asset_cache::AssetSource;
use galaxyui::fonts::FamilyId;
use galaxyui::text_layout::{CaretPosition, TextFrame};
use galaxyui::units::IntoPixels;
fn test_table_layout() -> LaidOutTable {
let source = "aaa\tbbb\nccc\tddd\n";
+6 -6
View File
@@ -21,11 +21,11 @@ use serde_yaml::Mapping;
use sum_tree::{SeekBias, SumTree};
use vec1::Vec1;
use vim::vim::{MotionType, VimMode};
use warp_core::{
use galaxy_core::{
channel::ChannelState,
ui::{Icon, theme::Fill as ThemeFill},
};
use warpui::{
use galaxyui::{
AppContext, Entity, EntityId, ModelContext, ModelHandle,
assets::asset_cache::AssetSource,
color::ColorU,
@@ -69,7 +69,7 @@ use crate::{
render::model::debug::Describe,
};
use string_offset::{CharOffset, impl_offset};
use warpui::elements::ListIndentLevel;
use galaxyui::elements::ListIndentLevel;
use super::{
BLOCK_FOOTER_HEIGHT,
@@ -664,7 +664,7 @@ impl LineCount {
}
/// A character offset within a [`TextFrame`]. These offsets count characters in the Rust string
/// passed to [`warpui::text_layout::LayoutCache::layout_text()`].
/// passed to [`galaxyui::text_layout::LayoutCache::layout_text()`].
///
/// Frame offsets often, but not always, correspond to glyph indices and caret positions. However,
/// they do not line up 1:1 if a glyph or grapheme contains multiple characters
@@ -4305,7 +4305,7 @@ impl<'a> Positioned<'a, Paragraph> {
vec2f(underline_width, UNDERLINE_THICKNESS),
);
let dash = warpui::scene::Dash {
let dash = galaxyui::scene::Dash {
dash_length: DASHED_UNDERLINE_DASH_LENGTH,
gap_length: DASHED_UNDERLINE_GAP_LENGTH,
force_consistent_gap_length: true,
@@ -4314,7 +4314,7 @@ impl<'a> Positioned<'a, Paragraph> {
.scene
.draw_rect_without_hit_recording(underline_rect)
.with_border(
warpui::scene::Border::bottom(UNDERLINE_THICKNESS)
galaxyui::scene::Border::bottom(UNDERLINE_THICKNESS)
.with_dashed_border(dash)
.with_border_color(color),
);
+8 -8
View File
@@ -2,8 +2,8 @@ use rangemap::RangeSet;
use std::{cell::Cell, sync::Arc};
use sum_tree::SumTree;
use vec1::{Vec1, vec1};
use warpui::assets::asset_cache::AssetSource;
use warpui::{
use galaxyui::assets::asset_cache::AssetSource;
use galaxyui::{
color::ColorU,
fonts::FamilyId,
geometry::{rect::RectF, vector::vec2f},
@@ -34,7 +34,7 @@ use crate::{
};
use markdown_parser::{FormattedTextStyles, Hyperlink};
use string_offset::CharOffset;
use warpui::elements::ListIndentLevel;
use galaxyui::elements::ListIndentLevel;
#[test]
fn test_height() {
@@ -930,7 +930,7 @@ fn test_multiselect_autoscroll_bounding_box() {
);
}
// 18:09:15 [INFO] [warp_editor::render::model] Initial tree:
// 18:09:15 [INFO] [galaxy_editor::render::model] Initial tree:
// -------- 0.00px / 0 characters --------
// Hidden (3067 characters, 87 lines, 20.00px tall)
// -------- 20.00px / 3067 characters --------
@@ -1033,7 +1033,7 @@ fn test_dedupe_hidden_ranges_logged_tree_is_unchanged() {
assert_eq!(initial, resulting);
}
// 18:09:14 [INFO] [warp_editor::render::model] Initial tree:
// 18:09:14 [INFO] [galaxy_editor::render::model] Initial tree:
// -------- 0.00px / 0 characters --------
// Hidden (3066 characters, 87 lines, 20.00px tall)
// -------- 20.00px / 3067 characters --------
@@ -1158,17 +1158,17 @@ fn make_test_cell_layout() -> CellLayout {
line_char_ranges: vec![CharOffset::from(0)..CharOffset::from(3)],
line_widths: vec![30.0],
line_caret_positions: vec![vec![
warpui::text_layout::CaretPosition {
galaxyui::text_layout::CaretPosition {
position_in_line: 0.0,
start_offset: 0,
last_offset: 0,
},
warpui::text_layout::CaretPosition {
galaxyui::text_layout::CaretPosition {
position_in_line: 10.0,
start_offset: 1,
last_offset: 1,
},
warpui::text_layout::CaretPosition {
galaxyui::text_layout::CaretPosition {
position_in_line: 20.0,
start_offset: 2,
last_offset: 2,
+1 -1
View File
@@ -19,7 +19,7 @@ mod tests;
/// certain character runs are interactive. Within those runs, there's a 1:1 mapping between
/// `char`s in the content model and `char`s in the text frame. It translates in two directions:
/// * From a [`CharOffset`] relative to the start of the content model block (a [`super::Paragraph`])
/// to the character index in the [`warpui::text_layout::TextFrame`].
/// to the character index in the [`galaxyui::text_layout::TextFrame`].
/// * From a [`FrameOffset`] in the `TextFrame` to the closest `CharOffset` in the content model
/// block (for example, clicking within a placeholder should snap the cursor to a regular content
/// character).
@@ -76,7 +76,7 @@ fn test_offset_map_placeholders() {
fn test_end_to_end() {
// Group imports here so they don't cause "unused import" warnings on other targets.
use warpui::{
use galaxyui::{
App, color::ColorU, elements::Fill, fonts::Cache as FontCache, text_layout::LayoutCache,
};
@@ -97,7 +97,7 @@ fn test_end_to_end() {
};
App::test((), |mut app| async move {
let mut font_cache = FontCache::new(Box::new(warpui::platform::current::FontDB::new()));
let mut font_cache = FontCache::new(Box::new(galaxyui::platform::current::FontDB::new()));
let layout_cache = LayoutCache::new();
let paragraph_styles = ParagraphStyles {
font_family: font_cache
+1 -1
View File
@@ -4,7 +4,7 @@
use std::sync::Arc;
use sum_tree::{Cursor, Dimension};
use warpui::{
use galaxyui::{
geometry::vector::Vector2F,
text_layout::Line,
units::{IntoPixels, Pixels},
@@ -1,4 +1,4 @@
use warpui::EntityId;
use galaxyui::EntityId;
/// Utility for consistently creating and referencing saved position IDs for
/// rich text.
@@ -17,16 +17,16 @@ impl SavedPositions {
/// Saved position ID for the cursor location.
pub fn cursor_id(&self) -> String {
format!("warp_editor:cursor_{}", self.model_id)
format!("galaxy_editor:cursor_{}", self.model_id)
}
/// The bounding box for the text selection.
pub fn text_selection_id(&self) -> String {
format!("warp_editor:text_selection_{}", self.model_id)
format!("galaxy_editor:text_selection_{}", self.model_id)
}
/// The first line of the block that the mouse is currently hovered over.
pub fn hovered_block_start(&self) -> String {
format!("warp_editor:hovered_block_start_{}", self.model_id)
format!("galaxy_editor:hovered_block_start_{}", self.model_id)
}
}
+5 -5
View File
@@ -6,8 +6,8 @@ use vec1::{Vec1, vec1};
use crate::content::text::BufferBlockStyle;
use ordered_float::OrderedFloat;
use warpui::elements::ListIndentLevel;
use warpui::{
use galaxyui::elements::ListIndentLevel;
use galaxyui::{
color::ColorU,
elements::{Border, Fill},
fonts::{FamilyId, Weight},
@@ -241,7 +241,7 @@ pub fn layout(text: &str, styles: &RichTextStyles, max_width: impl IntoPixels) -
width: line_width.as_f32(),
trailing_whitespace_width: 0.,
runs: vec![Run {
font_id: warpui::fonts::FontId(0),
font_id: galaxyui::fonts::FontId(0),
styles: Default::default(),
glyphs: mem::take(&mut glyphs_acc),
width: line_width.as_f32(),
@@ -280,7 +280,7 @@ pub fn layout(text: &str, styles: &RichTextStyles, max_width: impl IntoPixels) -
width: line_width.as_f32(),
trailing_whitespace_width: 0.,
runs: vec![Run {
font_id: warpui::fonts::FontId(0),
font_id: galaxyui::fonts::FontId(0),
styles: Default::default(),
glyphs: glyphs_acc,
width: line_width.as_f32(),
@@ -316,7 +316,7 @@ pub fn init_logging() {
static INIT: Once = Once::new();
INIT.call_once(|| {
env_logger::builder()
.parse_filters("warp_editor=trace")
.parse_filters("galaxy_editor=trace")
.is_test(true)
.init();
});
+1 -1
View File
@@ -1,6 +1,6 @@
use float_cmp::ApproxEq;
use sum_tree::{SeekBias, SumTree};
use warpui::{
use galaxyui::{
SizeConstraint,
geometry::{
rect::RectF,
@@ -1,7 +1,7 @@
use itertools::Itertools;
use sum_tree::SumTree;
use warpui::{
use galaxyui::{
SizeConstraint,
geometry::vector::vec2f,
units::{IntoPixels, Pixels},
+3 -3
View File
@@ -3,8 +3,8 @@ use std::ops::Range;
use itertools::Itertools;
use lazy_static::lazy_static;
use pathfinder_color::ColorU;
use warp_core::ui::theme::Fill;
use warpui::{Entity, ModelContext, ModelHandle, r#async::SpawnedFutureHandle};
use galaxy_core::ui::theme::Fill;
use galaxyui::{Entity, ModelContext, ModelHandle, r#async::SpawnedFutureHandle};
use crate::{
content::{
@@ -276,7 +276,7 @@ impl Searcher {
#[cfg(test)]
pub fn search_finished(
&self,
ctx: &mut warpui::AppContext,
ctx: &mut galaxyui::AppContext,
) -> impl std::future::Future<Output = ()> + use<> {
let maybe_search = self
.search_handle
+1 -1
View File
@@ -1,4 +1,4 @@
use warpui::{App, ModelHandle};
use galaxyui::{App, ModelHandle};
use crate::content::{
buffer::{AutoScrollBehavior, Buffer, BufferEditAction, BufferSelectAction, EditOrigin},
+2 -2
View File
@@ -1,7 +1,7 @@
use num_traits::SaturatingSub;
use std::ops::Range;
use vec1::Vec1;
use warpui::{AppContext, Entity, ModelAsRef, ModelContext, ModelHandle, units::Pixels};
use galaxyui::{AppContext, Entity, ModelAsRef, ModelContext, ModelHandle, units::Pixels};
use crate::{
content::{
@@ -16,7 +16,7 @@ use crate::{
render::model::{RenderState, SoftWrapPoint},
};
use string_offset::CharOffset;
use warpui::text::{TextBuffer, point::Point, word_boundaries::WordBoundariesPolicy};
use galaxyui::text::{TextBuffer, point::Point, word_boundaries::WordBoundariesPolicy};
#[cfg(test)]
#[path = "selection_tests.rs"]
+5 -5
View File
@@ -3,8 +3,8 @@ use std::sync::Arc;
use serde_yaml::Value;
use sum_tree::SumTree;
use vec1::vec1;
use warp_core::features::FeatureFlag;
use warpui::{App, ModelAsRef, units::IntoPixels};
use galaxy_core::features::FeatureFlag;
use galaxyui::{App, ModelAsRef, units::IntoPixels};
use crate::{
content::{
@@ -22,8 +22,8 @@ use crate::{
selection::SelectionMode,
};
use string_offset::CharOffset;
use warpui::assets::asset_cache::AssetSource;
use warpui::text::word_boundaries::WordBoundariesPolicy;
use galaxyui::assets::asset_cache::AssetSource;
use galaxyui::text::word_boundaries::WordBoundariesPolicy;
use super::{SelectionModel, TextDirection, TextUnit};
@@ -37,7 +37,7 @@ impl SelectionModel {
}
}
fn selection_model_with_rendered_mermaid(app: &mut App) -> warpui::ModelHandle<SelectionModel> {
fn selection_model_with_rendered_mermaid(app: &mut App) -> galaxyui::ModelHandle<SelectionModel> {
app.add_model(|ctx| {
let buffer = ctx.add_model(|_| Buffer::new(Box::new(|_, _| IndentBehavior::Ignore)));
let buffer_selection = ctx.add_model(|_| BufferSelectionModel::new(buffer.clone()));