@ranker/raxflow 2.0.5 → 2.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/dist/hub/components/ChatInput.d.ts +14 -0
- package/dist/hub/components/ChatInput.d.ts.map +1 -0
- package/dist/hub/components/ChatInput.js +14 -0
- package/dist/hub/components/ChatInput.js.map +1 -0
- package/dist/hub/components/ChatMessage.d.ts +14 -0
- package/dist/hub/components/ChatMessage.d.ts.map +1 -0
- package/dist/hub/components/ChatMessage.js +23 -0
- package/dist/hub/components/ChatMessage.js.map +1 -0
- package/dist/hub/components/HubHeader.d.ts +12 -0
- package/dist/hub/components/HubHeader.d.ts.map +1 -0
- package/dist/hub/components/HubHeader.js +12 -0
- package/dist/hub/components/HubHeader.js.map +1 -0
- package/dist/hub/components/index.d.ts +7 -0
- package/dist/hub/components/index.d.ts.map +1 -0
- package/dist/hub/components/index.js +7 -0
- package/dist/hub/components/index.js.map +1 -0
- package/dist/tui/App.d.ts.map +1 -1
- package/dist/tui/App.js +5 -5
- package/dist/tui/App.js.map +1 -1
- package/dist/tui/components/ChatPanel.d.ts +1 -1
- package/dist/tui/components/ChatPanel.d.ts.map +1 -1
- package/dist/tui/components/ChatPanel.js +37 -26
- package/dist/tui/components/ChatPanel.js.map +1 -1
- package/dist/tui/components/DAGPanel.d.ts +3 -4
- package/dist/tui/components/DAGPanel.d.ts.map +1 -1
- package/dist/tui/components/DAGPanel.js +44 -36
- package/dist/tui/components/DAGPanel.js.map +1 -1
- package/dist/tui/components/Header.d.ts.map +1 -1
- package/dist/tui/components/Header.js +54 -36
- package/dist/tui/components/Header.js.map +1 -1
- package/dist/tui/components/HelpOverlay.d.ts.map +1 -1
- package/dist/tui/components/HelpOverlay.js +7 -5
- package/dist/tui/components/HelpOverlay.js.map +1 -1
- package/dist/tui/components/InputBar.d.ts.map +1 -1
- package/dist/tui/components/InputBar.js +25 -13
- package/dist/tui/components/InputBar.js.map +1 -1
- package/dist/tui/components/LogsPanel.d.ts.map +1 -1
- package/dist/tui/components/LogsPanel.js +23 -17
- package/dist/tui/components/LogsPanel.js.map +1 -1
- package/dist/tui/components/MemoryPanel.d.ts +1 -1
- package/dist/tui/components/MemoryPanel.d.ts.map +1 -1
- package/dist/tui/components/MemoryPanel.js +24 -31
- package/dist/tui/components/MemoryPanel.js.map +1 -1
- package/dist/tui/components/MetricsPanel.d.ts +1 -1
- package/dist/tui/components/MetricsPanel.d.ts.map +1 -1
- package/dist/tui/components/MetricsPanel.js +10 -13
- package/dist/tui/components/MetricsPanel.js.map +1 -1
- package/dist/tui/components/SelectMenu.d.ts +20 -0
- package/dist/tui/components/SelectMenu.d.ts.map +1 -0
- package/dist/tui/components/SelectMenu.js +19 -0
- package/dist/tui/components/SelectMenu.js.map +1 -0
- package/dist/tui/components/StatusPanel.d.ts +1 -1
- package/dist/tui/components/StatusPanel.d.ts.map +1 -1
- package/dist/tui/components/StatusPanel.js +26 -18
- package/dist/tui/components/StatusPanel.js.map +1 -1
- package/dist/tui/components/animations/ProgressBar.d.ts +8 -1
- package/dist/tui/components/animations/ProgressBar.d.ts.map +1 -1
- package/dist/tui/components/animations/ProgressBar.js +52 -26
- package/dist/tui/components/animations/ProgressBar.js.map +1 -1
- package/dist/tui/components/animations/Pulse.d.ts +11 -3
- package/dist/tui/components/animations/Pulse.d.ts.map +1 -1
- package/dist/tui/components/animations/Pulse.js +23 -14
- package/dist/tui/components/animations/Pulse.js.map +1 -1
- package/dist/tui/components/animations/Spinner.d.ts +2 -1
- package/dist/tui/components/animations/Spinner.d.ts.map +1 -1
- package/dist/tui/components/animations/Spinner.js +31 -16
- package/dist/tui/components/animations/Spinner.js.map +1 -1
- package/dist/tui/components/animations/StatusAnimator.d.ts +3 -0
- package/dist/tui/components/animations/StatusAnimator.d.ts.map +1 -1
- package/dist/tui/components/animations/StatusAnimator.js +43 -28
- package/dist/tui/components/animations/StatusAnimator.js.map +1 -1
- package/dist/tui/components/animations/TypingEffect.d.ts +1 -0
- package/dist/tui/components/animations/TypingEffect.d.ts.map +1 -1
- package/dist/tui/components/animations/TypingEffect.js +13 -7
- package/dist/tui/components/animations/TypingEffect.js.map +1 -1
- package/dist/tui/components/animations/index.d.ts +3 -2
- package/dist/tui/components/animations/index.d.ts.map +1 -1
- package/dist/tui/components/animations/index.js +2 -2
- package/dist/tui/components/animations/index.js.map +1 -1
- package/dist/tui/components/composed/Button.d.ts +18 -0
- package/dist/tui/components/composed/Button.d.ts.map +1 -0
- package/dist/tui/components/composed/Button.js +22 -0
- package/dist/tui/components/composed/Button.js.map +1 -0
- package/dist/tui/components/composed/Divider.d.ts +13 -0
- package/dist/tui/components/composed/Divider.d.ts.map +1 -0
- package/dist/tui/components/composed/Divider.js +18 -0
- package/dist/tui/components/composed/Divider.js.map +1 -0
- package/dist/tui/components/composed/StatusBadge.d.ts +14 -0
- package/dist/tui/components/composed/StatusBadge.d.ts.map +1 -0
- package/dist/tui/components/composed/StatusBadge.js +28 -0
- package/dist/tui/components/composed/StatusBadge.js.map +1 -0
- package/dist/tui/components/composed/index.d.ts +7 -0
- package/dist/tui/components/composed/index.d.ts.map +1 -0
- package/dist/tui/components/composed/index.js +7 -0
- package/dist/tui/components/composed/index.js.map +1 -0
- package/dist/tui/components/layouts/Container.d.ts +14 -0
- package/dist/tui/components/layouts/Container.d.ts.map +1 -0
- package/dist/tui/components/layouts/Container.js +10 -0
- package/dist/tui/components/layouts/Container.js.map +1 -0
- package/dist/tui/components/layouts/Grid.d.ts +14 -0
- package/dist/tui/components/layouts/Grid.d.ts.map +1 -0
- package/dist/tui/components/layouts/Grid.js +13 -0
- package/dist/tui/components/layouts/Grid.js.map +1 -0
- package/dist/tui/components/layouts/Stack.d.ts +32 -0
- package/dist/tui/components/layouts/Stack.d.ts.map +1 -0
- package/dist/tui/components/layouts/Stack.js +17 -0
- package/dist/tui/components/layouts/Stack.js.map +1 -0
- package/dist/tui/components/layouts/index.d.ts +7 -0
- package/dist/tui/components/layouts/index.d.ts.map +1 -0
- package/dist/tui/components/layouts/index.js +7 -0
- package/dist/tui/components/layouts/index.js.map +1 -0
- package/dist/tui/components/primitives/Box.d.ts +28 -0
- package/dist/tui/components/primitives/Box.d.ts.map +1 -0
- package/dist/tui/components/primitives/Box.js +38 -0
- package/dist/tui/components/primitives/Box.js.map +1 -0
- package/dist/tui/components/primitives/Panel.d.ts +17 -0
- package/dist/tui/components/primitives/Panel.d.ts.map +1 -0
- package/dist/tui/components/primitives/Panel.js +12 -0
- package/dist/tui/components/primitives/Panel.js.map +1 -0
- package/dist/tui/components/primitives/Text.d.ts +18 -0
- package/dist/tui/components/primitives/Text.d.ts.map +1 -0
- package/dist/tui/components/primitives/Text.js +21 -0
- package/dist/tui/components/primitives/Text.js.map +1 -0
- package/dist/tui/components/primitives/index.d.ts +7 -0
- package/dist/tui/components/primitives/index.d.ts.map +1 -0
- package/dist/tui/components/primitives/index.js +7 -0
- package/dist/tui/components/primitives/index.js.map +1 -0
- package/dist/tui/hooks/useTerminalSize.d.ts +3 -0
- package/dist/tui/hooks/useTerminalSize.d.ts.map +1 -1
- package/dist/tui/hooks/useTerminalSize.js +36 -10
- package/dist/tui/hooks/useTerminalSize.js.map +1 -1
- package/dist/tui/styles/colors.d.ts +4 -0
- package/dist/tui/styles/colors.d.ts.map +1 -1
- package/dist/tui/styles/colors.js +54 -14
- package/dist/tui/styles/colors.js.map +1 -1
- package/dist/tui/styles/design-system.d.ts +107 -0
- package/dist/tui/styles/design-system.d.ts.map +1 -0
- package/dist/tui/styles/design-system.js +140 -0
- package/dist/tui/styles/design-system.js.map +1 -0
- package/dist/tui/styles/index.d.ts +4 -2
- package/dist/tui/styles/index.d.ts.map +1 -1
- package/dist/tui/styles/index.js +3 -2
- package/dist/tui/styles/index.js.map +1 -1
- package/dist/tui/styles/themes.d.ts +10 -0
- package/dist/tui/styles/themes.d.ts.map +1 -1
- package/dist/tui/styles/themes.js +137 -47
- package/dist/tui/styles/themes.js.map +1 -1
- package/dist/tui/styles/tokens.d.ts +262 -0
- package/dist/tui/styles/tokens.d.ts.map +1 -0
- package/dist/tui/styles/tokens.js +230 -0
- package/dist/tui/styles/tokens.js.map +1 -0
- package/package.json +1 -1
|
@@ -2,26 +2,34 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { memo } from "react";
|
|
3
3
|
import { Text } from "ink";
|
|
4
4
|
import { useAnimation } from "../../hooks/useAnimation.js";
|
|
5
|
-
import {
|
|
6
|
-
const PULSE_FRAMES = ["●", "◐", "○", "◐"];
|
|
7
|
-
const BREATH_FRAMES = ["●", "●", "◐", "◐", "○", "○", "◐", "◐"];
|
|
8
|
-
const PING_FRAMES = ["●", "●", "●", "○", "○", "○", "○", "○", "○", "○"];
|
|
5
|
+
import { getCurrentTheme } from "../../styles/colors.js";
|
|
6
|
+
const PULSE_FRAMES = ["●", "●", "◐", "○", "○", "◐"];
|
|
7
|
+
const BREATH_FRAMES = ["●", "●", "●", "◐", "◐", "○", "○", "○", "○", "◐", "◐"];
|
|
8
|
+
const PING_FRAMES = ["●", "●", "●", "○", "○", "○", "○", "○", "○", "○", "○", "○"];
|
|
9
|
+
const WAVE_FRAMES = ["○", "◐", "●", "◐", "○", "◐", "●"];
|
|
10
|
+
const HEARTBEAT_FRAMES = ["●", "●", "○", "●", "●", "○", "○", "○", "○", "○"];
|
|
9
11
|
const FRAME_MAP = {
|
|
10
12
|
pulse: PULSE_FRAMES,
|
|
11
13
|
breath: BREATH_FRAMES,
|
|
12
14
|
ping: PING_FRAMES,
|
|
15
|
+
wave: WAVE_FRAMES,
|
|
16
|
+
heartbeat: HEARTBEAT_FRAMES,
|
|
13
17
|
};
|
|
14
18
|
const DEFAULT_INTERVALS = {
|
|
15
|
-
pulse:
|
|
16
|
-
breath:
|
|
17
|
-
ping:
|
|
19
|
+
pulse: 250,
|
|
20
|
+
breath: 500,
|
|
21
|
+
ping: 350,
|
|
22
|
+
wave: 150,
|
|
23
|
+
heartbeat: 200,
|
|
18
24
|
};
|
|
19
|
-
export const Pulse = memo(function Pulse({ interval, color
|
|
25
|
+
export const Pulse = memo(function Pulse({ interval, color, isAnimating = true, type = "pulse", }) {
|
|
26
|
+
const theme = getCurrentTheme();
|
|
20
27
|
const frames = FRAME_MAP[type];
|
|
21
28
|
const actualInterval = interval ?? DEFAULT_INTERVALS[type];
|
|
29
|
+
const pulseColor = color ?? theme.colors.success;
|
|
22
30
|
const { frame } = useAnimation({ interval: actualInterval, loop: true, autoStart: isAnimating, maxFps: 15 });
|
|
23
31
|
const currentFrame = frames[frame % frames.length];
|
|
24
|
-
return _jsx(Text, { color:
|
|
32
|
+
return _jsx(Text, { color: pulseColor, children: currentFrame });
|
|
25
33
|
});
|
|
26
34
|
export function usePulseFrame(tick, type = "pulse") {
|
|
27
35
|
const frames = FRAME_MAP[type];
|
|
@@ -32,16 +40,17 @@ export function usePulseIntensity(tick, interval = 100) {
|
|
|
32
40
|
const phase = (tick % cycleLength) / cycleLength;
|
|
33
41
|
return 0.5 + Math.sin(phase * Math.PI * 2) * 0.5;
|
|
34
42
|
}
|
|
35
|
-
export const StatusPulse = memo(function StatusPulse({ status
|
|
43
|
+
export const StatusPulse = memo(function StatusPulse({ status }) {
|
|
44
|
+
const theme = getCurrentTheme();
|
|
36
45
|
if (status === "running") {
|
|
37
|
-
return _jsx(Pulse, { interval:
|
|
46
|
+
return _jsx(Pulse, { interval: 180, color: theme.colors.warning, type: "wave" });
|
|
38
47
|
}
|
|
39
48
|
if (status === "online") {
|
|
40
|
-
return _jsx(Pulse, { interval:
|
|
49
|
+
return _jsx(Pulse, { interval: 500, color: theme.colors.success, type: "breath" });
|
|
41
50
|
}
|
|
42
51
|
if (status === "error") {
|
|
43
|
-
return _jsx(Pulse, { interval:
|
|
52
|
+
return _jsx(Pulse, { interval: 300, color: theme.colors.error, type: "ping" });
|
|
44
53
|
}
|
|
45
|
-
return _jsx(Text, { color:
|
|
54
|
+
return _jsx(Text, { color: theme.colors.textTertiary, children: "\u25CB" });
|
|
46
55
|
});
|
|
47
56
|
//# sourceMappingURL=Pulse.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pulse.js","sourceRoot":"","sources":["../../../../src/tui/components/animations/Pulse.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Pulse.js","sourceRoot":"","sources":["../../../../src/tui/components/animations/Pulse.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,MAAM,YAAY,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACpD,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAC9E,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACjF,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACxD,MAAM,gBAAgB,GAAG,CAAC,GA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,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
export type SpinnerType = "dots" | "circle" | "
|
|
2
|
+
export type SpinnerType = "dots" | "dots2" | "circle" | "circleHalves" | "pipe" | "triangle" | "arc" | "line" | "dots12" | "bounce" | "wave" | "pulse";
|
|
3
3
|
interface SpinnerProps {
|
|
4
4
|
type?: SpinnerType;
|
|
5
5
|
interval?: number;
|
|
@@ -9,5 +9,6 @@ interface SpinnerProps {
|
|
|
9
9
|
export declare const Spinner: React.NamedExoticComponent<SpinnerProps>;
|
|
10
10
|
export declare function useSpinnerFrame(type: SpinnerType | undefined, tick: number): string;
|
|
11
11
|
export declare const spinnerTypes: SpinnerType[];
|
|
12
|
+
export declare function getSpinnerFrames(type: SpinnerType): string[];
|
|
12
13
|
export {};
|
|
13
14
|
//# sourceMappingURL=Spinner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../../../src/tui/components/animations/Spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../../../src/tui/components/animations/Spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AAKpC,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,cAAc,GAAG,MAAM,GAAG,UAAU,GAAG,KAAK,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;AAgCvJ,UAAU,YAAY;IACpB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,OAAO,0CAclB,CAAC;AAEH,wBAAgB,eAAe,CAAC,IAAI,EAAE,WAAW,YAAS,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAGhF;AAED,eAAO,MAAM,YAAY,EAAkC,WAAW,EAAE,CAAC;AAEzE,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,EAAE,CAE5D"}
|
|
@@ -2,35 +2,50 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { memo } from "react";
|
|
3
3
|
import { Text } from "ink";
|
|
4
4
|
import { useAnimation } from "../../hooks/useAnimation.js";
|
|
5
|
-
import {
|
|
5
|
+
import { getCurrentTheme } from "../../styles/colors.js";
|
|
6
6
|
const SPINNER_FRAMES = {
|
|
7
|
-
dots: ["⠋", "⠙", "⠹", "⠸", "
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
dots: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"],
|
|
8
|
+
dots2: ["⣾", "⣽", "⣻", "⢿", "⡿", "⣟", "⣯", "⣷"],
|
|
9
|
+
circle: ["◜", "◠", "◝", "◞", "◡", "◟"],
|
|
10
|
+
circleHalves: ["◐", "◓", "◑", "◒"],
|
|
11
|
+
pipe: ["┤", "┘", "┴", "└", "├", "┌", "┬", "┐"],
|
|
12
|
+
triangle: ["◢", "◣", "◤", "◥"],
|
|
13
|
+
arc: ["░", "▒", "▓", "▒"],
|
|
14
|
+
line: ["━", "━", "╋", "━", "━"],
|
|
15
|
+
dots12: ["⠁", "⠂", "⠄", "⡀", "⢀", "⠠", "⠐", "⠈"],
|
|
16
|
+
bounce: ["⠁", "⠂", "⠄", "⡀", "⢀", "⠠", "⠐", "⠈", "⠐", "⠠", "⢀", "⡀", "⠄", "⠂"],
|
|
17
|
+
wave: ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█", "▇", "▆", "▅", "▄", "▃", "▂"],
|
|
18
|
+
pulse: ["○", "◎", "●", "◎"],
|
|
14
19
|
};
|
|
15
20
|
const DEFAULT_INTERVALS = {
|
|
16
|
-
dots:
|
|
17
|
-
|
|
21
|
+
dots: 80,
|
|
22
|
+
dots2: 80,
|
|
23
|
+
circle: 100,
|
|
24
|
+
circleHalves: 120,
|
|
25
|
+
pipe: 100,
|
|
26
|
+
triangle: 100,
|
|
27
|
+
arc: 80,
|
|
28
|
+
line: 150,
|
|
29
|
+
dots12: 80,
|
|
30
|
+
bounce: 60,
|
|
31
|
+
wave: 80,
|
|
18
32
|
pulse: 200,
|
|
19
|
-
brackets: 80,
|
|
20
|
-
arrows: 100,
|
|
21
|
-
hamburger: 150,
|
|
22
|
-
grow: 100,
|
|
23
33
|
};
|
|
24
|
-
export const Spinner = memo(function Spinner({ type = "dots", interval, color
|
|
34
|
+
export const Spinner = memo(function Spinner({ type = "dots", interval, color, isAnimating = true, }) {
|
|
35
|
+
const theme = getCurrentTheme();
|
|
25
36
|
const frames = SPINNER_FRAMES[type];
|
|
26
37
|
const actualInterval = interval ?? DEFAULT_INTERVALS[type];
|
|
38
|
+
const spinnerColor = color ?? theme.colors.primary;
|
|
27
39
|
const { frame } = useAnimation({ interval: actualInterval, loop: true, autoStart: isAnimating, maxFps: 20 });
|
|
28
40
|
const currentFrame = frames[frame % frames.length];
|
|
29
|
-
return _jsx(Text, { color:
|
|
41
|
+
return _jsx(Text, { color: spinnerColor, children: currentFrame });
|
|
30
42
|
});
|
|
31
43
|
export function useSpinnerFrame(type = "dots", tick) {
|
|
32
44
|
const frames = SPINNER_FRAMES[type];
|
|
33
45
|
return frames[tick % frames.length];
|
|
34
46
|
}
|
|
35
47
|
export const spinnerTypes = Object.keys(SPINNER_FRAMES);
|
|
48
|
+
export function getSpinnerFrames(type) {
|
|
49
|
+
return SPINNER_FRAMES[type];
|
|
50
|
+
}
|
|
36
51
|
//# sourceMappingURL=Spinner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spinner.js","sourceRoot":"","sources":["../../../../src/tui/components/animations/Spinner.tsx"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AAG,YAAY,CAAC,EAAE,QAAQ,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC;IAC7G,MAAM,YAAY,GAAG,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;IAEnD,OAAO,KAAC,IAAI,IAAC,KAAK,EAAE,YAAY,YAAG,YAAY,GAAQ,CAAC;AAC1D,CAAC,CAAC,CAAC;AAEH,MAAM,UAAU,eAAe,CAAC,OAAoB,MAAM,EAAE,IAAY;IACtE,MAAM,MAAM,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;IACpC,OAAO,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;AACtC,CAAC;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,cAAc,CAAkB,CAAC;AAEzE,MAAM,UAAU,gBAAgB,CAAC,IAAiB;IAChD,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC"}
|
|
@@ -5,6 +5,7 @@ interface StatusAnimatorProps {
|
|
|
5
5
|
label?: string;
|
|
6
6
|
showLabel?: boolean;
|
|
7
7
|
transitionDuration?: number;
|
|
8
|
+
compact?: boolean;
|
|
8
9
|
}
|
|
9
10
|
export declare const StatusAnimator: React.NamedExoticComponent<StatusAnimatorProps>;
|
|
10
11
|
interface MetricPulseProps {
|
|
@@ -16,11 +17,13 @@ interface MetricPulseProps {
|
|
|
16
17
|
critical: number;
|
|
17
18
|
};
|
|
18
19
|
isHighlighted?: boolean;
|
|
20
|
+
compact?: boolean;
|
|
19
21
|
}
|
|
20
22
|
export declare const MetricPulse: React.NamedExoticComponent<MetricPulseProps>;
|
|
21
23
|
interface FitnessAnimatorProps {
|
|
22
24
|
value: number;
|
|
23
25
|
previousValue?: number;
|
|
26
|
+
compact?: boolean;
|
|
24
27
|
}
|
|
25
28
|
export declare const FitnessAnimator: React.NamedExoticComponent<FitnessAnimatorProps>;
|
|
26
29
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusAnimator.d.ts","sourceRoot":"","sources":["../../../../src/tui/components/animations/StatusAnimator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4C,MAAM,OAAO,CAAC;AAKjE,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE5E,UAAU,mBAAmB;IAC3B,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,kBAAkB,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"StatusAnimator.d.ts","sourceRoot":"","sources":["../../../../src/tui/components/animations/StatusAnimator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4C,MAAM,OAAO,CAAC;AAKjE,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE5E,UAAU,mBAAmB;IAC3B,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAiCD,eAAO,MAAM,cAAc,iDAwDzB,CAAC;AAEH,UAAU,gBAAgB;IACxB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IAClD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,WAAW,8CA+BtB,CAAC;AAEH,UAAU,oBAAoB;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,eAAe,kDAqC1B,CAAC"}
|
|
@@ -1,24 +1,37 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useEffect, memo, useRef } from "react";
|
|
3
3
|
import { Box, Text } from "ink";
|
|
4
|
-
import {
|
|
4
|
+
import { getCurrentTheme } from "../../styles/colors.js";
|
|
5
5
|
import { useAnimation } from "../../hooks/useAnimation.js";
|
|
6
|
-
const STATUS_COLORS = {
|
|
7
|
-
pending: tuiColors.textTertiary,
|
|
8
|
-
queued: tuiColors.warning,
|
|
9
|
-
running: tuiColors.primary,
|
|
10
|
-
done: tuiColors.success,
|
|
11
|
-
error: tuiColors.error,
|
|
12
|
-
idle: tuiColors.textQuaternary,
|
|
13
|
-
};
|
|
14
6
|
const RUNNING_FRAMES = ["◐", "◓", "◑", "◒"];
|
|
15
7
|
const TRANSITION_FRAMES = ["○", "◐", "◓", "●"];
|
|
16
8
|
const EXIT_FRAMES = ["●", "◑", "◒", "○"];
|
|
9
|
+
const PULSE_FRAMES = ["●", "●", "◐", "○"];
|
|
17
10
|
const STATUS_ORDER = ["pending", "queued", "running", "done", "error", "idle"];
|
|
18
|
-
function getStatusColor(status) {
|
|
19
|
-
|
|
11
|
+
function getStatusColor(status, theme) {
|
|
12
|
+
const colors = {
|
|
13
|
+
pending: theme.colors.textTertiary,
|
|
14
|
+
queued: theme.colors.warning,
|
|
15
|
+
running: theme.colors.primary,
|
|
16
|
+
done: theme.colors.success,
|
|
17
|
+
error: theme.colors.error,
|
|
18
|
+
idle: theme.colors.textQuaternary,
|
|
19
|
+
};
|
|
20
|
+
return colors[status] || theme.colors.textTertiary;
|
|
21
|
+
}
|
|
22
|
+
function getStatusIcon(status) {
|
|
23
|
+
const icons = {
|
|
24
|
+
pending: "○",
|
|
25
|
+
queued: "◐",
|
|
26
|
+
running: "●",
|
|
27
|
+
done: "✓",
|
|
28
|
+
error: "✗",
|
|
29
|
+
idle: "·",
|
|
30
|
+
};
|
|
31
|
+
return icons[status] || "·";
|
|
20
32
|
}
|
|
21
|
-
export const StatusAnimator = memo(function StatusAnimator({ status, label, showLabel = true, transitionDuration =
|
|
33
|
+
export const StatusAnimator = memo(function StatusAnimator({ status, label, showLabel = true, transitionDuration = 400, compact = false, }) {
|
|
34
|
+
const theme = getCurrentTheme();
|
|
22
35
|
const [displayStatus, setDisplayStatus] = useState(status);
|
|
23
36
|
const [isTransitioning, setIsTransitioning] = useState(false);
|
|
24
37
|
const [transitionFrame, setTransitionFrame] = useState(0);
|
|
@@ -47,39 +60,41 @@ export const StatusAnimator = memo(function StatusAnimator({ status, label, show
|
|
|
47
60
|
: EXIT_FRAMES;
|
|
48
61
|
return frames[transitionFrame % frames.length];
|
|
49
62
|
}
|
|
50
|
-
|
|
51
|
-
return statusInfo.icon;
|
|
63
|
+
return getStatusIcon(displayStatus);
|
|
52
64
|
};
|
|
53
|
-
const color = getStatusColor(status);
|
|
54
|
-
return (_jsxs(Box, { flexDirection: "row", children: [_jsx(Text, { color: color, children: getAnimatedIcon() }), showLabel && label && (_jsxs(Text, { color: color, children: [" ", label] })), showLabel && !label && (_jsxs(Text, { color:
|
|
65
|
+
const color = getStatusColor(status, theme);
|
|
66
|
+
return (_jsxs(Box, { flexDirection: "row", children: [_jsx(Text, { color: color, children: getAnimatedIcon() }), showLabel && label && (_jsxs(Text, { color: color, children: [" ", label] })), showLabel && !label && !compact && (_jsxs(Text, { color: theme.colors.textSecondary, children: [" [", status.toUpperCase(), "]"] }))] }));
|
|
55
67
|
});
|
|
56
|
-
export const MetricPulse = memo(function MetricPulse({ value, label, unit, threshold, isHighlighted }) {
|
|
68
|
+
export const MetricPulse = memo(function MetricPulse({ value, label, unit, threshold, isHighlighted, compact = false, }) {
|
|
69
|
+
const theme = getCurrentTheme();
|
|
57
70
|
const { frame } = useAnimation({ interval: 200, loop: true, maxFps: 10 });
|
|
58
71
|
const numValue = typeof value === "number" ? value : parseFloat(value) || 0;
|
|
59
|
-
let color =
|
|
72
|
+
let color = theme.colors.success;
|
|
60
73
|
if (threshold) {
|
|
61
74
|
if (numValue >= threshold.critical)
|
|
62
|
-
color =
|
|
75
|
+
color = theme.colors.error;
|
|
63
76
|
else if (numValue >= threshold.warning)
|
|
64
|
-
color =
|
|
77
|
+
color = theme.colors.warning;
|
|
65
78
|
}
|
|
66
|
-
|
|
79
|
+
const pulseFrame = isHighlighted ? PULSE_FRAMES[frame % PULSE_FRAMES.length] : "";
|
|
80
|
+
return (_jsxs(Box, { flexDirection: "row", children: [_jsxs(Text, { color: theme.colors.textTertiary, children: [label.slice(0, compact ? 6 : 12), ":"] }), _jsxs(Text, { color: color, bold: isHighlighted, children: [" ", value, unit || ""] }), isHighlighted && _jsxs(Text, { color: color, children: [" ", pulseFrame] })] }));
|
|
67
81
|
});
|
|
68
|
-
export const FitnessAnimator = memo(function FitnessAnimator({ value, previousValue }) {
|
|
82
|
+
export const FitnessAnimator = memo(function FitnessAnimator({ value, previousValue, compact = false, }) {
|
|
83
|
+
const theme = getCurrentTheme();
|
|
69
84
|
const { frame } = useAnimation({ interval: 150, loop: true, maxFps: 12 });
|
|
70
85
|
const diff = previousValue !== undefined ? value - previousValue : 0;
|
|
71
86
|
const isImproving = diff > 0;
|
|
72
87
|
const isDeclining = diff < 0;
|
|
73
|
-
let color =
|
|
88
|
+
let color = theme.colors.success;
|
|
74
89
|
if (value >= 0.9)
|
|
75
|
-
color =
|
|
90
|
+
color = theme.colors.success;
|
|
76
91
|
else if (value >= 0.7)
|
|
77
|
-
color =
|
|
92
|
+
color = theme.colors.warning;
|
|
78
93
|
else
|
|
79
|
-
color =
|
|
94
|
+
color = theme.colors.error;
|
|
80
95
|
const frames = ["●", "◐", "●", "◐"];
|
|
81
|
-
const animFrame =
|
|
96
|
+
const animFrame = isImproving || isDeclining ? frames[frame % frames.length] : "●";
|
|
82
97
|
const statusLabel = value >= 0.9 ? "OPTIMAL" : value >= 0.7 ? "GOOD" : "IMPROVING";
|
|
83
|
-
return (_jsxs(Box, { flexDirection: "row", children: [_jsx(Text, { color:
|
|
98
|
+
return (_jsxs(Box, { flexDirection: "row", children: [_jsx(Text, { color: theme.colors.textTertiary, children: compact ? "Fit:" : "Fitness:" }), _jsxs(Text, { color: color, bold: true, children: [" ", value.toFixed(2)] }), !compact && (_jsxs(Text, { color: theme.colors.textTertiary, children: [" [", statusLabel, "]"] })), isImproving && _jsx(Text, { color: theme.colors.success, children: " \u2191" }), isDeclining && _jsx(Text, { color: theme.colors.error, children: " \u2193" }), (isImproving || isDeclining) && (_jsxs(Text, { color: color, children: [" ", animFrame] }))] }));
|
|
84
99
|
});
|
|
85
100
|
//# sourceMappingURL=StatusAnimator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusAnimator.js","sourceRoot":"","sources":["../../../../src/tui/components/animations/StatusAnimator.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"StatusAnimator.js","sourceRoot":"","sources":["../../../../src/tui/components/animations/StatusAnimator.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,GAAG,EAAE,I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EACP,MAAC,IAAI,IAAC,KAAK,EAAE,KAAK,EAAE,IAAI,wBAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAQ,EAClD,CAAC,OAAO,IAAI,CACX,MAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,YAAY,mBAAK,WAAW,SAAS,CAChE,EACA,WAAW,IAAI,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,wBAAW,EAC3D,WAAW,IAAI,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,wBAAW,EACzD,CAAC,WAAW,IAAI,WAAW,CAAC,IAAI,CAC/B,MAAC,IAAI,IAAC,KAAK,EAAE,KAAK,kBAAI,SAAS,IAAQ,CACxC,IACG,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -20,6 +20,7 @@ export declare const TypewriterMessage: React.NamedExoticComponent<TypewriterMes
|
|
|
20
20
|
interface ProcessingIndicatorProps {
|
|
21
21
|
text?: string;
|
|
22
22
|
color?: string;
|
|
23
|
+
spinnerType?: "dots" | "dots2" | "circle" | "pulse";
|
|
23
24
|
}
|
|
24
25
|
export declare const ProcessingIndicator: React.NamedExoticComponent<ProcessingIndicatorProps>;
|
|
25
26
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypingEffect.d.ts","sourceRoot":"","sources":["../../../../src/tui/components/animations/TypingEffect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4C,MAAM,OAAO,CAAC;AAKjE,UAAU,iBAAiB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,YAAY,+
|
|
1
|
+
{"version":3,"file":"TypingEffect.d.ts","sourceRoot":"","sources":["../../../../src/tui/components/animations/TypingEffect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4C,MAAM,OAAO,CAAC;AAKjE,UAAU,iBAAiB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,YAAY,+CAqDvB,CAAC;AAEH,UAAU,sBAAsB;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,iBAAiB,oDA6B5B,CAAC;AAEH,UAAU,wBAAwB;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;CACrD;AAED,eAAO,MAAM,mBAAmB,sDAe9B,CAAC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useEffect, memo, useRef } from "react";
|
|
3
3
|
import { Box, Text } from "ink";
|
|
4
|
-
import {
|
|
4
|
+
import { getCurrentTheme } from "../../styles/colors.js";
|
|
5
5
|
import { Spinner } from "./Spinner.js";
|
|
6
|
-
export const TypingEffect = memo(function TypingEffect({ text, speed =
|
|
6
|
+
export const TypingEffect = memo(function TypingEffect({ text, speed = 25, color, showCursor = true, cursorChar = "▌", onComplete, isAnimating = true, prefix, }) {
|
|
7
|
+
const theme = getCurrentTheme();
|
|
8
|
+
const textColor = color ?? theme.colors.textPrimary;
|
|
7
9
|
const [displayedChars, setDisplayedChars] = useState(0);
|
|
8
10
|
const [isComplete, setIsComplete] = useState(false);
|
|
9
11
|
const timeoutRef = useRef(null);
|
|
@@ -31,9 +33,11 @@ export const TypingEffect = memo(function TypingEffect({ text, speed = 30, color
|
|
|
31
33
|
};
|
|
32
34
|
}, [displayedChars, text.length, speed, isComplete, isAnimating]);
|
|
33
35
|
const displayedText = text.slice(0, displayedChars);
|
|
34
|
-
return (_jsxs(Box, { flexDirection: "row", children: [prefix && _jsx(Text, { color:
|
|
36
|
+
return (_jsxs(Box, { flexDirection: "row", children: [prefix && _jsx(Text, { color: theme.colors.textTertiary, children: prefix }), _jsx(Text, { color: textColor, children: displayedText }), showCursor && !isComplete && (_jsx(Text, { color: theme.colors.primary, children: cursorChar }))] }));
|
|
35
37
|
});
|
|
36
|
-
export const TypewriterMessage = memo(function TypewriterMessage({ text, speed =
|
|
38
|
+
export const TypewriterMessage = memo(function TypewriterMessage({ text, speed = 15, color, isComplete, }) {
|
|
39
|
+
const theme = getCurrentTheme();
|
|
40
|
+
const textColor = color ?? theme.colors.textPrimary;
|
|
37
41
|
const [displayedChars, setDisplayedChars] = useState(0);
|
|
38
42
|
const timeoutRef = useRef(null);
|
|
39
43
|
useEffect(() => {
|
|
@@ -51,9 +55,11 @@ export const TypewriterMessage = memo(function TypewriterMessage({ text, speed =
|
|
|
51
55
|
clearTimeout(timeoutRef.current);
|
|
52
56
|
};
|
|
53
57
|
}, [displayedChars, text.length, speed, isComplete]);
|
|
54
|
-
return _jsx(Text, { color:
|
|
58
|
+
return _jsx(Text, { color: textColor, children: text.slice(0, displayedChars) });
|
|
55
59
|
});
|
|
56
|
-
export const ProcessingIndicator = memo(function ProcessingIndicator({ text = "Processing", color =
|
|
57
|
-
|
|
60
|
+
export const ProcessingIndicator = memo(function ProcessingIndicator({ text = "Processing", color, spinnerType = "dots", }) {
|
|
61
|
+
const theme = getCurrentTheme();
|
|
62
|
+
const indicatorColor = color ?? theme.colors.warning;
|
|
63
|
+
return (_jsxs(Box, { flexDirection: "row", children: [_jsx(Spinner, { type: spinnerType, color: indicatorColor }), _jsxs(Text, { color: indicatorColor, children: [" ", text] }), _jsx(Text, { color: theme.colors.textTertiary, children: "\u2026" })] }));
|
|
58
64
|
});
|
|
59
65
|
//# sourceMappingURL=TypingEffect.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypingEffect.js","sourceRoot":"","sources":["../../../../src/tui/components/animations/TypingEffect.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"TypingEffect.js","sourceRoot":"","sources":["../../../../src/tui/components/animations/TypingEffect.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAavC,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,YAAY,CAAC,EACrD,IAAI,EACJ,KAAK,GAAG,EAAE,EACV,KAAK,EACL,UAAU,GAAG,IAAI,EACjB,UAAU,GAAG,GAAG,EAChB,UAAU,EACV,WAAW,GAAG,IAAI,EAClB,MA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AC,OAAO;gBAAE,YAAY,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAC3D,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,cAAc,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC;IAErD,OAAO,KAAC,IAAI,IAAC,KAAK,EAAE,SAAS,YAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,cAAc,CAAC,GAAQ,CAAC;AACxE,CAAC,CAAC,CAAC;AAQH,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC,SAAS,mBAAmB,CAAC,EACnE,IAAI,GAAG,YAAY,EACnB,KAAK,EACL,WAAW,GAAG,MAAM,GACK;IACzB,MAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IAChC,MAAM,cAAc,GAAG,KAAK,IAAI,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC;IAErD,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,KAAK,aACtB,KAAC,OAAO,IAAC,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,cAAc,GAAI,EACrD,MAAC,IAAI,IAAC,KAAK,EAAE,cAAc,kBAAI,IAAI,IAAQ,EAC3C,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,YAAY,uBAAU,IAC5C,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export { Spinner, useSpinnerFrame, spinnerTypes } from "./Spinner.js";
|
|
1
|
+
export { Spinner, useSpinnerFrame, spinnerTypes, getSpinnerFrames } from "./Spinner.js";
|
|
2
2
|
export type { SpinnerType } from "./Spinner.js";
|
|
3
3
|
export { Pulse, StatusPulse, usePulseFrame, usePulseIntensity } from "./Pulse.js";
|
|
4
|
+
export type { PulseType } from "./Pulse.js";
|
|
4
5
|
export { TypingEffect, TypewriterMessage, ProcessingIndicator } from "./TypingEffect.js";
|
|
5
6
|
export { StatusAnimator, MetricPulse, FitnessAnimator } from "./StatusAnimator.js";
|
|
6
7
|
export type { TransitionStatus } from "./StatusAnimator.js";
|
|
7
|
-
export { AnimatedProgressBar, ProgressWithLabel, SegmentedProgress, WorkflowProgress } from "./ProgressBar.js";
|
|
8
|
+
export { AnimatedProgressBar, ProgressWithLabel, SegmentedProgress, WorkflowProgress, getProgressGlow, getProgressMarker, } from "./ProgressBar.js";
|
|
8
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tui/components/animations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tui/components/animations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACxF,YAAY,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAClF,YAAY,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAEzF,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACnF,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,iBAAiB,GAClB,MAAM,kBAAkB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { Spinner, useSpinnerFrame, spinnerTypes } from "./Spinner.js";
|
|
1
|
+
export { Spinner, useSpinnerFrame, spinnerTypes, getSpinnerFrames } from "./Spinner.js";
|
|
2
2
|
export { Pulse, StatusPulse, usePulseFrame, usePulseIntensity } from "./Pulse.js";
|
|
3
3
|
export { TypingEffect, TypewriterMessage, ProcessingIndicator } from "./TypingEffect.js";
|
|
4
4
|
export { StatusAnimator, MetricPulse, FitnessAnimator } from "./StatusAnimator.js";
|
|
5
|
-
export { AnimatedProgressBar, ProgressWithLabel, SegmentedProgress, WorkflowProgress } from "./ProgressBar.js";
|
|
5
|
+
export { AnimatedProgressBar, ProgressWithLabel, SegmentedProgress, WorkflowProgress, getProgressGlow, getProgressMarker, } from "./ProgressBar.js";
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tui/components/animations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tui/components/animations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGxF,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAGlF,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAEzF,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGnF,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,iBAAiB,GAClB,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Button - Composed interactive component
|
|
3
|
+
* Minimal, responsive button with theme support
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
type ButtonVariant = "primary" | "secondary" | "success" | "danger" | "ghost";
|
|
7
|
+
interface ButtonProps {
|
|
8
|
+
label: string;
|
|
9
|
+
variant?: ButtonVariant;
|
|
10
|
+
active?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
onClick?: () => void;
|
|
13
|
+
padding?: number;
|
|
14
|
+
width?: number | string;
|
|
15
|
+
}
|
|
16
|
+
export declare const Button: React.FC<ButtonProps>;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/tui/components/composed/Button.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,KAAK,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE9E,UAAU,WAAW;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAUD,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAiCxC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Box } from "../primitives/Box.js";
|
|
3
|
+
import { Text } from "../primitives/Text.js";
|
|
4
|
+
import { getCurrentTheme } from "../../styles/colors.js";
|
|
5
|
+
const variantColorMap = {
|
|
6
|
+
primary: "primary",
|
|
7
|
+
secondary: "secondary",
|
|
8
|
+
success: "success",
|
|
9
|
+
danger: "error",
|
|
10
|
+
ghost: "border",
|
|
11
|
+
};
|
|
12
|
+
export const Button = ({ label, variant = "primary", active = false, disabled = false, padding = 1, width, }) => {
|
|
13
|
+
const theme = getCurrentTheme();
|
|
14
|
+
const colorKey = variantColorMap[variant];
|
|
15
|
+
const color = theme.colors[colorKey];
|
|
16
|
+
const isActive = active || (variant !== "ghost");
|
|
17
|
+
const bgColor = isActive ? color : theme.colors.background;
|
|
18
|
+
const textColor = isActive ? theme.colors.background : color;
|
|
19
|
+
return (_jsx(Box, { p: padding, width: width, borderColor: color, backgroundColor: disabled ? theme.colors.background : bgColor, flexDirection: "row", justifyContent: "center", children: _jsx(Text, { bold: true, color: disabled ? "quaternary" : "primary", children: label }) }));
|
|
20
|
+
};
|
|
21
|
+
Button.displayName = "Button";
|
|
22
|
+
//# sourceMappingURL=Button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../../src/tui/components/composed/Button.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAezD,MAAM,eAAe,GAAkC;IACrD,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,WAAW;IACtB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,OAAO;IACf,KAAK,EAAE,QAAQ;CAChB,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAA0B,CAAC,EAC5C,KAAK,EACL,OAAO,GAAG,SAAS,EACnB,MAAM,GAAG,KAAK,EACd,QAAQ,GAAG,KAAK,EAChB,OAAO,GAAG,CAAC,EACX,KAAK,GACN,EAAE,EAAE;IACH,MAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IAChC,MAAM,QAAQ,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;IAC1C,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,QAAqC,CAAC,CAAC;IAElE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,KAAK,OAAO,CAAC,CAAC;IACjD,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC;IAC3D,MAAM,SAAS,GAAG,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC;IAE7D,OAAO,CACL,KAAC,GAAG,IACF,CAAC,EAAE,OAAO,EACV,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,KAAK,EAClB,eAAe,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,EAC7D,aAAa,EAAC,KAAK,EACnB,cAAc,EAAC,QAAQ,YAEvB,KAAC,IAAI,IACH,IAAI,QACJ,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,YAEzC,KAAK,GACD,GACH,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Divider - Simple separator component
|
|
3
|
+
* Uses design system borders for consistency
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
interface DividerProps {
|
|
7
|
+
direction?: "horizontal" | "vertical";
|
|
8
|
+
color?: "primary" | "secondary" | "border";
|
|
9
|
+
margin?: number;
|
|
10
|
+
}
|
|
11
|
+
export declare const Divider: React.FC<DividerProps>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=Divider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Divider.d.ts","sourceRoot":"","sources":["../../../../src/tui/components/composed/Divider.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,YAAY;IACpB,SAAS,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACtC,KAAK,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;IAC3C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAiC1C,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Box } from "../primitives/Box.js";
|
|
3
|
+
import { getCurrentTheme } from "../../styles/colors.js";
|
|
4
|
+
export const Divider = ({ direction = "horizontal", color = "border", margin = 0, }) => {
|
|
5
|
+
const theme = getCurrentTheme();
|
|
6
|
+
const colorMap = {
|
|
7
|
+
primary: theme.colors.primary,
|
|
8
|
+
secondary: theme.colors.secondary,
|
|
9
|
+
border: theme.colors.border,
|
|
10
|
+
};
|
|
11
|
+
const dividerColor = colorMap[color];
|
|
12
|
+
if (direction === "vertical") {
|
|
13
|
+
return (_jsx(Box, { flexDirection: "column", marginX: margin, borderLeftColor: dividerColor, height: "100%" }));
|
|
14
|
+
}
|
|
15
|
+
return (_jsx(Box, { flexDirection: "row", marginY: margin, borderBottomColor: dividerColor, width: "100%" }));
|
|
16
|
+
};
|
|
17
|
+
Divider.displayName = "Divider";
|
|
18
|
+
//# sourceMappingURL=Divider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Divider.js","sourceRoot":"","sources":["../../../../src/tui/components/composed/Divider.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAQzD,MAAM,CAAC,MAAM,OAAO,GAA2B,CAAC,EAC9C,SAAS,GAAG,YAAY,EACxB,KAAK,GAAG,QAAQ,EAChB,MAAM,GAAG,CAAC,GACX,EAAE,EAAE;IACH,MAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IAChC,MAAM,QAAQ,GAAG;QACf,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO;QAC7B,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,SAAS;QACjC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM;KAC5B,CAAC;IAEF,MAAM,YAAY,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAErC,IAAI,SAAS,KAAK,UAAU,EAAE,CAAC;QAC7B,OAAO,CACL,KAAC,GAAG,IACF,aAAa,EAAC,QAAQ,EACtB,OAAO,EAAE,MAAM,EACf,eAAe,EAAE,YAAY,EAC7B,MAAM,EAAC,MAAM,GACb,CACH,CAAC;IACJ,CAAC;IAED,OAAO,CACL,KAAC,GAAG,IACF,aAAa,EAAC,KAAK,EACnB,OAAO,EAAE,MAAM,EACf,iBAAiB,EAAE,YAAY,EAC/B,KAAK,EAAC,MAAM,GACZ,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* StatusBadge - Shows status with icon and color
|
|
3
|
+
* Used for success/error/warning/info states
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
type StatusType = "success" | "error" | "warning" | "info" | "pending";
|
|
7
|
+
interface StatusBadgeProps {
|
|
8
|
+
status: StatusType;
|
|
9
|
+
label?: string;
|
|
10
|
+
compact?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const StatusBadge: React.FC<StatusBadgeProps>;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=StatusBadge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusBadge.d.ts","sourceRoot":"","sources":["../../../../src/tui/components/composed/StatusBadge.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,KAAK,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;AAkBvE,UAAU,gBAAgB;IACxB,MAAM,EAAE,UAAU,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAoBlD,CAAC"}
|