Expand description
Dioxus integration for hyle.
Provides hooks and context utilities for building data-driven UIs with hyle
in Dioxus applications, calling the hyle crate directly without any WASM bridge.
§Quick start
ⓘ
use std::sync::Arc;
use dioxus::prelude::*;
use hyle_dioxus::{use_context_provider, HyleConfig, use_data, HyleAdapter, use_adapter_config};
fn app() -> Element {
use_context_provider(|| HyleConfig { blueprint: Arc::new(my_blueprint()) });
use_adapter_config!(make_rest_adapter("http://localhost:3001/api"));
rsx! { Router::<Route> {} }
}Re-exports§
pub use filter::FilterField;pub use filter::FilterField;pub use filter::FormFilterField;pub use filter::FormFilterField;
Macros§
- use_
adapter_ config - Provide a
HyleAdapteras Dioxus context.
Structs§
- Blueprint
- Bound
Mutate Input - Input for a
BoundMutation— likeMutateInputbut withoutmodel. - Bound
Mutation - A mutation handle with
modelpre-bound. - Bound
Mutations - Create/update/delete handles with
modelpre-bound. - Column
- Dioxus
Mutation Options - Field
- Forma
- Forma
Field - Hyle
Adapter - Unified adapter stored in Dioxus context.
- Hyle
Components - A map of component overrides for value cells and filter inputs.
- Hyle
Config - Hyle configuration stored in Dioxus context.
- Hyle
Filter Field Props - Props passed to a custom render function supplied to
FilterField. - Hyle
Filters State - State returned by
use_filters. - Hyle
Form State - State returned by
use_form. - Hyle
List State - State returned by
use_list. - Hyle
Mutation - A mutation handle.
- Hyle
Value Props - Props passed to a custom value cell renderer in
HyleComponents. - Manifest
- Model
- Purify
Error - Query
- Sort
- UseFilters
Options - Options for
use_filters. - UseForm
Options - Options for
use_form.
Enums§
- Field
Type - Forma
Context - Which rendering context to use when deriving a query from a forma.
- Forma
Field Type - How a forma field type is described in a runtime forma definition. Strings correspond to primitive names or entity names (for references).
- Hyle
Source State - The result of a source adapter call.
- Primitive
Functions§
- Filter
Field - A reactive filter input derived from
HyleFiltersState. - Form
Filter Field - Like
FilterFieldbut intended for form contexts: boolean fields render as a self-labelling checkbox (label on the right) instead of a 3-state select, matching the ReactFilterBooleancheckbox appearance. - field_
type_ key - Derive the
HyleComponentskey string from aFieldType. - form_
body - Convert an
IndexMap<String, String>(e.g. a parsed HTML form body) into a JSONValueobject. - make_
fullstack_ adapter - use_
context_ provider - Convenience re-export so callers don’t need to import
use_context_providerdirectly. Provide some context via the tree and return a reference to it - use_
data - Reactively resolve data for a query.
- use_
dioxus_ mutation - use_
filters - Reactive filter/form state with validation.
- use_
form - Auto-wired form hook. Derives edit/create mode from the query, reads the
appropriate mutation from
HyleAdapterConfigcontext, and delegates filter state touse_filters. - use_
forma - Fetch a forma definition from the
"forma"model and derive a query for the target table. - use_
fullstack_ source - use_
hyle_ components - Read
HyleComponentsfrom Dioxus context, if provided. - use_
list - Reactive list view with pagination and sort signals.
- use_
list_ with_ filters - Reactive list view driven by a live
HyleFiltersState. - use_
manifest - Reactively derive a
Manifestfrom a query. - use_
mutation - Returns create/update/delete mutation handles with
modelpre-bound.
Type Aliases§
- Dioxus
Field Change Fn - A single per-field Dioxus transform function.
- Dioxus
Field Change Map - A map of per-field Dioxus transform functions (keyed by field name).
- Hyle
Filter Field - Dioxus specialisation of
hyle::HyleFilterField— therenderfield carries an optional per-field Dioxus render closure. - Invalidation
Signal - Row
- Source
- UseSource
- A reactive source handle —
ReadOnlySignal<HyleSourceState>. - Value