mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-27 04:38:49 +00:00
Split UI test kit from story suite
This commit is contained in:
@@ -17,6 +17,7 @@ harness = false
|
||||
workspace = true
|
||||
|
||||
[features]
|
||||
suite = ["screen-testing", "craft-ui/suite"]
|
||||
default = []
|
||||
# The egui parts: the Actions panel, the control channel's server side (screenshots, synthetic
|
||||
# input) and `ui` stories. Without it the crate has no egui: `ControlOptions`, `ControlClient`,
|
||||
@@ -55,5 +56,5 @@ thiserror = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
tempfile = "3"
|
||||
craft-ui = { workspace = true, features = ["testing"] }
|
||||
craft-ui = { workspace = true, features = ["suite"] }
|
||||
egui = { workspace = true }
|
||||
|
||||
@@ -57,6 +57,7 @@ pub use security::AutomationError;
|
||||
/// The trials this crate registers, for its integration binary.
|
||||
#[cfg(feature = "screen-testing")]
|
||||
pub mod testing {
|
||||
#[cfg(feature = "suite")]
|
||||
craft_ui::testing_registered!();
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ pub mod mock;
|
||||
mod panel;
|
||||
mod prompt;
|
||||
mod rows;
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
mod words;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//! `AgentsPage`: the Agents page of Preferences, over the agent settings in the Preferences draft.
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
mod words;
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ harness = false
|
||||
workspace = true
|
||||
|
||||
[features]
|
||||
suite = ["screen-testing", "craft-ui/suite"]
|
||||
default = []
|
||||
# The browsing widgets (`craft_browse::ui`) and `FileThumbSource`.
|
||||
ui = ["dep:craft-behavior", "dep:craft-ui", "dep:egui", "dep:kurbo"]
|
||||
@@ -37,6 +38,6 @@ kurbo = { workspace = true, optional = true }
|
||||
serde = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
craft-ui = { workspace = true, features = ["testing"] }
|
||||
craft-ui = { workspace = true, features = ["suite"] }
|
||||
egui = { workspace = true }
|
||||
tempfile = "3"
|
||||
|
||||
@@ -23,7 +23,7 @@ mod free_view;
|
||||
mod icon;
|
||||
mod list;
|
||||
mod search;
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
use std::cell::RefCell;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
mod arrange;
|
||||
mod caption;
|
||||
mod pill;
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
mod style;
|
||||
mod tile;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
//! End, the marquee, the move gesture, rename, delete and the context menu. `FreeBin` adds the placement and turns the
|
||||
//! move gesture into the cards' new positions.
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
use std::cell::RefCell;
|
||||
|
||||
@@ -21,5 +21,6 @@ pub use relink::{LinkList, LinkListWords, RelinkDialog, RelinkWords, StatusBadge
|
||||
/// The stories and trials this crate registers for the integration binary.
|
||||
#[cfg(feature = "screen-testing")]
|
||||
pub mod testing {
|
||||
#[cfg(feature = "suite")]
|
||||
craft_ui::testing_registered!();
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
//! }
|
||||
//! ```
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
mod badge;
|
||||
mod dialog;
|
||||
mod list;
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
pub use badge::StatusBadge;
|
||||
|
||||
@@ -17,6 +17,7 @@ harness = false
|
||||
workspace = true
|
||||
|
||||
[features]
|
||||
suite = ["screen-testing", "craft-ui/suite"]
|
||||
default = []
|
||||
# The colour widgets (`craft_color_ui::ui`).
|
||||
ui = ["dep:craft-behavior", "dep:craft-keymap", "dep:craft-ui", "dep:egui", "dep:craft-settings", "dep:craft-window", "craft-platform/screen", "dep:serde_json"]
|
||||
@@ -39,7 +40,7 @@ serde = { workspace = true }
|
||||
serde_json = { workspace = true, optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
craft-ui = { workspace = true, features = ["testing"] }
|
||||
craft-ui = { workspace = true, features = ["suite"] }
|
||||
egui = { workspace = true }
|
||||
|
||||
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
|
||||
|
||||
@@ -13,7 +13,7 @@ use craft_ui::style::{ComponentStyle, StyleCx};
|
||||
use craft_ui::value_drag::{PointMark, PointPicker};
|
||||
use egui::{Mesh, Pos2, Rect, Vec2, pos2};
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
/// Vertices along each side of the area's colour mesh (PhotoCraft's 32).
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//! `ColorChoice`: a choice among named colours with a custom colour, as Photoshop's pasteboard colour
|
||||
//! (Preferences, Interface), the Crop shield colour and the Note colour.
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
use craft_theme::Srgba;
|
||||
|
||||
@@ -12,7 +12,7 @@ use egui::{CornerRadius, Rect, Response, Vec2, pos2};
|
||||
use super::picker::ColorPickerWords;
|
||||
use super::warning::{ColorWarning, ColorWarningChip};
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
/// The style of a compare block: the size of the block and of each half, the edge round it and the gap between a
|
||||
|
||||
@@ -16,7 +16,7 @@ use craft_ui::runtime::focus::{ActivateKeys, FocusShape, KeepKeys, KeyUse};
|
||||
use craft_ui::style::{ComponentStyle, FocusLook, MarkerLook, StyleColor, StyleCx};
|
||||
use egui::{Color32, Mesh, Pos2, Response, Vec2};
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
/// The disc: a press on it grabs the nearest marker within reach.
|
||||
|
||||
@@ -31,7 +31,7 @@ use craft_ui::runtime::env::Label;
|
||||
use craft_ui::runtime::requests::EyedropperRequest;
|
||||
use egui::{Pos2, Response, Ui, Vec2};
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
/// The pipette icon's tip, in the icon's own 24-unit box.
|
||||
|
||||
@@ -35,7 +35,7 @@ use craft_ui::runtime::env::{Env, Label};
|
||||
use craft_ui::style::DataColor;
|
||||
use egui::{Color32, Pos2, Response, Ui, Vec2, vec2};
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
craft_ui::words! {
|
||||
|
||||
@@ -17,7 +17,7 @@ use crate::gradient::{GradientStops, Sampler, StopRules};
|
||||
|
||||
mod bar;
|
||||
mod fields;
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
use bar::GradientBar;
|
||||
|
||||
@@ -19,7 +19,7 @@ use super::picker::{ChannelRow, ChannelRule};
|
||||
use crate::harmony::{Guide, GuideOptions, Harmony, Variation};
|
||||
use craft_ui::choice::{SwatchTable, SwatchTableOutput};
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
craft_ui::words! {
|
||||
|
||||
@@ -17,7 +17,7 @@ use craft_ui::runtime::pointer;
|
||||
use craft_ui::style::{ComponentStyle, StyleCx, UiTokens};
|
||||
use egui::{Pos2, Rect, Response, Ui, Vec2, pos2, vec2};
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
/// The model the HUD picks in: saturation and brightness across and down, hue in the strip.
|
||||
|
||||
@@ -13,7 +13,7 @@ use egui::{Response, Ui};
|
||||
|
||||
use super::SamplerReadout;
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
/// What a missing value shows.
|
||||
|
||||
@@ -19,7 +19,7 @@ use craft_ui::runtime::env::Label;
|
||||
use craft_ui::style::{ComponentStyle, StyleCx};
|
||||
use egui::{Response, Vec2};
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
craft_ui::words! {
|
||||
|
||||
@@ -34,7 +34,7 @@ use super::{PickedColor, ScreenPickGesture, SwatchKey, SwatchPalette, SwatchesWo
|
||||
use crate::palette::{SwatchColor, SwatchGroup};
|
||||
|
||||
mod paint_list;
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
pub use paint_list::{PaintLink, PaintLinkKind, PaintList, PaintListEvent, PaintListOptions, PaintListOutput, PaintRow};
|
||||
|
||||
@@ -18,7 +18,7 @@ use egui::{Color32, CornerRadius, Painter, Pos2, Rect, Response, Shape, Stroke,
|
||||
use super::popover::compact_picker;
|
||||
use super::{ColorPicker, PickedColor, ScreenPickGesture};
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
/// One of the wells, `WELL.at(0)` the primary and `WELL.at(1)` the secondary.
|
||||
|
||||
@@ -10,7 +10,7 @@ use craft_ui::runtime::env::Label;
|
||||
use egui::{Response, Ui};
|
||||
use std::sync::Arc;
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
/// What a [`SwatchPalette`] reports.
|
||||
|
||||
@@ -29,7 +29,7 @@ use super::{
|
||||
};
|
||||
use crate::{CmykModel, GrayModel, not_web_safe};
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
craft_ui::words! {
|
||||
|
||||
@@ -6,7 +6,7 @@ mod channel;
|
||||
mod compact;
|
||||
mod full;
|
||||
mod screen_pick;
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
mod value;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ use egui::{Response, Ui};
|
||||
|
||||
use super::{ColorPicker, ColorPickerLayout, ColorPickerOutput, PickedColor, ScreenPickGesture};
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
/// The setup closure of the picker in the popover.
|
||||
|
||||
@@ -18,7 +18,7 @@ use serde_json::{Value, json};
|
||||
|
||||
use crate::display::MonitorProblem;
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
craft_ui::words! {
|
||||
|
||||
@@ -17,7 +17,7 @@ use egui::{Color32, CornerRadius, Mesh, Pos2, Rect, Response, Vec2, pos2};
|
||||
use std::hash::{DefaultHasher, Hash, Hasher};
|
||||
use std::sync::Arc;
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
/// The bar: a press picks the colour under the pointer.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//! `ColorReadout`: a colour as a hex field and editable R, G and B fields (the readout of a Color panel).
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
use craft_behavior::{EditEvent, EditEvents, Mixed};
|
||||
|
||||
@@ -34,7 +34,7 @@ use super::{InfoColor, SampleSize, SampleSizeSelect};
|
||||
use craft_ui::style::{ComponentStyle, StyleColor, StyleCx};
|
||||
use egui::{Pos2, Response, Ui, Vec2, vec2};
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
craft_ui::words! {
|
||||
|
||||
@@ -33,7 +33,7 @@ use egui::{Color32, Context, Pos2, Rect, Ui, pos2, vec2};
|
||||
use super::ScreenPickGesture;
|
||||
|
||||
mod capture;
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
use capture::{CaptureView, CaptureWindow};
|
||||
|
||||
@@ -15,7 +15,7 @@ use craft_ui::runtime::focus::{ActivateKeys, KeepKeys, KeyUse};
|
||||
use craft_ui::style::{ComponentStyle, DataColor, FocusLook, StyleColor, StyleCx};
|
||||
use egui::{CornerRadius, Mesh, Pos2, Rect, Vec2, pos2};
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
/// The strip itself: a press on it sets the value there.
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
mod library;
|
||||
mod menu;
|
||||
mod panel;
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
pub use library::{SwatchAt, SwatchEdit, SwatchKey, SwatchLibrary, SwatchesState, swatch_rows};
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
#[cfg(feature = "suite")]
|
||||
craft_ui::testing_registered!();
|
||||
|
||||
@@ -11,7 +11,7 @@ use craft_ui::runtime::env::Label;
|
||||
use craft_ui::style::{ComponentStyle, StyleCx};
|
||||
use egui::{Rect, Response, Vec2};
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
/// A warning the host shows beside a colour's swatch, as the out-of-gamut and web-colour warnings of Photoshop's Color
|
||||
|
||||
@@ -15,7 +15,7 @@ use craft_ui::style::{ComponentStyle, FocusLook, MarkerLook, StyleColor, StyleCx
|
||||
use egui::{Mesh, Pos2, Rect, Vec2, vec2};
|
||||
use std::f32::consts::TAU;
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
/// The hue ring: a press on it sets the hue to the pointer's angle.
|
||||
|
||||
@@ -215,6 +215,7 @@ craft-suite-account = { workspace = true, optional = true }
|
||||
craft-xfa = { workspace = true, optional = true }
|
||||
|
||||
[features]
|
||||
suite = ["screen-testing", "craft-ui/suite", "craft-automation?/suite", "craft-browse?/suite", "craft-color-ui?/suite", "craft-dialogs?/suite", "craft-draw?/suite", "craft-font-manager?/suite", "craft-imaging?/suite", "craft-layers?/suite", "craft-menu?/suite", "craft-pages?/suite", "craft-print?/suite", "craft-review?/suite", "craft-table?/suite", "craft-text?/suite", "craft-theme-editor?/suite", "craft-theme-store?/suite", "craft-timeline?/suite", "craft-update?/suite"]
|
||||
ui = [
|
||||
"dep:craft-ui",
|
||||
"dep:egui",
|
||||
|
||||
@@ -45,6 +45,7 @@ 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-ui", "dep:egui"]
|
||||
@@ -52,7 +53,7 @@ ui = ["dep:craft-behavior", "dep:craft-ui", "dep:egui"]
|
||||
screen-testing = ["ui", "craft-ui/testing"]
|
||||
|
||||
[dev-dependencies]
|
||||
craft-ui = { workspace = true, features = ["testing"] }
|
||||
craft-ui = { workspace = true, features = ["suite"] }
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
@@ -34,6 +34,7 @@ pub mod ui;
|
||||
/// The registrations of this crate's UI types, for its integration binary.
|
||||
#[cfg(feature = "screen-testing")]
|
||||
pub mod testing {
|
||||
#[cfg(feature = "suite")]
|
||||
craft_ui::testing_registered!();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//! The file service's UI part: [`PathField`], and the words of the service's native boxes.
|
||||
|
||||
mod path_field;
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
pub use path_field::{PathField, PathFieldOutput, PathFieldWords};
|
||||
|
||||
@@ -17,6 +17,7 @@ harness = false
|
||||
workspace = true
|
||||
|
||||
[features]
|
||||
suite = ["screen-testing", "craft-ui/suite", "craft-color-ui/suite"]
|
||||
default = []
|
||||
# The tool widgets (`craft_draw::ui`).
|
||||
ui = ["dep:craft-behavior", "dep:craft-keymap", "dep:craft-ui", "dep:egui", "dep:craft-color-ui", "craft-color-ui/ui", "dep:craft-settings", "dep:serde_json"]
|
||||
@@ -38,5 +39,5 @@ serde = { version = "1", features = ["derive"] }
|
||||
serde_json = { workspace = true, optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
craft-ui = { workspace = true, features = ["testing"] }
|
||||
craft-ui = { workspace = true, features = ["suite"] }
|
||||
egui = { workspace = true }
|
||||
|
||||
@@ -9,6 +9,7 @@ pub mod ui;
|
||||
#[cfg(feature = "screen-testing")]
|
||||
pub mod testing {
|
||||
//! The registrations of this crate's stories, for the `tests/it` harness.
|
||||
#[cfg(feature = "suite")]
|
||||
craft_ui::testing_registered!();
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//! (Photoshop) or a connected object (FigJam) there. One canvas control for the Artboard tool and the connector
|
||||
//! tools: its buttons are parts in the canvas's arena, so a press on one reaches the control before the tool.
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
pub(crate) mod stories;
|
||||
mod words;
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ mod background;
|
||||
mod bar;
|
||||
mod overlay;
|
||||
mod properties;
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
mod tool;
|
||||
mod words;
|
||||
|
||||
@@ -14,7 +14,7 @@ mod panel;
|
||||
mod picker;
|
||||
mod rows;
|
||||
mod settings;
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
pub(crate) mod stories;
|
||||
mod words;
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ mod preview;
|
||||
mod rows;
|
||||
mod sections;
|
||||
mod size_field;
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
pub(crate) mod stories;
|
||||
mod words;
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ mod place;
|
||||
mod tool;
|
||||
mod words;
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
use craft_behavior::EditEvent;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
//! arc the app's engine draws.
|
||||
|
||||
mod geometry;
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
pub(crate) mod stories;
|
||||
mod style;
|
||||
mod widgets;
|
||||
|
||||
@@ -21,7 +21,7 @@ use craft_ui::runtime::requests::ColorRequest;
|
||||
use craft_ui::text::NumberField;
|
||||
use egui::{Response, Ui};
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
/// The ratio, a ratio field, a preset or W × H × Resolution changed.
|
||||
|
||||
@@ -11,7 +11,7 @@ use craft_ui::layout_components::Row;
|
||||
use craft_ui::runtime::env::Env;
|
||||
use egui::{Response, Ui};
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
/// The Perspective Crop options: W × H × Resolution, Front Image, Clear, a divider and Show Grid.
|
||||
|
||||
@@ -487,5 +487,5 @@ pub fn grid_lines(view: &CanvasView, q: &[Point; 4], step: f32) -> Vec<[Pos2; 2]
|
||||
out
|
||||
}
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
@@ -788,5 +788,5 @@ pub fn crop_to_form(words: &CropWords, frame: &CropBox) -> ParamDialog<'static>
|
||||
ParamDialog::command(CROP_TO_KEY, words.crop_to.clone(), params)
|
||||
}
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
@@ -222,5 +222,5 @@ impl<'a> GradientFillEditor<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
mod keys;
|
||||
mod parts;
|
||||
mod pointer;
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
//! It lives here rather than with the other adjustment editors in craft-imaging because it picks from the palette's
|
||||
//! [`GradientGroup`] presets, and a family crate depends on no other family crate but craft-color-ui.
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
use craft_behavior::{EditEvent, Mixed};
|
||||
|
||||
@@ -7,7 +7,7 @@ use craft_ui::patterns::presets::{CellShape, PresetBrowser, PresetEvent, PresetR
|
||||
use craft_ui::runtime::env::{Env, Label};
|
||||
use egui::{Response, Ui};
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
use craft_color_ui::ui::gradient::{GradientRamp, GradientStops, Sampler, StopRows, default_sampler};
|
||||
|
||||
@@ -10,7 +10,7 @@ use egui::{CornerRadius, Response, Vec2};
|
||||
|
||||
use craft_color_ui::ui::gradient::{GradientRamp, GradientStops, Sampler, StopRows, default_sampler};
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
/// The style of a gradient swatch: the colour swatch's height, corners and ring.
|
||||
|
||||
@@ -9,7 +9,7 @@ mod bar;
|
||||
mod distances;
|
||||
mod model;
|
||||
mod overlay;
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
mod tool;
|
||||
mod words;
|
||||
|
||||
@@ -20,7 +20,7 @@ use craft_ui::runtime::env::{Env, Label, UnitKind};
|
||||
use craft_ui::text::{NumberField, RangeAlert};
|
||||
use egui::{Response, Ui};
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
mod words;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ mod menu;
|
||||
mod model;
|
||||
mod panel;
|
||||
mod rows;
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
pub(crate) mod stories;
|
||||
mod words;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ use craft_theme::Srgba;
|
||||
|
||||
mod dialog;
|
||||
mod editor;
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
pub(crate) mod stories;
|
||||
mod words;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ mod hit_test;
|
||||
mod mark;
|
||||
mod model;
|
||||
mod ops;
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
mod style;
|
||||
mod tools;
|
||||
|
||||
@@ -9,7 +9,7 @@ pub(crate) mod bezier;
|
||||
mod curvature_mode;
|
||||
mod mode;
|
||||
mod options;
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
pub(crate) mod stories;
|
||||
mod tool;
|
||||
mod words;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
//! ```
|
||||
|
||||
mod editor;
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
mod words;
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ mod bar;
|
||||
mod gear;
|
||||
mod mode_select;
|
||||
mod panel;
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
pub(crate) mod stories;
|
||||
mod stroke_cells;
|
||||
mod words;
|
||||
|
||||
@@ -11,7 +11,7 @@ use craft_ui::style::UiTokens;
|
||||
use egui::{Color32, Mesh, Painter, Pos2, Rect, Shape, Stroke, Ui, pos2};
|
||||
use kurbo::{BezPath, PathEl};
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
/// The error bound, in points, when the glyph's curves are flattened.
|
||||
|
||||
@@ -38,7 +38,7 @@ use std::sync::Arc;
|
||||
mod bar;
|
||||
mod dialogs;
|
||||
mod overlay;
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
mod tool;
|
||||
mod words;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
mod button;
|
||||
mod editor;
|
||||
mod preview;
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
pub(crate) mod stories;
|
||||
mod words;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ mod handles;
|
||||
mod menu;
|
||||
mod model;
|
||||
mod overlay;
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
mod transform;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//! `TransformBar`: the options bar of an open Free Transform session.
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
use super::session::{TransformEdit, TransformPhase, TransformSession, TransformSettings, TransformWarp};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//! `TransformOverlay`: the open session's box on the canvas, which shows a [`TransformBox`](super::TransformBox)
|
||||
//! and turns its reports into [`TransformEdit`]s, and `TransformTool`: the canvas tool of the open session.
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
use craft_behavior::CancelReason;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//! corners, edges, reference point, inside and outside are parts in the canvas's arena; the value is the box in
|
||||
//! document units.
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
use craft_behavior::geometry::quad::{self, BoxAllow, BoxDrag, BoxPart, BoxRules, BoxState, ScaleRule, TransformMode};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//! `TransformFields`: the X, Y, W, H, angle and skew fields of a transform box, as an options-bar strip or a panel's
|
||||
//! rows.
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
mod units;
|
||||
|
||||
|
||||
@@ -31,22 +31,22 @@ workspace = true
|
||||
[dependencies]
|
||||
craft-ui-gallery = { path = "../ui-gallery", default-features = false }
|
||||
# The gallery's optional domain crates, with the gallery's features (`cl doctor` checks that the lists match).
|
||||
craft-automation = { workspace = true, features = ["screen-testing"] }
|
||||
craft-browse = { workspace = true, features = ["screen-testing"] }
|
||||
craft-color-ui = { workspace = true, features = ["screen-testing"] }
|
||||
craft-draw = { workspace = true, features = ["screen-testing"] }
|
||||
craft-imaging = { workspace = true, features = ["screen-testing"] }
|
||||
craft-layers = { workspace = true, features = ["screen-testing"] }
|
||||
craft-menu = { workspace = true, features = ["screen-testing"] }
|
||||
craft-pages = { workspace = true, features = ["screen-testing"] }
|
||||
craft-print = { workspace = true, features = ["screen-testing"] }
|
||||
craft-review = { workspace = true, features = ["screen-testing"] }
|
||||
craft-table = { workspace = true, features = ["screen-testing"] }
|
||||
craft-text = { workspace = true, features = ["screen-testing", "find"] }
|
||||
craft-theme-store = { workspace = true, features = ["screen-testing"] }
|
||||
craft-timeline = { workspace = true, features = ["screen-testing", "xml", "otio"] }
|
||||
craft-automation = { workspace = true, features = ["suite"] }
|
||||
craft-browse = { workspace = true, features = ["suite"] }
|
||||
craft-color-ui = { workspace = true, features = ["suite"] }
|
||||
craft-draw = { workspace = true, features = ["suite"] }
|
||||
craft-imaging = { workspace = true, features = ["suite"] }
|
||||
craft-layers = { workspace = true, features = ["suite"] }
|
||||
craft-menu = { workspace = true, features = ["suite"] }
|
||||
craft-pages = { workspace = true, features = ["suite"] }
|
||||
craft-print = { workspace = true, features = ["suite"] }
|
||||
craft-review = { workspace = true, features = ["suite"] }
|
||||
craft-table = { workspace = true, features = ["suite"] }
|
||||
craft-text = { workspace = true, features = ["suite", "find"] }
|
||||
craft-theme-store = { workspace = true, features = ["suite"] }
|
||||
craft-timeline = { workspace = true, features = ["suite", "xml", "otio"] }
|
||||
|
||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
||||
craft-dialogs = { workspace = true, features = ["screen-testing"] }
|
||||
craft-font-manager = { workspace = true, features = ["screen-testing"] }
|
||||
craft-update = { workspace = true, features = ["screen-testing"] }
|
||||
craft-dialogs = { workspace = true, features = ["suite"] }
|
||||
craft-font-manager = { workspace = true, features = ["suite"] }
|
||||
craft-update = { workspace = true, features = ["suite"] }
|
||||
|
||||
@@ -12,6 +12,7 @@ repository.workspace = true
|
||||
test = false
|
||||
|
||||
[features]
|
||||
suite = ["screen-testing", "craft-ui/suite"]
|
||||
default = []
|
||||
# `FontsPanel`: the whole interface as one egui panel (it builds for the web too), with the picker, the Glyphs panel, the axis sliders and the
|
||||
# Missing Fonts dialog.
|
||||
@@ -40,13 +41,13 @@ log = { version = "0.4", optional = true }
|
||||
skrifa = { version = "0.44", default-features = false, features = ["std"] }
|
||||
|
||||
[dev-dependencies]
|
||||
craft-font-manager = { path = ".", features = ["screen-testing"] }
|
||||
craft-font-manager = { path = ".", features = ["suite"] }
|
||||
|
||||
[[test]]
|
||||
name = "it"
|
||||
path = "tests/it/main.rs"
|
||||
harness = false
|
||||
required-features = ["screen-testing"]
|
||||
required-features = ["suite"]
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//! The row of sliders that edits the axes of a face (Photoshop's Properties › Character axis sliders; FigCraft's axis panel).
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//! Currency, ...), a grid of glyph cells drawn by the app's text engine, a zoom slider, and the recently used
|
||||
//! glyphs in a row at the top. Double-click or Enter inserts the glyph where the app can insert.
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
@@ -40,5 +40,6 @@ pub use panel::{
|
||||
/// The registered stories and trials of this crate.
|
||||
#[cfg(feature = "screen-testing")]
|
||||
pub mod testing {
|
||||
#[cfg(feature = "suite")]
|
||||
craft_ui::testing_registered!();
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//! are not installed, and the dialog that lists them with a replacement for each (Photoshop's
|
||||
//! "missing fonts" warning on open; VectorCraft's and FigCraft's Document Fonts lists).
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
use std::borrow::Cow;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//! The panel's model, what the host calls, and the view: the tabs and search across the top, the filters at the
|
||||
//! reading start, the family cards, the details sheet and the download consent.
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
use std::collections::HashMap;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//! The tabs and search, the filters, the sample toolbar and the list of family cards.
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
mod cards;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//! installing or removing it whole or a style at a time.
|
||||
|
||||
mod rows;
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//! added (never curated, and flagged when their file changed since it was added), adding one,
|
||||
//! and downloading them all again.
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
@@ -12,7 +12,7 @@ use crate::Catalog;
|
||||
use crate::FaceInfo;
|
||||
use crate::panel::faces::{self, Owner, Shown};
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
/// The ink of a sample: the text colour for a face that drew, the muted one for the interface face standing in.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
mod rank;
|
||||
mod rows;
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
@@ -17,6 +17,7 @@ harness = false
|
||||
workspace = true
|
||||
|
||||
[features]
|
||||
suite = ["screen-testing", "craft-ui/suite"]
|
||||
default = []
|
||||
# The editing widgets (`craft_imaging::ui`).
|
||||
ui = ["craft-color-ui/ui", "dep:serde_json", "dep:craft-behavior", "dep:craft-keymap", "dep:craft-ui", "dep:egui", "dep:kurbo"]
|
||||
@@ -37,7 +38,7 @@ serde = { workspace = true }
|
||||
serde_json = { workspace = true, optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
craft-ui = { workspace = true, features = ["testing"] }
|
||||
craft-ui = { workspace = true, features = ["suite"] }
|
||||
egui = { workspace = true }
|
||||
|
||||
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
|
||||
|
||||
@@ -16,6 +16,7 @@ pub mod wide_angle;
|
||||
/// The registered stories and suite cases of the widgets, for `tests/it`.
|
||||
#[cfg(feature = "screen-testing")]
|
||||
pub mod testing {
|
||||
#[cfg(feature = "suite")]
|
||||
craft_ui::testing_registered!();
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
mod brightness_contrast;
|
||||
mod color_balance;
|
||||
mod photo_filter;
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
mod threshold;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
//! and the hint line; and the ⌘/Ctrl-click-on-the-image helper
|
||||
//! ([`CurvesPanel::add_point_from_sample`]).
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//! [`HueSaturationEditor`]: Master and six colour ranges, Colorize, the two spectrum bars and the four range thumbs
|
||||
//! that wrap at 360°.
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
use craft_behavior::Mixed;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//! [`LevelsEditor`]: a levels adjustment's histogram, input thumbs and fields, output bar, thumbs
|
||||
//! and fields, editing one channel's [`Levels`].
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
use std::ops::RangeInclusive;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//! [`LevelsPanel`]: the Levels adjustment around the [`LevelsEditor`]: the point pickers, the
|
||||
//! Channel select, Auto and the editor over the shown channel's histogram.
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
mod black_white;
|
||||
mod channel_mixer;
|
||||
mod selective_color;
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
pub use black_white::{BlackWhite, BlackWhiteEditor, BlackWhiteOutput};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//! [`AdjustmentsPanel`]: the grid of adjustment buttons a document panel offers for adding an adjustment layer.
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
use craft_behavior::{Metrics, NavShape, Roving, Sense};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//! [`AdjustSession`]: the Properties panel's memory of the settings it found on an adjustment
|
||||
//! layer, so Reset returns to them once the user edited.
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
/// The settings an adjustment layer had when the Properties panel started showing it, and whether
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
//! rows' edits are lifted onto the editor's value ([`Run`]), so one slider drag, one typed number or one reset is one
|
||||
//! gesture of the whole value.
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
use std::ops::RangeInclusive;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
//! The library reports the sample; turning it into a Levels or Curves value needs the document's
|
||||
//! colour management and mode, so the app does that, as with the Eyedropper.
|
||||
|
||||
#[cfg(feature = "screen-testing")]
|
||||
#[cfg(feature = "suite")]
|
||||
mod stories;
|
||||
|
||||
use craft_behavior::{CancelReason, Cursor, IconId, PaintedCursor};
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user