Files
Ely-GPUI-Components/examples/gallery/pages/mod.rs
T
ZacharyZhang-NY 9edd0a8612 T21a: Documents, editing
- markdown read with pulldown-cmark: marks for live styling, blocks, links, words
- forms::Highlight gains weight, slant and strike; measure and paint share runs
- Inter Italic embedded, so emphasis reads slanted
- forms::mention's popup and keys become Suggestions, shared with the editors
- RichTextEditor with FixedFormatToolbar, the floating toolbar, LinkEditor,
  @ and : suggestions, WordCount and ReadingTime
- MarkdownEditor: visual (a pressed block opens as source), source, split
- BlockEditor: prose, lists, to-dos, quotes, callouts, toggles, code, math,
  diagrams the app draws, dividers, tables that grow and merge, pictures to
  resize and align, cards for video and pages, columns, synced text; slash menu,
  markdown shortcuts, handles that drag and open a menu, one undo for all
- TodoItem and Checklist
- icons: heading-1..3, workflow, merge
- gallery: the Documents page with scripted states
2026-09-26 03:32:24 -04:00

68 lines
1.2 KiB
Rust

mod buttons;
mod charts;
mod data;
mod debug;
mod documents;
mod editor;
mod feedback;
mod finance;
mod forms;
mod git;
mod layout;
mod lists;
mod menus;
mod motion;
mod navigation;
mod overlays;
mod primitives;
mod shell;
mod tables;
mod terminal;
mod theme;
mod typography;
use gpui::{AnyElement, App, Window};
use crate::script::Step;
pub struct Page {
pub number: u8,
pub slug: &'static str,
pub title: &'static str,
pub summary: &'static str,
pub render: fn(&mut Window, &mut App) -> AnyElement,
/// Interactions shot after the static pages.
pub script: &'static [Step],
}
pub const ALL: &[Page] = &[
primitives::PAGE,
typography::PAGE,
layout::PAGE,
shell::PAGE,
buttons::PAGE,
forms::PAGE,
navigation::PAGE,
menus::PAGE,
overlays::PAGE,
feedback::PAGE,
motion::PAGE,
data::PAGE,
lists::PAGE,
tables::PAGE,
charts::PAGE,
finance::PAGE,
editor::PAGE,
terminal::PAGE,
git::PAGE,
debug::PAGE,
documents::PAGE,
theme::PAGE,
];
pub use shell::{open_about, open_managed};
pub fn find(slug: &str) -> Option<usize> {
ALL.iter().position(|page| page.slug == slug)
}