1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! # 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`],
//! [`SheetHeight`], [`Icon`].
//! * Data contracts for secondary surfaces: [`Toast`], [`Dialog`],
//! [`BottomSheet`], [`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
//! `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` / `BottomSheet`
//! values do *not* carry their own close messages.
pub use ;
pub use Icon;
pub use AppLayout;
pub use ;
pub use ;
pub use ;
pub use ;