Skip to main content

Crate orbital_discussion

Crate orbital_discussion 

Source
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§

CitationRenderContext
Context passed to citation menu render callbacks.
ComposerContext
Composer draft state shared within a discussion thread.
ComposerReplyTarget
Reply target resolved from composer reply_to state.
DiscussionAttachmentDraft
Draft attachment queued in the composer before submit.
DiscussionAttachmentValidation
Client-side attachment validation rules for the composer attach button.
DiscussionAuthor
Author metadata for a single reply.
DiscussionCitation
Structured citation attached to a reply.
DiscussionCitationAffordance
Props for the DiscussionCitationAffordance slot.
DiscussionCitationMenu
Props for the DiscussionCitationMenu slot.
DiscussionCitationMenuExtras
Props for the DiscussionCitationMenuExtras slot.
DiscussionComposerHint
Props for the DiscussionComposerHint slot.
DiscussionComposerSlot
Props for the DiscussionComposerSlot slot.
DiscussionComposerSubmit
Payload emitted when the composer submits a reply.
DiscussionComposerTools
Props for the DiscussionComposerTools slot.
DiscussionContext
Shared discussion state for thread subcomponents.
DiscussionEmptyView
Props for the DiscussionEmptyView slot.
DiscussionError
Typed error returned by DiscussionAdapter methods.
DiscussionEvents
Event callbacks fired when the user interacts with the discussion thread.
DiscussionFeatures
Feature flags gating optional Discussion surfaces.
DiscussionLocale
User-facing strings for discussion thread chrome (composer, navigation, view modes).
DiscussionMenuItem
Host-defined menu item for reply or citation overflow menus.
DiscussionMetadata
Timestamps and labels for a reply.
DiscussionReasoningPart
Chain-of-thought / reasoning trace part.
DiscussionRelativeTimeLocale
Relative time formatting strings for reply header timestamps.
DiscussionRenderers
Data-driven render callbacks for reply rows.
DiscussionReply
Single item in a discussion thread.
DiscussionReplyFooterRegion
Props for the DiscussionReplyFooterRegion slot.
DiscussionReplyGraph
Adjacency graph built from a flat reply list.
DiscussionReplyMenu
Props for the DiscussionReplyMenu slot.
DiscussionReplyMenuExtras
Props for the DiscussionReplyMenuExtras slot.
DiscussionReplyMeta
Props for the DiscussionReplyMeta slot.
DiscussionReplyPart
Props for the DiscussionReplyPart slot.
DiscussionSlots
Internal slot content consumed by thread subcomponents.
DiscussionStepPart
Step delimiter part for multi-step agent replies.
DiscussionThreadToolbar
Props for the DiscussionThreadToolbar slot.
DiscussionToolPart
Tool invocation content part inside an agent reply body.
DiscussionUploadedFile
Result of uploading an attachment draft to host storage.
ReplyRenderContext
Context passed to reply render callbacks.
ToolApprovalDecision
User decision on a tool approval gate.

Enums§

DiscussionAppearance
Visual styling for reply rows — orthogonal to super::DiscussionViewMode.
DiscussionAuthorRole
Role of a reply author in a discussion thread.
DiscussionErrorCode
Error category for adapter and host integration failures.
DiscussionErrorSource
Origin of a DiscussionError for telemetry and UI routing.
DiscussionFocus
Focus state for tree navigation (drill-in UI deferred to Phase 2).
DiscussionLabel
Label chip shown in reply metadata (OP, moderator, etc.).
DiscussionPart
Content part composing a reply body.
DiscussionReasoningStatus
Streaming lifecycle for a reasoning (thinking) part.
DiscussionReplyStatus
Delivery and streaming status for a reply row.
DiscussionReplySurface
Resolved card tint for a single reply row.
DiscussionSort
Sort order applied when projecting visible replies.
DiscussionStepStatus
Status for a multi-step agent progress delimiter.
DiscussionToolRunStatus
Lifecycle status for a tool invocation part.
DiscussionViewMode
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§

DiscussionAdapter
Host-owned backend contract for persisting replies and lazy-loading branches.

Functions§

DiscussionCitationList
Divider section listing structured citations on a reply card.
DiscussionCitationRow
Single citation row with title, url, excerpt, affordance, and overflow menu.
DiscussionComposer
Reply composer with controlled draft, reply banner, and submit flow.
DiscussionComposerAttachments
Draft attachment chips above the composer toolbar.
DiscussionComposerRoot
Form orchestration for the default thread-bottom composer.
DiscussionDateDivider
Chronological date break between reply rows in Flat/Compact modes.
DiscussionDefaultEmptyView
Built-in empty thread message when no custom [DiscussionEmptyView] slot is provided.
DiscussionDefaultThreadToolbar
Default thread toolbar with view mode picker.
DiscussionFocusBack
Go-back bar shown when focus is drilled into a reply branch.
DiscussionProvider
Provides controlled reply and focus signals to descendant components.
DiscussionReplyBody
Reply body with part dispatch and optional markdown rendering.
DiscussionReplyCard
Card shell composing header, body, footer for one reply.
DiscussionReplyFooter
Footer region with reply affordance, optional overflow actions, and custom host widgets.
DiscussionReplyHeader
Author persona, collapse toggle, timestamp, labels, role badge, and meta_view.
DiscussionReplyList
Renders visible replies for the current graph projection.
DiscussionReplyNode
Single reply row with card surface, header, body, and nested children in Tree mode.
DiscussionReplyShowMore
Drill-in affordance when nested replies exceed the visible depth cap.
DiscussionReplyStatusIndicator
Inline delivery/streaming status for a reply row header.
DiscussionThread
Render a forum-style reply thread with controlled data and focus signals.
DiscussionThreadLoadingOverlay
Card-shaped skeleton placeholders shown while the host loads replies.
DiscussionThreadRoot
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_id is 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-l4 or #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_id visible 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 DiscussionProvider context.
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§

CitationAffordanceView
Custom chrome left of the citation overflow menu (agree/dispute, popover trigger, etc.).
CitationMenuExtrasView
Extra menu items appended to the default citation menu.
CitationMenuView
Custom citation overflow menu. When None, built-in open/copy actions render.
DiscussionCitationMenuItem
Back-compat alias for citation menu extras.
ReplyFooterView
Custom footer region below the reply body.
ReplyMenuExtrasView
Extra menu items on the default reply overflow menu beside Reply.
ReplyMenuView
Custom reply overflow menu. When None, built-in trigger + reply_menu_extras render.
ReplyMetaView
Custom meta region below the primary header row (reactions, votes, actions).
ReplyPartView
Custom part renderer. Return None to fall through to built-in renderers.