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
//! First-class motion for pocopine.
//!
//! Four pieces, each imperative and directly usable:
//!
//! - [`animate`] — Web Animations API wrapper. Keyframes + options in,
//! [`AnimationHandle`] out. The escape hatch for custom motion.
//! - [`apply_preset`] — stamp a named preset's `pp-transition:*` attrs
//! on an element so the existing `pp-transition` state machine
//! animates it on `pp-if` / `pp-show` transitions. Declarative.
//! Built-in presets: `fade`, `scale`, `fade-scale`, `zoom`,
//! `slide-up` / `slide-down` / `slide-left` / `slide-right`,
//! `collapse`, `none`.
//! - [`flip_from_snapshot`] — FLIP layout animation given a
//! before-rect. Used by the `animate = "flip"` macro integration
//! in pp-for's keyed reconcile; authors call it directly when they
//! move an element themselves.
//! - [`collapse_to`] — auto-height expand / collapse (the `collapse`
//! preset dispatches through here at runtime).
//!
//! ## Author declaration via `#[component]`
//!
//! The macro forwards `transition = "…"` / `transition_in = "…"` /
//! `transition_out = "…"` / `animate = "flip"` to the generated
//! `on_setup` so a component's rendered root gets the right preset
//! stamped without the author writing any glue. See
//! `pocopine-macros` and RFC-038.
//!
//! ## Author usage at the call site
//!
//! Per-instance overrides go through the `transition` / `transition-in`
//! / `transition-out` HTML attributes on the Pine primitive's tag:
//!
//! ```html
//! <pine-dialog-content transition="slide-up">...</pine-dialog-content>
//! <pine-tooltip-content transition-in="scale" transition-out="fade">...</pine-tooltip-content>
//! <pine-popover-content transition="none">...</pine-popover-content>
//! ```
// Flat re-exports — authors import from `pocopine::animate::*`.
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
/// Current motion preference snapshot. Convenience re-export so
/// authors don't have to know the submodule path.
/// Boot-time installation — inject the preset atom stylesheet and
/// start the motion-preference media-query watcher. Called from
/// `App::run`. Idempotent.
/// Re-export of [`crate::directives::transition::enter_subtree_staggered`]
/// so authors can reach for stagger from the same module they
/// already import for `apply_preset` / `animate`.
/// Disable RFC-038 transitions globally. Intended for tests that
/// were written before primitives gained default mount/unmount
/// transitions and assert post-toggle DOM state synchronously. With
/// this on, `enter` / `leave` invoke their `on_done` callback right
/// away — no CSS class swap, no waiting for transition-end.
/// Re-enable transitions after a previous `disable_transitions()`.