Expand description
The neuro-kitchen apps’ shared UI (GPUI through gpui-kit).
theme: design tokens (spacing, type, radii, pane gaps), the shared grey neutrals, the app’s accenttheme::Paletteor the user’s own (theme::Rgb), light and dark;theme::applyhands them to gpui-kit.widgets: accent picker, section, labelled row, slider, dropdown, stepper, dragged number, swatch, empty state, icon button.param_editor: the parameters of any op that serializes to JSON, editable.icons: what an app ships (its icon set and files) and the test that every icon its code names is shipped.
Start-up: gpui_kit::init(cx), then theme::use_look(Look::new(MY_PALETTE), cx); open
windows with gpui_kit::open_window. cargo run -p kitchen-ui --example gallery shows every
widget.
Re-exports§
pub use param_editor::Commit;pub use param_editor::ParamEditor;pub use param_editor::Params;pub use theme::Look;pub use theme::Palette;pub use theme::Rgb;
Modules§
- icons
- Icons: what an app ships (
AppAssets: gpui-kit’s component icons, the few Lucide icons the app adds, and its own files), and the check that every icon its code names is shipped (assert_icons_bundled): an icon missing from the assets draws nothing and logs an error. - param_
editor - The parameters of one op, editable: numbers as inputs (Enter or leaving the field applies
them), a short list of numbers as one input each, choices as menus, switches as checkboxes.
It works on any op that serializes to a JSON object (
Params): lumen’s ops, dsp-kitchen’s pipeline nodes. Whoever owns the op decides how a change is applied (aCommit: a project or session command), so a side panel and a pipeline inspector can share it. - theme
- Design tokens shared by the neuro-kitchen apps, and their application to gpui-kit’s theme, so every gpui-kit component (buttons, menus, inputs, tooltips) and the apps’ own layout use one set of values.
- widgets
- Small pieces both apps use: an accent picker, a titled section, a labelled row, a slider, a dropdown of fixed
options, a stepper and a dragged number, a colour swatch, a centred empty state, an icon
button. Plain data in, no store; colours from the current look (
crate::theme::color).