Skip to main content

Crate snora_core

Crate snora_core 

Source
Expand description

§snora-core

The contract and vocabulary layer of the Snora GUI framework.

This crate has no dependency on iced. It defines:

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 PageContract trait that declared view, dialog, toasts, etc. In practice the render engine did not consume the non-view methods, forcing users to plumb them manually. v0.4 drops the trait and keeps all overlay state as plain fields on AppLayout.

  • No user-extensible close hooks. Closing an overlay is a single concern with a single channel: AppLayout::on_close_menus and AppLayout::on_close_modals. Individual Dialog / Sheet values 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.