Expand description
§snora-core
The contract and vocabulary layer of the Snora GUI framework.
This crate has no dependency on iced. It defines:
- The shape of an application layout (
AppLayout) — the skeleton an engine implementation is expected to render. - Vocabulary enums that spell out the canonical choices an application
can make:
LayoutDirection,ToastIntent,ToastLifetime,ToastPosition,SheetEdge,SheetSize,Icon. - Data contracts for secondary surfaces:
Toast,Dialog,Sheet,Menu,MenuItem,SideBar,SideBarItem.
The snora sibling crate binds these contracts to iced and provides the
actual render engine. Other engines (e.g. a test double, a WGPU frontend,
a WASM/HTML backend) could be built against this vocabulary without
depending on iced.
§Non-goals
-
No trait-driven rendering. Earlier drafts of snora exposed a
PageContracttrait that declaredview,dialog,toasts, etc. In practice the render engine did not consume the non-viewmethods, forcing users to plumb them manually. v0.4 drops the trait and keeps all overlay state as plain fields onAppLayout. -
No user-extensible close hooks. Closing an overlay is a single concern with a single channel:
AppLayout::on_close_menusandAppLayout::on_close_modals. IndividualDialog/Sheetvalues do not carry their own close messages.
Re-exports§
pub use crumb::BreadcrumbAction;pub use crumb::Crumb;pub use direction::Edge;pub use direction::LayoutDirection;pub use focus::Cycle;pub use focus::FocusZone;pub use focus::ZonePresence;pub use icon::Icon;pub use layout::AppLayout;pub use menu::Menu;pub use menu::MenuAction;pub use menu::MenuItem;pub use overlay::Dialog;pub use overlay::Sheet;pub use overlay::SheetEdge;pub use overlay::SheetSize;pub use sidebar::SideBar;pub use sidebar::SideBarItem;pub use tab::Tab;pub use tab::TabAction;pub use tab::TabBar;pub use toast::Toast;pub use toast::ToastIntent;pub use toast::ToastLifetime;pub use toast::ToastPosition;
Modules§
- crumb
- Breadcrumb trail —
Crumb,BreadcrumbAction. Breadcrumb — a hierarchical-position indicator that doubles as a navigation widget for ancestor levels. - direction
- Reading direction and logical edges (
Start,End). Logical layout direction — the foundation of ABDD (Accessible By Default and by Design). - focus
- Frame-level keyboard zone navigation —
focus::FocusZone,focus::next_zone. Frame-level keyboard zone navigation — pure, iced-free decision vocabulary (RFC-060). - icon
- Icon enum and its source variants (text, Lucide, SVG). Icon vocabulary.
- layout
- The application skeleton (
AppLayout). The application skeleton —AppLayout. - menu
- Header / context menu vocabulary. Header menus (File / Edit / View / … drop-downs).
- overlay
- Modal overlay surfaces —
Dialog,Sheet. Dialogs and edge-anchored sheets — the modal overlay surfaces. - sidebar
- Vertical navigation rail. Vertical navigation rail (icon-only sidebar).
- tab
- Horizontal tab bar —
TabBar,Tab,TabAction. Tab bar — horizontal selector for switching between sibling views. - toast
- Toast notifications and lifetime / position vocabulary. Toast notifications.