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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
// 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.
///
/// Reaches [`snora_style`] directly (RFC-055) — available whenever
/// `design` is enabled, independent of `widgets`. Not gated: unlike the
/// modules below, this one does not depend on `snora-widgets` at all.
/// 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.
///
/// Reaches [`snora_style`] directly (RFC-055 round 2) — available
/// whenever `design` is enabled, independent of `widgets`, matching
/// [`style`] above. Not `widgets`-gated: `theme.rs` imports nothing
/// from the widget layer either (it styles *stock* iced widgets —
/// `text_input`, `pick_list`, `scrollable` — not snora's own prefab
/// ones), and the one known consumer of it has zero
/// `snora::widget::*` call sites, so gating it behind `widgets` would
/// have made design-without-widgets incomplete for exactly the
/// consumer it exists to serve.
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.
///
/// [`responsive_render`] is the `design`-path pair to
/// [`crate::responsive::responsive_render`] (`snora::responsive_render`)
/// — width-aware layout that keeps the styled dialog card and derived
/// modal dim, where the engine-path function would silently drop them
/// (RFC-053).
pub use ;
/// 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.
///
/// `widgets`-gated (RFC-055): this is a widget, not a style function —
/// it returns a composed `Element`, and depends on `snora-widgets`'s own
/// prefab building blocks.
/// 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.
///
/// `widgets`-gated (RFC-055): see [`style::button`] for the underlying
/// style functions these wrap, which work without `widgets`.
/// 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.
///
/// `widgets`-gated (RFC-055): see [`style::container`] for the
/// underlying style functions these wrap, which work without `widgets`
/// — the same ones [`crate::design::render`]'s dialog card uses.
/// Notice banner primitive (RFC-032).
///
/// Builder: `Notice::new(tokens, tone, body).title(…).action(…).dismiss(…).render()`.
///
/// `widgets`-gated (RFC-055).
/// Filter and removable chip primitives (RFC-032).
///
/// `widgets`-gated (RFC-055).
/// Progress row and card primitives (RFC-032).
///
/// `widgets`-gated (RFC-055): see [`style::progress`] for the underlying
/// style functions, which work without `widgets`.