Remove remain alphabetical sorting enforcement macros (#1647)

remove `remain`

Co-authored-by: 0HyperCube <78500760+0HyperCube@users.noreply.github.com>
This commit is contained in:
Karthik Prakash
2024-03-06 16:43:51 +00:00
committed by GitHub
co-authored by 0HyperCube
parent a47fff905e
commit 0c60fd95fa
53 changed files with 21 additions and 292 deletions
@@ -15,27 +15,18 @@ pub struct ArtboardTool {
data: ArtboardToolData,
}
#[remain::sorted]
#[impl_message(Message, ToolMessage, Artboard)]
#[derive(PartialEq, Clone, Debug, Serialize, Deserialize, specta::Type)]
pub enum ArtboardToolMessage {
// Standard messages
#[remain::unsorted]
Abort,
#[remain::unsorted]
Overlays(OverlayContext),
// Tool-specific messages
DeleteSelected,
NudgeSelected {
delta_x: f64,
delta_y: f64,
},
NudgeSelected { delta_x: f64, delta_y: f64 },
PointerDown,
PointerMove {
constrain_axis_or_aspect: Key,
center: Key,
},
PointerMove { constrain_axis_or_aspect: Key, center: Key },
PointerUp,
}
@@ -51,14 +51,11 @@ impl Default for BrushOptions {
}
}
#[remain::sorted]
#[impl_message(Message, ToolMessage, Brush)]
#[derive(PartialEq, Clone, Debug, Serialize, Deserialize, specta::Type)]
pub enum BrushToolMessage {
// Standard messages
#[remain::unsorted]
Abort,
#[remain::unsorted]
WorkingColorChanged,
// Tool-specific messages
@@ -68,7 +65,6 @@ pub enum BrushToolMessage {
UpdateOptions(BrushToolMessageOptionsUpdate),
}
#[remain::sorted]
#[derive(PartialEq, Clone, Debug, Serialize, Deserialize, specta::Type)]
pub enum BrushToolMessageOptionsUpdate {
BlendMode(BlendMode),
@@ -33,7 +33,6 @@ impl Default for EllipseToolOptions {
}
}
#[remain::sorted]
#[derive(PartialEq, Clone, Debug, Serialize, Deserialize, specta::Type)]
pub enum EllipseOptionsUpdate {
FillColor(Option<Color>),
@@ -44,25 +43,18 @@ pub enum EllipseOptionsUpdate {
WorkingColors(Option<Color>, Option<Color>),
}
#[remain::sorted]
#[impl_message(Message, ToolMessage, Ellipse)]
#[derive(PartialEq, Clone, Debug, Serialize, Deserialize, specta::Type)]
pub enum EllipseToolMessage {
// Standard messages
#[remain::unsorted]
Overlays(OverlayContext),
#[remain::unsorted]
Abort,
#[remain::unsorted]
WorkingColorChanged,
// Tool-specific messages
DragStart,
DragStop,
PointerMove {
center: Key,
lock_ratio: Key,
},
PointerMove { center: Key, lock_ratio: Key },
UpdateOptions(EllipseOptionsUpdate),
}
@@ -7,12 +7,10 @@ pub struct EyedropperTool {
data: EyedropperToolData,
}
#[remain::sorted]
#[impl_message(Message, ToolMessage, Eyedropper)]
#[derive(PartialEq, Eq, Clone, Debug, Hash, Serialize, Deserialize, specta::Type)]
pub enum EyedropperToolMessage {
// Standard messages
#[remain::unsorted]
Abort,
// Tool-specific messages
@@ -7,7 +7,6 @@ pub struct FillTool {
fsm_state: FillToolFsmState,
}
#[remain::sorted]
#[impl_message(Message, ToolMessage, Fill)]
#[derive(PartialEq, Eq, Clone, Debug, Hash, Serialize, Deserialize, specta::Type)]
pub enum FillToolMessage {
@@ -39,16 +39,12 @@ impl Default for FreehandOptions {
}
}
#[remain::sorted]
#[impl_message(Message, ToolMessage, Freehand)]
#[derive(PartialEq, Clone, Debug, Serialize, Deserialize, specta::Type)]
pub enum FreehandToolMessage {
// Standard messages
#[remain::unsorted]
Overlays(OverlayContext),
#[remain::unsorted]
Abort,
#[remain::unsorted]
WorkingColorChanged,
// Tool-specific messages
@@ -58,7 +54,6 @@ pub enum FreehandToolMessage {
UpdateOptions(FreehandOptionsUpdate),
}
#[remain::sorted]
#[derive(PartialEq, Clone, Debug, Serialize, Deserialize, specta::Type)]
pub enum FreehandOptionsUpdate {
FillColor(Option<Color>),
@@ -19,28 +19,22 @@ pub struct GradientOptions {
gradient_type: GradientType,
}
#[remain::sorted]
#[impl_message(Message, ToolMessage, Gradient)]
#[derive(PartialEq, Clone, Debug, Hash, Serialize, Deserialize, specta::Type)]
pub enum GradientToolMessage {
// Standard messages
#[remain::unsorted]
Abort,
#[remain::unsorted]
Overlays(OverlayContext),
// Tool-specific messages
DeleteStop,
InsertStop,
PointerDown,
PointerMove {
constrain_axis: Key,
},
PointerMove { constrain_axis: Key },
PointerUp,
UpdateOptions(GradientOptionsUpdate),
}
#[remain::sorted]
#[derive(PartialEq, Eq, Clone, Debug, Hash, Serialize, Deserialize, specta::Type)]
pub enum GradientOptionsUpdate {
Type(GradientType),
@@ -11,21 +11,16 @@ pub struct ImaginateTool {
tool_data: ImaginateToolData,
}
#[remain::sorted]
#[impl_message(Message, ToolMessage, Imaginate)]
#[derive(PartialEq, Eq, Clone, Debug, Hash, Serialize, Deserialize, specta::Type)]
pub enum ImaginateToolMessage {
// Standard messages
#[remain::unsorted]
Abort,
// Tool-specific messages
DragStart,
DragStop,
Resize {
center: Key,
lock_ratio: Key,
},
Resize { center: Key, lock_ratio: Key },
}
impl LayoutHolder for ImaginateTool {
@@ -32,30 +32,21 @@ impl Default for LineOptions {
}
}
#[remain::sorted]
#[impl_message(Message, ToolMessage, Line)]
#[derive(PartialEq, Clone, Debug, Serialize, Deserialize, specta::Type)]
pub enum LineToolMessage {
// Standard messages
#[remain::unsorted]
Overlays(OverlayContext),
#[remain::unsorted]
Abort,
#[remain::unsorted]
WorkingColorChanged,
// Tool-specific messages
DragStart,
DragStop,
PointerMove {
center: Key,
lock_angle: Key,
snap_angle: Key,
},
PointerMove { center: Key, lock_angle: Key, snap_angle: Key },
UpdateOptions(LineOptionsUpdate),
}
#[remain::sorted]
#[derive(PartialEq, Clone, Debug, Serialize, Deserialize, specta::Type)]
pub enum LineOptionsUpdate {
LineWeight(f64),
@@ -6,22 +6,15 @@ pub struct NavigateTool {
tool_data: NavigateToolData,
}
#[remain::sorted]
#[impl_message(Message, ToolMessage, Navigate)]
#[derive(PartialEq, Eq, Clone, Debug, Hash, Serialize, Deserialize, specta::Type)]
pub enum NavigateToolMessage {
// Standard messages
#[remain::unsorted]
Abort,
// Tool-specific messages
ClickZoom {
zoom_in: bool,
},
PointerMove {
snap_angle: Key,
snap_zoom: Key,
},
ClickZoom { zoom_in: bool },
PointerMove { snap_angle: Key, snap_zoom: Key },
RotateCanvasBegin,
TransformCanvasEnd,
TranslateCanvasBegin,
@@ -19,16 +19,12 @@ pub struct PathTool {
tool_data: PathToolData,
}
#[remain::sorted]
#[impl_message(Message, ToolMessage, Path)]
#[derive(PartialEq, Clone, Debug, Serialize, Deserialize, specta::Type)]
pub enum PathToolMessage {
// Standard messages
#[remain::unsorted]
Abort,
#[remain::unsorted]
Overlays(OverlayContext),
#[remain::unsorted]
SelectionChanged,
// Tool-specific messages
@@ -39,29 +39,20 @@ impl Default for PenOptions {
}
}
#[remain::sorted]
#[impl_message(Message, ToolMessage, Pen)]
#[derive(PartialEq, Clone, Debug, Serialize, Deserialize, specta::Type)]
pub enum PenToolMessage {
// Standard messages
#[remain::unsorted]
Abort,
#[remain::unsorted]
SelectionChanged,
#[remain::unsorted]
WorkingColorChanged,
#[remain::unsorted]
Overlays(OverlayContext),
// Tool-specific messages
Confirm,
DragStart,
DragStop,
PointerMove {
snap_angle: Key,
break_handle: Key,
lock_angle: Key,
},
PointerMove { snap_angle: Key, break_handle: Key, lock_angle: Key },
Redo,
Undo,
UpdateOptions(PenOptionsUpdate),
@@ -75,7 +66,6 @@ enum PenToolFsmState {
PlacingAnchor,
}
#[remain::sorted]
#[derive(PartialEq, Clone, Debug, Serialize, Deserialize, specta::Type)]
pub enum PenOptionsUpdate {
FillColor(Option<Color>),
@@ -37,25 +37,18 @@ impl Default for PolygonOptions {
}
}
#[remain::sorted]
#[impl_message(Message, ToolMessage, Polygon)]
#[derive(PartialEq, Clone, Debug, Serialize, Deserialize, specta::Type)]
pub enum PolygonToolMessage {
// Standard messages
#[remain::unsorted]
Overlays(OverlayContext),
#[remain::unsorted]
Abort,
#[remain::unsorted]
WorkingColorChanged,
// Tool-specific messages
DragStart,
DragStop,
PointerMove {
center: Key,
lock_ratio: Key,
},
PointerMove { center: Key, lock_ratio: Key },
UpdateOptions(PolygonOptionsUpdate),
}
@@ -65,7 +58,6 @@ pub enum PrimitiveShapeType {
Star = 1,
}
#[remain::sorted]
#[derive(PartialEq, Clone, Debug, Serialize, Deserialize, specta::Type)]
pub enum PolygonOptionsUpdate {
FillColor(Option<Color>),
@@ -33,7 +33,6 @@ impl Default for RectangleToolOptions {
}
}
#[remain::sorted]
#[derive(PartialEq, Clone, Debug, Serialize, Deserialize, specta::Type)]
pub enum RectangleOptionsUpdate {
FillColor(Option<Color>),
@@ -44,25 +43,18 @@ pub enum RectangleOptionsUpdate {
WorkingColors(Option<Color>, Option<Color>),
}
#[remain::sorted]
#[impl_message(Message, ToolMessage, Rectangle)]
#[derive(PartialEq, Clone, Debug, Serialize, Deserialize, specta::Type)]
pub enum RectangleToolMessage {
// Standard messages
#[remain::unsorted]
Overlays(OverlayContext),
#[remain::unsorted]
Abort,
#[remain::unsorted]
WorkingColorChanged,
// Tool-specific messages
DragStart,
DragStop,
PointerMove {
center: Key,
lock_ratio: Key,
},
PointerMove { center: Key, lock_ratio: Key },
UpdateOptions(RectangleOptionsUpdate),
}
@@ -30,7 +30,6 @@ pub struct SelectOptions {
nested_selection_behavior: NestedSelectionBehavior,
}
#[remain::sorted]
#[derive(PartialEq, Eq, Clone, Debug, Hash, Serialize, Deserialize, specta::Type)]
pub enum SelectOptionsUpdate {
NestedSelectionBehavior(NestedSelectionBehavior),
@@ -60,32 +59,22 @@ pub struct SelectToolPointerKeys {
pub duplicate: Key,
}
#[remain::sorted]
#[impl_message(Message, ToolMessage, Select)]
#[derive(PartialEq, Clone, Debug, Serialize, Deserialize, specta::Type)]
pub enum SelectToolMessage {
// Standard messages
#[remain::unsorted]
Abort,
#[remain::unsorted]
Overlays(OverlayContext),
// Tool-specific messages
DragStart {
add_to_selection: Key,
select_deepest: Key,
},
DragStop {
remove_from_selection: Key,
},
DragStart { add_to_selection: Key, select_deepest: Key },
DragStop { remove_from_selection: Key },
EditLayer,
Enter,
PointerMove(SelectToolPointerKeys),
PointerOutsideViewport(SelectToolPointerKeys),
SelectOptions(SelectOptionsUpdate),
SetPivot {
position: PivotPosition,
},
SetPivot { position: PivotPosition },
ShiftViewport,
}
@@ -34,16 +34,12 @@ impl Default for SplineOptions {
}
}
#[remain::sorted]
#[impl_message(Message, ToolMessage, Spline)]
#[derive(PartialEq, Clone, Debug, Serialize, Deserialize, specta::Type)]
pub enum SplineToolMessage {
// Standard messages
#[remain::unsorted]
CanvasTransformed,
#[remain::unsorted]
Abort,
#[remain::unsorted]
WorkingColorChanged,
// Tool-specific messages
@@ -62,7 +58,6 @@ enum SplineToolFsmState {
Drawing,
}
#[remain::sorted]
#[derive(PartialEq, Clone, Debug, Serialize, Deserialize, specta::Type)]
pub enum SplineOptionsUpdate {
FillColor(Option<Color>),
@@ -40,32 +40,23 @@ impl Default for TextOptions {
}
}
#[remain::sorted]
#[impl_message(Message, ToolMessage, Text)]
#[derive(PartialEq, Clone, Debug, Serialize, Deserialize, specta::Type)]
pub enum TextToolMessage {
// Standard messages
#[remain::unsorted]
Abort,
#[remain::unsorted]
WorkingColorChanged,
#[remain::unsorted]
Overlays(OverlayContext),
// Tool-specific messages
CommitText,
EditSelected,
Interact,
TextChange {
new_text: String,
},
UpdateBounds {
new_text: String,
},
TextChange { new_text: String },
UpdateBounds { new_text: String },
UpdateOptions(TextOptionsUpdate),
}
#[remain::sorted]
#[derive(PartialEq, Clone, Debug, Serialize, Deserialize, specta::Type)]
pub enum TextOptionsUpdate {
FillColor(Option<Color>),