epiq 0.0.5 → 0.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/cli.js +398 -33
- package/package.json +26 -11
- package/readme.md +1 -1
- package/dist/app.d.ts +0 -5
- package/dist/app.js +0 -18
- package/dist/board/components/Board.d.ts +0 -6
- package/dist/board/components/Board.js +0 -11
- package/dist/board/components/CommandLine.d.ts +0 -2
- package/dist/board/components/CommandLine.js +0 -26
- package/dist/board/components/ContextBar.d.ts +0 -4
- package/dist/board/components/ContextBar.js +0 -17
- package/dist/board/components/Help.d.ts +0 -4
- package/dist/board/components/Help.js +0 -28
- package/dist/board/components/Logo.d.ts +0 -2
- package/dist/board/components/Logo.js +0 -21
- package/dist/board/components/ScrollBox.d.ts +0 -9
- package/dist/board/components/ScrollBox.js +0 -22
- package/dist/board/components/Swimlane.d.ts +0 -9
- package/dist/board/components/Swimlane.js +0 -12
- package/dist/board/components/Swimlanes.d.ts +0 -8
- package/dist/board/components/Swimlanes.js +0 -17
- package/dist/board/components/TextInput.d.ts +0 -6
- package/dist/board/components/TextInput.js +0 -9
- package/dist/board/components/TicketListItem.d.ts +0 -6
- package/dist/board/components/TicketListItem.js +0 -13
- package/dist/board/components/TicketUI.d.ts +0 -8
- package/dist/board/components/TicketUI.js +0 -8
- package/dist/board/hints/hints.d.ts +0 -7
- package/dist/board/hints/hints.js +0 -21
- package/dist/board/mock/board.d.ts +0 -2
- package/dist/board/mock/board.js +0 -520
- package/dist/board/model/board.model.d.ts +0 -26
- package/dist/board/model/board.model.js +0 -6
- package/dist/board/render/color.d.ts +0 -7
- package/dist/board/render/color.js +0 -21
- package/dist/cli.d.ts +0 -3
- package/dist/debug-logger.d.ts +0 -2
- package/dist/debug-logger.js +0 -16
- package/dist/init-project.d.ts +0 -1
- package/dist/init-project.js +0 -1
- package/dist/navigation/actions/add/add-actions.d.ts +0 -2
- package/dist/navigation/actions/add/add-actions.js +0 -25
- package/dist/navigation/actions/add/add-item-actions.d.ts +0 -2
- package/dist/navigation/actions/add/add-item-actions.js +0 -25
- package/dist/navigation/actions/add-item/add-item-actions.d.ts +0 -3
- package/dist/navigation/actions/add-item/add-item-actions.js +0 -45
- package/dist/navigation/actions/board-action-map.d.ts +0 -10
- package/dist/navigation/actions/board-action-map.js +0 -12
- package/dist/navigation/actions/default/default-action-utils.d.ts +0 -8
- package/dist/navigation/actions/default/default-action-utils.js +0 -101
- package/dist/navigation/actions/default/default-actions.d.ts +0 -2
- package/dist/navigation/actions/default/default-actions.js +0 -64
- package/dist/navigation/actions/default/navigation-action-utils.d.ts +0 -16
- package/dist/navigation/actions/default/navigation-action-utils.js +0 -109
- package/dist/navigation/actions/input/command-line-input.d.ts +0 -2
- package/dist/navigation/actions/input/command-line-input.js +0 -18
- package/dist/navigation/actions/input/input-actions-utils.d.ts +0 -8
- package/dist/navigation/actions/input/input-actions-utils.js +0 -47
- package/dist/navigation/actions/input/input-actions.d.ts +0 -2
- package/dist/navigation/actions/input/input-actions.js +0 -44
- package/dist/navigation/actions/move/move-actions-routes.d.ts +0 -4
- package/dist/navigation/actions/move/move-actions-routes.js +0 -55
- package/dist/navigation/actions/move/move-actions-utils.d.ts +0 -4
- package/dist/navigation/actions/move/move-actions-utils.js +0 -66
- package/dist/navigation/actions/move/move-actions.d.ts +0 -4
- package/dist/navigation/actions/move/move-actions.js +0 -59
- package/dist/navigation/actions/navigate/navigation-action-utils.d.ts +0 -7
- package/dist/navigation/actions/navigate/navigation-action-utils.js +0 -48
- package/dist/navigation/actions/navigate/navigation-actions.d.ts +0 -2
- package/dist/navigation/actions/navigate/navigation-actions.js +0 -78
- package/dist/navigation/command-line/command-line-actions.d.ts +0 -2
- package/dist/navigation/command-line/command-line-actions.js +0 -32
- package/dist/navigation/command-line/command-line-intent.d.ts +0 -7
- package/dist/navigation/command-line/command-line-intent.js +0 -29
- package/dist/navigation/command-line/command-line-sequence-actions.d.ts +0 -2
- package/dist/navigation/command-line/command-line-sequence-actions.js +0 -44
- package/dist/navigation/command-line/command-line-sequence-intent.d.ts +0 -8
- package/dist/navigation/command-line/command-line-sequence-intent.js +0 -32
- package/dist/navigation/command-line/commands.d.ts +0 -2
- package/dist/navigation/command-line/commands.js +0 -58
- package/dist/navigation/keypress-listener.d.ts +0 -1
- package/dist/navigation/keypress-listener.js +0 -33
- package/dist/navigation/model/action-map.model.d.ts +0 -26
- package/dist/navigation/model/action-map.model.js +0 -6
- package/dist/navigation/model/navigation-ctx.model.d.ts +0 -1
- package/dist/navigation/model/navigation-ctx.model.js +0 -1
- package/dist/navigation/model/navigation-tree.model.d.ts +0 -11
- package/dist/navigation/model/navigation-tree.model.js +0 -1
- package/dist/navigation/navigation-ctx.d.ts +0 -1
- package/dist/navigation/navigation-ctx.js +0 -1
- package/dist/navigation/navigation.d.ts +0 -3
- package/dist/navigation/navigation.js +0 -82
- package/dist/navigation/state/command-line.state.d.ts +0 -18
- package/dist/navigation/state/command-line.state.js +0 -60
- package/dist/navigation/state/state.d.ts +0 -20
- package/dist/navigation/state/state.js +0 -38
- package/dist/navigation/utils/get-command-line-intent.d.ts +0 -3
- package/dist/navigation/utils/get-command-line-intent.js +0 -17
- package/dist/navigation/utils/getKeyIntent.d.ts +0 -5
- package/dist/navigation/utils/getKeyIntent.js +0 -71
- package/dist/navigation/utils/key-intent.d.ts +0 -25
- package/dist/navigation/utils/key-intent.js +0 -119
package/package.json
CHANGED
|
@@ -1,34 +1,48 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "epiq",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"bin": "dist/cli.js",
|
|
6
5
|
"type": "module",
|
|
7
6
|
"description": "EPIQ - CLI based issue tracker",
|
|
7
|
+
"bin": {
|
|
8
|
+
"epiq": "dist/cli.js"
|
|
9
|
+
},
|
|
8
10
|
"engines": {
|
|
9
11
|
"node": ">=16"
|
|
10
12
|
},
|
|
11
13
|
"scripts": {
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
14
|
+
"clean": "node -e \"import('node:fs').then(fs => fs.rmSync('dist', { recursive: true, force: true }))\"",
|
|
15
|
+
"build": "tsc --noEmit",
|
|
16
|
+
"build:publish": "pnpm clean && esbuild source/cli.tsx --bundle --platform=node --format=esm --target=node16 --minify --outfile=dist/cli.js --banner:js='#!/usr/bin/env node' --external:react-devtools-core",
|
|
17
|
+
"dev": "tsc --watch --noEmit",
|
|
18
|
+
"dev:start": "IS_LOCAL=true tsx source/cli.tsx",
|
|
19
|
+
"start": "node dist/cli.js",
|
|
20
|
+
"start:debug": "IS_LOCAL=true node dist/cli.js",
|
|
21
|
+
"test": "prettier --check \"**/*.{ts,tsx}\" && vitest run",
|
|
22
|
+
"prepack": "pnpm build:publish",
|
|
23
|
+
"pack:check": "npm pack && tar -tf epiq-*.tgz",
|
|
24
|
+
"publish:dry": "npm publish --dry-run",
|
|
25
|
+
"release": "pnpm build:publish && pnpm test && pnpm pack:check && npm publish"
|
|
16
26
|
},
|
|
17
27
|
"files": [
|
|
18
28
|
"dist"
|
|
19
29
|
],
|
|
20
30
|
"dependencies": {
|
|
21
|
-
"ink": "^
|
|
22
|
-
"
|
|
23
|
-
"
|
|
31
|
+
"ink": "^6.8.0",
|
|
32
|
+
"json-stringify-pretty-compact": "^4.0.0",
|
|
33
|
+
"marked": "^17.0.3",
|
|
34
|
+
"marked-terminal": "^7.3.0",
|
|
35
|
+
"meow": "^14.1.0",
|
|
36
|
+
"react": "^19.2.4",
|
|
37
|
+
"ulid": "^3.0.2"
|
|
24
38
|
},
|
|
25
39
|
"devDependencies": {
|
|
26
40
|
"@sindresorhus/tsconfig": "^3.0.1",
|
|
41
|
+
"@types/marked-terminal": "^6.1.1",
|
|
27
42
|
"@types/react": "^18.0.32",
|
|
28
43
|
"@vdemedes/prettier-config": "^2.0.1",
|
|
29
|
-
"ava": "^5.2.0",
|
|
30
44
|
"chalk": "^5.2.0",
|
|
31
|
-
"
|
|
45
|
+
"esbuild": "^0.25.0",
|
|
32
46
|
"eslint-plugin-react": "^7.32.2",
|
|
33
47
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
34
48
|
"ink-testing-library": "^3.0.0",
|
|
@@ -36,6 +50,7 @@
|
|
|
36
50
|
"ts-node": "^10.9.1",
|
|
37
51
|
"tsx": "^4.20.3",
|
|
38
52
|
"typescript": "^5.0.3",
|
|
53
|
+
"vitest": "^4.1.0",
|
|
39
54
|
"xo": "^0.53.1"
|
|
40
55
|
},
|
|
41
56
|
"ava": {
|
package/readme.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# epiq
|
|
2
2
|
|
|
3
3
|
> **The ultimate productivity tool** — a CLI-based issue tracking client powered by Git as its backend, living directly inside the repository you work in.
|
|
4
|
-
> No external services. No context switching. Just tickets
|
|
4
|
+
> No external services. No context switching. Just tickets - versioned and colocated with your code.
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
package/dist/app.d.ts
DELETED
package/dist/app.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Box } from 'ink';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { BoardUI } from './board/components/Board.js';
|
|
4
|
-
import { ContextBar } from './board/components/ContextBar.js';
|
|
5
|
-
import { HelpUI } from './board/components/Help.js';
|
|
6
|
-
import { Mode } from './navigation/model/action-map.model.js';
|
|
7
|
-
import { appState } from './navigation/state/state.js';
|
|
8
|
-
export default function App({ board }) {
|
|
9
|
-
const width = process.stdout.columns || 120;
|
|
10
|
-
const swimlaneMaxWidth = Math.floor(process.stdout.columns / 3);
|
|
11
|
-
const swimlaneDynamicWidth = Math.floor(width / board.children.length);
|
|
12
|
-
const renderedWidth = swimlaneDynamicWidth * board.children.length;
|
|
13
|
-
const swimlaneWidth = Math.min(renderedWidth, swimlaneMaxWidth);
|
|
14
|
-
return (React.createElement(Box, { flexDirection: "column" },
|
|
15
|
-
!(appState.mode === Mode.HELP) && (React.createElement(BoardUI, { board: board, swimlaneWidth: swimlaneWidth })),
|
|
16
|
-
appState.mode === Mode.HELP && React.createElement(HelpUI, { width: renderedWidth }),
|
|
17
|
-
React.createElement(ContextBar, { width: width })));
|
|
18
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Box, Text } from 'ink';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { appState } from '../../navigation/state/state.js';
|
|
4
|
-
import { BoardContentUI } from './Swimlanes.js';
|
|
5
|
-
export const BoardUI = ({ board, swimlaneWidth, }) => {
|
|
6
|
-
return (React.createElement(Box, { flexDirection: "column" },
|
|
7
|
-
React.createElement(Box, { paddingLeft: 1 },
|
|
8
|
-
React.createElement(Text, null, appState.breadCrumb.map(b => ' > ' + b.name))),
|
|
9
|
-
React.createElement(Box, { flexDirection: "row" },
|
|
10
|
-
React.createElement(BoardContentUI, { items: board.children, width: swimlaneWidth }))));
|
|
11
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import { Box, Text } from 'ink';
|
|
3
|
-
import { getCommandLineInput, subscribeCommandLineState, } from '../../navigation/state/command-line.state.js';
|
|
4
|
-
const roleColors = {
|
|
5
|
-
command: 'cyan',
|
|
6
|
-
argument: 'white',
|
|
7
|
-
};
|
|
8
|
-
export const CommandLine = () => {
|
|
9
|
-
const [input, setInput] = useState(getCommandLineInput());
|
|
10
|
-
useEffect(() => {
|
|
11
|
-
const unsubscribe = subscribeCommandLineState(() => {
|
|
12
|
-
setInput(getCommandLineInput());
|
|
13
|
-
});
|
|
14
|
-
return () => {
|
|
15
|
-
unsubscribe();
|
|
16
|
-
};
|
|
17
|
-
}, []);
|
|
18
|
-
const [command, ...rest] = input.split(' ');
|
|
19
|
-
const argument = rest.join(' ');
|
|
20
|
-
return (React.createElement(Box, null,
|
|
21
|
-
React.createElement(Text, { color: "gray" }, ":"),
|
|
22
|
-
command && React.createElement(Text, { color: roleColors.command }, command),
|
|
23
|
-
argument && (React.createElement(Text, null,
|
|
24
|
-
' ',
|
|
25
|
-
React.createElement(Text, { color: roleColors.argument }, "'" + argument + "'")))));
|
|
26
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Box, Text } from 'ink';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { Mode } from '../../navigation/model/action-map.model.js';
|
|
4
|
-
import { appState } from '../../navigation/state/state.js';
|
|
5
|
-
import { CommandLine } from './CommandLine.js';
|
|
6
|
-
export const ContextBar = ({ width }) => (React.createElement(Box, { flexDirection: "column", paddingLeft: 1, paddingRight: 1, borderColor: "gray", borderStyle: "round", width: width },
|
|
7
|
-
React.createElement(Box, null, appState.mode === Mode.COMMAND_LINE ? (React.createElement(CommandLine, null)) : (React.createElement(Box, { flexDirection: "row", gap: 2 },
|
|
8
|
-
React.createElement(Text, null, "\uD83D\uDCA1"),
|
|
9
|
-
appState.availableHints.map((x, index) => {
|
|
10
|
-
const [command, ...rest] = x.split(' ');
|
|
11
|
-
const argument = rest.join(' ');
|
|
12
|
-
return (React.createElement(Box, { key: index },
|
|
13
|
-
React.createElement(Text, { color: "cyan" }, command),
|
|
14
|
-
argument && (React.createElement(React.Fragment, null,
|
|
15
|
-
React.createElement(Text, null, " "),
|
|
16
|
-
React.createElement(Text, { color: "gray" }, argument)))));
|
|
17
|
-
}))))));
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Box, Text } from 'ink';
|
|
2
|
-
import { appState } from '../../navigation/state/state.js';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { Mode } from '../../navigation/model/action-map.model.js';
|
|
5
|
-
export const HelpUI = ({ width }) => (React.createElement(Box, { flexDirection: "column", marginTop: 3, borderColor: "gray", borderStyle: "round", width: width, minHeight: 19 },
|
|
6
|
-
React.createElement(Box, { flexDirection: "column", width: width }, appState.mode === Mode.HELP
|
|
7
|
-
? [
|
|
8
|
-
{
|
|
9
|
-
action: '',
|
|
10
|
-
description: '[COMMAND] DESCRIPTION',
|
|
11
|
-
mode: appState.mode,
|
|
12
|
-
},
|
|
13
|
-
...appState.availableActions,
|
|
14
|
-
]
|
|
15
|
-
.filter(action => Boolean(action.description))
|
|
16
|
-
// .filter(x => x.mode === navigationState.mode)
|
|
17
|
-
.map((action, index) => {
|
|
18
|
-
const [leftRaw, rightRaw] = action.description.split(']');
|
|
19
|
-
const left = leftRaw?.replace('[', '');
|
|
20
|
-
const right = rightRaw?.trim(); // no extra space
|
|
21
|
-
return (React.createElement(Box, { paddingLeft: 1, key: index, flexDirection: "row" },
|
|
22
|
-
React.createElement(Box, { key: index, flexDirection: "row", paddingBottom: index ? 0 : 1 },
|
|
23
|
-
React.createElement(Box, { flexGrow: 1, width: 30 },
|
|
24
|
-
React.createElement(Text, { color: index ? 'white' : 'gray' }, right)),
|
|
25
|
-
React.createElement(Box, { width: 20 },
|
|
26
|
-
React.createElement(Text, { color: index ? 'yellow' : 'gray' }, left)))));
|
|
27
|
-
})
|
|
28
|
-
: null)));
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Box, Text } from 'ink';
|
|
2
|
-
import { highlight } from '../render/color.js';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
function replaceRange(str, start, end, replacement) {
|
|
5
|
-
return str.slice(0, start) + replacement + str.slice(end);
|
|
6
|
-
}
|
|
7
|
-
const logoLines = [
|
|
8
|
-
` ______ _____ _____ _____`,
|
|
9
|
-
`| ____| __ \\ |_ _| / ____|`,
|
|
10
|
-
`| |__ | |__)\\ | | | | `,
|
|
11
|
-
`| __| | ___/ | | | | `,
|
|
12
|
-
`| |____| | _| |_ | |____ `,
|
|
13
|
-
`|______|__| |_____| \\____ |`,
|
|
14
|
-
` (_|`,
|
|
15
|
-
];
|
|
16
|
-
const coloredLogo = logoLines
|
|
17
|
-
.map(line => replaceRange(line, 0, 7, highlight(line.slice(0, 7), 'cyan')))
|
|
18
|
-
.map(line => replaceRange(line, 31, 39, highlight(line.slice(31, 39), 'yellow')));
|
|
19
|
-
export default function Logo() {
|
|
20
|
-
return (React.createElement(Box, { flexDirection: "column", marginBottom: 1 }, coloredLogo.map((line, idx) => (React.createElement(Text, { key: idx }, line)))));
|
|
21
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Box, Text } from 'ink';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
export const ScrollBoxUI = ({ children = [], size, selectedIndex, }) => {
|
|
4
|
-
if (children.length === 0) {
|
|
5
|
-
return null;
|
|
6
|
-
}
|
|
7
|
-
const scrollIndex = Math.floor(Math.max(selectedIndex, 0) / size);
|
|
8
|
-
const start = scrollIndex * size;
|
|
9
|
-
const end = start + size;
|
|
10
|
-
// Clamp values to avoid overflow
|
|
11
|
-
const visibleChildren = children.slice(start, end);
|
|
12
|
-
// Scrollbar calculations
|
|
13
|
-
const scrollBarHeight = size;
|
|
14
|
-
const scrollSteps = Math.floor(children.length / size) + 1;
|
|
15
|
-
const indexBarHeight = Math.ceil(scrollBarHeight / scrollSteps);
|
|
16
|
-
const barOffset = scrollIndex * indexBarHeight;
|
|
17
|
-
return (React.createElement(Box, { flexDirection: "row" },
|
|
18
|
-
children.length > size && (React.createElement(Box, { flexDirection: "column", width: 1, height: scrollBarHeight, marginRight: 1 }, Array.from({ length: scrollBarHeight }).map((_, i) => (React.createElement(Text, { key: i, color: i >= barOffset && i < barOffset + indexBarHeight
|
|
19
|
-
? 'cyan'
|
|
20
|
-
: 'gray' }, "\u2502"))))),
|
|
21
|
-
React.createElement(Box, { flexDirection: "column" }, visibleChildren)));
|
|
22
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Box, Text } from 'ink';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { ScrollBoxUI } from './ScrollBox.js';
|
|
4
|
-
import { TicketListItemUI } from './TicketListItem.js';
|
|
5
|
-
export const SwimlaneUI = ({ item, isSelected, width }) => {
|
|
6
|
-
const color = isSelected ? 'cyan' : 'gray';
|
|
7
|
-
return (React.createElement(Box, { flexDirection: "column", width: width, borderStyle: "round", borderColor: 'gray', paddingRight: 1, paddingLeft: 1, minHeight: 15, height: 20 },
|
|
8
|
-
React.createElement(Box, { borderStyle: "round", borderColor: color, justifyContent: "center" },
|
|
9
|
-
React.createElement(Text, { bold: true }, item.name)),
|
|
10
|
-
React.createElement(Box, { padding: 1 },
|
|
11
|
-
React.createElement(ScrollBoxUI, { selectedIndex: item.children.findIndex(x => x.isSelected), width: width, size: 10, children: item.children.map((ticket, index) => (React.createElement(TicketListItemUI, { key: index, width: width, ticket: ticket }))) }))));
|
|
12
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Box } from 'ink';
|
|
3
|
-
import { appState } from '../../navigation/state/state.js';
|
|
4
|
-
import { BoardItemTypes } from '../model/board.model.js';
|
|
5
|
-
import { SwimlaneUI } from './Swimlane.js';
|
|
6
|
-
import { TicketUI } from './TicketUI.js';
|
|
7
|
-
export const BoardContentUI = ({ items, width }) => {
|
|
8
|
-
const actionContext = appState.currentNode.actionContext;
|
|
9
|
-
const isTicketContext = actionContext === BoardItemTypes.TICKET_LIST_ITEM;
|
|
10
|
-
const isSwimlaneContext = actionContext === BoardItemTypes.BOARD ||
|
|
11
|
-
actionContext === BoardItemTypes.SWIMLANE;
|
|
12
|
-
return (React.createElement(Box, { flexDirection: "row" },
|
|
13
|
-
isSwimlaneContext &&
|
|
14
|
-
items.map((lane, index) => (React.createElement(SwimlaneUI, { key: index, width: width, isSelected: appState.currentNode.actionContext === 'BOARD' &&
|
|
15
|
-
appState.selectedIndex === index, item: lane }))),
|
|
16
|
-
isTicketContext && appState.currentNode && (React.createElement(TicketUI, { width: width * items.length, item: appState.breadCrumb[appState.breadCrumb.length - 1] }))));
|
|
17
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Text } from 'ink';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
// const onChange = (_value: string) => {
|
|
4
|
-
// // No-op for now
|
|
5
|
-
// };
|
|
6
|
-
// const onSubmit = (_value: string) => {
|
|
7
|
-
// // No-op for now
|
|
8
|
-
// };
|
|
9
|
-
export const TextInput = ({ value }) => React.createElement(Text, null, value);
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Box, Text } from 'ink';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { Mode } from '../../navigation/model/action-map.model.js';
|
|
4
|
-
import { appState } from '../../navigation/state/state.js';
|
|
5
|
-
const truncateWithEllipsis = (str, width) => str.length >= width ? str.slice(0, width - 3) + '...' : str;
|
|
6
|
-
export const TicketListItemUI = ({ width, ticket }) => (React.createElement(Box, { borderBottom: true },
|
|
7
|
-
React.createElement(Text, { color: ticket.isSelected && appState.mode === Mode.MOVE
|
|
8
|
-
? 'cyan'
|
|
9
|
-
: ticket.isSelected
|
|
10
|
-
? 'cyan'
|
|
11
|
-
: appState.mode === Mode.MOVE
|
|
12
|
-
? 'gray'
|
|
13
|
-
: 'white' }, truncateWithEllipsis(ticket.name, width - 6))));
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Box, Text } from 'ink';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
export const TicketUI = ({ item, width }) => (React.createElement(Box, { flexDirection: "column", padding: 1, paddingLeft: 2, borderStyle: "round", width: width, minHeight: 20, borderColor: "gray" }, item.children.map(child => (React.createElement(Box, { key: child.id, flexDirection: "row", borderStyle: 'round', borderColor: child.isSelected ? 'cyan' : 'gray', paddingLeft: 1 },
|
|
4
|
-
React.createElement(Box, { width: 30 },
|
|
5
|
-
React.createElement(Text, { color: "cyan" },
|
|
6
|
-
child.name,
|
|
7
|
-
":")),
|
|
8
|
-
React.createElement(Text, null, child.description))))));
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const Hints: {
|
|
2
|
-
readonly [x: string]: readonly [] | readonly [":h Help", "hjkl: navigate", "enter: confirm"] | readonly ["q: exit"] | readonly ["i: edit", "y: yank/move"] | readonly ["q: exit", "i: edit"] | readonly ["hjkl: move selection", "e/enter: confirm move/yank", "q: exit"] | readonly ["hjkl: move selection", "e/enter: confirm move/yank", "y: confirm move/yank", "q: exit"];
|
|
3
|
-
readonly BOARD: readonly [];
|
|
4
|
-
readonly SWIMLANE: readonly [":h Help", "hjkl: navigate", "enter: confirm"];
|
|
5
|
-
readonly TICKET_LIST_ITEM: readonly ["i: edit", "y: yank/move"];
|
|
6
|
-
readonly TICKET: readonly ["q: exit", "i: edit"];
|
|
7
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Mode } from '../../navigation/model/action-map.model.js';
|
|
2
|
-
import { BoardItemTypes } from '../model/board.model.js';
|
|
3
|
-
export const Hints = {
|
|
4
|
-
[BoardItemTypes.BOARD]: [],
|
|
5
|
-
[BoardItemTypes.SWIMLANE]: [':h Help', 'hjkl: navigate', 'enter: confirm'],
|
|
6
|
-
[BoardItemTypes.TICKET_LIST_ITEM + Mode.HELP]: ['q: exit'],
|
|
7
|
-
[BoardItemTypes.SWIMLANE + Mode.HELP]: ['q: exit'],
|
|
8
|
-
[BoardItemTypes.TICKET_LIST_ITEM]: ['i: edit', 'y: yank/move'],
|
|
9
|
-
[BoardItemTypes.TICKET]: ['q: exit', 'i: edit'],
|
|
10
|
-
[BoardItemTypes.SWIMLANE + Mode.MOVE]: [
|
|
11
|
-
'hjkl: move selection',
|
|
12
|
-
'e/enter: confirm move/yank',
|
|
13
|
-
'q: exit',
|
|
14
|
-
],
|
|
15
|
-
[BoardItemTypes.TICKET_LIST_ITEM + Mode.MOVE]: [
|
|
16
|
-
'hjkl: move selection',
|
|
17
|
-
'e/enter: confirm move/yank',
|
|
18
|
-
'y: confirm move/yank',
|
|
19
|
-
'q: exit',
|
|
20
|
-
],
|
|
21
|
-
};
|