1//! # UI – Zed UI Primitives & Components
2//!
3//! This crate provides a set of UI primitives and components that are used to build all of the elements in Zed's UI.
4//!
5//! ## Work in Progress
6//!
7//! This crate is still a work in progress. The initial primitives and components are built for getting all the UI on the screen,
8//! much of the state and functionality is mocked or hard codeded, and performance has not been a focus.
9//!
10
11#![doc = include_str!("../docs/hello-world.md")]
12#![doc = include_str!("../docs/building-ui.md")]
13#![doc = include_str!("../docs/todo.md")]
14// TODO: Fix warnings instead of supressing.
15#![allow(dead_code, unused_variables)]
16
17mod components;
18mod elevation;
19pub mod prelude;
20pub mod settings;
21mod static_data;
22mod styled_ext;
23mod to_extract;
24pub mod utils;
25
26pub use components::*;
27use gpui::actions;
28pub use prelude::*;
29pub use static_data::*;
30pub use styled_ext::*;
31pub use to_extract::*;
32
33// This needs to be fully qualified with `crate::` otherwise we get a panic
34// at:
35// thread '<unnamed>' panicked at crates/gpui2/src/platform/mac/platform.rs:66:81:
36// called `Option::unwrap()` on a `None` value
37//
38// AFAICT this is something to do with conflicting names between crates and modules that
39// interfaces with declaring the `ClassDecl`.
40pub use crate::settings::*;
41
42#[cfg(feature = "stories")]
43mod story;
44#[cfg(feature = "stories")]
45pub use story::*;
46actions!(NoAction);
47
48pub fn binding(key: &str) -> gpui::KeyBinding {
49 gpui::KeyBinding::new(key, NoAction {}, None)
50}