arc-ui 0.4.0

Physics-first native Rust desktop UI component library & charts for GPUI (120+ interactive components ported from Arc).
Documentation
//! Ported from Arc (MIT) © 2026 Elia Kuratli
//! P7 桌面区块,复用 Arc 组件、tokens 和 motion。
pub mod changelog_feed;
pub mod comparison_table;
pub mod empty_states;
pub mod file_upload;
pub mod notification_center;
pub mod otp_input;
pub mod page_header;

#[cfg(test)]
mod tests;

use arc_tokens::{ActiveArcTheme as _, Radii, Spacing, Typography};
use gpui_kit::{App, ElementId, ParentElement, Styled, div, px};

pub(crate) fn child_id(id: &ElementId, name: impl Into<gpui_kit::SharedString>) -> ElementId {
    ElementId::NamedChild(id.clone().into(), name.into())
}

pub(crate) fn surface(cx: &App) -> gpui_kit::Div {
    let colors = cx.arc_theme().colors;
    div()
        .w_full()
        .min_w(px(0.0))
        .flex()
        .flex_col()
        .gap(Spacing::S3)
        .p(Spacing::S4)
        .rounded(Radii::PANEL)
        .border_1()
        .border_color(colors.border)
        .bg(colors.surface)
        .text_color(colors.foreground)
        .text_size(Typography::TEXT_SM)
}

pub(crate) fn text(value: impl Into<gpui_kit::SharedString>, cx: &App) -> gpui_kit::Div {
    div()
        .text_size(Typography::TEXT_XS)
        .text_color(cx.arc_theme().colors.text_secondary)
        .child(value.into())
}