A new chapter, src/media. ImageViewer fits a picture to its stage and zooms by the document steps, by keys, buttons and Cmd-scroll about the pointer; a drag through gpui's drag, a scroll or the arrows pan it once it overhangs; R turns it a quarter at a time. gpui paints pictures without a transform, so media::turn turns the decoded frames off the main thread, an asset keyed by the picture and the turn; `image` 0.25, which gpui already decodes with, is now a dependency. ImageThumbnail shows a picture in its own shape with a corner label and a ring when chosen, and is a Tab stop only with a handler. Lightbox / Gallery Viewer points to overlays::Lightbox, which the gallery opens from the thumbnails. T26 splits into T26a–e. AGENTS.md: the drag rule says drags that pan, turn or slide go through gpui's drag; pictures turn by their pixels. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
55 lines
1.4 KiB
Rust
55 lines
1.4 KiB
Rust
mod blocks;
|
|
mod counts;
|
|
mod epub;
|
|
mod find;
|
|
mod format;
|
|
mod history;
|
|
mod knowledge;
|
|
mod link;
|
|
mod markdown;
|
|
mod modes;
|
|
mod pages;
|
|
mod print;
|
|
mod reading;
|
|
mod render;
|
|
mod rich;
|
|
mod suggest;
|
|
mod templates;
|
|
#[cfg(all(test, feature = "test-support"))]
|
|
mod tests;
|
|
mod thumbs;
|
|
mod todo;
|
|
mod toolbar;
|
|
mod tree;
|
|
mod viewer;
|
|
|
|
use gpui::App;
|
|
|
|
pub(crate) use blocks::source;
|
|
pub use blocks::{Align, BlockData, BlockEditor, BlockEvent, BlockKind, Media};
|
|
pub use counts::{ReadingTime, WordCount};
|
|
pub use epub::{Chapter, EpubReader};
|
|
pub use format::{Format, format};
|
|
pub(crate) use history::Change;
|
|
pub use history::{PageHistoryDiff, Version, VersionHistory};
|
|
pub use knowledge::{Backlink, Backlinks, Favorite, Favorites, TrashBin, Trashed};
|
|
pub use link::LinkEditor;
|
|
pub use markdown::markdown_highlights;
|
|
pub use modes::{MarkdownEditor, MarkdownMode};
|
|
pub use pages::{PageCover, PageIcon};
|
|
pub use print::{Margins, Paper, PrintPreview, PrintSettings, sheet};
|
|
pub use reading::{Footnote, Glossary, ReadingProgress, TooltipTerm, ZenMode};
|
|
pub use render::{MarkdownRenderer, outline};
|
|
pub use rich::RichTextEditor;
|
|
pub use templates::{Template, TemplatePicker};
|
|
pub use thumbs::PageThumbnailList;
|
|
pub use todo::{Checklist, TodoItem};
|
|
pub use toolbar::FixedFormatToolbar;
|
|
pub(crate) use viewer::step as zoom_step;
|
|
pub use viewer::{DocPage, DocumentViewer, PageHit, PageNote};
|
|
|
|
/// Binds the documents keys. `init` calls it.
|
|
pub(crate) fn bind_keys(cx: &mut App) {
|
|
rich::bind_keys(cx);
|
|
}
|