plushie-core 0.4.0

Extension SDK for Plushie
Documentation
//! Common re-exports for widget extension authors.
//!
//! Import the entire prelude to get the types, traits, and helpers
//! needed to implement [`WidgetExtension`]:
//!
//! ```ignore
//! use plushie_core::prelude::*;
//! ```
//!
//! For iced types not covered here (e.g. `canvas::Path`, advanced
//! layout widgets), use `plushie_core::iced::*` instead of adding a
//! direct `iced` dependency. This avoids version conflicts when
//! plushie-core bumps its iced version.

// -- Extension trait and lifecycle types --
pub use crate::extensions::{
    EventResult, ExtensionCaches, GenerationCounter, InitCtx, RenderCtx, WidgetEnv, WidgetExtension,
};

// -- Wire protocol types --
pub use crate::message::Message;
pub use crate::protocol::{CoalesceHint, OutgoingEvent, TreeNode};

// -- Prop extraction helpers --
pub use crate::prop_helpers::*;

// -- Commonly needed iced types --
//
// Note: `column` and `row` are deliberately excluded. They conflict
// with the `column!` and `row!` macros when glob-imported. Extension
// authors should use the macros directly (available via
// `plushie_core::iced`) or import explicitly:
//   use plushie_core::iced::widget::{column, row};
pub use crate::iced::widget::{
    button, canvas, checkbox, container, image, pick_list, progress_bar, rule, scrollable, slider,
    space, stack, text, toggler, tooltip,
};
pub use crate::iced::{
    Color, Element, Font, Length, Padding, Pixels, Point, Size, Theme, alignment,
};

// -- JSON (extensions parse props from serde_json::Value) --
pub use serde_json::Value;