Skip to content

🎉 v0.3.0 - Headless Core & Swappable Renderers

Latest

Choose a tag to compare

@MeowLynxSea MeowLynxSea released this 18 Jun 08:18

We're excited to announce the release of Yororen UI v0.3.0! This is a major architectural overhaul that splits the library into a headless core and swappable renderers.

✨ Highlights

  • Headless Core + Swappable Renderersyororen-ui-core now defines component behavior and a renderer registry; visual rendering is provided by separate renderer crates.
  • Workspace Split — The monolithic crate is now a focused workspace:
    • yororen-ui-core — headless component definitions, renderer registry, and 55 component markers
    • yororen-ui-default-renderer — modern rounded TokenXxxRenderer implementations
    • yororen-ui-brutalism-renderer — feature-gated brutalist BrutalXxxRenderer implementations
    • yororen-ui — meta-crate re-exporting core + default renderer + 3 locales
    • yororen-ui-xml + yororen-ui-xml-macro — XML DSL crate pair
    • Locale crates: yororen-ui-locale-en, yororen-ui-locale-zh-CN, yororen-ui-locale-ar
  • JSON-backed ThemeTheme is now a thin wrapper over serde_json::Value. Renderers read paths like action.primary.bg and tokens.control.button.min_height at render time, with renderer defaults as fallbacks.
  • 55 Component Markers — defined in yororen-ui-core/src/renderer/markers.rs; each marker is a slot in the global RendererRegistry implemented by both renderers.
  • Two Renderers, Same Headlessrenderer::install(cx, appearance) selects the modern rounded look; brutalism_renderer::install(cx) selects sharp corners, hard shadows, and monospace styling.
  • Public API Baselinesupstream/*.api.txt baselines now track the public surface of each published crate via cargo public-api.

🔧 Breaking Changes

  • The single yororen-ui crate has been split into a workspace. Direct imports of internal component modules will need to be updated.
  • Theme customization is now JSON-driven rather than Rust-typed.
  • The old monolithic component API (.apply(div) visual path) is replaced by the renderer-based pipeline.
  • See the wiki migration guides for detailed upgrade instructions.

🚀 Demo Applications

This release includes 8 demo applications:

  • 🔢 counter — minimal counter app
  • 🖼️ gallery_demo — component gallery
  • ⌨️ inputs_demo — input controls showcase
  • 🥞 layers_demo — overlay and layer demo
  • 🎨 theme_showcase — theme visualization
  • 🧩 variant_showcase — component variants
  • 📄 gallery_xml — XML DSL gallery
  • 📄 showcase_xml — XML DSL showcase

📦 Usage

[dependencies]
yororen-ui = "0.3"
use yororen_ui::headless::button::button;

button("save", cx)
    .caption("Save")
    .on_click(|_, _, _| { /* ... */ })
    .render(cx)

📚 Documentation

🛠 Tech Stack

  • Rust Edition 2024
  • gpui-ce (Zed Community Edition)
  • Apache License 2.0

⚠️ Not in v0.3.0

  • Screen-reader / ARIA bridge (pending gpui-ce AccessKit integration)
  • Visual theme editor
  • Cross-platform support beyond what gpui already provides

Thank you for your continued support! Feel free to upgrade and provide feedback.


我们很高兴发布 Yororen UI v0.3.0!本次版本是一次重大架构重构,将库拆分为无头核心和可替换渲染器。

✨ 特性亮点

  • 无头核心 + 可替换渲染器yororen-ui-core 现在定义组件行为和渲染器注册表;视觉渲染由独立的渲染器 crate 提供。
  • Workspace 拆分 — 单一 crate 被拆分为多个专注的 crate:
    • yororen-ui-core — 无头组件定义、渲染器注册表和 55 个组件标记
    • yororen-ui-default-renderer — 现代圆角风格的 TokenXxxRenderer 实现
    • yororen-ui-brutalism-renderer — feature-gated 的粗野主义 BrutalXxxRenderer 实现
    • yororen-ui — 重新导出 core + default renderer + 3 个语言包的 meta-crate
    • yororen-ui-xml + yororen-ui-xml-macro — XML DSL crate 组合
    • 语言包 crate:yororen-ui-locale-enyororen-ui-locale-zh-CNyororen-ui-locale-ar
  • JSON 驱动的 ThemeTheme 现在是 serde_json::Value 的薄封装。渲染器在渲染时读取 action.primary.bgtokens.control.button.min_height 等路径,缺失时回退到渲染器默认值。
  • 55 个组件标记 — 定义在 yororen-ui-core/src/renderer/markers.rs;每个标记都是全局 RendererRegistry 的插槽,由两个渲染器分别实现。
  • 同一无头核心,两种视觉风格renderer::install(cx, appearance) 选择现代圆角外观;brutalism_renderer::install(cx) 选择锐角、硬阴影和等宽字体风格。
  • Public API 基线upstream/*.api.txt 现在通过 cargo public-api 跟踪每个发布 crate 的公开 API 表面。

🔧 破坏性变更

  • 单一的 yororen-ui crate 已拆分为 workspace。直接引用内部组件模块的代码需要更新。
  • 主题定制现在由 JSON 驱动,而不再使用 Rust 类型化主题。
  • 旧的整体式组件 API(.apply(div) 视觉路径)已被基于渲染器的流程取代。
  • 详细的升级说明请参见 wiki 迁移指南。

🚀 示例应用

本次版本包含 8 个演示应用:

  • 🔢 counter — 计数器入门示例
  • 🖼️ gallery_demo — 组件画廊
  • ⌨️ inputs_demo — 输入控件展示
  • 🥞 layers_demo — 浮层与层级演示
  • 🎨 theme_showcase — 主题可视化
  • 🧩 variant_showcase — 组件变体展示
  • 📄 gallery_xml — XML DSL 画廊
  • 📄 showcase_xml — XML DSL 展示

📦 使用方式

[dependencies]
yororen-ui = "0.3"
use yororen_ui::headless::button::button;

button("save", cx)
    .caption("Save")
    .on_click(|_, _, _| { /* ... */ })
    .render(cx)

📚 文档

🛠 技术栈

  • Rust Edition 2024
  • gpui-ce(Zed 社区版)
  • Apache License 2.0

⚠️ 不在 v0.3.0 中

  • 屏幕阅读器 / ARIA 桥接(等待 gpui-ce AccessKit 集成)
  • 可视化主题编辑器
  • 超出 gpui 本身支持的跨平台能力

感谢大家的持续支持!欢迎升级并提供反馈 🙏