Files
craft-libs/crates/ui-contract/Cargo.toml
T
Dylan M. Taylor a9126c6a72 fw-sync fw-contract-runtime: resolve ui-contract runtime, egui glue, fonts, style, testing kit, manifest and runtime trials
Union of the port's and upstream next's changes: document-face chains carried onto
upstream's over-interface faces (one begin-pass edit), refused/declined commands and
requested pastes onto the rewritten command board (resolve_once, Instances), drop
operations beside region tokens in drag registration, wheel layers/exit gate/modal
family beside scroll_owner_inside, locate_wheel beside press records, text_edit
scroll + submit_key, both focus/policy additions, test module lists and trials.
2026-11-22 22:57:47 -05:00

125 lines
5.8 KiB
TOML

[package]
name = "craft-ui-contract"
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
description = "Runtime, style, fonts, primitives, the component contract, layout and the test kit of the craft UI library, on egui"
[lib]
# Every test lives in the `it` integration binary.
test = false
[lints]
workspace = true
[features]
default = []
# `craft_ui::testing`: the fixture and helpers used by application tests.
# The suite runner, stories, registrations and snapshots are opt-in.
testing = ["craft-platform/testing"]
suite = ["testing", "dep:libtest-mimic", "snapshot"]
# `craft_ui::testing::snapshot`: stories rendered to images offscreen (desktop only).
snapshot = ["dep:egui_kittest", "dep:image"]
# Draw colour glyphs (COLR, sbix, CBDT), e.g. colour emoji.
color_fonts = ["dep:epaint", "epaint/color_fonts"]
# Find installed fonts for characters the app's faces lack (desktop only).
system_fonts = ["dep:fontique"]
[dependencies]
craft-behavior = { workspace = true }
# `Intent::Access` and the AccessKit action requests the key stage routes.
accesskit = "0.25"
craft-keymap = { workspace = true, features = ["egui"] }
craft-theme = { workspace = true }
craft-ui-macros = { workspace = true }
# `Tracked`: app models whose revision keys memoized views and write-through bindings.
craft-tracked = { workspace = true }
# `MemoKey`: SipHash-1-3 with a 128-bit output.
siphasher = "1"
# `MemoProps::identity`: the `TypeId` of a props type with its lifetimes erased.
typeid = { workspace = true }
# `CommandRef.params`, which a memo key walks.
serde_json = { workspace = true }
craft-settings = { workspace = true }
toml = { version = "1.1", default-features = false, features = ["std", "parse", "serde"] }
egui = { workspace = true }
libtest-mimic = { version = "0.8", optional = true }
craft-host = { workspace = true }
# `WindowSystem` and `restore::Store`, which viewport mounts place windows through.
# `ui`: the window crate's egui side builds once, the same for the runtime, the shell's `app` and the apps.
craft-window = { workspace = true, features = ["ui"] }
# `quit`, which `runtime::windows::logic` routes a root close through.
craft-quit = { workspace = true }
# `appearance::SystemReader`, the OS appearance the root's `System` choices resolve from.
craft-platform = { workspace = true, features = ["appearance", "clipboard"] }
craft-i18n = { workspace = true, features = ["collate"] }
# `alt_code_char`, which the raw-input step decodes Alt+numpad codes with.
craft-codepage = { workspace = true }
log = "0.4"
scoped-tls = { workspace = true }
smallvec = { workspace = true }
inventory = "0.3.25"
serde = { workspace = true }
# `fonts`: character maps and variation axes of faces, and inflating egui's default fonts, stored deflated.
skrifa = { version = "0.44", default-features = false, features = ["std"] }
flate2 = { version = "1", default-features = false, features = ["rust_backend"] }
# The installed font folders, for the on-demand font candidates (`fonts::SystemCandidates`).
craft-font-catalog = { path = "../font-catalog", default-features = false }
# The craft-fonts faces (`fonts::EmbeddedFace`, `fonts::ServedFace`).
craft-fonts-build = { workspace = true }
# Only `color_fonts` reads it: the feature turns on epaint's colour glyphs.
epaint = { version = "0.37", default-features = false, optional = true }
# Icon parsing and rasterising: the bounded usvg/resvg stack every Craft app shares, without text or raster images.
craft-svg = { workspace = true, features = ["draw"] }
# `std::time::Instant` on native; the browser clock on wasm, where `Instant::now` panics.
web-time = "1.1"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
# The versions egui_system_font_provider 0.37 uses.
fontique = { version = "0.11.1", default-features = false, features = ["system", "fontconfig-dlopen"], optional = true }
# `testing::snapshot`: egui's wgpu test renderer, which prefers a software adapter, and PNG output.
egui_kittest = { version = "0.37", features = ["wgpu"], optional = true }
image = { version = "0.25", default-features = false, features = ["png"], optional = true }
# The window host's end hook sets `NSWindow.movable` through craft-window's AppKit code.
[target.'cfg(target_arch = "wasm32")'.dependencies]
# `screen::available`: whether the browser has the EyeDropper, read at install for `Caps::SCREEN_CAPTURE`.
craft-platform = { workspace = true, features = ["screen", "browser", "clipboard"] }
# `egui/files.rs`: a pathless dropped file's bytes, which the page reads only asynchronously.
wasm-bindgen-futures = "0.4"
[target.'cfg(target_os = "macos")'.dependencies]
craft-window = { workspace = true, features = ["ui", "appkit"] }
# build.rs reads icons/icons.toml and deflates the suite's default fonts (Inter, egui's faces) for `fonts::deflated_default_definitions`.
[build-dependencies]
toml = { version = "1.1", default-features = false, features = ["std", "parse", "serde"] }
flate2 = { version = "1", default-features = false, features = ["rust_backend"] }
epaint_default_fonts = { version = "0.37", features = ["monochrome_emoji_fonts"] }
[dev-dependencies]
craft-ui-contract = { path = ".", features = ["suite"] }
craft-behavior = { workspace = true }
craft-fonts-build = { workspace = true }
craft-host = { workspace = true }
craft-i18n = { workspace = true }
craft-keymap = { workspace = true, features = ["egui"] }
craft-theme = { workspace = true }
craft-ui-test-kit = { workspace = true, features = ["suite"] }
craft-window = { workspace = true }
egui = { workspace = true }
# The oracle for the deflated default faces (`tests/it/fonts/on_demand.rs`).
epaint_default_fonts = { version = "0.37", features = ["monochrome_emoji_fonts"] }
proc-macro2 = "1"
syn = { version = "2", features = ["full"] }
[[test]]
name = "it"
path = "tests/it/main.rs"
harness = false