Relocate the widget facade (widgets/, including the Widget trait,
render primitives, the editor-UI compositions, the CanvasViewport
center canvas, the lucide icon drawer, and editor_state_ext), the
theme tokens, the layout-resolved render scene (layout_scene +
layout_scene_hit), and the design-variable aggregation (scene_vars)
out of openpencil-shell-core into a dedicated op-editor-ui crate.
The canvas widgets (canvas_viewport*) stay inside op-editor-ui rather
than splitting into a separate op-canvas crate: they depend on the
widgets/ siblings editor_state_ext + icons and on the Widget trait, so
a clean mechanical split is not possible — per the task's explicit
allowance not to force a fragile split.
op-editor-ui's lib.rs mirrors the old shell-core crate-root re-exports
(render_backend facade types + jian gesture types + the i18n alias) so
every intra-module `crate::Color` / `crate::theme` / `crate::widgets`
path resolves unchanged — a pure relocation with no path rewrites
inside the moved modules. openpencil-shell-core becomes a thin
re-export shim (`pub use op_editor_ui::{widgets, theme, ...}`) so the
hosts keep resolving `openpencil_shell_core::*` until the Task 7.3
host rename dissolves the crate. The widgets_static integration test
moves to op-editor-ui/tests with its imports rewritten. The widget
boundary script's reverse-check path is updated to the new crate.
No behaviour change; all tests move with their code.
28 lines
981 B
TOML
28 lines
981 B
TOML
[package]
|
|
name = "op-editor-ui"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
rust-version.workspace = true
|
|
license.workspace = true
|
|
description = "OpenPencil editor UI — platform-agnostic widget facade + theme + layout-resolved render scene"
|
|
|
|
[lib]
|
|
name = "op_editor_ui"
|
|
path = "src/lib.rs"
|
|
|
|
[dependencies]
|
|
# Widget facade internals: glam Vec2 as Point2D, bitflags for flags.
|
|
glam = { version = "0.29", default-features = false, features = ["std"] }
|
|
bitflags = "2"
|
|
# Every Widget exposes an `accesskit::Node` so the host can build a
|
|
# unified accessibility tree. Pinned to 0.24 to match the hosts.
|
|
accesskit = "0.24"
|
|
|
|
# Canonical jian render/gesture types + the .op document schema.
|
|
jian-core = { path = "../../vendor/jian/crates/jian-core", version = "0.0.1" }
|
|
jian-ops-schema = { path = "../../vendor/jian/crates/jian-ops-schema" }
|
|
|
|
# i18n string tables + the canonical editor state model.
|
|
op-i18n = { path = "../op-i18n" }
|
|
op-editor-core = { path = "../op-editor-core" }
|