Expand description
Mobiler’s fixed UI wire ABI.
These types are the stable contract between any Mobiler app’s Rust core and the native shell. Because they never change per app, a single shell is built once and renders any Mobiler app — the shell only ever knows these types, never an app’s domain events or widgets.
- The core emits a
Widgettree (theViewModel). - The shell sends back an
Action(theEvent). - App domain events ride inside actions as opaque
ActionTokens that the shell round-trips without interpreting.
Style is expressed as intent tokens (e.g. TextStyle, Tone); the
shell maps each to a concrete look (font, color, dp), so dark mode and theme
come for free on the native side.
Structs§
- Fab
- A floating action button anchored over the scaffold body (the raised primary action).
- Rgb
- A 24-bit RGB color. Used for a theme’s brand/seed color — the one place an app supplies an arbitrary color (everything else is intent tokens).
- Segment
- One option in a
Widget::Segmentedcontrol (mirrorsTab).selectedmarks the active segment; tapping sendson_select. - Sheet
- A modal bottom sheet anchored over the scaffold body (a scrim behind, a panel rising from
the bottom). Present (
Some) ⇒ open; tapping the scrim/handle sendson_dismiss. - Swipe
Button - One revealed action in a
SwipeActionrow (swipe to reveal, tap to fire). - Tab
- A bottom-navigation tab.
selectedmarks the active one; tapping sendson_select.icon(optional) renders above the label for an icon tab bar. - Theme
- App branding as data — the visual twin of
dark_mode. Set on aWidget::Scaffold(theme: None= the framework defaults, i.e. no visual change). The shell maps these to its native theming:seed→ the brand/primary color (Android M3 scheme / iOS tint / web--primary), plus a global corner, spacing, and font choice.
Enums§
- Action
- What the shell sends back to the core. Fixed across all apps.
- BoxAlign
- Button
Style - Card
Style - Chart
Style - How a
Chartdraws its values. - Corner
- Global corner-radius scale.
Medium≈ the current (un-themed) look. - Density
- Global spacing scale.
Comfortable≈ the current (un-themed) spacing. - Font
Family - A finite, cross-platform font family (maps to each platform’s nearest system
font design — no bundled font files).
System≈ the current look. - Icon
- A finite icon set (maps to Material icons / SF Symbols / web glyphs per shell). Grouped: editing, navigation/chrome, content, and domain icons.
- Image
Ratio - Image
Shape - Input
Value - A value produced by an input widget at runtime.
- Project
Color - Project-identity colors (distinct from semantic
Tone). Concrete RGB decided in the render layer. - Spacing
- Text
Style - Tone
- Semantic status color (distinct from brand/identity color).
- Widget
- The app-agnostic widget tree the shell renders. Fixed across all apps.
Type Aliases§
- Action
Token - An opaque, serialized app event (e.g. JSON of the app’s domain action).