next-ai-editor 1.0.2 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +174 -77
- package/dist/index.cjs +537 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +50 -0
- package/dist/index.js +538 -20
- package/dist/index.js.map +1 -1
- package/dist/next-ai-editor.css +707 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -55,6 +55,20 @@ export declare interface ControlPillProps {
|
|
|
55
55
|
activeTool?: "component" | "area" | "text" | null;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
+
export declare interface CreatePRInput {
|
|
59
|
+
title: string;
|
|
60
|
+
description: string;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export declare interface CreatePRResult {
|
|
64
|
+
success: boolean;
|
|
65
|
+
prUrl?: string;
|
|
66
|
+
prNumber?: number;
|
|
67
|
+
branchName?: string;
|
|
68
|
+
error?: string;
|
|
69
|
+
partialSuccess?: boolean;
|
|
70
|
+
}
|
|
71
|
+
|
|
58
72
|
export declare interface ElementContext {
|
|
59
73
|
tagName: string;
|
|
60
74
|
textContent?: string;
|
|
@@ -64,6 +78,11 @@ export declare interface ElementContext {
|
|
|
64
78
|
props?: Record<string, unknown>;
|
|
65
79
|
}
|
|
66
80
|
|
|
81
|
+
declare interface GeneratedPRContent {
|
|
82
|
+
title: string;
|
|
83
|
+
description: string;
|
|
84
|
+
}
|
|
85
|
+
|
|
67
86
|
/**
|
|
68
87
|
* Configuration for the AI Editor Service
|
|
69
88
|
*
|
|
@@ -126,6 +145,19 @@ declare interface Point {
|
|
|
126
145
|
y: number;
|
|
127
146
|
}
|
|
128
147
|
|
|
148
|
+
export declare interface PRStatus {
|
|
149
|
+
hasChanges: boolean;
|
|
150
|
+
changedFiles: string[];
|
|
151
|
+
baseBranch: string;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export declare function PRView({ onClose, onSuccess }: PRViewProps): JSX.Element;
|
|
155
|
+
|
|
156
|
+
export declare interface PRViewProps {
|
|
157
|
+
onClose: () => void;
|
|
158
|
+
onSuccess?: (result: CreatePRResult) => void;
|
|
159
|
+
}
|
|
160
|
+
|
|
129
161
|
export declare interface SourceLocation {
|
|
130
162
|
filePath: string;
|
|
131
163
|
lineNumber: number;
|
|
@@ -186,4 +218,22 @@ export declare interface TaskHistoryItem {
|
|
|
186
218
|
|
|
187
219
|
export declare type ToolType = "component" | "area" | "text" | null;
|
|
188
220
|
|
|
221
|
+
export declare function useCreatePR(): UseCreatePRResult;
|
|
222
|
+
|
|
223
|
+
export declare interface UseCreatePRResult {
|
|
224
|
+
createPR: (input: CreatePRInput) => Promise<CreatePRResult>;
|
|
225
|
+
generateContent: () => Promise<GeneratedPRContent>;
|
|
226
|
+
isCreating: boolean;
|
|
227
|
+
isGenerating: boolean;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export declare function usePRStatus(): UsePRStatusResult;
|
|
231
|
+
|
|
232
|
+
export declare interface UsePRStatusResult {
|
|
233
|
+
status: PRStatus | null;
|
|
234
|
+
isLoading: boolean;
|
|
235
|
+
error: string | null;
|
|
236
|
+
refresh: () => Promise<void>;
|
|
237
|
+
}
|
|
238
|
+
|
|
189
239
|
export { }
|