1mod a11y_disabled;
8mod accordion;
9pub mod actions;
10mod alert_dialog;
11pub mod animation;
12#[doc(hidden)]
13pub mod async_util;
14mod auto_scroll;
15mod avatar;
16mod button;
17mod calendar;
18mod checkbox;
19mod collapsible;
20mod color_picker;
21mod combobox;
22pub mod component_traits;
23mod date_picker;
24mod dialog;
25pub mod dock;
26mod element_ext;
27mod event;
28mod focus_trap;
29mod geometry;
30mod global_state;
31mod history;
32mod hover_card;
33mod index_path;
34pub mod input;
35mod link;
36mod list_settings;
37#[cfg(all(target_os = "macos", not(test)))]
38mod macos_accessibility;
39mod measure;
40pub mod motion;
41mod nav_stack;
42mod number_input;
43mod observe;
44mod otp_input;
45mod overscroll;
46mod pagination;
47pub mod plot;
48mod popover;
49mod popup;
50mod positioner;
51mod progress;
52pub mod questionnaire;
53mod radio;
54mod radio_group;
55mod reduce_motion;
56mod resizable;
57mod root;
58mod scroll_bounce;
59mod scrollable_mask;
60mod scrollbar;
61mod select;
62mod selectable_text;
63mod sheet;
64pub mod slider;
65mod state_style;
66mod styled;
67mod switch;
68mod table;
69mod tabs;
70pub mod text;
71mod text_boundary;
72mod text_selection;
73mod theme;
74pub mod theme_tokens;
75mod time_field;
76mod toast;
77mod toggle;
78mod toggle_group;
79mod toolbar;
80mod tooltip;
81mod touch_selection;
82mod tree;
83mod undo_history;
84mod virtual_list;
85
86pub use accordion::{Accordion, AccordionHeader, AccordionItem, AccordionPanel, AccordionTrigger};
87pub use alert_dialog::{
88 AlertDialog, AlertDialogAction, AlertDialogBackdrop, AlertDialogCancel, AlertDialogClose,
89 AlertDialogDescription, AlertDialogPopup, AlertDialogTitle, AlertDialogTrigger,
90};
91pub use auto_scroll::AutoScroll;
92pub use avatar::{Avatar, AvatarFallback, AvatarImage};
93pub use button::{Button, ButtonStyles};
94pub use calendar::{
95 Calendar, CalendarEvent, CalendarItem, CalendarItemKind, CalendarItemState, CalendarState,
96 CalendarView, Date, IntervalMatcher, Matcher, RangeMatcher,
97};
98pub use checkbox::{
99 Checkbox, CheckboxIndicator, CheckboxIndicatorStyles, CheckboxState, CheckboxStyles,
100};
101pub use collapsible::Collapsible;
102pub use color_picker::{ColorPicker, ColorPickerEvent, ColorPickerState, ColorSwatch, HslaSliders};
103pub use combobox::Combobox;
104pub use component_traits::FocusableExt;
105pub use component_traits::{Disableable, Selectable};
106pub use date_picker::DatePicker;
107pub use dialog::{
108 Dialog, DialogBackdrop, DialogChangeReason, DialogClose, DialogDescription, DialogHandle,
109 DialogPopup, DialogTitle, DialogTrigger,
110};
111pub use element_ext::{ElementExt, TextSelectionScopeExt};
112pub use event::{InteractiveElementExt, OngoingScrollExt};
113pub use focus_trap::FocusTrapElement;
114#[doc(hidden)]
115pub use focus_trap::active_focus_trap;
116pub use geometry::*;
117pub use global_state::{DeferredPopover, GlobalState};
118pub use history::History;
119pub use hover_card::{HoverCard, HoverCardState};
120pub use index_path::IndexPath;
121pub use input::{Editor, Input, InputBase, InputStyles, Textarea};
122pub use link::{Link, LinkStyles};
123pub use list_settings::ListSettings;
124#[cfg(all(target_os = "macos", not(test)))]
125#[doc(hidden)]
126pub use macos_accessibility::install_window_hit_test_forwarder;
127#[doc(hidden)]
128pub use measure::measurement_enabled;
129pub use measure::{Measure, measure, measure_if};
130pub use motion::{
131 Discrete, DiscreteError, Easing, EasingError, Interpolate, IterationCount, Keyframe,
132 KeyframeError, Keyframes, LinearStop, MotionPhase, MotionReveal, MotionStatus, MotionTransform,
133 MotionValue, PlaybackDirection, Presence, PresencePhase, PresenceSample, Sequence,
134 SequenceSample, SequenceStep, SignedDuration, Spring, SpringError, Stagger, StaggerOrigin,
135 StepPosition, Timing, TimingSample, Transition, TransitionId, animate_keyframes, spring,
136 transition, transition_with_status,
137};
138pub use nav_stack::{NavMotion, NavOperation, NavPage, NavStack, NavStackEvent, NavStackState};
139pub use number_input::{
140 Decrement, Increment, NumberInput, NumberInputEvent, NumberInputText, NumberStep, StepAction,
141 step_value,
142};
143pub use observe::{ObservedElement, TestSupportExt};
144pub use otp_input::{OtpEvent, OtpInput, OtpState};
145pub use pagination::{Pagination, PaginationItem, PaginationState};
146pub use plot::PlotMotion;
147pub use popover::{Popover, PopoverState};
148pub use popup::{POPUP_PRIORITY, Popup};
149pub use positioner::{Align, Positioner, ResolvedPosition};
150pub use progress::{Progress, ProgressIndicator, ProgressTrack};
151pub use radio::{Radio, RadioStyles};
152pub use radio_group::RadioGroup;
153pub use reduce_motion::apply_system_reduce_motion;
154#[doc(hidden)]
155pub use resizable::PANEL_MIN_SIZE;
156pub use resizable::{
157 HandleEdge, ResizablePanel, ResizablePanelEvent, ResizablePanelGroup, ResizableState,
158 ResizeHandle, ResizeHandleContext, ResizeHandleRenderer, ResizeHandleState, h_resizable,
159 resizable_panel, resize_handle, v_resizable,
160};
161pub use root::{Root, RootPlugin};
162pub use scroll_bounce::{ScrollBounce, ScrollBounceMotion};
163pub use scrollable_mask::{
164 HorizontalScrollClaim, RoundedFrameCover, ScrollableMask, last_horizontal_scroll_claim,
165};
166pub use scrollbar::{
167 Scrollbar, ScrollbarAxis, ScrollbarEntrance, ScrollbarHandle, ScrollbarMode, ScrollbarMotion,
168 ScrollbarStyles, ScrollbarThumbStyle, ScrollbarTrackStyle,
169};
170pub use select::Select;
171pub use selectable_text::SelectableText;
172pub use sheet::Sheet;
173pub use slider::{Slider, SliderIndicator, SliderThumb, SliderTrack};
174pub use state_style::StateStyle;
175#[cfg(any(feature = "inspector", debug_assertions))]
176pub use styled::styled_ext_reflection_methods;
177pub use styled::{RoleOverride, StyledExt, box_shadow, h_flex, refine_style_refinement, v_flex};
178pub use switch::{
179 Switch, SwitchStyles, SwitchThumb, SwitchThumbStyles, SwitchTrack, SwitchTrackStyles,
180};
181pub use table::{Table, TableBody, TableCaption, TableCell, TableHead, TableHeader, TableRow};
182pub use tabs::{Tab, TabStyles, Tabs};
183pub use text::{
184 InlineElement, InlineRenderContext, MarkdownExtensions, MarkdownNode, MarkdownParseContext,
185 MarkdownPlugin, RangeHighlight, RangeHighlightError, RenderedText, SelectionFormat, TableData,
186 Text, TextView, TextViewDefaults, TextViewMotion, TextViewPlugin, TextViewState, TextViewStyle,
187 html, markdown, markdown_ast,
188};
189pub use text_selection::{
190 TextSelection, TextSelectionContentKey, TextSelectionCoverage, TextSelectionEndpoint,
191 TextSelectionEvent, TextSelectionHandle, TextSelectionLayer, TextSelectionProjection,
192 TextSelectionRegistration, TextSelectionRun, TextSelectionScopeId, TextSelectionSnapshot,
193 TextSelectionWindowPoints, TouchHandleLayout,
194};
195pub use theme::{PlotTheme, ResizableTheme, ScrollbarTheme, Theme, ThemeAppearance};
196pub use theme_tokens::{
197 ColorTokens, RadiusTokens, SemanticThemeTokens, ShadowTokens, SpacingTokens, TextStyleToken,
198 TypographyTokens,
199};
200pub use time_field::{
201 HourCycle, TimeField, TimeFieldEvent, TimeFieldSegment, TimeFieldSegmentState, TimeFieldState,
202 TimePrecision, TimeSegment,
203};
204pub use toast::{
205 Toast, ToastAdvance, ToastManager, ToastMotion, ToastOptions, ToastStack, ToastStackState,
206 ToastTransitionStatus,
207};
208pub use toggle::{Toggle, ToggleStyles};
209pub use toggle_group::ToggleGroup;
210pub use toolbar::{Toolbar, ToolbarGroup};
211pub use tooltip::{
212 Tooltip, TooltipDefaults, TooltipOverlay, TooltipPositioner, TooltipRequest, TooltipTransition,
213};
214pub use touch_selection::{SelectionEdge, TouchHandle, TouchSelectionSnapshot};
215pub use tree::{Tree, TreeEntry, TreeEntryState, TreeEvent, TreeItem, TreeState};
216#[doc(hidden)]
217pub use tree::{init as init_tree, key_context as tree_key_context};
218pub use undo_history::UndoHistory;
219#[doc(hidden)]
220pub use virtual_list::virtual_list;
221pub use virtual_list::{VirtualList, VirtualListScrollHandle, h_virtual_list, v_virtual_list};
222
223use wgpui::App;
224
225#[inline]
229pub const fn is_mobile() -> bool {
230 cfg!(any(target_os = "ios", target_os = "android"))
231}
232
233pub fn init(cx: &mut App) {
235 let _ = Theme::global_mut(cx);
236 GlobalState::init(cx);
237 reduce_motion::init(cx);
238 dialog::init(cx);
239 focus_trap::init(cx);
240 popover::init(cx);
241 sheet::init(cx);
242 combobox::init(cx);
243 color_picker::init(cx);
244 select::init(cx);
245 number_input::init(cx);
246 time_field::init(cx);
247 input::init(cx);
248 tree::init(cx);
249 text::init(cx);
250 root::init(cx);
251}
252
253#[cfg(any(test, feature = "test-support"))]
254pub mod test_support;