mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-25 20:14:31 +01:00
# Conflicts: # crates/dialogs/src/lib.rs # crates/dialogs/src/ui/mod.rs # crates/draw/src/ui/gradient/mod.rs # crates/draw/src/ui/gradient/swatch.rs # crates/menu/src/shortcuts/view.rs # crates/menu/tests/it/main.rs # crates/menu/tests/it/shortcuts/mod.rs # crates/pages/tests/it/main.rs # crates/print/src/lib.rs # crates/review/tests/it/main.rs # crates/story-render/src/main.rs # crates/table/tests/it/main.rs # crates/text/tests/it/main.rs # crates/ui-canvas/src/canvas/navigate/mod.rs # crates/ui-canvas/tests/it/canvas/mod.rs # crates/ui-contract/tests/it/access/mod.rs # crates/ui-contract/tests/it/fonts/mod.rs # crates/ui-contract/tests/it/runtime/mod.rs # crates/ui-gallery/src/foundations/mod.rs # crates/ui-patterns/src/patterns/preferences/mod.rs # crates/ui-patterns/tests/it/docking/mod.rs # crates/ui-patterns/tests/it/form_dialogs/mod.rs # crates/ui-patterns/tests/it/panels/palette.rs # crates/ui-patterns/tests/it/preferences/mod.rs # crates/ui-shell/src/shell/mod.rs # crates/ui-shell/tests/it/shell/mod.rs # crates/ui-widgets/src/tabs/strip.rs # crates/ui-widgets/tests/it/bars/mod.rs # crates/ui-widgets/tests/it/contract/mod.rs # crates/ui-widgets/tests/it/layout/mod.rs # crates/ui-widgets/tests/it/main.rs # crates/ui-widgets/tests/it/menu/mod.rs # crates/ui-widgets/tests/it/pickers/mod.rs # crates/ui-widgets/tests/it/text/mod.rs
63 lines
3.0 KiB
TOML
63 lines
3.0 KiB
TOML
[package]
|
|
name = "craft-dialogs"
|
|
description = "Native file and message dialogs that never block the event loop: queued requests, shown at the end of the frame, answered on a later frame."
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
rust-version.workspace = true
|
|
repository.workspace = true
|
|
autotests = false
|
|
|
|
[lib]
|
|
# The lib's test target is the crate's one test executable: its trials and, with `screen-testing`, the
|
|
# screen tests in tests/it.
|
|
harness = false
|
|
|
|
# Versions the apps already pin (rfd 0.17.2, raw-window-handle 0.6.2), so adopting the crate adds
|
|
# nothing new to their Cargo.lock. rfd without its `wayland` feature, which links libwayland-client
|
|
# through pkg-config unless winit's `dlopen` is in the build too; the apps' own rfd keeps it on.
|
|
[dependencies]
|
|
craft-atomic = { workspace = true }
|
|
craft-host = { workspace = true }
|
|
craft-i18n = { workspace = true }
|
|
craft-platform = { workspace = true }
|
|
craft-behavior = { workspace = true, optional = true }
|
|
craft-browse = { workspace = true, optional = true }
|
|
craft-ui = { workspace = true, optional = true }
|
|
egui = { workspace = true, optional = true }
|
|
raw-window-handle = "0.6.2"
|
|
# `ui`: the file chooser's automation fields are JSON (craft-ui does not re-export serde_json).
|
|
serde_json = { workspace = true, optional = true }
|
|
rfd = { version = "0.17.2", default-features = false, features = ["xdg-portal"] }
|
|
|
|
# The file-dialog probe asks the session bus whether the desktop portal offers a file chooser.
|
|
# The free-standing Open and Folder panel (`beginWithCompletionHandler:`). rfd and winit already
|
|
# use these.
|
|
[target.'cfg(target_os = "macos")'.dependencies]
|
|
block2 = "0.6.2"
|
|
objc2 = { version = "0.6.4", default-features = false, features = ["std"] }
|
|
objc2-app-kit = { version = "0.3.2", default-features = false, features = ["std", "block2", "NSApplication", "NSOpenPanel", "NSPanel", "NSResponder", "NSSavePanel", "NSView", "NSWindow"] }
|
|
objc2-foundation = { version = "0.3.2", default-features = false, features = ["std", "NSArray", "NSString", "NSURL"] }
|
|
|
|
# The Linux and BSD Save panel asks the desktop portal itself, which reports the file type picked.
|
|
# The versions craft-platform already builds (zbus with async-io and blocking-api), so adopting the
|
|
# crate adds nothing new to the apps' Cargo.lock. The cfg is the one on `mod portal` in `lib.rs`.
|
|
[target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os = "dragonfly", target_os = "netbsd", target_os = "openbsd"))'.dependencies]
|
|
futures-lite = "2"
|
|
log = "0.4"
|
|
zbus = { version = "5", default-features = false, features = ["async-io", "blocking-api"] }
|
|
|
|
[features]
|
|
suite = ["screen-testing", "craft-ui/suite"]
|
|
default = []
|
|
# `craft_dialogs::ui`: `PathField` and the other egui parts of the file service.
|
|
ui = ["dep:craft-behavior", "dep:craft-browse", "dep:craft-ui", "dep:egui", "dep:serde_json"]
|
|
# The stories and the integration binary of the file service's UI parts.
|
|
screen-testing = ["ui", "craft-ui/testing"]
|
|
|
|
[dev-dependencies]
|
|
craft-ui = { workspace = true, features = ["suite"] }
|
|
|
|
[lints]
|
|
workspace = true
|