Expand description
Orbital Discussion — composable reply thread library for Leptos.
Modules§
- docs
- Doc hub pages for the Discussion component library.
- preview
- Preview registration for discussion components.
Structs§
- Citation
Render Context - Context passed to citation menu render callbacks.
- Composer
Context - Composer draft state shared within a discussion thread.
- Composer
Reply Target - Reply target resolved from composer
reply_tostate. - Discussion
Attachment Draft - Draft attachment queued in the composer before submit.
- Discussion
Attachment Validation - Client-side attachment validation rules for the composer attach button.
- Discussion
Author - Author metadata for a single reply.
- Discussion
Citation - Structured citation attached to a reply.
- Discussion
Citation Affordance - Props for the
DiscussionCitationAffordanceslot. - Discussion
Citation Menu - Props for the
DiscussionCitationMenuslot. - Discussion
Citation Menu Extras - Props for the
DiscussionCitationMenuExtrasslot. - Discussion
Composer Hint - Props for the
DiscussionComposerHintslot. - Discussion
Composer Slot - Props for the
DiscussionComposerSlotslot. - Discussion
Composer Submit - Payload emitted when the composer submits a reply.
- Discussion
Composer Tools - Props for the
DiscussionComposerToolsslot. - Discussion
Context - Shared discussion state for thread subcomponents.
- Discussion
Empty View - Props for the
DiscussionEmptyViewslot. - Discussion
Error - Typed error returned by
DiscussionAdaptermethods. - Discussion
Events - Event callbacks fired when the user interacts with the discussion thread.
- Discussion
Features - Feature flags gating optional Discussion surfaces.
- Discussion
Locale - User-facing strings for discussion thread chrome (composer, navigation, view modes).
- Discussion
Menu Item - Host-defined menu item for reply or citation overflow menus.
- Discussion
Metadata - Timestamps and labels for a reply.
- Discussion
Reasoning Part - Chain-of-thought / reasoning trace part.
- Discussion
Relative Time Locale - Relative time formatting strings for reply header timestamps.
- Discussion
Renderers - Data-driven render callbacks for reply rows.
- Discussion
Reply - Single item in a discussion thread.
- Discussion
Reply Footer Region - Props for the
DiscussionReplyFooterRegionslot. - Discussion
Reply Graph - Adjacency graph built from a flat reply list.
- Discussion
Reply Menu - Props for the
DiscussionReplyMenuslot. - Discussion
Reply Menu Extras - Props for the
DiscussionReplyMenuExtrasslot. - Discussion
Reply Meta - Props for the
DiscussionReplyMetaslot. - Discussion
Reply Part - Props for the
DiscussionReplyPartslot. - Discussion
Slots - Internal slot content consumed by thread subcomponents.
- Discussion
Step Part - Step delimiter part for multi-step agent replies.
- Discussion
Thread Toolbar - Props for the
DiscussionThreadToolbarslot. - Discussion
Tool Part - Tool invocation content part inside an agent reply body.
- Discussion
Uploaded File - Result of uploading an attachment draft to host storage.
- Reply
Render Context - Context passed to reply render callbacks.
- Tool
Approval Decision - User decision on a tool approval gate.
Enums§
- Discussion
Appearance - Visual styling for reply rows — orthogonal to
super::DiscussionViewMode. - Discussion
Author Role - Role of a reply author in a discussion thread.
- Discussion
Error Code - Error category for adapter and host integration failures.
- Discussion
Error Source - Origin of a
DiscussionErrorfor telemetry and UI routing. - Discussion
Focus - Focus state for tree navigation (drill-in UI deferred to Phase 2).
- Discussion
Label - Label chip shown in reply metadata (OP, moderator, etc.).
- Discussion
Part - Content part composing a reply body.
- Discussion
Reasoning Status - Streaming lifecycle for a reasoning (thinking) part.
- Discussion
Reply Status - Delivery and streaming status for a reply row.
- Discussion
Reply Surface - Resolved card tint for a single reply row.
- Discussion
Sort - Sort order applied when projecting visible replies.
- Discussion
Step Status - Status for a multi-step agent progress delimiter.
- Discussion
Tool RunStatus - Lifecycle status for a tool invocation part.
- Discussion
View Mode - Layout projection for the same flat reply list.
Constants§
- DEFAULT_
MAX_ VISIBLE_ DEPTH - Default maximum visible nesting depth in tree mode.
Statics§
- DISCUSSIONAGENTPARTSDOC_
PREVIEW_ REGISTRATION - DISCUSSIONCITATIONSDOC_
PREVIEW_ REGISTRATION - DISCUSSIONCOMPOSERDOC_
PREVIEW_ REGISTRATION - DISCUSSIONCUSTOMAREASDOC_
PREVIEW_ REGISTRATION - DISCUSSIONEVENTSDOC_
PREVIEW_ REGISTRATION - DISCUSSIONINTEGRATIONDOC_
PREVIEW_ REGISTRATION - DISCUSSIONOVERLAYSDOC_
PREVIEW_ REGISTRATION - DISCUSSIONPARTSDOC_
PREVIEW_ REGISTRATION - DISCUSSIONREPLIESDOC_
PREVIEW_ REGISTRATION - DISCUSSIONSLOTSDOC_
PREVIEW_ REGISTRATION - DISCUSSIONTHREAD_
PREVIEW_ REGISTRATION - DISCUSSIONTREENAVIGATIONDOC_
PREVIEW_ REGISTRATION - DISCUSSIONVIEWMODESDOC_
PREVIEW_ REGISTRATION
Traits§
- Discussion
Adapter - Host-owned backend contract for persisting replies and lazy-loading branches.
Functions§
- Discussion
Citation List - Divider section listing structured citations on a reply card.
- Discussion
Citation Row - Single citation row with title, url, excerpt, affordance, and overflow menu.
- Discussion
Composer - Reply composer with controlled draft, reply banner, and submit flow.
- Discussion
Composer Attachments - Draft attachment chips above the composer toolbar.
- Discussion
Composer Root - Form orchestration for the default thread-bottom composer.
- Discussion
Date Divider - Chronological date break between reply rows in Flat/Compact modes.
- Discussion
Default Empty View - Built-in empty thread message when no custom [
DiscussionEmptyView] slot is provided. - Discussion
Default Thread Toolbar - Default thread toolbar with view mode picker.
- Discussion
Focus Back - Go-back bar shown when focus is drilled into a reply branch.
- Discussion
Provider - Provides controlled reply and focus signals to descendant components.
- Discussion
Reply Body - Reply body with part dispatch and optional markdown rendering.
- Discussion
Reply Card - Card shell composing header, body, footer for one reply.
- Discussion
Reply Footer - Footer region with reply affordance, optional overflow actions, and custom host widgets.
- Discussion
Reply Header - Author persona, collapse toggle, timestamp, labels, role badge, and meta_view.
- Discussion
Reply List - Renders visible replies for the current graph projection.
- Discussion
Reply Node - Single reply row with card surface, header, body, and nested children in Tree mode.
- Discussion
Reply Show More - Drill-in affordance when nested replies exceed the visible depth cap.
- Discussion
Reply Status Indicator - Inline delivery/streaming status for a reply row header.
- Discussion
Thread - Render a forum-style reply thread with controlled data and focus signals.
- Discussion
Thread Loading Overlay - Card-shaped skeleton placeholders shown while the host loads replies.
- Discussion
Thread Root - Scrollable shell for a discussion thread body.
- add_
attachment_ draft - Append a validated draft attachment.
- add_
citation_ draft - Append a citation draft.
- ancestor_
chain - Root-to-target ancestor chain (inclusive).
- apply_
markdown_ wrap - Wrap or insert markdown markers using textarea selection when available.
- can_
submit - Whether the composer can submit the current draft.
- format_
file_ size - Human-readable file size for download links.
- format_
relative_ time - Format a UTC timestamp as a relative time string using English defaults.
- insert_
at_ caret - Insert text at the textarea caret (or append when selection is unavailable).
- insert_
citation_ ref - Insert a citation reference token.
- insert_
markdown_ image - Insert a markdown image reference after upload.
- insert_
markdown_ link - Insert a markdown link.
- insert_
markdown_ prefix - Insert text at the end of the draft.
- is_
image_ mime - Whether a MIME type represents an inline image preview.
- is_
reply_ visible_ in_ tree - Whether
reply_idis rendered under the current tree focus without drilling further. - locale_
signal - Signal-backed locale for reactive toolbar and preview language toggles.
- navigate_
focus_ back - Pop one level of focus and notify listeners.
- navigate_
focus_ to - Push focus onto a reply and notify listeners.
- navigate_
to_ reply - Navigate to a nested reply: uncollapse ancestors, drill focus when needed, scroll into view.
- parse_
reply_ anchor_ hash - Parse a reply id from a URL fragment such as
#reply-d-l4or#d-l4. - pop_
focus - Pop one level of focus navigation, or return to root.
- push_
focus - Push focus onto a reply, extending the breadcrumb trail.
- remove_
attachment_ draft - Remove a draft attachment by id.
- remove_
citation_ draft - Remove a draft citation by id.
- render_
markdown - Render markdown for a discussion reply body part.
- resolve_
discussion_ locale - Resolve locale from an optional partial override, falling back to English defaults.
- resolve_
focus_ for_ reply - Focus state that makes
reply_idvisible in tree mode, drilling through show-more barriers. - resolve_
reply_ surface - Resolve card surface tint for a reply.
- select_
reply_ by_ id - Lookup a reply by id in the graph index.
- select_
visible_ branch - Depth-first visible subtree rooted at
id, respecting focus and view mode. - should_
show_ more_ children - Whether a reply at the depth cap should show a “more replies” affordance.
- thread_
has_ streaming_ reply - Returns true when any reply in the thread is actively streaming.
- toggle_
collapse - Toggle branch collapse and notify listeners.
- use_
composer_ reply_ target - Read the active reply-to target from the nearest composer root.
- use_
discussion - Read the nearest
DiscussionProvidercontext. - use_
discussion_ composer - Read composer draft state from the nearest [
DiscussionProvider]. - use_
discussion_ focus - Read the current focus anchor signal.
- use_
discussion_ locale - Read the active discussion locale from the nearest
DiscussionProvider. - validate_
attachment_ metadata - Validate file metadata against optional composer rules.
- wrap_
markdown_ selection - Wrap the entire draft with prefix/suffix (legacy fallback).
Type Aliases§
- Citation
Affordance View - Custom chrome left of the citation overflow menu (agree/dispute, popover trigger, etc.).
- Citation
Menu Extras View - Extra menu items appended to the default citation menu.
- Citation
Menu View - Custom citation overflow menu. When
None, built-in open/copy actions render. - Discussion
Citation Menu Item - Back-compat alias for citation menu extras.
- Reply
Footer View - Custom footer region below the reply body.
- Reply
Menu Extras View - Extra menu items on the default reply overflow menu beside Reply.
- Reply
Menu View - Custom reply overflow menu. When
None, built-in trigger +reply_menu_extrasrender. - Reply
Meta View - Custom meta region below the primary header row (reactions, votes, actions).
- Reply
Part View - Custom part renderer. Return
Noneto fall through to built-in renderers.