euv-macros 0.51.0

Zero-overhead procedural macros for the cross-platform euv UI framework, providing view!, style!, var!, watch!, computed!, state!, #[store], #[component], #[event], emit!, on!, and #[euv].
Documentation
/// Legacy style property keys rejected with explicit keyless type migration hints.
pub(crate) const LEGACY_STYLE_KEY_HINTS: &[(&str, &str)] = &[
    ("direction", "FlexDirection::Row or FlexDirection::Column"),
    ("display", "Display::Flex, Display::Grid, or Display::None"),
    (
        "position",
        "Position::Relative, Position::Absolute, or Position::Fixed",
    ),
    ("inset", "Inset(top, right, bottom, left)"),
    ("width", "Width(...)"),
    ("height", "Height(...)"),
    ("min_width", "MinWidth(...)"),
    ("min_height", "MinHeight(...)"),
    ("max_width", "MaxWidth(...)"),
    ("max_height", "MaxHeight(...)"),
    ("flex_basis", "FlexBasis(...)"),
    ("aspect_ratio", "AspectRatio(...)"),
    ("padding", "Padding(...)"),
    ("margin", "Margin(...)"),
    ("gap", "Gap(...)"),
    ("row_gap", "RowGap(...)"),
    ("column_gap", "ColumnGap(...)"),
    ("background", "Background(...)"),
    ("gradient", "LinearGradient::new(...)"),
    ("shadow", "Shadow::new(...)"),
    ("focus_ring", "FocusRing(...)"),
    ("cursor", "CursorIcon::Pointer"),
    (
        "pointer_events",
        "PointerEvents::None or PointerEvents::Auto",
    ),
    ("stop_scroll_propagation", "StopScrollPropagation(...)"),
    ("stop_event_propagation", "StopEventPropagation(...)"),
    ("color", "TextColor(...)"),
    ("radius", "Radius(...) or CornerRadius::all(...)"),
    ("align", "AlignItems::Center"),
    ("align_self", "AlignSelf::Stretch"),
    ("justify", "JustifyContent::SpaceBetween"),
    ("flex_grow", "FlexGrow(...)"),
    ("flex_shrink", "FlexShrink(...)"),
    ("flex_wrap", "FlexWrap::Wrap"),
    ("overflow", "Overflow::Hidden or Overflow::Scroll"),
    ("font_size", "FontSize(...)"),
    ("font_weight", "FontWeight::SemiBold"),
    ("font_family", "FontFamily::Sans or FontFamily::Monospace"),
    ("line_height", "LineHeight(...)"),
    ("letter_spacing", "LetterSpacing(...)"),
    ("italic", "Italic(...)"),
    ("underline", "Underline(...)"),
    ("strikethrough", "Strikethrough(...)"),
    ("text_align", "TextAlign::Center"),
    ("text_overflow", "TextOverflow::Ellipsis"),
    ("selectable", "Selectable(...)"),
    ("text_select", "TextSelectMode::SelectAndCopy"),
    ("selection_color", "SelectionColor(...)"),
    ("opacity", "Opacity(...)"),
    ("z_index", "ZIndex(...)"),
    ("border", "Border::new(width, color)"),
    ("columns", "GridColumns(...)"),
    ("grid", "GridColumns(...)"),
];

/// Error message when a `style!` rule contains a disallowed semicolon.
pub(crate) const ERR_STYLE_UNEXPECTED_SEMI: &str =
    "unexpected `;` in `style!` — place each typed style rule on its own line without semicolons";

/// Error message when two `style!` statements appear on the same source line.
pub(crate) const ERR_STYLE_NEWLINE_REQUIRED: &str =
    "each typed style rule in `style!` must start on a new line";