mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-25 11:05:03 +00:00
VectorCraft's UI moves onto the shared craft UI framework in storytold/craft-libs (`next`; the framework side is storytold/craft-libs#2809), as PhotoCraft's did. The app keeps its engine, document model, file formats, commands and automation; its windows, panels, bars, dialogs and canvas are now built and driven by the framework: shell, docking and panels, hosted dialogs, keyboard, focus, IME and pointer routing, and theme tokens. About 264,000 lines of VectorCraft's own egui UI code are removed and about 154,000 added. craft-libs is pinned at bf62d509f (in `next`), the egui fork at f5025284. Tests that drove the old UI were rewritten against the port where only their premise changed, with their assertions kept. The UI tests still failing at merge, and their follow-ups, are listed in the pull request.
111 lines
4.3 KiB
TOML
111 lines
4.3 KiB
TOML
[package]
|
|
name = "vectorcraft-ui-egui"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
description = "VectorCraft egui frontend (menus, panels, tools and canvas); swappable — nothing below depends on it"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[features]
|
|
default = ["bundled-fonts", "interface-fonts"]
|
|
# The fonts vectorcraft-text bundles for documents, through the engine's `bundled-fonts`. Off, for
|
|
# an embedder that supplies every document font at run time (`vectorcraft_text::FontDb::add_font`);
|
|
# the interface's own faces are `interface-fonts`.
|
|
bundled-fonts = ["vectorcraft-engine/bundled-fonts"]
|
|
# The interface's own faces (theme.rs: Inter, Source Sans 3, JetBrains Mono, about 2 MB). Off, the
|
|
# panels and dialogs draw in egui's built-in fonts, which lack some symbols they show (→ ▾ ● ✓);
|
|
# `theme::install_fonts` binds their families either way.
|
|
interface-fonts = []
|
|
|
|
[dependencies]
|
|
craft = { workspace = true, features = [
|
|
"ui",
|
|
"automation",
|
|
"cms",
|
|
"color-ui",
|
|
"draw",
|
|
"font-catalog",
|
|
"font-catalog-system",
|
|
"font-manager",
|
|
"imaging",
|
|
"keymap",
|
|
"layers",
|
|
"menu",
|
|
"pages",
|
|
"pdf",
|
|
"platform",
|
|
"platform-clipboard",
|
|
"print",
|
|
"quit",
|
|
"settings",
|
|
"table",
|
|
"text",
|
|
"text-find",
|
|
"text-font-picker",
|
|
"tracked",
|
|
"window",
|
|
] }
|
|
vectorcraft-geom = { workspace = true }
|
|
vectorcraft-color = { workspace = true }
|
|
vectorcraft-doc = { workspace = true }
|
|
vectorcraft-brush = { workspace = true }
|
|
vectorcraft-render = { workspace = true }
|
|
vectorcraft-text = { workspace = true }
|
|
vectorcraft-tools = { workspace = true }
|
|
vectorcraft-engine = { workspace = true }
|
|
vectorcraft-svg = { workspace = true }
|
|
vectorcraft-effects = { workspace = true }
|
|
vectorcraft-three-d = { workspace = true }
|
|
vectorcraft-plugins = { workspace = true }
|
|
vectorcraft-pdf = { workspace = true }
|
|
vectorcraft-cad = { workspace = true }
|
|
vectorcraft-eps = { workspace = true }
|
|
vectorcraft-format = { workspace = true }
|
|
egui = { workspace = true, features = ["bytemuck", "default_fonts", "monochrome_emoji_fonts"] }
|
|
# With egui's `bytemuck`: copies rendered rasters into egui images whole (`canvas::color_image`).
|
|
# `default_fonts`: egui 0.37 makes its bundled faces opt-in, and a dependency's dev-features do not
|
|
# reach our tests; `theme::install_fonts` starts from `FontDefinitions::default()`, which is empty
|
|
# without them (production would lay out tofu, and the no-interface-fonts tests would bind nothing).
|
|
bytemuck = { version = "1", features = ["extern_crate_alloc"] }
|
|
image = { workspace = true }
|
|
craft-image-codecs = { workspace = true }
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
log = { workspace = true }
|
|
|
|
# Floating panels open in OS windows of their own on the desktop; on the web they stay in the page.
|
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
|
# The folder picker and the updater are native only (`craft/Cargo.toml`: rfd and getrandom have no wasm build).
|
|
craft = { workspace = true, features = ["dialogs", "update"] }
|
|
# The local date and time the status bar's Date and Time readout shows (`chrono::Local`). Already in
|
|
# Cargo.lock with the time-zone crates `clock` uses.
|
|
chrono = { workspace = true, features = ["clock"] }
|
|
|
|
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
|
# The status bar's Date and Time readout reads the page's clock with this crate in the web build. It
|
|
# is MIT OR Apache-2.0 and already in the build through eframe.
|
|
web-time = "1"
|
|
|
|
# The current user's id (`geteuid`): Preview in Browser uses its temporary folder only when that
|
|
# user owns it (src/dialogs/save_for_web.rs). Already in Cargo.lock (tempfile), so this adds no
|
|
# new crate.
|
|
[target.'cfg(unix)'.dependencies]
|
|
rustix = { workspace = true, features = ["std", "process"] }
|
|
|
|
[dev-dependencies]
|
|
# `Fixture` and the stories sit behind craft-ui's `testing` feature.
|
|
craft = { workspace = true, features = ["ui-testing"] }
|
|
egui_kittest = { workspace = true, features = ["wgpu", "snapshot"] }
|
|
egui_extras = { workspace = true }
|
|
vectorcraft-apischema = { workspace = true }
|
|
vectorcraft-testkit = { workspace = true }
|
|
# A variable font built in code (no font file is committed).
|
|
vectorcraft-text = { workspace = true, features = ["test-fonts"] }
|
|
wat = { workspace = true }
|
|
|
|
[build-dependencies]
|
|
serde_json = { workspace = true }
|
|
toml = "1"
|