1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
//! Common re-exports for widget authors.
//!
//! Import the entire prelude to get the types, traits, and helpers
//! needed to implement [`PlushieWidget`]:
//!
//! ```ignore
//! use plushie_widget_sdk::prelude::*;
//! ```
//!
//! For iced types not covered here (e.g. `canvas::Path`, advanced
//! layout widgets), use `plushie_widget_sdk::iced::*` instead of adding a
//! direct `iced` dependency. This avoids version conflicts when
//! plushie-core bumps its iced version.
// -- Renderer trait alias + Element shorthand --
/// Shorthand for iced `Element` parameterized with the plushie message type.
pub use cratePlushieElement;
/// Renderer trait alias implemented for `iced::Renderer` and `()`.
pub use cratePlushieRenderer;
// -- PlushieWidget trait, registry, and lifecycle types --
/// Monotonic counter used to freshen cached widget state.
pub use crateGenerationCounter;
/// Outcome of a widget message handler.
pub use crateHandleResult;
/// Context passed to [`PlushieWidget::init`].
pub use crateInitCtx;
/// Core trait implemented by every built-in and custom widget.
pub use cratePlushieWidget;
/// Object-safe render slice used by the widget dispatcher.
pub use cratePlushieWidgetRender;
/// Context passed to `PlushieWidget::subscriptions`.
pub use crateSubscribeCtx;
/// Registry of widget implementations keyed by type name.
pub use crateWidgetRegistry;
/// Grouping trait for a reusable bundle of widgets.
pub use crateWidgetSet;
/// Declared widget subscription returned from `subscriptions`.
pub use crateWidgetSubscription;
// -- Derive macros for widget props, events, and commands --
/// Derive macro generating widget command enums.
pub use crateWidgetCommand;
/// Derive macro generating widget event enums.
pub use crateWidgetEvent;
/// Derive macro generating typed widget prop structs.
pub use crateWidgetProps;
// Derive macro re-export. Note: the macro and the
// `registry::PlushieWidget` trait share the name `PlushieWidget`,
// but Rust keeps macros and traits in separate namespaces so
// `#[derive(PlushieWidget)]` and `impl PlushieWidget<R>` both work
// from a single glob import.
/// Function-like macro that declares a custom widget (struct + builder
/// + [`TreeNode`] conversion + build-time metadata).
pub use widget;
/// Derive macro for the [`PlushieWidget`] trait on widget factories.
pub use PlushieWidget;
// -- Rendering context --
/// Render-time context passed to [`PlushieWidget::render`].
pub use crateRenderCtx;
// -- Image registry (widgets that render images read from ctx.images) --
/// In-memory image handle store accessed via `ctx.images`.
pub use crateImageRegistry;
// -- A11y types (needed for PlushieWidget::infer_a11y) --
/// Accumulator for `PlushieWidget::infer_a11y` output.
pub use crateA11yOverrides;
// -- Canvas engine (for composing canvas-based widgets) --
/// Reusable canvas composition engine.
pub use crateCanvasEngine;
// -- Wire protocol types --
/// Coalesce hint for outgoing events.
pub use crateCoalesceHint;
/// Widget event emitted to the SDK over the wire.
pub use crateOutgoingEvent;
/// Retained widget-tree node structure.
pub use crateTreeNode;
/// Internal iced Message used by the widget dispatcher.
pub use crateMessage;
// -- Prop extraction helpers --
/// Typed prop-extract helpers (color, length, font, a11y, ...).
pub use crate*;
// -- Type conversions (plushie-core -> iced) --
/// Conversion helpers from plushie-core types to iced types.
pub use crateiced_convert;
// -- Widget helpers (parsing, style application) --
/// Parsed style-map field extract.
pub use crateStyleMapFields;
/// Resolved style override set for a widget.
pub use crateStyleOverrides;
/// Apply plushie-core style overrides to an iced container style.
pub use cratecontainer_style_from_base;
/// Look up per-widget style overrides by widget name.
pub use crateget_style_overrides;
/// Parse a StyleMap object into typed fields.
pub use crateparse_style_map_fields;
/// Parse a JSON value into typed [`StyleOverrides`].
pub use crateparse_style_overrides;
/// Build [`StyleOverrides`] from a parsed [`StyleMapFields`].
pub use cratestyle_overrides_from_style_map;
// -- Plushie-core primitive domain types --
//
// These are the canonical wire-aware types used in widget props and
// view trees. Widget authors build UI logic against these. At the
// render boundary, convert to iced types via `iced_convert::*`.
/// Plushie-core `Color` domain type (wire-aware).
pub use Color;
/// Plushie-core `Font` domain type (wire-aware).
pub use Font;
/// Plushie-core `Length` domain type (wire-aware).
pub use Length;
/// Plushie-core `Padding` domain type (wire-aware).
pub use Padding;
/// Trait providing `T::extract(&props, key)` for every wire-aware
/// domain type. Needed in scope so calls like `Color::extract(...)`
/// and `Length::extract(...)` resolve.
pub use PlushieType;
/// Plushie-core `Theme` domain type (wire-aware).
pub use Theme;
// -- Commonly needed iced rendering types --
//
// These are iced-only; plushie-core has no equivalents. Reach into
// `plushie_widget_sdk::iced::*` for anything else iced-specific.
//
// Note: `column` and `row` are deliberately excluded. They conflict
// with the `column!` and `row!` macros when glob-imported. Widget
// authors should use the macros directly (available via
// `plushie_widget_sdk::iced`) or import explicitly:
// use plushie_widget_sdk::iced::widget::{column, row};
/// Iced `Element` type.
pub use crateElement;
/// Iced `Pixels` newtype (distinguishes logical vs physical lengths).
pub use cratePixels;
/// Iced `Point` type.
pub use cratePoint;
/// Iced `Size` type.
pub use crateSize;
/// Iced alignment helpers module.
pub use cratealignment;
/// Iced `button` widget constructor.
pub use cratebutton;
/// Iced `canvas` widget constructor.
pub use cratecanvas;
/// Iced `checkbox` widget constructor.
pub use cratecheckbox;
/// Iced `container` widget constructor.
pub use cratecontainer;
/// Iced `image` widget constructor.
pub use crateimage;
/// Iced `pick_list` widget constructor.
pub use cratepick_list;
/// Iced `progress_bar` widget constructor.
pub use crateprogress_bar;
/// Iced `rule` widget constructor.
pub use craterule;
/// Iced `scrollable` widget constructor.
pub use cratescrollable;
/// Iced `slider` widget constructor.
pub use crateslider;
/// Iced `space` widget constructor.
pub use cratespace;
/// Iced `stack` widget constructor.
pub use cratestack;
/// Iced `text` widget constructor.
pub use cratetext;
/// Iced `toggler` widget constructor.
pub use cratetoggler;
/// Iced `tooltip` widget constructor.
pub use cratetooltip;
// -- JSON (widgets parse props from serde_json::Value) --
/// Re-export of `serde_json::Value` for prop parsing.
pub use Value;