@lotics/ui 27.15.2 → 27.15.3

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.
package/docs/catalog.md CHANGED
@@ -615,9 +615,10 @@ source (`src/<module>.tsx`/`.ts`) is the API reference.
615
615
  - **`dots_indicator`** — `DotsIndicator`: three looping bouncing dots (`size`/`color`); the
616
616
  indeterminate "working/typing" pulse `Loading` composes; use bare beside a caption while
617
617
  an agent thinks. Determinate work → `ProgressBar`.
618
- - **`animation_fade_in`** — `AnimationFadeIn`: the mount transition — children fade (+
619
- optional `translateY` rise) into place on first render, once; the entrance polish
620
- Accordion/Timeline/Stepper/AgentRun rows use.
618
+ - **`animation_fade_in`** — `AnimationFadeIn`: the mount transition — children fade into
619
+ place on first render, once; the entrance polish Accordion/Timeline/Stepper/AgentRun
620
+ rows use. `translateY` adds the rise that reads as settling into place; `translateX`
621
+ the horizontal travel of a panel arriving from an edge (negative = from the left).
621
622
 
622
623
  ### Pickers & selection controls
623
624
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lotics/ui",
3
- "version": "27.15.2",
3
+ "version": "27.15.3",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./vite": {
@@ -7,10 +7,14 @@ interface AnimationFadeInProps {
7
7
  /** Rise this many px while fading in — the "appearing into place" gesture.
8
8
  * Default 0 (fade only). */
9
9
  translateY?: number;
10
+ /** Travel this many px horizontally while fading in — negative enters from the
11
+ * left, positive from the right. The gesture for a panel arriving from an
12
+ * edge rather than settling into place. Default 0. */
13
+ translateX?: number;
10
14
  }
11
15
 
12
16
  export function AnimationFadeIn(props: AnimationFadeInProps) {
13
- const { children, style, translateY = 0 } = props;
17
+ const { children, style, translateY = 0, translateX = 0 } = props;
14
18
  const progress = useRef(new Animated.Value(0)).current;
15
19
 
16
20
  useEffect(() => {
@@ -21,9 +25,18 @@ export function AnimationFadeIn(props: AnimationFadeInProps) {
21
25
  }).start();
22
26
  }, [progress]);
23
27
 
24
- const transform = translateY
25
- ? [{ translateY: progress.interpolate({ inputRange: [0, 1], outputRange: [translateY, 0] }) }]
26
- : undefined;
28
+ const offset = (from: number) =>
29
+ progress.interpolate({ inputRange: [0, 1], outputRange: [from, 0] });
30
+ const transform = [
31
+ ...(translateX ? [{ translateX: offset(translateX) }] : []),
32
+ ...(translateY ? [{ translateY: offset(translateY) }] : []),
33
+ ];
27
34
 
28
- return <Animated.View style={[{ opacity: progress, transform }, style]}>{children}</Animated.View>;
35
+ return (
36
+ <Animated.View
37
+ style={[{ opacity: progress, transform: transform.length ? transform : undefined }, style]}
38
+ >
39
+ {children}
40
+ </Animated.View>
41
+ );
29
42
  }