Make animation module only available in native

This commit is contained in:
Héctor Ramón Jiménez 2025-01-27 05:24:10 +01:00
parent 2753103942
commit 8fd87f94eb
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
2 changed files with 11 additions and 4 deletions

View file

@ -10,6 +10,7 @@
html_logo_url = "https://raw.githubusercontent.com/iced-rs/iced/9ab6923e943f784985e9ef9ca28b10278297225d/docs/logo.svg" html_logo_url = "https://raw.githubusercontent.com/iced-rs/iced/9ab6923e943f784985e9ef9ca28b10278297225d/docs/logo.svg"
)] )]
pub mod alignment; pub mod alignment;
#[cfg(not(target_arch = "wasm32"))]
pub mod animation; pub mod animation;
pub mod border; pub mod border;
pub mod clipboard; pub mod clipboard;
@ -50,6 +51,7 @@ mod vector;
pub use alignment::Alignment; pub use alignment::Alignment;
pub use angle::{Degrees, Radians}; pub use angle::{Degrees, Radians};
#[cfg(not(target_arch = "wasm32"))]
pub use animation::Animation; pub use animation::Animation;
pub use background::Background; pub use background::Background;
pub use border::Border; pub use border::Border;

View file

@ -498,20 +498,25 @@ pub mod window;
pub mod advanced; pub mod advanced;
pub use crate::core::alignment; pub use crate::core::alignment;
pub use crate::core::animation;
pub use crate::core::border; pub use crate::core::border;
pub use crate::core::color; pub use crate::core::color;
pub use crate::core::gradient; pub use crate::core::gradient;
pub use crate::core::padding; pub use crate::core::padding;
pub use crate::core::theme; pub use crate::core::theme;
pub use crate::core::{ pub use crate::core::{
Alignment, Animation, Background, Border, Color, ContentFit, Degrees, Alignment, Background, Border, Color, ContentFit, Degrees, Gradient,
Gradient, Length, Padding, Pixels, Point, Radians, Rectangle, Rotation, Length, Padding, Pixels, Point, Radians, Rectangle, Rotation, Settings,
Settings, Shadow, Size, Theme, Transformation, Vector, Shadow, Size, Theme, Transformation, Vector,
}; };
pub use crate::runtime::exit; pub use crate::runtime::exit;
pub use iced_futures::Subscription; pub use iced_futures::Subscription;
#[cfg(not(target_arch = "wasm32"))]
pub use crate::core::animation;
#[cfg(not(target_arch = "wasm32"))]
pub use crate::core::Animation;
pub use alignment::Horizontal::{Left, Right}; pub use alignment::Horizontal::{Left, Right};
pub use alignment::Vertical::{Bottom, Top}; pub use alignment::Vertical::{Bottom, Top};
pub use Alignment::Center; pub use Alignment::Center;