@nemo-cli/ui 0.1.4 → 0.1.5

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/index.d.ts CHANGED
@@ -1,16 +1,120 @@
1
- import * as ink3 from "ink";
2
- import { Box } from "ink";
3
- import Gradient from "ink-gradient";
4
1
  import * as react0 from "react";
5
2
  import { ComponentProps, FC } from "react";
3
+ import * as ink0 from "ink";
4
+ import { Box } from "ink";
5
+ import Gradient from "ink-gradient";
6
6
  import { PromptOptions } from "@nemo-cli/shared";
7
7
 
8
+ //#region src/components/ai-progress-viewer.d.ts
9
+ type AiProgressStatus = 'pending' | 'running' | 'done' | 'skipped' | 'error';
10
+ type AiProgressUpdate = {
11
+ total: number;
12
+ completed: number;
13
+ status: AiProgressStatus;
14
+ current?: string;
15
+ message?: string;
16
+ };
17
+ interface AiProgressViewerProps {
18
+ title: string;
19
+ onStart: (emit: (update: AiProgressUpdate) => void, signal: AbortSignal) => Promise<void>;
20
+ onExit?: () => void;
21
+ }
22
+ declare const AiProgressViewer: FC<AiProgressViewerProps>;
23
+ declare const renderAiProgressViewer: (props: AiProgressViewerProps) => Promise<void>;
24
+ //#endregion
8
25
  //#region src/components/big-text.d.ts
9
26
  declare const BigText: ({
10
27
  text
11
28
  }: {
12
29
  text: string;
13
- }) => ink3.Instance;
30
+ }) => ink0.Instance;
31
+ //#endregion
32
+ //#region src/components/branch-viewer.d.ts
33
+ interface BranchViewerProps {
34
+ maxCount?: number;
35
+ }
36
+ /**
37
+ * BranchViewer Component
38
+ *
39
+ * Displays local and remote git branches in a dual-panel interactive viewer.
40
+ * Supports vim-style keyboard navigation and independent panel scrolling.
41
+ *
42
+ * @param maxCount - Optional limit on the number of branches to display
43
+ *
44
+ * @example
45
+ * ```tsx
46
+ * <BranchViewer maxCount={20} />
47
+ * ```
48
+ */
49
+ declare const BranchViewer: FC<BranchViewerProps>;
50
+ /**
51
+ * Renders the BranchViewer component using Ink's render function.
52
+ *
53
+ * @param maxCount - Optional limit on the number of branches to display
54
+ * @returns A promise that resolves when the viewer exits
55
+ *
56
+ * @example
57
+ * ```typescript
58
+ * await renderBranchViewer(20)
59
+ * ```
60
+ */
61
+ declare const renderBranchViewer: (maxCount?: number) => Promise<void>;
62
+ //#endregion
63
+ //#region src/components/commit-detail.d.ts
64
+ interface CommitDetailProps {
65
+ commitHash: string;
66
+ onExit: () => void;
67
+ }
68
+ declare const CommitDetail: FC<CommitDetailProps>;
69
+ declare const renderCommitDetail: (commitHash: string) => Promise<void>;
70
+ //#endregion
71
+ //#region src/components/commit-viewer.d.ts
72
+ interface Commit {
73
+ hash: string;
74
+ shortHash: string;
75
+ author: string;
76
+ date: string;
77
+ message: string;
78
+ }
79
+ interface CommitViewerProps {
80
+ maxCount?: number;
81
+ onSelect: (hash: string) => void;
82
+ onExit: () => void;
83
+ }
84
+ declare const CommitViewer: FC<CommitViewerProps>;
85
+ declare const renderCommitViewer: (maxCount: number | undefined) => Promise<string | undefined>;
86
+ //#endregion
87
+ //#region src/components/diff-viewer.d.ts
88
+ interface DiffViewerProps {
89
+ targetBranch?: string;
90
+ }
91
+ /**
92
+ * DiffViewer Component
93
+ *
94
+ * Displays git diff in a dual-panel interactive viewer.
95
+ * Left panel shows changed files, right panel shows diff content for selected file.
96
+ * Supports vim-style keyboard navigation and independent panel scrolling.
97
+ *
98
+ * @param targetBranch - Optional target branch to diff against (defaults to working directory)
99
+ *
100
+ * @example
101
+ * ```tsx
102
+ * <DiffViewer targetBranch="main" />
103
+ * ```
104
+ */
105
+ declare const DiffViewer: FC<DiffViewerProps>;
106
+ /**
107
+ * Renders the DiffViewer component using Ink's render function.
108
+ *
109
+ * @param targetBranch - Optional target branch to diff against
110
+ * @returns A promise that resolves when the viewer exits
111
+ *
112
+ * @example
113
+ * ```typescript
114
+ * await renderDiffViewer('main')
115
+ * ```
116
+ */
117
+ declare const renderDiffViewer: (targetBranch?: string) => Promise<void>;
14
118
  //#endregion
15
119
  //#region src/components/hist-viewer.d.ts
16
120
  interface HistViewerProps {
@@ -23,7 +127,7 @@ declare const renderHistViewer: (maxCount?: number) => Promise<void>;
23
127
  interface ListProps<T extends string | number | boolean | symbol = string> {
24
128
  items: PromptOptions<T>[];
25
129
  }
26
- declare const renderList: (items: ListProps["items"]) => ink3.Instance;
130
+ declare const renderList: (items: ListProps["items"]) => ink0.Instance;
27
131
  //#endregion
28
132
  //#region src/components/message.d.ts
29
133
  declare const MessageVariant: {
@@ -50,12 +154,12 @@ declare const Message: ({
50
154
  name,
51
155
  type,
52
156
  ...props
53
- }: MessageProps) => ink3.Instance;
157
+ }: MessageProps) => ink0.Instance;
54
158
  declare const ErrorMessage: ({
55
159
  text,
56
160
  colors,
57
161
  ...props
58
- }: MessageProps) => ink3.Instance;
162
+ }: MessageProps) => ink0.Instance;
59
163
  //#endregion
60
164
  //#region src/components/process-message.d.ts
61
165
  type ProcessMessageProps = {
@@ -69,7 +173,16 @@ declare const ProcessMessage: ({
69
173
  commandArgs,
70
174
  onSuccess,
71
175
  onError
72
- }: ProcessMessageProps) => ink3.Instance;
176
+ }: ProcessMessageProps) => ink0.Instance;
177
+ //#endregion
178
+ //#region src/components/route-viewer.d.ts
179
+ interface RouteViewerProps {
180
+ routes: string[];
181
+ onSelect: (routes: string[]) => void;
182
+ onExit: () => void;
183
+ }
184
+ declare const RouteViewer: FC<RouteViewerProps>;
185
+ declare const renderRouteViewer: (routes: string[]) => Promise<string[] | undefined>;
73
186
  //#endregion
74
187
  //#region src/components/stash-list.d.ts
75
188
  interface StashItem {
@@ -101,5 +214,5 @@ declare const renderStatusViewer: (files: StatusFile[]) => {
101
214
  unmount: (error?: Error | number | null) => void;
102
215
  };
103
216
  //#endregion
104
- export { BigText, ErrorMessage, HistViewer, Message, ProcessMessage, type StashItem, StashList, type StatusFile, StatusViewer, renderHistViewer, renderList, renderStashList, renderStatusViewer };
217
+ export { type AiProgressStatus, type AiProgressUpdate, AiProgressViewer, BigText, BranchViewer, type Commit, CommitDetail, CommitViewer, DiffViewer, ErrorMessage, HistViewer, Message, ProcessMessage, RouteViewer, type StashItem, StashList, type StatusFile, StatusViewer, renderAiProgressViewer, renderBranchViewer, renderCommitDetail, renderCommitViewer, renderDiffViewer, renderHistViewer, renderList, renderRouteViewer, renderStashList, renderStatusViewer };
105
218
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/components/big-text.tsx","../src/components/hist-viewer.tsx","../src/components/list.tsx","../src/components/message.tsx","../src/components/process-message.tsx","../src/components/stash-list.tsx","../src/components/status-viewer.tsx"],"mappings":";;;;;;;;cAIa,OAAA;EAAW;AAAA;EAAY,IAAA;AAAA,MAAZ,IAAA,CAA0B,QAAA;;;UCExC,eAAA;EACR,QAAA;AAAA;AAAA,cAGW,UAAA,EAAY,EAAA,CAAG,eAAA;AAAA,cAyJf,gBAAA,GAAoB,QAAA,cAAiB,OAAA;;;UC/JxC,SAAA;EACR,KAAA,EAAO,aAAA,CAAc,CAAA;AAAA;AAAA,cAgBV,UAAA,GAAc,KAAA,EAAO,SAAA,cAAS,IAAA,CAAS,QAAA;;;cCjB9C,cAAA;;;;;;;;;;;;;;KAOD,YAAA;EACH,IAAA;EACA,IAAA,gBAAoB,cAAA;AAAA,IAClB,IAAA,CAAK,cAAA,QAAsB,QAAA,iBAC7B,cAAA,QAAsB,GAAA;AAAA,cAEX,OAAA;EAAW,IAAA;EAAA,MAAA;EAAA,IAAA;EAAA,IAAA;EAAA,GAAA;AAAA,GAAoD,YAAA,KAAY,IAAA,CAAA,QAAA;AAAA,cAa3E,YAAA;EAAgB,IAAA;EAAA,MAAA;EAAA,GAAA;AAAA,GAA4B,YAAA,KAAY,IAAA,CAAA,QAAA;;;KCvBhE,mBAAA;EACH,OAAA;EACA,WAAA;EACA,SAAA;EACA,OAAA,IAAW,KAAA;AAAA;AAAA,cA8CA,cAAA;EAAkB,OAAA;EAAA,WAAA;EAAA,SAAA;EAAA;AAAA,GAA8C,mBAAA,KAAmB,IAAA,CAAA,QAAA;;;UCtD/E,SAAA;EACf,GAAA;EACA,MAAA;EACA,OAAA;EACA,KAAA;EACA,SAAA;AAAA;AAAA,UAGQ,cAAA;EACR,OAAA,EAAS,SAAA;AAAA;AAAA,cA0DE,SAAA,EAAW,EAAA,CAAG,cAAA;AAAA,cA0Bd,eAAA,GAAmB,OAAA,EAAS,SAAA,OAAW,OAAA;;;UC1FnC,UAAA;EACf,IAAA;EACA,MAAA;EACA,MAAA;AAAA;AAAA,UAGQ,iBAAA;EACR,KAAA,EAAO,UAAA;EACP,MAAA;AAAA;AAAA,cA6FW,YAAA,EAAc,EAAA,CAAG,iBAAA;AAAA,cAoJjB,kBAAA,GAAsB,KAAA,EAAO,UAAA;mBAAU,MAAA,CAAA,SAAA"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/components/ai-progress-viewer.tsx","../src/components/big-text.tsx","../src/components/branch-viewer.tsx","../src/components/commit-detail.tsx","../src/components/commit-viewer.tsx","../src/components/diff-viewer.tsx","../src/components/hist-viewer.tsx","../src/components/list.tsx","../src/components/message.tsx","../src/components/process-message.tsx","../src/components/route-viewer.tsx","../src/components/stash-list.tsx","../src/components/status-viewer.tsx"],"mappings":";;;;;;;;KAMY,gBAAA;AAAA,KAEA,gBAAA;EACV,KAAA;EACA,SAAA;EACA,MAAA,EAAQ,gBAAA;EACR,OAAA;EACA,OAAA;AAAA;AAAA,UAGQ,qBAAA;EACR,KAAA;EACA,OAAA,GAAU,IAAA,GAAO,MAAA,EAAQ,gBAAA,WAA2B,MAAA,EAAQ,WAAA,KAAgB,OAAA;EAC5E,MAAA;AAAA;AAAA,cAaW,gBAAA,EAAkB,EAAA,CAAG,qBAAA;AAAA,cAwGrB,sBAAA,GAA0B,KAAA,EAAO,qBAAA,KAAwB,OAAA;;;cCpIzD,OAAA;EAAW;AAAA;EAAY,IAAA;AAAA,MAAZ,IAAA,CAA0B,QAAA;;;UCGxC,iBAAA;EAC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