@cratis/event-models 0.269.0 → 0.269.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Calls `changed` whenever a transition or an animation anywhere under the target ends or is cancelled.
3
+ *
4
+ * A screen editor opens by scaling its window up from a small size: while that runs, every box measured on the surface is the scaled one, and when it ends
5
+ * nothing on the surface has changed size - the observers of the surface's sizes and contents see nothing - so a frame measured during the opening stayed
6
+ * the size of the scaled content (the slot's outline was about a tenth of the screen). The end of the transition is the moment to measure again.
7
+ *
8
+ * @param target Where the transitions and animations are heard: they end on elements around and inside the surface, and the event bubbles only upwards, so it is the document that listens.
9
+ * @param changed What to call when one ends.
10
+ * @returns What stops listening.
11
+ */
12
+ export declare function whenTransitionsEnd(target: EventTarget, changed: () => void): () => void;