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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
// Token types (enumerated, not glob).
pub use ;
/// Pure-Rust WCAG contrast utilities, re-exported from `snora-design`.
///
/// Available through the `snora::design` facade so that applications do
/// not need a direct `snora-design` dependency to use the contrast
/// utilities alongside the rest of the design system.
///
/// Functions:
///
/// * [`contrast_ratio`] — WCAG 2.1 contrast ratio between two opaque
/// colors (range 1.0–21.0; AA body text threshold is 4.5).
/// * [`relative_luminance`] — WCAG 2.1 relative luminance of a color
/// (range 0.0–1.0).
/// * [`composite_over`] — alpha-composite a translucent foreground over
/// an opaque background before contrast checking.
///
/// [`contrast_ratio`]: snora_design::contrast::contrast_ratio
/// [`relative_luminance`]: snora_design::contrast::relative_luminance
/// [`composite_over`]: snora_design::contrast::composite_over
/// iced style functions derived from Snora Design tokens.
/// Token-derived `iced::Theme` emission (RFC-038).
///
/// [`theme`] derives a complete `iced::Theme` from a [`Tokens`] bundle so
/// stock iced widgets and the window background follow the same palette as
/// snora's design primitives — without letting iced substitute its own
/// heuristically-corrected colors for the contrast-tested ones the preset
/// guarantees. See [`theme`] for the full mapping and usage example.
pub use theme;
/// Token-derived engine surface styling: the dialog card and the modal
/// dim (RFC-039).
///
/// [`render`] is a sibling to [`crate::render::render`] (`snora::render`),
/// not a replacement — see [`render`]'s own documentation for the
/// derivation and the gating-invariant guarantee.
pub use render;
/// Token-derived chrome geometry: styled variants of the header, sidebar,
/// footer, tab bar, and breadcrumb (RFC-040).
///
/// Each function takes `&Tokens` first, then the same parameters as its
/// unstyled `snora::widget::*` counterpart. Colors already follow the
/// theme (RFC-038); these additionally map padding, gaps, and corner
/// radii to `tokens.spacing`/`tokens.radius`. See
/// `snora_widgets::design::widget`'s module documentation for the full
/// mapping table and rationale.
/// Pilot button helpers (RFC-028).
///
/// Each function wraps `iced::widget::button` with Snora Design token
/// styling. Token ownership is handled internally via `Clone`; callers
/// do not need to annotate lifetimes.
/// Pilot card helpers (RFC-029).
///
/// Each function wraps `iced::widget::container` with Snora Design token
/// styling. Cards are non-interactive visual grouping surfaces;
/// application behaviour lives outside the card.
/// Notice banner primitive (RFC-032).
///
/// Builder: `Notice::new(tokens, tone, body).title(…).action(…).dismiss(…).render()`.
/// Filter and removable chip primitives (RFC-032).
/// Progress row and card primitives (RFC-032).