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