Expand description
The usual imports for application code.
Re-exports§
pub use crate::framework::run;pub use crate::framework::testing::HeadlessApp;pub use crate::framework::testing::TestApp;pub use crate::framework::ActionControl;pub use crate::framework::Actions;pub use crate::framework::Bindable;pub use crate::framework::Command;pub use crate::framework::Dispatcher;pub use crate::framework::Each;pub use crate::framework::EditsText;pub use crate::framework::EffectCx;pub use crate::framework::EffectStatus;pub use crate::framework::Effected;pub use crate::framework::Fixture;pub use crate::framework::Form;pub use crate::framework::Jobs;pub use crate::framework::LaunchInput;pub use crate::framework::Live;pub use crate::framework::LiveRow;pub use crate::framework::PersonRecord;pub use crate::framework::Records;pub use crate::framework::ResourceApp;pub use crate::framework::ResourceSelection;pub use crate::framework::ResourceSurface;pub use crate::framework::RunMode;pub use crate::framework::SeedCx;pub use crate::framework::Setting;pub use crate::framework::Submit;pub use crate::framework::SurfaceCx;pub use crate::framework::TextControl;pub use crate::framework::ViewCx;pub use tilo_resource;pub use ui_core::tilo_actions;
Modules§
- collaboration
- Toolkit-side collab client: a synchronous, non-blocking
send/pollpair trading typedCollabRequest/CollabEventframes, stable so every downstream app keeps compiling while the transport underneath changes. - history_
source - Turning a live CRDT document into the rows the history widgets render.
- presence
- resource
- The resource contract: what any resource type provides so that it gets history, undo, collaboration, permissions, palette/agent/script exposure, search and replay without writing any of them.
- resource_
actions - Toolkit-owned host for a small app’s typed resource/action surface.
- search
- Search as a platform service.
Macros§
- column
- Build a retained
Columnfrom concrete child widgets without repeatingpush(Box::new(...)). - row
- Build a retained
Rowfrom concrete child widgets. - stack
- Build a retained
Stackfrom overlapping concrete child widgets.
Structs§
- Action
Cx - Deterministic services available while an action applies.
- Action
Decl - One mutation offered by name: a [
Declaration] of the resourceR, whose fields it derefs to. - Action
Emitter - A reusable action-intent queue for controls, including custom widgets.
Widgets call
emitfrom any interaction path. Mounted shared controls install independent host custody; custom producers should usenew_inwith their actual owner domain. The privatetakepath remains only as explicitly unqualified migration compatibility. - Action
Form - One action whose arguments and live UI state are declared together.
- Action
Need - What one invocation of an action is, for the grants deciding it: its kind,
the one field of its resource it writes when it writes only one (a reply
writes the
comments), which places it below that field in the tree, and whether it is privileged (RiskLevel::Privileged): it exercises authority over the room or others in it, so the person’s own grants must allow it (tilo_action_policy::Verdict::privileged). - Action
Registry - Maps a stable
type_idto the decoder that reconstructs its action from a payload — cheap to share behind anArc/&at dispatch time. - AppComponent
- Real app content and its lifetime; hosts cannot extract an unbound root.
- Application
Catalog - Application
Definition - Atom
- A string written whole: last writer wins. For identifiers, enum-like codes and short values where character merging would be wrong.
- Banner
- An inline semantic alert with a title, an optional message, up to two actions and an optional dismiss control.
- Button
- Card
- A retained card. See the module docs.
- Checkbox
- Collection
- An ordered collection of items addressed by
Id. - Column
- Column
Def - Component
Behaviour - How the window hosting a component treats its tree. Part of the component, so every host that runs it applies the same behaviour.
- Component
Runner Inputs - Presentation owned by a runner. Authority comes only from the component context.
- Container
- Each bool below is an independent builder toggle (background, height
fill, padding, grow behaviour) set at construction time, not a state
machine with meaningful combinations to enumerate — a bitflags/enum
refactor would ripple across every one of
Container’s call sites in the crate for no behavioural gain. - Control
Binding Metadata - Counter
- A number whose concurrent changes add up: two people each adding one make
two. Change it with
Self::add; writing it back records the difference as an increment rather than a new value. - Data
Table - Delta
- The parts of a document some set of changes touched. See the module docs.
- Demand
- The parts of a large resource that views are looking at, in terms any
resource can interpret: positions in its primary order (the paragraphs of
a document, the rows of a sheet) and keyed parts (a comment thread, a
clip). See
Resource::load. - Dropdown
- Edit
- A field edit of the record
R: a path and an operation. See the module docs. - Empty
State - A centered empty-state placeholder: hero icon + title + message + action.
- Event
Ctx - Host services associated with one retained widget event dispatch.
- Filter
Count - How many rows a filtered view shows out of how many it has.
- Filtered
- Content with a filter: a
SearchField::filterin a band above the content, narrowing the firstFilterableinside it. Ctrl+F (⌘F) focuses the field. A navigation shell’s filter slot is the same field wired withsync_filter. - FindBar
- The find bar: a query field with a match counter, option chips, previous/next and close, and an optional replace row.
- Find
Match - One match, as a span of the findable’s own content (a byte range of its text, or of its bytes in hex mode). The findable interprets it.
- Find
Options - The options the bar’s chips set.
- Find
Scope - Content with find: a
FindBarthat Ctrl+F (⌘F) opens as a band at the top of the content, driving the firstFindableinside it. - Host
Context - Explicit identity, authority and storage. Apps receive no ambient profile resolver.
- Host
Context Inputs - Host-supplied storage, identity and authority for one instance, checked by
HostContext::preparebefore any factory runs. - Id
- A stable identity for an item in a resource. Minted deterministically by
ActionCx::id, so replaying an action on another replica mints the same id. - Instance
View Store - Exact explicit namespace retained across construction, close and save retry.
- Invoke
- One fully specified invocation of a declared action, or of one of the
app’s effects (
Invoke::effect). - Json
- An opaque value stored as one JSON string: written whole, last writer wins. The escape hatch for nested data that has no meaningful concurrent merge (a colour curve, a filter preset).
- Label
Key - The Fluent message a label, placeholder or button shows: looked up in the active locale when drawn, shown verbatim when no catalog has it.
- Latest
Request - UI-thread inbox for worker results where only the newest request may win.
- Latest
Task - Typed state for restartable background work where only the latest run may
publish a result. Starting or cancelling a run invalidates every older
TaskCompletion. - Local
State - A cloneable handle to typed, process-local application state.
- Model
View - A retained subtree selected by a value projected from application state.
- NavItem
- One destination. Every part but the label is optional; see
docs/ui-migration.md, “Rows: what each part of aNavItemmeans”. - NavList
- The navigation list. See the module docs.
- NavSection
- A group of destinations under a sentence-case title.
- NavShell
- The one window shell. See the module docs.
- Number
Input - Open
File - One file to open: its name, media type and bytes.
- Outbox
- Outside consequences of the record’s actions, queued in the document: a
mail to send, an event to upload, a file to move. A verb that takes
&mut Outbox<T, O>pushes entries and is an Outside action. - Path
- The location of a
Tinside the recordR. See the module docs. - Plain
Text - Plain text, edited a splice at a time.
- Playback
Handoff - Where playback stood on the device or app that handed the launch’s media over: the launch continues it from there. The media itself is what the launch names (its argument or file); this is the transport and the name it played under.
- Point
- A 2D point.
- Prepared
Component Inputs - Explicit host preparation completed before invoking the application factory.
- Presence
Ctx - QrWidget
- Holds the source bytes plus the cached encoded matrix. Re-encodes when
the payload changes via
set_payload— the pairing-channel screen calls it every few seconds as the broker rotates the nonce. - Record
Checkout - A record named together with its type — what a widget declares it is working on, and what a room index holds.
- Record
Id - The stable identity of a record. Encoded by prefix:
file-record:<uuid>(a file, by the durable id its filesystem record carries — seeRecordId::identify_file),file:<absolute path>(a file known only by where it is: a not-yet-written Save As target, or a filesystem that can’t hold the durable id),uuid:<uuid>(minted, for a record with no natural name),tab:<tab id>(a window’s scratch document until a file names it, seeRecordId::for_tab) andderived:<role>@<id>(seeRecordId::derived). - Record
Kind - What kind of thing a record is —
document,annotation-set,book,playlist. App-owned rather than system-registered, so an app can add a kind without coordinating; the cost is no cross-app library view yet (needs a system-owned type registry, not built here). - Rect
- A rectangle.
- Refusal
- Why an action declined to run, in the user’s words.
- Replica
- One replica of an
Rresource. See the module docs. - Revision
History - A causal-order snapshot of all revisions retained by a document.
- Row
- Saved
Instance View - Scrollable
- Search
Entry - A search index entry.
anchoraddresses what a hit opens (an item id);action, when set, is the published action a hit invokes, so choosing it goes through the same door, permissions and history as the palette. - Search
Field - A search-styled input: magnifier + editable text + count slot + clear.
- Search
Registry - The set of providers a search surface draws from. One registry can back a single app (its own providers) or, in the shell, every app’s providers at once for a global Ctrl+K.
- Search
Results View - The results overlay. Populate it with
set_groupseach time the query changes, drive selection with the keyboard or pointer, and drain activations withtake_activated. - Set
- A set whose concurrent adds and removes merge per element. Stored as a map keyed by each element’s JSON form.
- Size
- A 2D size.
- Slider
- Spacer
- Spinner
- Stack
- Children painted on top of one another, each
position: Absoluteand anchored at the stack’s top-left. There is deliberately no alignment option: a child that wants a corner or the centre positions itself (aColumn/Rowwith its own insets and justify, or aContainerwithwith_centered_max_width), so the stack stays a pure z-order primitive and the layer’s geometry is owned by the layer. If a caller needs the stack itself to anchor, add an opt-in that maps toinseton the child node rather than changing this default. - State
- The unified state object that holds our CRDT document.
- Text
- Text
Input - Text
Renderer - Theme
- Toggle
- A switch: a [
BoolControl] drawn as a pill whose knob slides to the checked side. - Tree
Node - Tree
View - Undo
Access - The undo half of a widget, as one embeddable field: the last
UndoStatusthe host published, plus at most one pendingUndoRequest. - Undo
Status - What the live undo history can do right now, as a widget sees it.
- Undoing
- What a verb’s declared undo (
#[action(undo = path)]) is computed from: the record before and after the verb ran, the ids it minted (the outbox entry it queued) and its parameters. The undo returns the verb that compensates, which undo applies like any action, so its own outbox entries are queued and drained the same way, and which reads at that time how the original entry settled (where the trashed file went). - Virtual
List
Enums§
- Action
Error - Errors from encoding, decoding, or applying an action.
- Action
Kind - What an action is able to do, derived by the framework from the action’s code and never declared by an app.
- Column
Width Autois sized to content at build time (treated asFlex(1.0)until the layout pass can measure it).- Control
Binding Kind - Machine-readable classification of a control’s activation path.
- Execution
Locus - Where an action executes, declared on the action type and carried on every
envelope.
ServerPreferredretains its historical wire spelling, but is an authoritative-host requirement: absence of a host is a refusal, never permission for the client to perform the operation. - Launch
Target - List
Model Change - One already-applied change to a
ListModel. Structural variants retain mounted delegates by stable key;Self::RowsChangedrebuilds only the named rows. - List
RowState - State of one stable row in a paged or asynchronously populated list.
- NavMode
- What the sidebar becomes when the window is too narrow to dock it.
- NavPane
- A screen of the narrow push stack.
- Record
Save Status - Restore
Input - Scope
- Where an app’s typed settings live and how far they travel. Settings follow a person or a device, never a room’s members; they are never visible to collaborators. Content shared with a room is a record instead.
- Settled
- How the owning device settled an
Outboxentry, with what its handler reports back (O): where a trashed file went, the name a copy got, the id a server gave the upload. - Table
Model Change - One model notification batch consumed after the backing data has changed.
Structural variants preserve mounted controls by stable row key;
Self::RowsChangedrebuilds controls only for the named rows. - Table
RowState - State of one logical row in a potentially paged or asynchronous table. Loading and error rows keep their geometry and stable key, so completing a fetch does not disturb the scroll anchor or selection.
- Text
Edit - One edit of plain text. Positions count characters (Unicode scalar values), whatever the document’s own text encoding.
- Text
Role - What a piece of text is. Pick the role; never a pixel size.
- Undo
Request - A widget’s request that the host drive the history. The host performs it through the one undo implementation; a widget never touches the stacks.
Constants§
- ANY_
MEDIA_ TYPE - The entry of
ApplicationDefinition::opensthat opens files of every type.
Traits§
- Action
Value - A value that can connect a
LocalStatefield directly to a typed resource action. - Audience
Presentation Provider - Optional second-output presentation capability for app roots.
- Collaborative
- Optional session collaboration capability for widgets that own live broker-backed activity.
- Complete
Content Provider - Optional full-document/canvas capture capability.
- Continuable
- Optional cross-device continuation capability for an app root.
- Effect
- A typed vocabulary of effects. Derive it (
#[derive(Effect)]); see the module docs. - Filterable
- A view a
SearchFieldcan narrow: a list, a table, a grid of cards. - Findable
- A view whose content can be searched in place.
- Floating
Surface Provider - Optional capture and detachable-surface capability.
- Fullscreen
Provider - Optional OS-fullscreen capability for roots and forwarding containers.
- List
Model - Random-access collection contract for
VirtualList. Keys must be unique and stable while an item represents the same logical entity. - Model
- A typed value stored in a CRDT document. See the module docs.
- Native
View Lifecycle - Optional lifecycle for widgets backed by a platform-native child view.
- Params
- A verb’s generated parameter struct, linked to the verb it is the input
of. A form is a local value of it; submitting the form invokes
Self::ACTIONwith it. - Resource
- A resource type. Implement it by hand for a type with its own storage
layout and merge semantics (a timeline, a rich-text document, a photo edit
stack);
#[resource]implements it for a#[derive(Model)]record. - Settings
Schema - A typed settings value with a declared
Scope. - Table
Model - Unopinionated backing model for very large or asynchronously populated
tables. Implementations need not keep all rows resident:
DataTablequeries only the visible range plus overscan. - Widget
Functions§
- labeled_
check - Compose a checkbox or toggle with one inline visible and accessible label.
- labeled_
field - Compose a visible semantic label with the control it names.
Type Aliases§
- Component
Host Preparer - Explicit runner authority/presentation preparation; application metadata is never authority.
- Element
Attribute Macros§
- resource
- Turn a record’s
#[action]methods into its replayable, published action vocabulary, and implementResourcefor it.