BREAKING CHANGES: - Relationship syntax now requires blocks for all participants - Removed self/other perspective blocks from relationships - Replaced 'guard' keyword with 'if' for behavior tree decorators Language Features: - Add tree-sitter grammar with improved if/condition disambiguation - Add comprehensive tutorial and reference documentation - Add SBIR v0.2.0 binary format specification - Add resource linking system for behaviors and schedules - Add year-long schedule patterns (day, season, recurrence) - Add behavior tree enhancements (named nodes, decorators) Documentation: - Complete tutorial series (9 chapters) with baker family examples - Complete reference documentation for all language features - SBIR v0.2.0 specification with binary format details - Added locations and institutions documentation Examples: - Convert all examples to baker family scenario - Add comprehensive working examples Tooling: - Zed extension with LSP integration - Tree-sitter grammar for syntax highlighting - Build scripts and development tools Version Updates: - Main package: 0.1.0 → 0.2.0 - Tree-sitter grammar: 0.1.0 → 0.2.0 - Zed extension: 0.1.0 → 0.2.0 - Storybook editor: 0.1.0 → 0.2.0
56 lines
1.3 KiB
Rust
56 lines
1.3 KiB
Rust
/// UI components module
|
|
mod components;
|
|
mod entity_browser;
|
|
mod file_editor;
|
|
mod main_editor;
|
|
mod menu_bar;
|
|
mod quick_actions;
|
|
mod tabs;
|
|
|
|
use iced::{
|
|
Element,
|
|
Length,
|
|
widget::{
|
|
column,
|
|
row,
|
|
},
|
|
};
|
|
|
|
use crate::app::{
|
|
Editor,
|
|
Message,
|
|
};
|
|
|
|
pub fn view(editor: &Editor) -> Element<'_, Message> {
|
|
let menu_bar = menu_bar::view(editor);
|
|
let tab_bar = tabs::tab_bar(editor);
|
|
let main_editor = main_editor::view(editor);
|
|
|
|
let editor_with_tabs = column![tab_bar, main_editor]
|
|
.spacing(0)
|
|
.width(Length::Fill)
|
|
.height(Length::Fill);
|
|
|
|
// Zed-like layout: file tree + editor (only show file tree when project is
|
|
// open)
|
|
let main_content = if editor.project.is_some() {
|
|
let entity_browser = entity_browser::view(editor);
|
|
row![entity_browser, editor_with_tabs]
|
|
.spacing(0)
|
|
.width(Length::Fill)
|
|
.height(Length::Fill)
|
|
} else {
|
|
// No project - just show editor area (welcome screen)
|
|
row![editor_with_tabs]
|
|
.spacing(0)
|
|
.width(Length::Fill)
|
|
.height(Length::Fill)
|
|
};
|
|
|
|
column![menu_bar, main_content]
|
|
.spacing(0)
|
|
.width(Length::Fill)
|
|
.height(Length::Fill)
|
|
.into()
|
|
}
|