@rotorsoft/contui 1.0.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.
Files changed (94) hide show
  1. package/README.md +192 -0
  2. package/dist/components/App.d.ts +3 -0
  3. package/dist/components/App.d.ts.map +1 -0
  4. package/dist/components/App.js +365 -0
  5. package/dist/components/App.js.map +1 -0
  6. package/dist/components/ConfirmDialog.d.ts +9 -0
  7. package/dist/components/ConfirmDialog.d.ts.map +1 -0
  8. package/dist/components/ConfirmDialog.js +14 -0
  9. package/dist/components/ConfirmDialog.js.map +1 -0
  10. package/dist/components/ContainersView.d.ts +10 -0
  11. package/dist/components/ContainersView.d.ts.map +1 -0
  12. package/dist/components/ContainersView.js +46 -0
  13. package/dist/components/ContainersView.js.map +1 -0
  14. package/dist/components/CreateDialog.d.ts +9 -0
  15. package/dist/components/CreateDialog.d.ts.map +1 -0
  16. package/dist/components/CreateDialog.js +19 -0
  17. package/dist/components/CreateDialog.js.map +1 -0
  18. package/dist/components/DetailView.d.ts +9 -0
  19. package/dist/components/DetailView.d.ts.map +1 -0
  20. package/dist/components/DetailView.js +38 -0
  21. package/dist/components/DetailView.js.map +1 -0
  22. package/dist/components/HelpOverlay.d.ts +7 -0
  23. package/dist/components/HelpOverlay.d.ts.map +1 -0
  24. package/dist/components/HelpOverlay.js +54 -0
  25. package/dist/components/HelpOverlay.js.map +1 -0
  26. package/dist/components/ImagesView.d.ts +10 -0
  27. package/dist/components/ImagesView.d.ts.map +1 -0
  28. package/dist/components/ImagesView.js +17 -0
  29. package/dist/components/ImagesView.js.map +1 -0
  30. package/dist/components/LogsView.d.ts +9 -0
  31. package/dist/components/LogsView.d.ts.map +1 -0
  32. package/dist/components/LogsView.js +7 -0
  33. package/dist/components/LogsView.js.map +1 -0
  34. package/dist/components/NetworksView.d.ts +10 -0
  35. package/dist/components/NetworksView.d.ts.map +1 -0
  36. package/dist/components/NetworksView.js +16 -0
  37. package/dist/components/NetworksView.js.map +1 -0
  38. package/dist/components/PullDialog.d.ts +8 -0
  39. package/dist/components/PullDialog.d.ts.map +1 -0
  40. package/dist/components/PullDialog.js +19 -0
  41. package/dist/components/PullDialog.js.map +1 -0
  42. package/dist/components/SearchInput.d.ts +9 -0
  43. package/dist/components/SearchInput.d.ts.map +1 -0
  44. package/dist/components/SearchInput.js +7 -0
  45. package/dist/components/SearchInput.js.map +1 -0
  46. package/dist/components/StatusBar.d.ts +13 -0
  47. package/dist/components/StatusBar.d.ts.map +1 -0
  48. package/dist/components/StatusBar.js +31 -0
  49. package/dist/components/StatusBar.js.map +1 -0
  50. package/dist/components/TabBar.d.ts +8 -0
  51. package/dist/components/TabBar.d.ts.map +1 -0
  52. package/dist/components/TabBar.js +13 -0
  53. package/dist/components/TabBar.js.map +1 -0
  54. package/dist/components/Table.d.ts +16 -0
  55. package/dist/components/Table.d.ts.map +1 -0
  56. package/dist/components/Table.js +19 -0
  57. package/dist/components/Table.js.map +1 -0
  58. package/dist/components/VolumesView.d.ts +10 -0
  59. package/dist/components/VolumesView.d.ts.map +1 -0
  60. package/dist/components/VolumesView.js +16 -0
  61. package/dist/components/VolumesView.js.map +1 -0
  62. package/dist/hooks/useContainerData.d.ts +13 -0
  63. package/dist/hooks/useContainerData.d.ts.map +1 -0
  64. package/dist/hooks/useContainerData.js +46 -0
  65. package/dist/hooks/useContainerData.js.map +1 -0
  66. package/dist/hooks/useKeyboard.d.ts +18 -0
  67. package/dist/hooks/useKeyboard.d.ts.map +1 -0
  68. package/dist/hooks/useKeyboard.js +122 -0
  69. package/dist/hooks/useKeyboard.js.map +1 -0
  70. package/dist/hooks/useReleaseCheck.d.ts +15 -0
  71. package/dist/hooks/useReleaseCheck.d.ts.map +1 -0
  72. package/dist/hooks/useReleaseCheck.js +60 -0
  73. package/dist/hooks/useReleaseCheck.js.map +1 -0
  74. package/dist/index.d.ts +3 -0
  75. package/dist/index.d.ts.map +1 -0
  76. package/dist/index.js +18 -0
  77. package/dist/index.js.map +1 -0
  78. package/dist/services/container-cli.d.ts +33 -0
  79. package/dist/services/container-cli.d.ts.map +1 -0
  80. package/dist/services/container-cli.js +241 -0
  81. package/dist/services/container-cli.js.map +1 -0
  82. package/dist/services/health-check.d.ts +8 -0
  83. package/dist/services/health-check.d.ts.map +1 -0
  84. package/dist/services/health-check.js +59 -0
  85. package/dist/services/health-check.js.map +1 -0
  86. package/dist/types/index.d.ts +79 -0
  87. package/dist/types/index.d.ts.map +1 -0
  88. package/dist/types/index.js +2 -0
  89. package/dist/types/index.js.map +1 -0
  90. package/dist/utils/app-version.d.ts +2 -0
  91. package/dist/utils/app-version.d.ts.map +1 -0
  92. package/dist/utils/app-version.js +18 -0
  93. package/dist/utils/app-version.js.map +1 -0
  94. package/package.json +70 -0
@@ -0,0 +1,46 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box, Text } from "ink";
3
+ import { Table } from "./Table.js";
4
+ const STATUS_COLORS = {
5
+ running: "green",
6
+ stopped: "red",
7
+ paused: "yellow",
8
+ restarting: "cyan",
9
+ created: "blue",
10
+ dead: "gray",
11
+ };
12
+ function formatPorts(container) {
13
+ if (container.ports.length === 0)
14
+ return "-";
15
+ return container.ports
16
+ .map((p) => `${p.hostPort}:${p.containerPort}`)
17
+ .join(", ");
18
+ }
19
+ function StatusBadge({ status }) {
20
+ return _jsx(Text, { color: STATUS_COLORS[status], children: status });
21
+ }
22
+ export function ContainersView({ containers, selectedIndex, searchQuery, }) {
23
+ const filteredContainers = containers.filter((c) => !searchQuery ||
24
+ c.name.toLowerCase().includes(searchQuery.toLowerCase()) ||
25
+ c.image.toLowerCase().includes(searchQuery.toLowerCase()) ||
26
+ c.status.toLowerCase().includes(searchQuery.toLowerCase()));
27
+ const columns = [
28
+ { key: "name", header: "NAME", width: 25 },
29
+ { key: "image", header: "IMAGE", width: 30 },
30
+ {
31
+ key: "status",
32
+ header: "STATUS",
33
+ width: 12,
34
+ render: (c) => _jsx(StatusBadge, { status: c.status }),
35
+ },
36
+ {
37
+ key: "ports",
38
+ header: "PORTS",
39
+ width: 20,
40
+ render: (c) => formatPorts(c),
41
+ },
42
+ { key: "created", header: "CREATED", width: 20 },
43
+ ];
44
+ return (_jsxs(Box, { flexDirection: "column", flexGrow: 1, children: [searchQuery && (_jsx(Box, { paddingX: 1, children: _jsxs(Text, { dimColor: true, children: ["Filtered by: \"", searchQuery, "\""] }) })), _jsx(Table, { columns: columns, data: filteredContainers, selectedIndex: selectedIndex, emptyMessage: "No containers found" })] }));
45
+ }
46
+ //# sourceMappingURL=ContainersView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContainersView.js","sourceRoot":"","sources":["../../src/components/ContainersView.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AASnC,MAAM,aAAa,GAAoC;IACrD,OAAO,EAAE,OAAO;IAChB,OAAO,EAAE,KAAK;IACd,MAAM,EAAE,QAAQ;IAChB,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,MAAM;IACf,IAAI,EAAE,MAAM;CACb,CAAC;AAEF,SAAS,WAAW,CAAC,SAAoB;IACvC,IAAI,SAAS,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,GAAG,CAAC;IAC7C,OAAO,SAAS,CAAC,KAAK;SACnB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;SAC9C,IAAI,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC;AAED,SAAS,WAAW,CAAC,EAAE,MAAM,EAA+B;IAC1D,OAAO,KAAC,IAAI,IAAC,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC,YAAG,MAAM,GAAQ,CAAC;AAC7D,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,EAC7B,UAAU,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CACP,EACD,KAAC,KAAK,IACJ,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,kBAAkB,EACxB,aAAa,EAAE,aAAa,EAC5B,YAAY,EAAC,qBAAqB,GAClC,IACE,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ interface CreateDialogProps {
3
+ type: "network" | "volume";
4
+ onConfirm: (name: string) => void;
5
+ onCancel: () => void;
6
+ }
7
+ export declare function CreateDialog({ type, onConfirm, onCancel, }: CreateDialogProps): React.ReactElement;
8
+ export {};
9
+ //# sourceMappingURL=CreateDialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CreateDialog.d.ts","sourceRoot":"","sources":["../../src/components/CreateDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAIxC,UAAU,iBAAiB;IACzB,IAAI,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC3B,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,SAAS,EACT,QAAQ,GACT,EAAE,iBAAiB,GAAG,KAAK,CAAC,YAAY,CAuCxC"}
@@ -0,0 +1,19 @@
1
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
+ import { useState } from "react";
3
+ import { Box, Text, useInput } from "ink";
4
+ import TextInput from "ink-text-input";
5
+ export function CreateDialog({ type, onConfirm, onCancel, }) {
6
+ const [name, setName] = useState("");
7
+ useInput((_input, key) => {
8
+ if (key.escape) {
9
+ onCancel();
10
+ }
11
+ });
12
+ const handleSubmit = () => {
13
+ if (name.trim()) {
14
+ onConfirm(name.trim());
15
+ }
16
+ };
17
+ return (_jsxs(Box, { flexDirection: "column", borderStyle: "double", borderColor: "yellow", paddingX: 2, paddingY: 1, children: [_jsx(Box, { justifyContent: "center", marginBottom: 1, children: _jsxs(Text, { bold: true, color: "yellow", children: ["Create New ", type === "network" ? "Network" : "Volume"] }) }), _jsxs(Box, { children: [_jsx(Text, { children: "Name: " }), _jsx(TextInput, { value: name, onChange: setName, onSubmit: handleSubmit })] }), _jsx(Box, { justifyContent: "center", marginTop: 1, children: _jsx(Text, { dimColor: true, children: "Enter to confirm, Esc to cancel" }) })] }));
18
+ }
19
+ //# sourceMappingURL=CreateDialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CreateDialog.js","sourceRoot":"","sources":["../../src/components/CreateDialog.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC1C,OAAO,SAAS,MAAM,gBAAgB,CAAC;AAQvC,MAAM,UAAU,YAAY,CAAC,EAC3B,IAAI,EACJ,SAAS,EACT,QAAQ,GACU;IAClB,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAErC,QAAQ,CAAC,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE;QACvB,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC;YACf,QAAQ,EAAE,CAAC;QACb,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,MAAM,YAAY,GAAG,GAAG,EAAE;QACxB,IAAI,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC;YAChB,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;QACzB,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,CACL,MAAC,GAAG,IACF,aAAa,EAAC,QAAQ,EACtB,WAAW,EAAC,QAAQ,EACpB,WAAW,EAAC,QAAQ,EACpB,QAAQ,EAAE,CAAC,EACX,QAAQ,EAAE,CAAC,aAEX,KAAC,GAAG,IAAC,cAAc,EAAC,QAAQ,EAAC,YAAY,EAAE,CAAC,YAC1C,MAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAC,QAAQ,4BACX,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,IAChD,GACH,EAEN,MAAC,GAAG,eACF,KAAC,IAAI,yBAAc,EACnB,KAAC,SAAS,IAAC,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,GAAI,IACjE,EAEN,KAAC,GAAG,IAAC,cAAc,EAAC,QAAQ,EAAC,SAAS,EAAE,CAAC,YACvC,KAAC,IAAI,IAAC,QAAQ,sDAAuC,GACjD,IACF,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ interface DetailViewProps {
3
+ title: string;
4
+ data: Record<string, unknown>;
5
+ onClose: () => void;
6
+ }
7
+ export declare function DetailView({ title, data }: DetailViewProps): React.ReactElement;
8
+ export {};
9
+ //# sourceMappingURL=DetailView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DetailView.d.ts","sourceRoot":"","sources":["../../src/components/DetailView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,eAAe;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,eAAe,GAAG,KAAK,CAAC,YAAY,CA6F/E"}
@@ -0,0 +1,38 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box, Text } from "ink";
3
+ export function DetailView({ title, data }) {
4
+ const renderValue = (value, indent = 0) => {
5
+ const padding = " ".repeat(indent);
6
+ if (value === null || value === undefined) {
7
+ return _jsx(Text, { dimColor: true, children: "null" });
8
+ }
9
+ if (typeof value === "boolean") {
10
+ return _jsx(Text, { color: value ? "green" : "red", children: String(value) });
11
+ }
12
+ if (typeof value === "number") {
13
+ return _jsx(Text, { color: "yellow", children: value });
14
+ }
15
+ if (typeof value === "string") {
16
+ if (value.length > 50) {
17
+ return _jsxs(Text, { color: "green", children: ["\"", value.substring(0, 50), "...\""] });
18
+ }
19
+ return _jsxs(Text, { color: "green", children: ["\"", value, "\""] });
20
+ }
21
+ if (Array.isArray(value)) {
22
+ if (value.length === 0) {
23
+ return _jsx(Text, { dimColor: true, children: "[]" });
24
+ }
25
+ return (_jsx(Box, { flexDirection: "column", children: value.map((item, index) => (_jsxs(Box, { children: [_jsxs(Text, { children: [padding, " - "] }), renderValue(item, indent + 1)] }, index))) }));
26
+ }
27
+ if (typeof value === "object") {
28
+ const entries = Object.entries(value);
29
+ if (entries.length === 0) {
30
+ return _jsx(Text, { dimColor: true, children: "{}" });
31
+ }
32
+ return (_jsx(Box, { flexDirection: "column", children: entries.map(([key, val]) => (_jsxs(Box, { children: [_jsxs(Text, { children: [padding, " "] }), _jsx(Text, { color: "cyan", children: key }), _jsx(Text, { children: ": " }), renderValue(val, indent + 1)] }, key))) }));
33
+ }
34
+ return _jsx(Text, { children: String(value) });
35
+ };
36
+ return (_jsxs(Box, { flexDirection: "column", borderStyle: "double", borderColor: "cyan", paddingX: 2, paddingY: 1, flexGrow: 1, children: [_jsx(Box, { justifyContent: "center", marginBottom: 1, children: _jsx(Text, { bold: true, color: "cyan", children: title }) }), _jsx(Box, { flexDirection: "column", flexGrow: 1, overflowY: "hidden", children: Object.entries(data).map(([key, value]) => (_jsxs(Box, { marginBottom: 0, children: [_jsxs(Text, { bold: true, color: "yellow", children: [key, ":"] }), _jsx(Text, { children: " " }), renderValue(value)] }, key))) }), _jsx(Box, { justifyContent: "center", marginTop: 1, children: _jsx(Text, { dimColor: true, children: "Press Esc or q to close" }) })] }));
37
+ }
38
+ //# sourceMappingURL=DetailView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,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E,CAAC,aAEX,KAAC,GAAG,IAAC,cAAc,EAAC,QAAQ,EAAC,YAAY,EAAE,CAAC,YAC1C,KAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAC,MAAM,YACpB,KAAK,GACD,GACH,EAEN,KAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,QAAQ,EAAE,CAAC,EAAE,SAAS,EAAC,QAAQ,YACxD,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAC1C,MAAC,GAAG,IAAW,YAAY,EAAE,CAAC,aAC5B,MAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAC,QAAQ,aACtB,GAAG,SACC,EACP,KAAC,IAAI,oBAAS,EACb,WAAW,CAAC,KAAK,CAAC,KALX,GAAG,CAMP,CACP,CAAC,GACE,EAEN,KAAC,GAAG,IAAC,cAAc,EAAC,QAAQ,EAAC,SAAS,EAAE,CAAC,YACvC,KAAC,IAAI,IAAC,QAAQ,8CAA+B,GACzC,IACF,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ interface HelpOverlayProps {
3
+ onClose: () => void;
4
+ }
5
+ export declare function HelpOverlay({ onClose: _ }: HelpOverlayProps): React.ReactElement;
6
+ export {};
7
+ //# sourceMappingURL=HelpOverlay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HelpOverlay.d.ts","sourceRoot":"","sources":["../../src/components/HelpOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,gBAAgB;IACxB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAmDD,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,gBAAgB,GAAG,KAAK,CAAC,YAAY,CAoChF"}
@@ -0,0 +1,54 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box, Text } from "ink";
3
+ const HELP_SECTIONS = [
4
+ {
5
+ title: "Navigation",
6
+ items: [
7
+ { key: "h / l", desc: "Previous / Next tab" },
8
+ { key: "j / k", desc: "Move down / up" },
9
+ { key: "Enter", desc: "Select / Expand" },
10
+ { key: "Esc", desc: "Go back / Close" },
11
+ { key: "1-4", desc: "Switch to tab directly" },
12
+ ],
13
+ },
14
+ {
15
+ title: "Container Actions",
16
+ items: [
17
+ { key: "s", desc: "Start container" },
18
+ { key: "x", desc: "Stop container" },
19
+ { key: "R", desc: "Restart container" },
20
+ { key: "d", desc: "Delete (remove)" },
21
+ { key: "L", desc: "View logs" },
22
+ { key: "i", desc: "Inspect details" },
23
+ ],
24
+ },
25
+ {
26
+ title: "Image Actions",
27
+ items: [
28
+ { key: "p", desc: "Pull image" },
29
+ { key: "d", desc: "Delete image" },
30
+ { key: "i", desc: "Inspect image" },
31
+ ],
32
+ },
33
+ {
34
+ title: "Network / Volume Actions",
35
+ items: [
36
+ { key: "c", desc: "Create new" },
37
+ { key: "d", desc: "Delete" },
38
+ { key: "i", desc: "Inspect" },
39
+ ],
40
+ },
41
+ {
42
+ title: "General",
43
+ items: [
44
+ { key: "/", desc: "Search / Filter" },
45
+ { key: "r", desc: "Refresh data" },
46
+ { key: "?", desc: "Toggle help" },
47
+ { key: "q", desc: "Quit application" },
48
+ ],
49
+ },
50
+ ];
51
+ export function HelpOverlay({ onClose: _ }) {
52
+ return (_jsxs(Box, { flexDirection: "column", borderStyle: "double", borderColor: "cyan", paddingX: 2, paddingY: 1, children: [_jsx(Box, { justifyContent: "center", marginBottom: 1, children: _jsx(Text, { bold: true, color: "cyan", children: "Keyboard Shortcuts" }) }), HELP_SECTIONS.map((section) => (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsx(Text, { bold: true, underline: true, children: section.title }), section.items.map((item) => (_jsxs(Box, { children: [_jsx(Box, { width: 15, children: _jsx(Text, { color: "yellow", children: item.key }) }), _jsx(Text, { children: item.desc })] }, item.key)))] }, section.title))), _jsx(Box, { justifyContent: "center", marginTop: 1, children: _jsx(Text, { dimColor: true, children: "Press ? or Esc to close" }) })] }));
53
+ }
54
+ //# sourceMappingURL=HelpOverlay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HelpOverlay.js","sourceRoot":"","sources":["../../src/components/HelpOverlay.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAMhC,MAAM,aAAa,GAAG;IACpB;QACE,KAAK,EAAE,YAAY;QACnB,KAAK,EAAE;YACL,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,qBAAqB,EAAE;YAC7C,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE;YACxC,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE;YACzC,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,iBAAiB,EAAE;YACvC,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,wBAAwB,EAAE;SAC/C;KACF;IACD;QACE,KAAK,EAAE,mBAAmB;QAC1B,KAAK,EAAE;YACL,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,iBAAiB,EAAE;YACrC,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,gBAAgB,EAAE;YACpC,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,mBAAmB,EAAE;YACvC,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,iBAAiB,EAAE;YACrC,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE;YAC/B,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,iBAAiB,EAAE;SACtC;KACF;IACD;QACE,KAAK,EAAE,eAAe;QACtB,KAAK,EAAE;YACL,EAAE,GAAG,EAAE,GAAG,EAAE,IA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ACjB,OAAO,CAAC,KAAK,GACT,EACN,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAC3B,MAAC,GAAG,eACF,KAAC,GAAG,IAAC,KAAK,EAAE,EAAE,YACZ,KAAC,IAAI,IAAC,KAAK,EAAC,QAAQ,YAAE,IAAI,CAAC,GAAG,GAAQ,GAClC,EACN,KAAC,IAAI,cAAE,IAAI,CAAC,IAAI,GAAQ,KAJhB,IAAI,CAAC,GAAG,CAKZ,CACP,CAAC,KAXM,OAAO,CAAC,KAAK,CAYjB,CACP,CAAC,EAEF,KAAC,GAAG,IAAC,cAAc,EAAC,QAAQ,EAAC,SAAS,EAAE,CAAC,YACvC,KAAC,IAAI,IAAC,QAAQ,8CAA+B,GACzC,IACF,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import type { Image } from "../types/index.js";
3
+ interface ImagesViewProps {
4
+ images: Image[];
5
+ selectedIndex: number;
6
+ searchQuery: string;
7
+ }
8
+ export declare function ImagesView({ images, selectedIndex, searchQuery, }: ImagesViewProps): React.ReactElement;
9
+ export {};
10
+ //# sourceMappingURL=ImagesView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImagesView.d.ts","sourceRoot":"","sources":["../../src/components/ImagesView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE/C,UAAU,eAAe;IACvB,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,UAAU,CAAC,EACzB,MAAM,EACN,aAAa,EACb,WAAW,GACZ,EAAE,eAAe,GAAG,KAAK,CAAC,YAAY,CA+BtC"}
@@ -0,0 +1,17 @@
1
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
+ import { Box, Text } from "ink";
3
+ import { Table } from "./Table.js";
4
+ export function ImagesView({ images, selectedIndex, searchQuery, }) {
5
+ const filteredImages = images.filter((img) => !searchQuery ||
6
+ img.repository.toLowerCase().includes(searchQuery.toLowerCase()) ||
7
+ img.tag.toLowerCase().includes(searchQuery.toLowerCase()));
8
+ const columns = [
9
+ { key: "repository", header: "REPOSITORY", width: 35 },
10
+ { key: "tag", header: "TAG", width: 20 },
11
+ { key: "id", header: "IMAGE ID", width: 15 },
12
+ { key: "size", header: "SIZE", width: 12 },
13
+ { key: "created", header: "CREATED", width: 20 },
14
+ ];
15
+ return (_jsxs(Box, { flexDirection: "column", flexGrow: 1, children: [searchQuery && (_jsx(Box, { paddingX: 1, children: _jsxs(Text, { dimColor: true, children: ["Filtered by: \"", searchQuery, "\""] }) })), _jsx(Table, { columns: columns, data: filteredImages, selectedIndex: selectedIndex, emptyMessage: "No images found" })] }));
16
+ }
17
+ //# sourceMappingURL=ImagesView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImagesView.js","sourceRoot":"","sources":["../../src/components/ImagesView.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AASnC,MAAM,UAAU,UAAU,CAAC,EACzB,MAAM,EACN,aAAa,EACb,WAAW,GACK;IAChB,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAClC,CAAC,GAAG,EAAE,EAAE,CACN,CAAC,WAAW;QACZ,GAAG,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC;QAChE,GAAG,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC,CAC5D,CAAC;IAEF,MAAM,OAAO,GAAG;QACd,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,EAAE,EAAE;QACtD,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;QACxC,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE,EAAE;QAC5C,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE;QAC1C,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,EAAE;KACjD,CAAC;IAEF,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,QAAQ,EAAE,CAAC,aACpC,WAAW,IAAI,CACd,KAAC,GAAG,IAAC,QAAQ,EAAE,CAAC,YACd,MAAC,IAAI,IAAC,QAAQ,sCAAgB,WAAW,UAAS,GAC9C,CACP,EACD,KAAC,KAAK,IACJ,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,cAAc,EACpB,aAAa,EAAE,aAAa,EAC5B,YAAY,EAAC,iBAAiB,GAC9B,IACE,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ interface LogsViewProps {
3
+ containerName: string;
4
+ logs: string;
5
+ onClose: () => void;
6
+ }
7
+ export declare function LogsView({ containerName, logs }: LogsViewProps): React.ReactElement;
8
+ export {};
9
+ //# sourceMappingURL=LogsView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LogsView.d.ts","sourceRoot":"","sources":["../../src/components/LogsView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,aAAa;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,wBAAgB,QAAQ,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,EAAE,aAAa,GAAG,KAAK,CAAC,YAAY,CAgCnF"}
@@ -0,0 +1,7 @@
1
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
+ import { Box, Text } from "ink";
3
+ export function LogsView({ containerName, logs }) {
4
+ const logLines = logs.split("\n").slice(-30);
5
+ return (_jsxs(Box, { flexDirection: "column", borderStyle: "double", borderColor: "green", paddingX: 2, paddingY: 1, flexGrow: 1, children: [_jsx(Box, { justifyContent: "center", marginBottom: 1, children: _jsxs(Text, { bold: true, color: "green", children: ["Logs: ", containerName] }) }), _jsxs(Box, { flexDirection: "column", flexGrow: 1, overflowY: "hidden", children: [logLines.map((line, index) => (_jsx(Text, { wrap: "truncate", children: line }, index))), logLines.length === 0 && _jsx(Text, { dimColor: true, children: "No logs available" })] }), _jsx(Box, { justifyContent: "center", marginTop: 1, children: _jsx(Text, { dimColor: true, children: "Press Esc or q to close" }) })] }));
6
+ }
7
+ //# sourceMappingURL=LogsView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LogsView.js","sourceRoot":"","sources":["../../src/components/LogsView.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAQhC,MAAM,UAAU,QAAQ,CAAC,EAAE,aAAa,EAAE,IAAI,EAAiB;IAC7D,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;IAE7C,OAAO,CACL,MAAC,GAAG,IACF,aAAa,EAAC,QAAQ,EACtB,WAAW,EAAC,QAAQ,EACpB,WAAW,EAAC,OAAO,EACnB,QAAQ,EAAE,CAAC,EACX,QAAQ,EAAE,CAAC,EACX,QAAQ,EAAE,CAAC,aAEX,KAAC,GAAG,IAAC,cAAc,EAAC,QAAQ,EAAC,YAAY,EAAE,CAAC,YAC1C,MAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAC,OAAO,uBACf,aAAa,IACf,GACH,EAEN,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,QAAQ,EAAE,CAAC,EAAE,SAAS,EAAC,QAAQ,aACxD,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAC7B,KAAC,IAAI,IAAa,IAAI,EAAC,UAAU,YAC9B,IAAI,IADI,KAAK,CAET,CACR,CAAC,EACD,QAAQ,CAAC,MAAM,KAAK,CAAC,IAAI,KAAC,IAAI,IAAC,QAAQ,wCAAyB,IAC7D,EAEN,KAAC,GAAG,IAAC,cAAc,EAAC,QAAQ,EAAC,SAAS,EAAE,CAAC,YACvC,KAAC,IAAI,IAAC,QAAQ,8CAA+B,GACzC,IACF,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import type { Network } from "../types/index.js";
3
+ interface NetworksViewProps {
4
+ networks: Network[];
5
+ selectedIndex: number;
6
+ searchQuery: string;
7
+ }
8
+ export declare function NetworksView({ networks, selectedIndex, searchQuery, }: NetworksViewProps): React.ReactElement;
9
+ export {};
10
+ //# sourceMappingURL=NetworksView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NetworksView.d.ts","sourceRoot":"","sources":["../../src/components/NetworksView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEjD,UAAU,iBAAiB;IACzB,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,aAAa,EACb,WAAW,GACZ,EAAE,iBAAiB,GAAG,KAAK,CAAC,YAAY,CA8BxC"}
@@ -0,0 +1,16 @@
1
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
+ import { Box, Text } from "ink";
3
+ import { Table } from "./Table.js";
4
+ export function NetworksView({ networks, selectedIndex, searchQuery, }) {
5
+ const filteredNetworks = networks.filter((net) => !searchQuery ||
6
+ net.name.toLowerCase().includes(searchQuery.toLowerCase()) ||
7
+ net.driver.toLowerCase().includes(searchQuery.toLowerCase()));
8
+ const columns = [
9
+ { key: "id", header: "NETWORK ID", width: 15 },
10
+ { key: "name", header: "NAME", width: 30 },
11
+ { key: "driver", header: "DRIVER", width: 15 },
12
+ { key: "scope", header: "SCOPE", width: 15 },
13
+ ];
14
+ return (_jsxs(Box, { flexDirection: "column", flexGrow: 1, children: [searchQuery && (_jsx(Box, { paddingX: 1, children: _jsxs(Text, { dimColor: true, children: ["Filtered by: \"", searchQuery, "\""] }) })), _jsx(Table, { columns: columns, data: filteredNetworks, selectedIndex: selectedIndex, emptyMessage: "No networks found" })] }));
15
+ }
16
+ //# sourceMappingURL=NetworksView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NetworksView.js","sourceRoot":"","sources":["../../src/components/NetworksView.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AASnC,MAAM,UAAU,YAAY,CAAC,EAC3B,QAAQ,EACR,aAAa,EACb,WAAW,GACO;IAClB,MAAM,gBAAgB,GAAG,QAAQ,CAAC,MAAM,CACtC,CAAC,GAAG,EAAE,EAAE,CACN,CAAC,WAAW;QACZ,GAAG,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC;QAC1D,GAAG,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC,CAC/D,CAAC;IAEF,MAAM,OAAO,GAAG;QACd,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,EAAE,EAAE;QAC9C,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE;QAC1C,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAE;QAC9C,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE;KAC7C,CAAC;IAEF,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,QAAQ,EAAE,CAAC,aACpC,WAAW,IAAI,CACd,KAAC,GAAG,IAAC,QAAQ,EAAE,CAAC,YACd,MAAC,IAAI,IAAC,QAAQ,sCAAgB,WAAW,UAAS,GAC9C,CACP,EACD,KAAC,KAAK,IACJ,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,gBAAgB,EACtB,aAAa,EAAE,aAAa,EAC5B,YAAY,EAAC,mBAAmB,GAChC,IACE,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ interface PullDialogProps {
3
+ onConfirm: (imageName: string) => void;
4
+ onCancel: () => void;
5
+ }
6
+ export declare function PullDialog({ onConfirm, onCancel }: PullDialogProps): React.ReactElement;
7
+ export {};
8
+ //# sourceMappingURL=PullDialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PullDialog.d.ts","sourceRoot":"","sources":["../../src/components/PullDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAIxC,UAAU,eAAe;IACvB,SAAS,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,eAAe,GAAG,KAAK,CAAC,YAAY,CA2CvF"}
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from "react";
3
+ import { Box, Text, useInput } from "ink";
4
+ import TextInput from "ink-text-input";
5
+ export function PullDialog({ onConfirm, onCancel }) {
6
+ const [imageName, setImageName] = useState("");
7
+ useInput((_input, key) => {
8
+ if (key.escape) {
9
+ onCancel();
10
+ }
11
+ });
12
+ const handleSubmit = () => {
13
+ if (imageName.trim()) {
14
+ onConfirm(imageName.trim());
15
+ }
16
+ };
17
+ return (_jsxs(Box, { flexDirection: "column", borderStyle: "double", borderColor: "yellow", paddingX: 2, paddingY: 1, children: [_jsx(Box, { justifyContent: "center", marginBottom: 1, children: _jsx(Text, { bold: true, color: "yellow", children: "Pull Image" }) }), _jsxs(Box, { children: [_jsx(Text, { children: "Image name: " }), _jsx(TextInput, { value: imageName, onChange: setImageName, onSubmit: handleSubmit })] }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: "Example: nginx:latest, ubuntu:22.04, alpine" }) }), _jsx(Box, { justifyContent: "center", marginTop: 1, children: _jsx(Text, { dimColor: true, children: "Enter to confirm, Esc to cancel" }) })] }));
18
+ }
19
+ //# sourceMappingURL=PullDialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PullDialog.js","sourceRoot":"","sources":["../../src/components/PullDialog.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC1C,OAAO,SAAS,MAAM,gBAAgB,CAAC;AAOvC,MAAM,UAAU,UAAU,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAmB;IACjE,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAE/C,QAAQ,CAAC,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE;QACvB,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC;YACf,QAAQ,EAAE,CAAC;QACb,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,MAAM,YAAY,GAAG,GAAG,EAAE;QACxB,IAAI,SAAS,CAAC,IAAI,EAAE,EAAE,CAAC;YACrB,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC;QAC9B,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,CACL,MAAC,GAAG,IACF,aAAa,EAAC,QAAQ,EACtB,WAAW,EAAC,QAAQ,EACpB,WAAW,EAAC,QAAQ,EACpB,QAAQ,EAAE,CAAC,EACX,QAAQ,EAAE,CAAC,aAEX,KAAC,GAAG,IAAC,cAAc,EAAC,QAAQ,EAAC,YAAY,EAAE,CAAC,YAC1C,KAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAC,QAAQ,2BAElB,GACH,EAEN,MAAC,GAAG,eACF,KAAC,IAAI,+BAAoB,EACzB,KAAC,SAAS,IAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,YAAY,GAAI,IAC3E,EAEN,KAAC,GAAG,IAAC,SAAS,EAAE,CAAC,YACf,KAAC,IAAI,IAAC,QAAQ,kEAAmD,GAC7D,EAEN,KAAC,GAAG,IAAC,cAAc,EAAC,QAAQ,EAAC,SAAS,EAAE,CAAC,YACvC,KAAC,IAAI,IAAC,QAAQ,sDAAuC,GACjD,IACF,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ interface SearchInputProps {
3
+ value: string;
4
+ onChange: (value: string) => void;
5
+ onSubmit: () => void;
6
+ }
7
+ export declare function SearchInput({ value, onChange, onSubmit }: SearchInputProps): React.ReactElement;
8
+ export {};
9
+ //# sourceMappingURL=SearchInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchInput.d.ts","sourceRoot":"","sources":["../../src/components/SearchInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,gBAAgB;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,gBAAgB,GAAG,KAAK,CAAC,YAAY,CAQ/F"}
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box, Text } from "ink";
3
+ import TextInput from "ink-text-input";
4
+ export function SearchInput({ value, onChange, onSubmit }) {
5
+ return (_jsxs(Box, { borderStyle: "single", borderColor: "yellow", paddingX: 1, children: [_jsx(Text, { color: "yellow", children: "/" }), _jsx(TextInput, { value: value, onChange: onChange, onSubmit: onSubmit }), _jsx(Text, { dimColor: true, children: " (Enter to search, Esc to cancel)" })] }));
6
+ }
7
+ //# sourceMappingURL=SearchInput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchInput.js","sourceRoot":"","sources":["../../src/components/SearchInput.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,SAAS,MAAM,gBAAgB,CAAC;AAQvC,MAAM,UAAU,WAAW,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAoB;IACzE,OAAO,CACL,MAAC,GAAG,IAAC,WAAW,EAAC,QAAQ,EAAC,WAAW,EAAC,QAAQ,EAAC,QAAQ,EAAE,CAAC,aACxD,KAAC,IAAI,IAAC,KAAK,EAAC,QAAQ,kBAAS,EAC7B,KAAC,SAAS,IAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,GAAI,EACnE,KAAC,IAAI,IAAC,QAAQ,wDAAyC,IACnD,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import type { Tab } from "../types/index.js";
3
+ import type { ReleaseCheckState } from "../hooks/useReleaseCheck.js";
4
+ interface StatusBarProps {
5
+ activeTab: Tab;
6
+ itemCount: number;
7
+ error?: string | null;
8
+ actionInProgress?: string | null;
9
+ releaseStatus?: ReleaseCheckState | null;
10
+ }
11
+ export declare function StatusBar({ activeTab, itemCount, error, actionInProgress, releaseStatus, }: StatusBarProps): React.ReactElement;
12
+ export {};
13
+ //# sourceMappingURL=StatusBar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StatusBar.d.ts","sourceRoot":"","sources":["../../src/components/StatusBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAErE,UAAU,cAAc;IACtB,SAAS,EAAE,GAAG,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,aAAa,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;CAC1C;AAuBD,wBAAgB,SAAS,CAAC,EACxB,SAAS,EACT,SAAS,EACT,KAAK,EACL,gBAAgB,EAChB,aAAa,GACd,EAAE,cAAc,GAAG,KAAK,CAAC,YAAY,CAkCrC"}
@@ -0,0 +1,31 @@
1
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
+ import { Box, Text } from "ink";
3
+ import Spinner from "ink-spinner";
4
+ const TAB_ACTIONS = {
5
+ containers: "s:start x:stop R:restart d:delete L:logs i:inspect",
6
+ images: "p:pull d:delete i:inspect",
7
+ networks: "c:create d:delete i:inspect",
8
+ volumes: "c:create d:delete i:inspect",
9
+ };
10
+ function renderReleaseStatus(releaseStatus) {
11
+ if (!releaseStatus)
12
+ return null;
13
+ if (releaseStatus.status === "update-available" && releaseStatus.latestVersion) {
14
+ return _jsxs(Text, { color: "yellow", children: ["Update available: v", releaseStatus.latestVersion] });
15
+ }
16
+ if (releaseStatus.status === "checking") {
17
+ return _jsx(Text, { dimColor: true, children: "Checking for updates..." });
18
+ }
19
+ return null;
20
+ }
21
+ export function StatusBar({ activeTab, itemCount, error, actionInProgress, releaseStatus, }) {
22
+ if (error) {
23
+ return (_jsx(Box, { borderStyle: "single", borderColor: "red", paddingX: 1, children: _jsxs(Text, { color: "red", children: ["Error: ", error] }) }));
24
+ }
25
+ if (actionInProgress) {
26
+ return (_jsxs(Box, { borderStyle: "single", borderColor: "yellow", paddingX: 1, children: [_jsx(Text, { color: "yellow", children: _jsx(Spinner, { type: "dots" }) }), _jsxs(Text, { color: "yellow", children: [" ", actionInProgress] })] }));
27
+ }
28
+ const releaseContent = renderReleaseStatus(releaseStatus);
29
+ return (_jsxs(Box, { borderStyle: "single", paddingX: 1, justifyContent: "space-between", children: [_jsxs(Text, { children: [_jsx(Text, { color: "cyan", children: itemCount }), " ", activeTab, " | ", TAB_ACTIONS[activeTab]] }), releaseContent ?? (_jsx(Text, { dimColor: true, children: "h/l:tabs j/k:navigate /:search r:refresh ?:help q:quit" }))] }));
30
+ }
31
+ //# sourceMappingURL=StatusBar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StatusBar.js","sourceRoot":"","sources":["../../src/components/StatusBar.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,OAAO,MAAM,aAAa,CAAC;AAYlC,MAAM,WAAW,GAAwB;IACvC,UAAU,EAAE,oDAAoD;IAChE,MAAM,EAAE,2BAA2B;IACnC,QAAQ,EAAE,6BAA6B;IACvC,OAAO,EAAE,6BAA6B;CACvC,CAAC;AAEF,SAAS,mBAAmB,CAAC,aAA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AAK,EAAC,MAAM,YAAE,SAAS,GAAQ,OAAE,SAAS,SAAK,WAAW,CAAC,SAAS,CAAC,IACtE,EACN,cAAc,IAAI,CACjB,KAAC,IAAI,IAAC,QAAQ,6EAEP,CACR,IACG,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import type { Tab } from "../types/index.js";
3
+ interface TabBarProps {
4
+ activeTab: Tab;
5
+ }
6
+ export declare function TabBar({ activeTab }: TabBarProps): React.ReactElement;
7
+ export {};
8
+ //# sourceMappingURL=TabBar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TabBar.d.ts","sourceRoot":"","sources":["../../src/components/TabBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAE7C,UAAU,WAAW;IACnB,SAAS,EAAE,GAAG,CAAC;CAChB;AASD,wBAAgB,MAAM,CAAC,EAAE,SAAS,EAAE,EAAE,WAAW,GAAG,KAAK,CAAC,YAAY,CAgBrE"}
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React from "react";
3
+ import { Box, Text } from "ink";
4
+ const TABS = [
5
+ { key: "containers", label: "Containers", shortcut: "1" },
6
+ { key: "images", label: "Images", shortcut: "2" },
7
+ { key: "networks", label: "Networks", shortcut: "3" },
8
+ { key: "volumes", label: "Volumes", shortcut: "4" },
9
+ ];
10
+ export function TabBar({ activeTab }) {
11
+ return (_jsx(Box, { borderStyle: "single", paddingX: 1, children: TABS.map((tab, index) => (_jsxs(React.Fragment, { children: [index > 0 && _jsx(Text, { children: " | " }), _jsxs(Text, { color: activeTab === tab.key ? "cyan" : "white", bold: activeTab === tab.key, children: ["[", tab.shortcut, "] ", tab.label] })] }, tab.key))) }));
12
+ }
13
+ //# sourceMappingURL=TabBar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TabBar.js","sourceRoot":"","sources":["../../src/components/TabBar.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAOhC,MAAM,IAAI,GAAyD;IACjE,EAAE,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,GAAG,EAAE;IACzD,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE;IACjD,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE;IACrD,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,EAAE;CACpD,CAAC;AAEF,MAAM,UAAU,MAAM,CAAC,EAAE,SAAS,EAAe;IAC/C,OAAO,CACL,KAAC,GAAG,IAAC,WAAW,EAAC,QAAQ,EAAC,QAAQ,EAAE,CAAC,YAClC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,CACxB,MAAC,KAAK,CAAC,QAAQ,eACZ,KAAK,GAAG,CAAC,IAAI,KAAC,IAAI,sBAAW,EAC9B,MAAC,IAAI,IACH,KAAK,EAAE,SAAS,KAAK,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAC/C,IAAI,EAAE,SAAS,KAAK,GAAG,CAAC,GAAG,kBAEzB,GAAG,CAAC,QAAQ,QAAI,GAAG,CAAC,KAAK,IACtB,KAPY,GAAG,CAAC,GAAG,CAQX,CAClB,CAAC,GACE,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+ interface Column<T> {
3
+ key: string;
4
+ header: string;
5
+ width: number;
6
+ render?: (item: T) => React.ReactNode;
7
+ }
8
+ interface TableProps<T> {
9
+ columns: Column<T>[];
10
+ data: T[];
11
+ selectedIndex: number;
12
+ emptyMessage?: string;
13
+ }
14
+ export declare function Table<T extends object>({ columns, data, selectedIndex, emptyMessage, }: TableProps<T>): React.ReactElement;
15
+ export {};
16
+ //# sourceMappingURL=Table.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../src/components/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,MAAM,CAAC,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;CACvC;AAED,UAAU,UAAU,CAAC,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,KAAK,CAAC,CAAC,SAAS,MAAM,EAAE,EACtC,OAAO,EACP,IAAI,EACJ,aAAa,EACb,YAA+B,GAChC,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,YAAY,CAyCpC"}
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box, Text } from "ink";
3
+ export function Table({ columns, data, selectedIndex, emptyMessage = "No items found", }) {
4
+ if (data.length === 0) {
5
+ return (_jsx(Box, { paddingX: 1, paddingY: 1, children: _jsx(Text, { dimColor: true, children: emptyMessage }) }));
6
+ }
7
+ return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Box, { children: columns.map((col) => (_jsx(Box, { width: col.width, children: _jsx(Text, { bold: true, color: "cyan", children: col.header }) }, col.key))) }), _jsx(Box, { borderStyle: "single", borderTop: false, borderLeft: false, borderRight: false }), data.map((item, index) => {
8
+ const isSelected = index === selectedIndex;
9
+ return (_jsx(Box, { children: columns.map((col) => (_jsx(Box, { width: col.width, children: _jsx(Text, { inverse: isSelected, color: isSelected ? "blue" : undefined, children: col.render
10
+ ? col.render(item)
11
+ : truncate(String(item[col.key] ?? ""), col.width - 1) }) }, col.key))) }, index));
12
+ })] }));
13
+ }
14
+ function truncate(str, maxLength) {
15
+ if (str.length <= maxLength)
16
+ return str;
17
+ return str.substring(0, maxLength - 1) + "…";
18
+ }
19
+ //# sourceMappingURL=Table.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Table.js","sourceRoot":"","sources":["../../src/components/Table.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAgBhC,MAAM,UAAU,KAAK,CAAmB,EACtC,OAAO,EACP,IAAI,EACJ,aAAa,EACb,YAAY,GAAG,gBAAgB,GACjB;IACd,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtB,OAAO,CACL,KAAC,GAAG,IAAC,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,YAC3B,KAAC,IAAI,IAAC,QAAQ,kBAAE,YAAY,GAAQ,GAChC,CACP,CAAC;IACJ,CAAC;IAED,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,aACzB,KAAC,GAAG,cACD,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CACpB,KAAC,GAAG,IAAyB,KAAK,EAAE,GAAG,CAAC,KAAK,YAC3C,KAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAC,MAAM,YACpB,GAAG,CAAC,MAAM,GACN,IAHC,GAAG,CAAC,GAAa,CAIrB,CACP,CAAC,GACE,EAEN,KAAC,GAAG,IAAC,WAAW,EAAC,QAAQ,EAAC,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,GAAI,EAEpF,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;gBACxB,MAAM,UAAU,GAAG,KAAK,KAAK,aAAa,CAAC;gBAC3C,OAAO,CACL,KAAC,GAAG,cACD,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CACpB,KAAC,GAAG,IAAe,KAAK,EAAE,GAAG,CAAC,KAAK,YACjC,KAAC,IAAI,IAAC,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,YAC9D,GAAG,CAAC,MAAM;gCACT,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC;gCAClB,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAE,IAAgC,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,GAChF,IALC,GAAG,CAAC,GAAG,CAMX,CACP,CAAC,IATM,KAAK,CAUT,CACP,CAAC;YACJ,CAAC,CAAC,IACE,CACP,CAAC;AACJ,CAAC;AAED,SAAS,QAAQ,CAAC,GAAW,EAAE,SAAiB;IAC9C,IAAI,GAAG,CAAC,MAAM,IAAI,SAAS;QAAE,OAAO,GAAG,CAAC;IACxC,OAAO,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;AAC/C,CAAC"}
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import type { Volume } from "../types/index.js";
3
+ interface VolumesViewProps {
4
+ volumes: Volume[];
5
+ selectedIndex: number;
6
+ searchQuery: string;
7
+ }
8
+ export declare function VolumesView({ volumes, selectedIndex, searchQuery, }: VolumesViewProps): React.ReactElement;
9
+ export {};
10
+ //# sourceMappingURL=VolumesView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VolumesView.d.ts","sourceRoot":"","sources":["../../src/components/VolumesView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,UAAU,gBAAgB;IACxB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,aAAa,EACb,WAAW,GACZ,EAAE,gBAAgB,GAAG,KAAK,CAAC,YAAY,CA8BvC"}
@@ -0,0 +1,16 @@
1
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
+ import { Box, Text } from "ink";
3
+ import { Table } from "./Table.js";
4
+ export function VolumesView({ volumes, selectedIndex, searchQuery, }) {
5
+ const filteredVolumes = volumes.filter((vol) => !searchQuery ||
6
+ vol.name.toLowerCase().includes(searchQuery.toLowerCase()) ||
7
+ vol.driver.toLowerCase().includes(searchQuery.toLowerCase()));
8
+ const columns = [
9
+ { key: "name", header: "VOLUME NAME", width: 35 },
10
+ { key: "driver", header: "DRIVER", width: 15 },
11
+ { key: "scope", header: "SCOPE", width: 10 },
12
+ { key: "mountpoint", header: "MOUNTPOINT", width: 40 },
13
+ ];
14
+ return (_jsxs(Box, { flexDirection: "column", flexGrow: 1, children: [searchQuery && (_jsx(Box, { paddingX: 1, children: _jsxs(Text, { dimColor: true, children: ["Filtered by: \"", searchQuery, "\""] }) })), _jsx(Table, { columns: columns, data: filteredVolumes, selectedIndex: selectedIndex, emptyMessage: "No volumes found" })] }));
15
+ }
16
+ //# sourceMappingURL=VolumesView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VolumesView.js","sourceRoot":"","sources":["../../src/components/VolumesView.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,I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ainerDataResult {
3
+ containers: Container[];
4
+ images: Image[];
5
+ networks: Network[];
6
+ volumes: Volume[];
7
+ loading: boolean;
8
+ error: string | null;
9
+ refresh: () => Promise<void>;
10
+ }
11
+ export declare function useContainerData(refreshInterval?: number): UseContainerDataResult;
12
+ export {};
13
+ //# sourceMappingURL=useContainerData.d.ts.map