1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
//! Carbon UI for GPUI: IBM Carbon v11 visuals, shadcn/ui component API,
//! Material Symbols Sharp icons. Kit owns behavior; this crate owns appearance.
//!
//! Layers (each depends only on those above it):
//!
//! | Module | Role |
//! | --- | --- |
//! | [`tokens`] | Generated by `u0ui-codegen` from the design reference `tokens.json`: [`ColorRole`], [`TypeStyle`], spacing/size/radius |
//! | [`theme`] | Active [`CarbonTheme`], [`theme::color`], [`LayerLevel`], Kit theme bridge |
//! | [`typography`] | Bundled IBM Plex, [`TypeStyled::type_style`] |
//! | [`motion`] | Carbon curves and durations, reduced motion, state-change animation helpers |
//! | [`clock`] | Local wall-clock time (`new Date()`): toast captions, today |
//! | [`icons`] | Material Symbols Sharp [`Icon`], [`CarbonIcon`], asset source, Kit icon mapping |
//! | [`density`] | [`Density`] (compact desktop default / comfortable) |
//! | [`components`] | Carbon components ([`components::button`] is the reference) |
//! | [`t3`] | The T3 Code pattern library, composed from the components |
//! | [`u0`] | The u0 pattern library (`u0 · …` cards: foundations, primitives, …) |
//! | [`patterns`] | Building blocks of the Carbon pattern examples (`Carbon · Patterns` cards) |
//!
//! ```no_run
//! use gpui_kit::*;
//! use u0ui::prelude::*;
//!
//! struct App;
//! impl Render for App {
//! fn render(&mut self, _: &mut Window, _: &mut Context<Self>) -> impl IntoElement {
//! div()
//! .bg(color(ColorRole::Background))
//! .child(Button::new("go", "Create project").icon(CarbonIcon::Add))
//! }
//! }
//!
//! fn main() {
//! gpui_kit::application().with_assets(u0ui::Assets::new()).run(|cx| {
//! gpui_kit::init(cx);
//! u0ui::init(cx);
//! gpui_kit::open_window(WindowOptions::default(), cx, |_, cx| cx.new(|_| App)).unwrap();
//! });
//! }
//! ```
pub use Density;
pub use ;
pub use LayerLevel;
pub use ;
pub use TypeStyled;
/// The README's Rust examples compile as doctests.
;
/// Everything a component or page usually needs.
/// Initialize u0ui. Call once after `gpui_kit::init(cx)` and before opening a
/// window: registers the IBM Plex fonts, installs the active theme (White
/// unless [`theme::ActiveTheme`] was set) and projects it into Kit's theme, and
/// maps Kit's default icons to Material Symbols Sharp.
///
/// The application must also serve icon assets:
/// `gpui_kit::application().with_assets(u0ui::Assets::new())`.