@ranker/raxflow 2.0.5 → 2.1.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.
- 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 +10 -10
- 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 +4 -3
- 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/useAppState.d.ts +30 -2
- package/dist/tui/hooks/useAppState.d.ts.map +1 -1
- package/dist/tui/hooks/useAppState.js +333 -186
- package/dist/tui/hooks/useAppState.js.map +1 -1
- 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/services/orchestrator.d.ts +6 -2
- package/dist/tui/services/orchestrator.d.ts.map +1 -1
- package/dist/tui/services/orchestrator.js +22 -5
- package/dist/tui/services/orchestrator.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
|
@@ -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":"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"}
|
|
@@ -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"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } 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
|
+
import { indicators } from "../../styles/design-system.js";
|
|
6
|
+
const statusIcons = {
|
|
7
|
+
success: indicators.success,
|
|
8
|
+
error: indicators.error,
|
|
9
|
+
warning: indicators.warning,
|
|
10
|
+
info: indicators.info,
|
|
11
|
+
pending: indicators.pending,
|
|
12
|
+
};
|
|
13
|
+
const statusColors = {
|
|
14
|
+
success: "success",
|
|
15
|
+
error: "error",
|
|
16
|
+
warning: "warning",
|
|
17
|
+
info: "info",
|
|
18
|
+
pending: "warning",
|
|
19
|
+
};
|
|
20
|
+
export const StatusBadge = ({ status, label, compact = false, }) => {
|
|
21
|
+
const theme = getCurrentTheme();
|
|
22
|
+
const icon = statusIcons[status];
|
|
23
|
+
const colorKey = statusColors[status];
|
|
24
|
+
const color = theme.colors[colorKey];
|
|
25
|
+
return (_jsxs(Box, { flexDirection: "row", gap: compact ? 0 : 1, children: [_jsx(Text, { color: colorKey, children: icon }), label && !compact && (_jsx(Text, { color: colorKey, bold: true, children: label }))] }));
|
|
26
|
+
};
|
|
27
|
+
StatusBadge.displayName = "StatusBadge";
|
|
28
|
+
//# sourceMappingURL=StatusBadge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusBadge.js","sourceRoot":"","sources":["../../../../src/tui/components/composed/StatusBadge.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;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAI3D,MAAM,WAAW,GAA+B;IAC9C,OAAO,EAAE,UAAU,CAAC,OAAO;IAC3B,KAAK,EAAE,UAAU,CAAC,KAAK;IACvB,OAAO,EAAE,UAAU,CAAC,OAAO;IAC3B,IAAI,EAAE,UAAU,CAAC,IAAI;IACrB,OAAO,EAAE,UAAU,CAAC,OAAO;CAC5B,CAAC;AAEF,MAAM,YAAY,GAA+B;IAC/C,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;CACnB,CAAC;AAQF,MAAM,CAAC,MAAM,WAAW,GAA+B,CAAC,EACtD,MAAM,EACN,KAAK,EACL,OAAO,GAAG,KAAK,GAChB,EAAE,EAAE;IACH,MAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IAChC,MAAM,IAAI,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;IACjC,MAAM,QAAQ,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;IACtC,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,QAAqC,CAAC,CAAC;IAElE,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,KAAK,EAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,aAC3C,KAAC,IAAI,IAAC,KAAK,EAAE,QAAe,YAAG,IAAI,GAAQ,EAC1C,KAAK,IAAI,CAAC,OAAO,IAAI,CACpB,KAAC,IAAI,IAAC,KAAK,EAAE,QAAe,EAAE,IAAI,kBAC/B,KAAK,GACD,CACR,IACG,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,WAAW,CAAC,WAAW,GAAG,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tui/components/composed/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tui/components/composed/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Container - Responsive container component
|
|
3
|
+
* Adapts layout based on terminal size
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
interface ContainerProps {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
maxWidth?: number;
|
|
9
|
+
centered?: boolean;
|
|
10
|
+
gutter?: number;
|
|
11
|
+
}
|
|
12
|
+
export declare const Container: React.FC<ContainerProps>;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=Container.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Container.d.ts","sourceRoot":"","sources":["../../../../src/tui/components/layouts/Container.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,UAAU,cAAc;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAmB9C,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Box } from "../primitives/Box.js";
|
|
3
|
+
import { useTerminalSize } from "../../hooks/useTerminalSize.js";
|
|
4
|
+
export const Container = ({ children, maxWidth, centered = false, gutter = 1, }) => {
|
|
5
|
+
const terminalSize = useTerminalSize();
|
|
6
|
+
const width = Math.min(terminalSize.availableWidth, maxWidth || terminalSize.availableWidth);
|
|
7
|
+
return (_jsx(Box, { width: width, flexDirection: "column", px: gutter, ...(centered && { ml: gutter, mr: gutter }), children: children }));
|
|
8
|
+
};
|
|
9
|
+
Container.displayName = "Container";
|
|
10
|
+
//# sourceMappingURL=Container.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Container.js","sourceRoot":"","sources":["../../../../src/tui/components/layouts/Container.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAUjE,MAAM,CAAC,MAAM,SAAS,GAA6B,CAAC,EAClD,QAAQ,EACR,QAAQ,EACR,QAAQ,GAAG,KAAK,EAChB,MAAM,GAAG,CAAC,GACX,EAAE,EAAE;IACH,MAAM,YAAY,GAAG,eAAe,EAAE,CAAC;IACvC,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,cAAc,EAAE,QAAQ,IAAI,YAAY,CAAC,cAAc,CAAC,CAAC;IAE7F,OAAO,CACL,KAAC,GAAG,IACF,KAAK,EAAE,KAAK,EACZ,aAAa,EAAC,QAAQ,EACtB,EAAE,EAAE,MAAM,KACN,CAAC,QAAQ,IAAI,EAAE,EAAE,EAAE,MAAa,EAAE,EAAE,EAAE,MAAa,EAAE,CAAC,YAEzD,QAAQ,GACL,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Grid - Simple grid layout for responsive positioning
|
|
3
|
+
*/
|
|
4
|
+
import React from "react";
|
|
5
|
+
interface GridProps {
|
|
6
|
+
columns?: number;
|
|
7
|
+
gap?: number;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
width?: number | string;
|
|
10
|
+
height?: number | string;
|
|
11
|
+
}
|
|
12
|
+
export declare const Grid: React.FC<GridProps>;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=Grid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Grid.d.ts","sourceRoot":"","sources":["../../../../src/tui/components/layouts/Grid.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,SAAS;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CA6BpC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Grid - Simple grid layout for responsive positioning
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { Box } from "../primitives/Box.js";
|
|
7
|
+
export const Grid = ({ columns = 2, gap = 1, children, width = "100%", height, }) => {
|
|
8
|
+
const childArray = React.Children.toArray(children);
|
|
9
|
+
const rows = Math.ceil(childArray.length / columns);
|
|
10
|
+
return (_jsx(Box, { flexDirection: "column", gap: gap, width: width, height: height, children: Array.from({ length: rows }).map((_, rowIdx) => (_jsx(Box, { flexDirection: "row", gap: gap, width: "100%", children: childArray.slice(rowIdx * columns, (rowIdx + 1) * columns) }, rowIdx))) }));
|
|
11
|
+
};
|
|
12
|
+
Grid.displayName = "Grid";
|
|
13
|
+
//# sourceMappingURL=Grid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Grid.js","sourceRoot":"","sources":["../../../../src/tui/components/layouts/Grid.tsx"],"names":[],"mappings":";AAAA;;GAEG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAU3C,MAAM,CAAC,MAAM,IAAI,GAAwB,CAAC,EACxC,OAAO,GAAG,CAAC,EACX,GAAG,GAAG,CAAC,EACP,QAAQ,EACR,KAAK,GAAG,MAAM,EACd,MAAM,GACP,EAAE,EAAE;IACH,MAAM,UAAU,GAAG,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACpD,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC;IAEpD,OAAO,CACL,KAAC,GAAG,IACF,aAAa,EAAC,QAAQ,EACtB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,YAEb,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,CAC/C,KAAC,GAAG,IAEF,aAAa,EAAC,KAAK,EACnB,GAAG,EAAE,GAAG,EACR,KAAK,EAAC,MAAM,YAEX,UAAU,CAAC,KAAK,CAAC,MAAM,GAAG,OAAO,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC,IALtD,MAAM,CAMP,CACP,CAAC,GACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stack - Flexible container for stacking content
|
|
3
|
+
* Vertical or horizontal with consistent spacing
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { SpacingKey } from "../../styles/design-system.js";
|
|
7
|
+
interface StackProps {
|
|
8
|
+
direction?: "row" | "column";
|
|
9
|
+
gap?: SpacingKey | number;
|
|
10
|
+
align?: "flex-start" | "center" | "flex-end" | "stretch";
|
|
11
|
+
justify?: "flex-start" | "center" | "flex-end" | "space-between" | "space-around";
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
width?: number | string;
|
|
14
|
+
height?: number | string;
|
|
15
|
+
p?: SpacingKey | number;
|
|
16
|
+
px?: SpacingKey | number;
|
|
17
|
+
py?: SpacingKey | number;
|
|
18
|
+
pt?: SpacingKey | number;
|
|
19
|
+
pb?: SpacingKey | number;
|
|
20
|
+
pl?: SpacingKey | number;
|
|
21
|
+
pr?: SpacingKey | number;
|
|
22
|
+
m?: SpacingKey | number;
|
|
23
|
+
mx?: SpacingKey | number;
|
|
24
|
+
my?: SpacingKey | number;
|
|
25
|
+
mt?: SpacingKey | number;
|
|
26
|
+
mb?: SpacingKey | number;
|
|
27
|
+
ml?: SpacingKey | number;
|
|
28
|
+
mr?: SpacingKey | number;
|
|
29
|
+
}
|
|
30
|
+
export declare const Stack: React.FC<StackProps>;
|
|
31
|
+
export {};
|
|
32
|
+
//# sourceMappingURL=Stack.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stack.d.ts","sourceRoot":"","sources":["../../../../src/tui/components/layouts/Stack.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D,UAAU,UAAU;IAClB,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;IAC7B,GAAG,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IAC1B,KAAK,CAAC,EAAE,YAAY,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;IACzD,OAAO,CAAC,EAAE,YAAY,GAAG,QAAQ,GAAG,UAAU,GAAG,eAAe,GAAG,cAAc,CAAC;IAClF,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IACxB,EAAE,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IACzB,EAAE,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IACzB,EAAE,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IACzB,EAAE,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IACzB,EAAE,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IACzB,EAAE,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IACzB,CAAC,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IACxB,EAAE,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IACzB,EAAE,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IACzB,EAAE,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IACzB,EAAE,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IACzB,EAAE,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IACzB,EAAE,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;CAC1B;AAYD,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAmDtC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Box } from "../primitives/Box.js";
|
|
3
|
+
const spacingMap = {
|
|
4
|
+
none: 0,
|
|
5
|
+
xs: 1,
|
|
6
|
+
sm: 2,
|
|
7
|
+
md: 3,
|
|
8
|
+
lg: 4,
|
|
9
|
+
xl: 5,
|
|
10
|
+
xxl: 6,
|
|
11
|
+
};
|
|
12
|
+
export const Stack = ({ direction = "column", gap = "md", align = "flex-start", justify = "flex-start", children, width, height, p, px, py, pt, pb, pl, pr, m, mx, my, mt, mb, ml, mr, }) => {
|
|
13
|
+
const gapValue = typeof gap === "number" ? gap : spacingMap[gap];
|
|
14
|
+
return (_jsx(Box, { flexDirection: direction, gap: gapValue, alignItems: align, justifyContent: justify, width: width, height: height, p: p, px: px, py: py, pt: pt, pb: pb, pl: pl, pr: pr, m: m, mx: mx, my: my, mt: mt, mb: mb, ml: ml, mr: mr, children: children }));
|
|
15
|
+
};
|
|
16
|
+
Stack.displayName = "Stack";
|
|
17
|
+
//# sourceMappingURL=Stack.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stack.js","sourceRoot":"","sources":["../../../../src/tui/components/layouts/Stack.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AA2B3C,MAAM,UAAU,GAA+B;IAC7C,IAAI,EAAE,CAAC;IACP,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;IACL,GAAG,EAAE,CAAC;CACP,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAyB,CAAC,EAC1C,SAAS,GAAG,QAAQ,EACpB,GAAG,GAAG,IAAI,EACV,KAAK,GAAG,YAAY,EACpB,OAAO,GAAG,YAAY,EACtB,QAAQ,EACR,KAAK,EACL,MAAM,EACN,CAAC,EACD,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,CAAC,EACD,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,GACH,EAAE,EAAE;IACH,MAAM,QAAQ,GAAG,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IAEjE,OAAO,CACL,KAAC,GAAG,IACF,aAAa,EAAE,SAAS,EACxB,GAAG,EAAE,QAAQ,EACb,UAAU,EAAE,KAAK,EACjB,cAAc,EAAE,OAAO,EACvB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,CAAC,EAAE,CAAC,EACJ,EAAE,EAAE,EAAE,EACN,EAAE,EAAE,EAAE,EACN,EAAE,EAAE,EAAE,EACN,EAAE,EAAE,EAAE,EACN,EAAE,EAAE,EAAE,EACN,EAAE,EAAE,EAAE,EACN,CAAC,EAAE,CAAC,EACJ,EAAE,EAAE,EAAE,EACN,EAAE,EAAE,EAAE,EACN,EAAE,EAAE,EAAE,EACN,EAAE,EAAE,EAAE,EACN,EAAE,EAAE,EAAE,EACN,EAAE,EAAE,EAAE,YAEL,QAAQ,GACL,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,KAAK,CAAC,WAAW,GAAG,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tui/components/layouts/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tui/components/layouts/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Box - Primitive component for layout and spacing
|
|
3
|
+
* Wrapper around Ink's Box with design system integration
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { BoxProps } from "ink";
|
|
7
|
+
import { SpacingKey } from "../../styles/design-system.js";
|
|
8
|
+
interface PrimitiveBoxProps extends Omit<BoxProps, "padding" | "margin" | "gap"> {
|
|
9
|
+
p?: SpacingKey | number;
|
|
10
|
+
px?: SpacingKey | number;
|
|
11
|
+
py?: SpacingKey | number;
|
|
12
|
+
pt?: SpacingKey | number;
|
|
13
|
+
pb?: SpacingKey | number;
|
|
14
|
+
pl?: SpacingKey | number;
|
|
15
|
+
pr?: SpacingKey | number;
|
|
16
|
+
m?: SpacingKey | number;
|
|
17
|
+
mx?: SpacingKey | number;
|
|
18
|
+
my?: SpacingKey | number;
|
|
19
|
+
mt?: SpacingKey | number;
|
|
20
|
+
mb?: SpacingKey | number;
|
|
21
|
+
ml?: SpacingKey | number;
|
|
22
|
+
mr?: SpacingKey | number;
|
|
23
|
+
gap?: SpacingKey | number;
|
|
24
|
+
children?: React.ReactNode;
|
|
25
|
+
}
|
|
26
|
+
export declare const Box: React.FC<PrimitiveBoxProps>;
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=Box.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["../../../../src/tui/components/primitives/Box.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAiB,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC9C,OAAO,EAAgB,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAEzE,UAAU,iBAAkB,SAAQ,IAAI,CAAC,QAAQ,EAAE,SAAS,GAAG,QAAQ,GAAG,KAAK,CAAC;IAC9E,CAAC,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IACxB,EAAE,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IACzB,EAAE,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IACzB,EAAE,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IACzB,EAAE,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IACzB,EAAE,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IACzB,EAAE,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IACzB,CAAC,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IACxB,EAAE,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IACzB,EAAE,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IACzB,EAAE,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IACzB,EAAE,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IACzB,EAAE,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IACzB,EAAE,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IACzB,GAAG,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAoBD,eAAO,MAAM,GAAG,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA2C3C,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Box as InkBox } from "ink";
|
|
3
|
+
/**
|
|
4
|
+
* Convert design token key to number value
|
|
5
|
+
*/
|
|
6
|
+
function getValue(val) {
|
|
7
|
+
if (val === undefined)
|
|
8
|
+
return undefined;
|
|
9
|
+
if (typeof val === "number")
|
|
10
|
+
return val;
|
|
11
|
+
const spacingMap = {
|
|
12
|
+
none: 0,
|
|
13
|
+
xs: 1,
|
|
14
|
+
sm: 2,
|
|
15
|
+
md: 3,
|
|
16
|
+
lg: 4,
|
|
17
|
+
xl: 5,
|
|
18
|
+
xxl: 6,
|
|
19
|
+
};
|
|
20
|
+
return spacingMap[val];
|
|
21
|
+
}
|
|
22
|
+
export const Box = ({ p, px, py, pt, pb, pl, pr, m, mx, my, mt, mb, ml, mr, gap, children, ...props }) => {
|
|
23
|
+
// Calculate padding
|
|
24
|
+
let paddingValue;
|
|
25
|
+
if (p !== undefined)
|
|
26
|
+
paddingValue = getValue(p);
|
|
27
|
+
const paddingX = px !== undefined ? getValue(px) : getValue(pl) ?? getValue(pr) ?? paddingValue;
|
|
28
|
+
const paddingY = py !== undefined ? getValue(py) : getValue(pt) ?? getValue(pb) ?? paddingValue;
|
|
29
|
+
// Calculate margin
|
|
30
|
+
let marginValue;
|
|
31
|
+
if (m !== undefined)
|
|
32
|
+
marginValue = getValue(m);
|
|
33
|
+
const marginX = mx !== undefined ? getValue(mx) : getValue(ml) ?? getValue(mr) ?? marginValue;
|
|
34
|
+
const marginY = my !== undefined ? getValue(my) : getValue(mt) ?? getValue(mb) ?? marginValue;
|
|
35
|
+
return (_jsx(InkBox, { paddingX: paddingX, paddingY: paddingY, marginX: marginX, marginY: marginY, gap: getValue(gap), ...props, children: children }));
|
|
36
|
+
};
|
|
37
|
+
Box.displayName = "Box";
|
|
38
|
+
//# sourceMappingURL=Box.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Box.js","sourceRoot":"","sources":["../../../../src/tui/components/primitives/Box.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,GAAG,IAAI,MAAM,EAAY,MAAM,KAAK,CAAC;AAsB9C;;GAEG;AACH,SAAS,QAAQ,CAAC,GAAoC;IACpD,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IACxC,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,GAAG,CAAC;IACxC,MAAM,UAAU,GAA+B;QAC7C,IAAI,EAAE,CAAC;QACP,EAAE,EAAE,CAAC;QACL,EAAE,EAAE,CAAC;QACL,EAAE,EAAE,CAAC;QACL,EAAE,EAAE,CAAC;QACL,EAAE,EAAE,CAAC;QACL,GAAG,EAAE,CAAC;KACP,CAAC;IACF,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC;AACzB,CAAC;AAED,MAAM,CAAC,MAAM,GAAG,GAAgC,CAAC,EAC/C,CAAC,EACD,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,CAAC,EACD,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,GAAG,EACH,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,EAAE;IACH,oBAAoB;IACpB,IAAI,YAAgC,CAAC;IACrC,IAAI,CAAC,KAAK,SAAS;QAAE,YAAY,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAChD,MAAM,QAAQ,GAAG,EAAE,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,QAAQ,CAAC,EAAE,CAAC,IAAI,YAAY,CAAC;IAChG,MAAM,QAAQ,GAAG,EAAE,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,QAAQ,CAAC,EAAE,CAAC,IAAI,YAAY,CAAC;IAEhG,mBAAmB;IACnB,IAAI,WAA+B,CAAC;IACpC,IAAI,CAAC,KAAK,SAAS;QAAE,WAAW,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC/C,MAAM,OAAO,GAAG,EAAE,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,QAAQ,CAAC,EAAE,CAAC,IAAI,WAAW,CAAC;IAC9F,MAAM,OAAO,GAAG,EAAE,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,QAAQ,CAAC,EAAE,CAAC,IAAI,WAAW,CAAC;IAE9F,OAAO,CACL,KAAC,MAAM,IACL,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,QAAQ,CAAC,GAAG,CAAC,KACd,KAAK,YAER,QAAQ,GACF,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,GAAG,CAAC,WAAW,GAAG,KAAK,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Panel - Composed component for consistent bordered containers
|
|
3
|
+
* Uses design system for styling
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
import type { BorderStyle } from "../../styles/design-system.js";
|
|
7
|
+
interface PanelProps {
|
|
8
|
+
title?: string;
|
|
9
|
+
borderStyle?: BorderStyle;
|
|
10
|
+
padding?: number;
|
|
11
|
+
width?: number | string;
|
|
12
|
+
height?: number | string;
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
export declare const Panel: React.FC<PanelProps>;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=Panel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Panel.d.ts","sourceRoot":"","sources":["../../../../src/tui/components/primitives/Panel.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAEjE,UAAU,UAAU;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CA4BtC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box } from "./Box.js";
|
|
3
|
+
import { Text } from "./Text.js";
|
|
4
|
+
import { getCurrentTheme } from "../../styles/colors.js";
|
|
5
|
+
import { borders } from "../../styles/design-system.js";
|
|
6
|
+
export const Panel = ({ title, borderStyle = "thin", padding = 1, width, height, children, }) => {
|
|
7
|
+
const theme = getCurrentTheme();
|
|
8
|
+
const border = borders[borderStyle];
|
|
9
|
+
return (_jsxs(Box, { flexDirection: "column", width: width, height: height, borderColor: theme.colors.border, children: [title && (_jsx(Box, { p: padding, borderBottomColor: theme.colors.border, children: _jsx(Text, { bold: true, color: "primary", children: title }) })), _jsx(Box, { flexDirection: "column", flexGrow: 1, p: padding, overflow: "hidden", children: children })] }));
|
|
10
|
+
};
|
|
11
|
+
Panel.displayName = "Panel";
|
|
12
|
+
//# sourceMappingURL=Panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Panel.js","sourceRoot":"","sources":["../../../../src/tui/components/primitives/Panel.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAYxD,MAAM,CAAC,MAAM,KAAK,GAAyB,CAAC,EAC1C,KAAK,EACL,WAAW,GAAG,MAAM,EACpB,OAAO,GAAG,CAAC,EACX,KAAK,EACL,MAAM,EACN,QAAQ,GACT,EAAE,EAAE;IACH,MAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IAChC,MAAM,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAEpC,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,aAEvF,KAAK,IAAI,CACR,KAAC,GAAG,IAAC,CAAC,EAAE,OAAO,EAAE,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,YACrD,KAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAC,SAAS,YACvB,KAAK,GACD,GACH,CACP,EAGD,KAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,QAAQ,EAAE,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAC,QAAQ,YACnE,QAAQ,GACL,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,KAAK,CAAC,WAAW,GAAG,OAAO,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Text - Primitive component for typography
|
|
3
|
+
* Wrapper around Ink's Text with design system integration
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { TextProps } from "ink";
|
|
7
|
+
type TextVariant = "xs" | "sm" | "base" | "lg" | "xl" | "xxl";
|
|
8
|
+
type TextColor = "primary" | "secondary" | "tertiary" | "quaternary" | "success" | "error" | "warning" | "info";
|
|
9
|
+
interface PrimitiveTextProps extends Omit<TextProps, "color"> {
|
|
10
|
+
variant?: TextVariant;
|
|
11
|
+
color?: TextColor;
|
|
12
|
+
dim?: boolean;
|
|
13
|
+
bold?: boolean;
|
|
14
|
+
children?: React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
export declare const Text: React.FC<PrimitiveTextProps>;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=Text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../../src/tui/components/primitives/Text.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAmB,SAAS,EAAE,MAAM,KAAK,CAAC;AAIjD,KAAK,WAAW,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;AAC9D,KAAK,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,YAAY,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAEhH,UAAU,kBAAmB,SAAQ,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC;IAC3D,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAkC7C,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Text as InkText } from "ink";
|
|
3
|
+
import { getCurrentTheme } from "../../styles/colors.js";
|
|
4
|
+
export const Text = ({ variant = "base", color, bold, dim, children, ...props }) => {
|
|
5
|
+
const theme = getCurrentTheme();
|
|
6
|
+
// Map color variant to theme color
|
|
7
|
+
const colorMap = {
|
|
8
|
+
primary: theme.colors.textPrimary,
|
|
9
|
+
secondary: theme.colors.textSecondary,
|
|
10
|
+
tertiary: theme.colors.textTertiary,
|
|
11
|
+
quaternary: theme.colors.textQuaternary,
|
|
12
|
+
success: theme.colors.success,
|
|
13
|
+
error: theme.colors.error,
|
|
14
|
+
warning: theme.colors.warning,
|
|
15
|
+
info: theme.colors.info,
|
|
16
|
+
};
|
|
17
|
+
const textColor = color ? colorMap[color] : theme.colors.textPrimary;
|
|
18
|
+
return (_jsx(InkText, { color: textColor, bold: bold, dimColor: dim, ...props, children: children }));
|
|
19
|
+
};
|
|
20
|
+
Text.displayName = "Text";
|
|
21
|
+
//# sourceMappingURL=Text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Text.js","sourceRoot":"","sources":["../../../../src/tui/components/primitives/Text.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,IAAI,IAAI,OAAO,EAAa,MAAM,KAAK,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAczD,MAAM,CAAC,MAAM,IAAI,GAAiC,CAAC,EACjD,OAAO,GAAG,MAAM,EAChB,KAAK,EACL,IAAI,EACJ,GAAG,EACH,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IAEhC,mCAAmC;IACnC,MAAM,QAAQ,GAA8B;QAC1C,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,WAAW;QACjC,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,aAAa;QACrC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,YAAY;QACnC,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,cAAc;QACvC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO;QAC7B,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK;QACzB,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO;QAC7B,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI;KACxB,CAAC;IAEF,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC;IAErE,OAAO,CACL,KAAC,OAAO,IACN,KAAK,EAAE,SAAS,EAChB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,GAAG,KACT,KAAK,YAER,QAAQ,GACD,CACX,CAAC;AACJ,CAAC,CAAC;AAEF,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tui/components/primitives/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tui/components/primitives/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC"}
|