@echothink-ui/motion 0.1.0
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/README.md +5 -0
- package/dist/components/AgentThinkingAnimation.d.ts +2 -0
- package/dist/components/AttentionPulse.d.ts +2 -0
- package/dist/components/DAGStatusTransition.d.ts +2 -0
- package/dist/components/DocumentLockPulse.d.ts +2 -0
- package/dist/components/PipelineFlowAnimation.d.ts +2 -0
- package/dist/components/ProgressTransition.d.ts +2 -0
- package/dist/components/SkeletonLoadingPattern.d.ts +2 -0
- package/dist/components/StatusChangeAnimation.d.ts +2 -0
- package/dist/components/StepCompletionAnimation.d.ts +2 -0
- package/dist/components/StreamingText.d.ts +2 -0
- package/dist/components/SyncProgressAnimation.d.ts +2 -0
- package/dist/components/motionUtils.d.ts +5 -0
- package/dist/components/types.d.ts +82 -0
- package/dist/index.cjs +2381 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +2333 -0
- package/dist/index.js.map +1 -0
- package/package.json +38 -0
- package/src/components/AgentThinkingAnimation.tsx +59 -0
- package/src/components/AttentionPulse.tsx +57 -0
- package/src/components/DAGStatusTransition.tsx +292 -0
- package/src/components/DocumentLockPulse.tsx +72 -0
- package/src/components/PipelineFlowAnimation.tsx +243 -0
- package/src/components/ProgressTransition.tsx +51 -0
- package/src/components/SkeletonLoadingPattern.tsx +248 -0
- package/src/components/StatusChangeAnimation.test.tsx +20 -0
- package/src/components/StatusChangeAnimation.tsx +89 -0
- package/src/components/StepCompletionAnimation.tsx +75 -0
- package/src/components/StreamingText.tsx +77 -0
- package/src/components/SyncProgressAnimation.test.tsx +49 -0
- package/src/components/SyncProgressAnimation.tsx +256 -0
- package/src/components/motionUtils.tsx +942 -0
- package/src/components/types.ts +111 -0
- package/src/index.test.tsx +97 -0
- package/src/index.tsx +44 -0
package/README.md
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# @echothink-ui/motion
|
|
2
|
+
|
|
3
|
+
Motion package for EchoThink app-domain websites.
|
|
4
|
+
|
|
5
|
+
This package is part of the EchoThink-UI app-domain library. It is designed for normal website app domains rendered inside EchoThink Studio's Chromium shell, not for implementing the studio browser chrome itself.
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { SkeletonLoadingPatternProps } from "./types";
|
|
2
|
+
export declare function SkeletonLoadingPattern({ columns, label, lines, rows, variant, className, style, role, "aria-busy": ariaBusy, "aria-label": ariaLabel, ...props }: SkeletonLoadingPatternProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { StatusChangeAnimationProps } from "./types";
|
|
2
|
+
export declare function StatusChangeAnimation({ status, previousStatus, label, className, children, style, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...props }: StatusChangeAnimationProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { StepCompletionAnimationProps } from "./types";
|
|
2
|
+
export declare function StepCompletionAnimation({ completed, description, label, state, className, children, role, "aria-live": ariaLive, ...props }: StepCompletionAnimationProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { SyncProgressAnimationProps } from "./types";
|
|
2
|
+
export declare function SyncProgressAnimation({ children, className, completed, description, label, progress, rate, remaining, role, source, stage, status, style, target, total, variant, "aria-busy": ariaBusy, "aria-label": ariaLabel, "aria-live": ariaLive, ...props }: SyncProgressAnimationProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { EthOperationalStatus, EthSeverity } from "@echothink-ui/core";
|
|
2
|
+
export declare function usePrefersReducedMotion(): boolean;
|
|
3
|
+
export declare function MotionStyles(): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare function statusColor(status: EthOperationalStatus): "#24a148" | "#da1e28" | "#f1c21b" | "#0f62fe" | "#8d8d8d" | "#6f6f6f";
|
|
5
|
+
export declare function severityColor(severity: EthSeverity | undefined): "#24a148" | "#da1e28" | "#f1c21b" | "#0f62fe" | "#6f6f6f";
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
import type { EthOperationalStatus, EthSeverity, SurfaceComponentProps } from "@echothink-ui/core";
|
|
3
|
+
export interface ProgressTransitionProps extends Omit<React.HTMLAttributes<HTMLElement>, "children"> {
|
|
4
|
+
from?: number;
|
|
5
|
+
to: number;
|
|
6
|
+
durationMs?: number;
|
|
7
|
+
children?: (currentValue: number) => React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export interface MotionFlowNode {
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
status: EthOperationalStatus;
|
|
13
|
+
x?: number;
|
|
14
|
+
y?: number;
|
|
15
|
+
}
|
|
16
|
+
export interface MotionFlowEdge {
|
|
17
|
+
from: string;
|
|
18
|
+
to: string;
|
|
19
|
+
active?: boolean;
|
|
20
|
+
status?: EthOperationalStatus;
|
|
21
|
+
}
|
|
22
|
+
export interface PipelineFlowAnimationProps extends React.HTMLAttributes<HTMLElement> {
|
|
23
|
+
nodes: MotionFlowNode[];
|
|
24
|
+
edges: MotionFlowEdge[];
|
|
25
|
+
}
|
|
26
|
+
export interface DAGStatusTransitionProps extends React.HTMLAttributes<HTMLElement> {
|
|
27
|
+
nodes: MotionFlowNode[];
|
|
28
|
+
previousNodes?: MotionFlowNode[];
|
|
29
|
+
edges?: MotionFlowEdge[];
|
|
30
|
+
}
|
|
31
|
+
export interface AgentThinkingAnimationProps extends React.HTMLAttributes<HTMLElement> {
|
|
32
|
+
label?: string;
|
|
33
|
+
}
|
|
34
|
+
export type SyncProgressAnimationStatus = "syncing" | "synced" | "paused" | "stale" | "failed" | "error";
|
|
35
|
+
export interface SyncProgressAnimationProps extends React.HTMLAttributes<HTMLElement> {
|
|
36
|
+
completed?: number;
|
|
37
|
+
description?: React.ReactNode;
|
|
38
|
+
label?: React.ReactNode;
|
|
39
|
+
progress?: number;
|
|
40
|
+
rate?: React.ReactNode;
|
|
41
|
+
remaining?: React.ReactNode;
|
|
42
|
+
source?: React.ReactNode;
|
|
43
|
+
stage?: React.ReactNode;
|
|
44
|
+
status?: SyncProgressAnimationStatus;
|
|
45
|
+
target?: React.ReactNode;
|
|
46
|
+
total?: number;
|
|
47
|
+
variant?: "compact" | "detailed";
|
|
48
|
+
}
|
|
49
|
+
export type SkeletonLoadingPatternVariant = "article" | "card" | "list" | "table";
|
|
50
|
+
export interface SkeletonLoadingPatternProps extends React.HTMLAttributes<HTMLElement> {
|
|
51
|
+
columns?: number;
|
|
52
|
+
label?: string;
|
|
53
|
+
lines?: number;
|
|
54
|
+
rows?: number;
|
|
55
|
+
variant?: SkeletonLoadingPatternVariant;
|
|
56
|
+
}
|
|
57
|
+
export interface AttentionPulseProps extends React.HTMLAttributes<HTMLElement> {
|
|
58
|
+
severity?: EthSeverity;
|
|
59
|
+
maxRepeats?: number;
|
|
60
|
+
}
|
|
61
|
+
export interface DocumentLockPulseProps extends React.HTMLAttributes<HTMLElement> {
|
|
62
|
+
lockedBy?: React.ReactNode;
|
|
63
|
+
active?: boolean;
|
|
64
|
+
}
|
|
65
|
+
export interface StreamingTextProps extends Omit<React.HTMLAttributes<HTMLElement>, "children" | "onDone"> {
|
|
66
|
+
text: string;
|
|
67
|
+
intervalMs?: number;
|
|
68
|
+
onDone?: () => void;
|
|
69
|
+
}
|
|
70
|
+
export type StepCompletionState = "completed" | "current" | "pending";
|
|
71
|
+
export interface StepCompletionAnimationProps extends React.HTMLAttributes<HTMLElement> {
|
|
72
|
+
completed?: boolean;
|
|
73
|
+
description?: React.ReactNode;
|
|
74
|
+
label?: React.ReactNode;
|
|
75
|
+
state?: StepCompletionState;
|
|
76
|
+
}
|
|
77
|
+
export interface StatusChangeAnimationProps extends React.HTMLAttributes<HTMLElement> {
|
|
78
|
+
status: EthOperationalStatus;
|
|
79
|
+
previousStatus?: EthOperationalStatus;
|
|
80
|
+
label?: React.ReactNode;
|
|
81
|
+
}
|
|
82
|
+
export type { SurfaceComponentProps, EthOperationalStatus, EthSeverity };
|