@anymux/connect 0.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/dist/GitBrowser-BLgTNQyd.js +905 -0
- package/dist/GitBrowser-BLgTNQyd.js.map +1 -0
- package/dist/GitBrowser-CIyWiuX-.js +3 -0
- package/dist/ObjectStorageBrowser-B2YkUxMl.js +3 -0
- package/dist/ObjectStorageBrowser-B_25Emfu.js +267 -0
- package/dist/ObjectStorageBrowser-B_25Emfu.js.map +1 -0
- package/dist/RepoPicker-BprFGOn7.js +3 -0
- package/dist/RepoPicker-CoHMiJ-3.js +168 -0
- package/dist/RepoPicker-CoHMiJ-3.js.map +1 -0
- package/dist/index.d.ts +697 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2539 -0
- package/dist/index.js.map +1 -0
- package/dist/registry.d.ts +2 -0
- package/dist/registry.js +3 -0
- package/dist/scope-labels-B4VAwoL6.js +582 -0
- package/dist/scope-labels-B4VAwoL6.js.map +1 -0
- package/dist/scope-labels-DvdJLcSL.d.ts +50 -0
- package/dist/scope-labels-DvdJLcSL.d.ts.map +1 -0
- package/package.json +87 -0
- package/src/adapters/adapter-registry.ts +177 -0
- package/src/auth/auth-client.ts +101 -0
- package/src/auth/token-manager.ts +27 -0
- package/src/components/ActionHistoryPanel.tsx +137 -0
- package/src/components/CapabilityCell.tsx +97 -0
- package/src/components/CapabilityError.tsx +50 -0
- package/src/components/CapabilityPanel.tsx +530 -0
- package/src/components/CapabilityPill.tsx +56 -0
- package/src/components/ConnectButton.tsx +149 -0
- package/src/components/ConnectedMenu.tsx +142 -0
- package/src/components/ConnectionStatus.tsx +28 -0
- package/src/components/CredentialForm.tsx +246 -0
- package/src/components/FullScreenBrowser.tsx +84 -0
- package/src/components/GitBrowser.tsx +705 -0
- package/src/components/GitHubRepoPicker.tsx +125 -0
- package/src/components/ObjectStorageBrowser.tsx +176 -0
- package/src/components/RepoPicker.tsx +93 -0
- package/src/components/ServiceCard.tsx +77 -0
- package/src/components/ServiceCardGrid.tsx +141 -0
- package/src/components/ServiceDashboard.tsx +84 -0
- package/src/components/ServiceIcon.tsx +37 -0
- package/src/components/ServiceRow.tsx +50 -0
- package/src/components/useAdapter.ts +33 -0
- package/src/demos/ServiceDashboardDemo.tsx +108 -0
- package/src/index.ts +68 -0
- package/src/models/ActionNotificationModel.ts +72 -0
- package/src/models/ConnectionManagerModel.ts +410 -0
- package/src/models/CredentialFormModel.ts +111 -0
- package/src/models/DashboardModel.ts +157 -0
- package/src/models/GitHostBrowserModel.ts +89 -0
- package/src/models/GitRepoBrowserModel.ts +285 -0
- package/src/models/ObjectStorageBrowserModel.ts +131 -0
- package/src/models/RepoPickerModel.ts +132 -0
- package/src/registry/service-registry.ts +46 -0
- package/src/registry/services/apple.ts +22 -0
- package/src/registry/services/bitbucket.ts +24 -0
- package/src/registry/services/box.ts +22 -0
- package/src/registry/services/browser-fs.ts +19 -0
- package/src/registry/services/dropbox.ts +22 -0
- package/src/registry/services/flickr.ts +22 -0
- package/src/registry/services/gitea.ts +24 -0
- package/src/registry/services/github.ts +24 -0
- package/src/registry/services/gitlab.ts +24 -0
- package/src/registry/services/google.ts +24 -0
- package/src/registry/services/icloud.ts +23 -0
- package/src/registry/services/indexeddb.ts +19 -0
- package/src/registry/services/instagram.ts +22 -0
- package/src/registry/services/microsoft.ts +24 -0
- package/src/registry/services/s3.ts +21 -0
- package/src/registry/services/webdav.ts +21 -0
- package/src/registry.ts +4 -0
- package/src/types/connection-state.ts +33 -0
- package/src/types/connection.ts +11 -0
- package/src/types/optional-deps.d.ts +149 -0
- package/src/types/service.ts +18 -0
- package/src/types/user-profile.ts +21 -0
- package/src/utils/action-toast.ts +53 -0
- package/src/utils/scope-labels.ts +91 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,697 @@
|
|
|
1
|
+
import { CapabilityId, ServiceCapability, ServiceDefinition, getScopeLabel$1 as getScopeLabel, getScopeLabels$1 as getScopeLabels, serviceRegistry$1 as serviceRegistry } from "./scope-labels-DvdJLcSL.js";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { LucideProps } from "lucide-react";
|
|
4
|
+
import * as react_jsx_runtime16 from "react/jsx-runtime";
|
|
5
|
+
import * as react_jsx_runtime17 from "react/jsx-runtime";
|
|
6
|
+
import * as mobx_dist_internal6 from "mobx/dist/internal";
|
|
7
|
+
import * as mobx_dist_internal0 from "mobx/dist/internal";
|
|
8
|
+
import * as mobx_dist_internal1 from "mobx/dist/internal";
|
|
9
|
+
import * as mobx_dist_internal2 from "mobx/dist/internal";
|
|
10
|
+
import * as mobx_dist_internal3 from "mobx/dist/internal";
|
|
11
|
+
import * as mobx_dist_internal4 from "mobx/dist/internal";
|
|
12
|
+
import * as mobx_dist_internal5 from "mobx/dist/internal";
|
|
13
|
+
import * as mobx_dist_internal9 from "mobx/dist/internal";
|
|
14
|
+
import * as mobx_dist_internal10 from "mobx/dist/internal";
|
|
15
|
+
import * as mobx_dist_internal11 from "mobx/dist/internal";
|
|
16
|
+
import * as mobx_dist_internal12 from "mobx/dist/internal";
|
|
17
|
+
import * as mobx_dist_internal13 from "mobx/dist/internal";
|
|
18
|
+
import { GitBranch as GitBranch$1, GitCommit as GitCommit$1, GitDiffEntry, GitTag, IFileSystem, IGitHost, IGitRepo, IObjectStorage, Issue, PullRequest } from "@anymux/file-system";
|
|
19
|
+
|
|
20
|
+
//#region src/types/connection.d.ts
|
|
21
|
+
type ConnectionStatus = 'disconnected' | 'connecting' | 'connected' | 'expired' | 'error' | 'not_configured' | 'loading';
|
|
22
|
+
interface ConnectedService {
|
|
23
|
+
serviceId: string;
|
|
24
|
+
status: ConnectionStatus;
|
|
25
|
+
accessToken?: string | undefined;
|
|
26
|
+
refreshToken?: string | undefined;
|
|
27
|
+
expiresAt?: number | undefined;
|
|
28
|
+
scopes: string[];
|
|
29
|
+
connectedAt?: Date;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region src/types/user-profile.d.ts
|
|
34
|
+
//# sourceMappingURL=connection.d.ts.map
|
|
35
|
+
/**
|
|
36
|
+
* Normalized user profile from any OAuth provider or credential-based service.
|
|
37
|
+
* Each connected service produces its own IUserProfile, so a user who connects
|
|
38
|
+
* both GitHub and Google will have two profiles with different avatars, names, etc.
|
|
39
|
+
*/
|
|
40
|
+
interface IUserProfile {
|
|
41
|
+
/** Provider-specific user id (e.g. GitHub numeric id, Google sub) */
|
|
42
|
+
id: string;
|
|
43
|
+
/** Display name from the provider */
|
|
44
|
+
name: string;
|
|
45
|
+
/** Email associated with this provider account */
|
|
46
|
+
email?: string;
|
|
47
|
+
/** Avatar / profile picture URL */
|
|
48
|
+
avatarUrl?: string;
|
|
49
|
+
/** Link to the user's profile on the provider (e.g. github.com/user) */
|
|
50
|
+
profileUrl?: string;
|
|
51
|
+
/** AnyMux service id (e.g. 'github', 'google-drive') */
|
|
52
|
+
provider: string;
|
|
53
|
+
/** Raw provider-specific data for future use */
|
|
54
|
+
raw?: Record<string, unknown>;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
//#endregion
|
|
58
|
+
//#region src/registry/services/google.d.ts
|
|
59
|
+
//# sourceMappingURL=user-profile.d.ts.map
|
|
60
|
+
declare const googleService: ServiceDefinition;
|
|
61
|
+
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region src/registry/services/dropbox.d.ts
|
|
64
|
+
//# sourceMappingURL=google.d.ts.map
|
|
65
|
+
declare const dropboxService: ServiceDefinition;
|
|
66
|
+
|
|
67
|
+
//#endregion
|
|
68
|
+
//#region src/registry/services/github.d.ts
|
|
69
|
+
//# sourceMappingURL=dropbox.d.ts.map
|
|
70
|
+
declare const githubService: ServiceDefinition;
|
|
71
|
+
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region src/registry/services/microsoft.d.ts
|
|
74
|
+
//# sourceMappingURL=github.d.ts.map
|
|
75
|
+
declare const microsoftService: ServiceDefinition;
|
|
76
|
+
|
|
77
|
+
//#endregion
|
|
78
|
+
//#region src/registry/services/s3.d.ts
|
|
79
|
+
//# sourceMappingURL=microsoft.d.ts.map
|
|
80
|
+
declare const s3Service: ServiceDefinition;
|
|
81
|
+
|
|
82
|
+
//#endregion
|
|
83
|
+
//#region src/registry/services/webdav.d.ts
|
|
84
|
+
//# sourceMappingURL=s3.d.ts.map
|
|
85
|
+
declare const webdavService: ServiceDefinition;
|
|
86
|
+
|
|
87
|
+
//#endregion
|
|
88
|
+
//#region src/registry/services/gitlab.d.ts
|
|
89
|
+
//# sourceMappingURL=webdav.d.ts.map
|
|
90
|
+
declare const gitlabService: ServiceDefinition;
|
|
91
|
+
|
|
92
|
+
//#endregion
|
|
93
|
+
//#region src/registry/services/bitbucket.d.ts
|
|
94
|
+
//# sourceMappingURL=gitlab.d.ts.map
|
|
95
|
+
declare const bitbucketService: ServiceDefinition;
|
|
96
|
+
|
|
97
|
+
//#endregion
|
|
98
|
+
//#region src/registry/services/gitea.d.ts
|
|
99
|
+
//# sourceMappingURL=bitbucket.d.ts.map
|
|
100
|
+
declare const giteaService: ServiceDefinition;
|
|
101
|
+
|
|
102
|
+
//#endregion
|
|
103
|
+
//#region src/registry/services/browser-fs.d.ts
|
|
104
|
+
//# sourceMappingURL=gitea.d.ts.map
|
|
105
|
+
declare const browserFsService: ServiceDefinition;
|
|
106
|
+
|
|
107
|
+
//#endregion
|
|
108
|
+
//#region src/registry/services/indexeddb.d.ts
|
|
109
|
+
//# sourceMappingURL=browser-fs.d.ts.map
|
|
110
|
+
declare const indexeddbService: ServiceDefinition;
|
|
111
|
+
|
|
112
|
+
//#endregion
|
|
113
|
+
//#region src/registry/services/icloud.d.ts
|
|
114
|
+
//# sourceMappingURL=indexeddb.d.ts.map
|
|
115
|
+
declare const icloudService: ServiceDefinition;
|
|
116
|
+
|
|
117
|
+
//#endregion
|
|
118
|
+
//#region src/auth/auth-client.d.ts
|
|
119
|
+
//# sourceMappingURL=icloud.d.ts.map
|
|
120
|
+
interface ConnectAuthClient {
|
|
121
|
+
signIn(provider: string, serviceId: string): Promise<void>;
|
|
122
|
+
signOut(): Promise<void>;
|
|
123
|
+
getSession(): Promise<{
|
|
124
|
+
user: {
|
|
125
|
+
id: string;
|
|
126
|
+
name: string;
|
|
127
|
+
image?: string;
|
|
128
|
+
};
|
|
129
|
+
} | null>;
|
|
130
|
+
getAccessToken(providerId: string): Promise<string | null>;
|
|
131
|
+
fetchConfiguredProviders(): Promise<{
|
|
132
|
+
database: boolean;
|
|
133
|
+
authSecret: boolean;
|
|
134
|
+
providers: Record<string, boolean>;
|
|
135
|
+
}>;
|
|
136
|
+
fetchGrantedScopes(): Promise<Record<string, string[]>>;
|
|
137
|
+
fetchTestCredentials(): Promise<Record<string, unknown>>;
|
|
138
|
+
fetchUserProfiles(): Promise<Record<string, {
|
|
139
|
+
id: string;
|
|
140
|
+
name: string;
|
|
141
|
+
email?: string;
|
|
142
|
+
avatarUrl?: string;
|
|
143
|
+
profileUrl?: string;
|
|
144
|
+
}>>;
|
|
145
|
+
revokeProvider(providerId: string): Promise<void>;
|
|
146
|
+
getPendingServiceId(): string | null;
|
|
147
|
+
clearPendingServiceId(): void;
|
|
148
|
+
}
|
|
149
|
+
declare function createConnectAuthClient(baseURL: string): ConnectAuthClient;
|
|
150
|
+
|
|
151
|
+
//#endregion
|
|
152
|
+
//#region src/auth/token-manager.d.ts
|
|
153
|
+
//# sourceMappingURL=auth-client.d.ts.map
|
|
154
|
+
declare class TokenManager {
|
|
155
|
+
getToken(serviceId: string): string | null;
|
|
156
|
+
setToken(serviceId: string, token: string): void;
|
|
157
|
+
removeToken(serviceId: string): void;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
//#endregion
|
|
161
|
+
//#region src/models/ConnectionManagerModel.d.ts
|
|
162
|
+
//# sourceMappingURL=token-manager.d.ts.map
|
|
163
|
+
declare class ConnectionManagerModel {
|
|
164
|
+
connections: Map<string, ConnectedService>;
|
|
165
|
+
grantedScopes: Map<string, string[]>;
|
|
166
|
+
initialized: boolean;
|
|
167
|
+
configuredProviders: Set<string>;
|
|
168
|
+
configError: string | null;
|
|
169
|
+
/** Per-service user profiles with provider-specific name, avatar, and profile link */
|
|
170
|
+
userProfiles: Map<string, IUserProfile>;
|
|
171
|
+
testCredentials: Record<string, unknown>;
|
|
172
|
+
pendingReconnect: Set<string>;
|
|
173
|
+
private tokenManager;
|
|
174
|
+
private authClient;
|
|
175
|
+
constructor(options?: {
|
|
176
|
+
authClient?: ConnectAuthClient;
|
|
177
|
+
});
|
|
178
|
+
initialize(): Promise<void>;
|
|
179
|
+
/** Fetch per-provider profiles from the server and update the userProfiles map */
|
|
180
|
+
private fetchAndStoreUserProfiles;
|
|
181
|
+
private handleOAuthReturn;
|
|
182
|
+
private loadFromStorage;
|
|
183
|
+
private persistToStorage;
|
|
184
|
+
connect(serviceId: string): Promise<void>;
|
|
185
|
+
connectWithCredentials(serviceId: string, credentialToken: string): void;
|
|
186
|
+
disconnect: (serviceId: string) => mobx_dist_internal6.CancellablePromise<void>;
|
|
187
|
+
requestReconnect(serviceId: string): void;
|
|
188
|
+
clearReconnectRequest(serviceId: string): void;
|
|
189
|
+
isConnected(serviceId: string): boolean;
|
|
190
|
+
getStatus(serviceId: string): ConnectionStatus;
|
|
191
|
+
getToken(serviceId: string): string | null;
|
|
192
|
+
/** Refresh OAuth token from better-auth. Returns fresh token or null. */
|
|
193
|
+
refreshToken(serviceId: string): Promise<string | null>;
|
|
194
|
+
/** Get the full user profile for a connected service */
|
|
195
|
+
getUserProfile(serviceId: string): IUserProfile | undefined;
|
|
196
|
+
/** @deprecated Use getUserProfile() instead. Kept for backward compat. */
|
|
197
|
+
getUserInfo(serviceId: string): {
|
|
198
|
+
name: string;
|
|
199
|
+
image?: string;
|
|
200
|
+
} | null;
|
|
201
|
+
hasCapabilityScopes(serviceId: string, capabilityId: CapabilityId): boolean;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
//#endregion
|
|
205
|
+
//#region src/models/ActionNotificationModel.d.ts
|
|
206
|
+
//# sourceMappingURL=ConnectionManagerModel.d.ts.map
|
|
207
|
+
type ActionType = 'delete' | 'move' | 'rename' | 'upload' | 'create' | 'copy';
|
|
208
|
+
interface ActionRecord {
|
|
209
|
+
id: string;
|
|
210
|
+
type: ActionType;
|
|
211
|
+
description: string;
|
|
212
|
+
timestamp: Date;
|
|
213
|
+
/** Undo function — called when user clicks Undo */
|
|
214
|
+
undo?: () => Promise<void>;
|
|
215
|
+
/** Whether undo was executed */
|
|
216
|
+
undone: boolean;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Tracks user actions for toast notifications with undo support.
|
|
220
|
+
* Uses sonner's toast() externally — this model just manages the action log.
|
|
221
|
+
*/
|
|
222
|
+
declare class ActionNotificationModel {
|
|
223
|
+
actions: ActionRecord[];
|
|
224
|
+
/** Maximum actions to keep in history */
|
|
225
|
+
maxHistory: number;
|
|
226
|
+
constructor();
|
|
227
|
+
/**
|
|
228
|
+
* Record an action. Returns the action ID for reference.
|
|
229
|
+
* The caller is responsible for showing the toast via sonner's toast().
|
|
230
|
+
*/
|
|
231
|
+
record(type: ActionType, description: string, undo?: () => Promise<void>): string;
|
|
232
|
+
/** Mark an action as undone */
|
|
233
|
+
markUndone(id: string): void;
|
|
234
|
+
get recentActions(): ActionRecord[];
|
|
235
|
+
get undoableActions(): ActionRecord[];
|
|
236
|
+
clear(): void;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
//#endregion
|
|
240
|
+
//#region src/models/DashboardModel.d.ts
|
|
241
|
+
//# sourceMappingURL=ActionNotificationModel.d.ts.map
|
|
242
|
+
interface SelectedCell {
|
|
243
|
+
serviceId: string;
|
|
244
|
+
capabilityId: CapabilityId;
|
|
245
|
+
}
|
|
246
|
+
interface GitBrowserState {
|
|
247
|
+
serviceId: string;
|
|
248
|
+
owner?: string;
|
|
249
|
+
repo?: string;
|
|
250
|
+
ref?: string;
|
|
251
|
+
path?: string;
|
|
252
|
+
}
|
|
253
|
+
declare class DashboardModel {
|
|
254
|
+
selectedCell: SelectedCell | null;
|
|
255
|
+
panelOpen: boolean;
|
|
256
|
+
/** Generic repo selection per service (replaces githubRepo) */
|
|
257
|
+
selectedRepos: Record<string, {
|
|
258
|
+
owner: string;
|
|
259
|
+
repo: string;
|
|
260
|
+
}>;
|
|
261
|
+
browserPath: string;
|
|
262
|
+
gitBrowserState: GitBrowserState | null;
|
|
263
|
+
actionNotifications: ActionNotificationModel;
|
|
264
|
+
private connectionManager;
|
|
265
|
+
/** Optional callback when selected cell changes (for URL sync) */
|
|
266
|
+
onCellChange?: (cell: SelectedCell | null) => void;
|
|
267
|
+
/** Optional callback when browser path changes (for URL sync) */
|
|
268
|
+
onPathChange?: (path: string) => void;
|
|
269
|
+
constructor(connectionManager: ConnectionManagerModel);
|
|
270
|
+
/** @deprecated Use getSelectedRepo('github') instead */
|
|
271
|
+
get githubRepo(): {
|
|
272
|
+
owner: string;
|
|
273
|
+
repo: string;
|
|
274
|
+
} | null;
|
|
275
|
+
/** @deprecated Use setSelectedRepo('github', repo) instead */
|
|
276
|
+
setGitHubRepo(repo: {
|
|
277
|
+
owner: string;
|
|
278
|
+
repo: string;
|
|
279
|
+
}): void;
|
|
280
|
+
/** @deprecated Use clearSelectedRepo('github') instead */
|
|
281
|
+
clearGitHubRepo(): void;
|
|
282
|
+
setSelectedRepo(serviceId: string, repo: {
|
|
283
|
+
owner: string;
|
|
284
|
+
repo: string;
|
|
285
|
+
}): void;
|
|
286
|
+
clearSelectedRepo(serviceId: string): void;
|
|
287
|
+
getSelectedRepo(serviceId: string): {
|
|
288
|
+
owner: string;
|
|
289
|
+
repo: string;
|
|
290
|
+
} | null;
|
|
291
|
+
private persistRepos;
|
|
292
|
+
selectCell(serviceId: string, capabilityId: CapabilityId): void;
|
|
293
|
+
/** Open a cell without checking connection/capability (used for URL restore) */
|
|
294
|
+
openCell(serviceId: string, capabilityId: CapabilityId): void;
|
|
295
|
+
setBrowserPath(path: string): void;
|
|
296
|
+
setGitBrowserState(state: GitBrowserState | null): void;
|
|
297
|
+
closePanel(): void;
|
|
298
|
+
/** Close panel without triggering onCellChange (used for URL-driven state sync, e.g. browser back) */
|
|
299
|
+
closePanelSilent(): void;
|
|
300
|
+
/** Set browser path without triggering onPathChange (used for URL-driven state sync) */
|
|
301
|
+
setBrowserPathSilent(path: string): void;
|
|
302
|
+
get selectedService(): ServiceDefinition | null;
|
|
303
|
+
get selectedCapability(): ServiceCapability | null;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
//#endregion
|
|
307
|
+
//#region src/models/GitRepoBrowserModel.d.ts
|
|
308
|
+
//# sourceMappingURL=DashboardModel.d.ts.map
|
|
309
|
+
type SidebarTab = 'files' | 'branches' | 'commits' | 'prs' | 'issues';
|
|
310
|
+
declare class GitRepoBrowserModel {
|
|
311
|
+
private gitRepo;
|
|
312
|
+
private _gitHost;
|
|
313
|
+
private createFileSystem;
|
|
314
|
+
private onError?;
|
|
315
|
+
branches: GitBranch$1[];
|
|
316
|
+
tags: GitTag[];
|
|
317
|
+
currentRef: string;
|
|
318
|
+
fileSystem: IFileSystem | null;
|
|
319
|
+
loading: boolean;
|
|
320
|
+
error: string | null;
|
|
321
|
+
activeTab: SidebarTab;
|
|
322
|
+
commits: GitCommit$1[];
|
|
323
|
+
commitsLoading: boolean;
|
|
324
|
+
commitsPage: number;
|
|
325
|
+
hasMoreCommits: boolean;
|
|
326
|
+
selectedCommitSha: string | undefined;
|
|
327
|
+
diffEntries: GitDiffEntry[];
|
|
328
|
+
diffLoading: boolean;
|
|
329
|
+
prs: PullRequest[];
|
|
330
|
+
issues: Issue[];
|
|
331
|
+
hostLoading: boolean;
|
|
332
|
+
hostError: string | null;
|
|
333
|
+
prPage: number;
|
|
334
|
+
issuePage: number;
|
|
335
|
+
hasMorePrs: boolean;
|
|
336
|
+
hasMoreIssues: boolean;
|
|
337
|
+
constructor(gitRepo: IGitRepo, _gitHost: IGitHost | undefined, createFileSystem: (branch: string) => Promise<IFileSystem>, onError?: ((err: {
|
|
338
|
+
message: string;
|
|
339
|
+
}) => void) | undefined);
|
|
340
|
+
/** Update the gitHost adapter (e.g. when loaded asynchronously after construction) */
|
|
341
|
+
setGitHost(host: IGitHost): void;
|
|
342
|
+
get headSha(): string | undefined;
|
|
343
|
+
get hasGitHost(): boolean;
|
|
344
|
+
setActiveTab(tab: SidebarTab): void;
|
|
345
|
+
initialize: () => mobx_dist_internal0.CancellablePromise<void>;
|
|
346
|
+
switchRef: (ref: string) => mobx_dist_internal1.CancellablePromise<void>;
|
|
347
|
+
loadCommits: () => mobx_dist_internal2.CancellablePromise<void>;
|
|
348
|
+
selectCommit: (commit: GitCommit$1) => mobx_dist_internal3.CancellablePromise<void>;
|
|
349
|
+
loadPRs: () => mobx_dist_internal4.CancellablePromise<void>;
|
|
350
|
+
loadIssues: () => mobx_dist_internal5.CancellablePromise<void>;
|
|
351
|
+
nextCommitsPage(): void;
|
|
352
|
+
prevCommitsPage(): void;
|
|
353
|
+
nextPrPage(): void;
|
|
354
|
+
prevPrPage(): void;
|
|
355
|
+
nextIssuePage(): void;
|
|
356
|
+
prevIssuePage(): void;
|
|
357
|
+
retryPRs(): void;
|
|
358
|
+
retryIssues(): void;
|
|
359
|
+
selectBranch(branch: GitBranch$1): void;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
//#endregion
|
|
363
|
+
//#region src/models/ObjectStorageBrowserModel.d.ts
|
|
364
|
+
//# sourceMappingURL=GitRepoBrowserModel.d.ts.map
|
|
365
|
+
interface DisplayObject {
|
|
366
|
+
key: string;
|
|
367
|
+
size?: number;
|
|
368
|
+
lastModified?: Date;
|
|
369
|
+
isPrefix: boolean;
|
|
370
|
+
}
|
|
371
|
+
declare class ObjectStorageBrowserModel {
|
|
372
|
+
storage: IObjectStorage;
|
|
373
|
+
bucket: string;
|
|
374
|
+
prefix: string;
|
|
375
|
+
objects: DisplayObject[];
|
|
376
|
+
loading: boolean;
|
|
377
|
+
error: string | null;
|
|
378
|
+
continuationToken: string | undefined;
|
|
379
|
+
tokenHistory: (string | undefined)[];
|
|
380
|
+
page: number;
|
|
381
|
+
hasMore: boolean;
|
|
382
|
+
constructor(storage: IObjectStorage, bucket: string);
|
|
383
|
+
get breadcrumbs(): Array<{
|
|
384
|
+
label: string;
|
|
385
|
+
prefix: string;
|
|
386
|
+
}>;
|
|
387
|
+
displayName(key: string): string;
|
|
388
|
+
loadObjects: (token?: string | undefined) => mobx_dist_internal9.CancellablePromise<void>;
|
|
389
|
+
initialize: () => mobx_dist_internal10.CancellablePromise<void>;
|
|
390
|
+
navigateToPrefix(newPrefix: string): void;
|
|
391
|
+
navigateUp(): void;
|
|
392
|
+
nextPage(): void;
|
|
393
|
+
prevPage(): void;
|
|
394
|
+
download: (key: string) => mobx_dist_internal11.CancellablePromise<void>;
|
|
395
|
+
refresh(): void;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
//#endregion
|
|
399
|
+
//#region src/models/RepoPickerModel.d.ts
|
|
400
|
+
//# sourceMappingURL=ObjectStorageBrowserModel.d.ts.map
|
|
401
|
+
interface RepoInfo {
|
|
402
|
+
fullName: string;
|
|
403
|
+
description: string | null;
|
|
404
|
+
language: string | null;
|
|
405
|
+
isPrivate: boolean;
|
|
406
|
+
}
|
|
407
|
+
declare class RepoPickerModel {
|
|
408
|
+
serviceId: string;
|
|
409
|
+
accessToken: string;
|
|
410
|
+
repos: RepoInfo[];
|
|
411
|
+
loading: boolean;
|
|
412
|
+
error: string | null;
|
|
413
|
+
search: string;
|
|
414
|
+
constructor(serviceId: string, accessToken: string);
|
|
415
|
+
get filtered(): RepoInfo[];
|
|
416
|
+
setSearch(value: string): void;
|
|
417
|
+
loadRepos: () => mobx_dist_internal12.CancellablePromise<void>;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
//#endregion
|
|
421
|
+
//#region src/models/GitHostBrowserModel.d.ts
|
|
422
|
+
//# sourceMappingURL=RepoPickerModel.d.ts.map
|
|
423
|
+
type HostTab = 'prs' | 'issues';
|
|
424
|
+
declare class GitHostBrowserModel {
|
|
425
|
+
gitHost: IGitHost;
|
|
426
|
+
activeTab: HostTab;
|
|
427
|
+
prs: PullRequest[];
|
|
428
|
+
issues: Issue[];
|
|
429
|
+
hasMorePrs: boolean;
|
|
430
|
+
hasMoreIssues: boolean;
|
|
431
|
+
page: number;
|
|
432
|
+
loading: boolean;
|
|
433
|
+
error: string | null;
|
|
434
|
+
constructor(gitHost: IGitHost);
|
|
435
|
+
get currentItems(): PullRequest[] | Issue[];
|
|
436
|
+
get hasMore(): boolean;
|
|
437
|
+
get showPagination(): boolean;
|
|
438
|
+
setActiveTab(tab: HostTab): void;
|
|
439
|
+
nextPage(): void;
|
|
440
|
+
prevPage(): void;
|
|
441
|
+
retry(): void;
|
|
442
|
+
loadData: () => mobx_dist_internal13.CancellablePromise<void>;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
//#endregion
|
|
446
|
+
//#region src/models/CredentialFormModel.d.ts
|
|
447
|
+
//# sourceMappingURL=GitHostBrowserModel.d.ts.map
|
|
448
|
+
type CredentialServiceType = 's3' | 'webdav' | 'gitea' | 'icloud';
|
|
449
|
+
declare class CredentialFormModel {
|
|
450
|
+
open: boolean;
|
|
451
|
+
serviceType: CredentialServiceType;
|
|
452
|
+
accessKeyId: string;
|
|
453
|
+
secretAccessKey: string;
|
|
454
|
+
region: string;
|
|
455
|
+
bucket: string;
|
|
456
|
+
endpoint: string;
|
|
457
|
+
url: string;
|
|
458
|
+
username: string;
|
|
459
|
+
password: string;
|
|
460
|
+
token: string;
|
|
461
|
+
owner: string;
|
|
462
|
+
repo: string;
|
|
463
|
+
email: string;
|
|
464
|
+
appPassword: string;
|
|
465
|
+
constructor();
|
|
466
|
+
openForm(serviceType: CredentialServiceType, prefill?: Record<string, string>): void;
|
|
467
|
+
closeForm(): void;
|
|
468
|
+
setField(field: string, value: string): void;
|
|
469
|
+
/** Serialize current form state to JSON credential string */
|
|
470
|
+
serialize(): string;
|
|
471
|
+
private resetFields;
|
|
472
|
+
private applyPrefill;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
//#endregion
|
|
476
|
+
//#region src/utils/action-toast.d.ts
|
|
477
|
+
//# sourceMappingURL=CredentialFormModel.d.ts.map
|
|
478
|
+
/**
|
|
479
|
+
* Show a toast notification for a user action, with optional undo.
|
|
480
|
+
* Records the action in the ActionNotificationModel for history.
|
|
481
|
+
*/
|
|
482
|
+
declare function showActionToast(model: ActionNotificationModel, type: ActionType, description: string, options?: {
|
|
483
|
+
undo?: () => Promise<void>;
|
|
484
|
+
/** Duration in ms before auto-dismiss. Default 5000. */
|
|
485
|
+
duration?: number;
|
|
486
|
+
}): string;
|
|
487
|
+
/** Show an error toast */
|
|
488
|
+
declare function showErrorToast(message: string, context?: string): void;
|
|
489
|
+
/** Show an info toast */
|
|
490
|
+
declare function showInfoToast(message: string): void;
|
|
491
|
+
|
|
492
|
+
//#endregion
|
|
493
|
+
//#region src/components/ServiceDashboard.d.ts
|
|
494
|
+
//# sourceMappingURL=action-toast.d.ts.map
|
|
495
|
+
interface ServiceDashboardProps {
|
|
496
|
+
connectionManager: ConnectionManagerModel;
|
|
497
|
+
dashboardModel: DashboardModel;
|
|
498
|
+
}
|
|
499
|
+
declare const ServiceDashboard: React.FC<ServiceDashboardProps>;
|
|
500
|
+
|
|
501
|
+
//#endregion
|
|
502
|
+
//#region src/components/ServiceRow.d.ts
|
|
503
|
+
interface ServiceRowProps {
|
|
504
|
+
service: ServiceDefinition;
|
|
505
|
+
connectionManager: ConnectionManagerModel;
|
|
506
|
+
dashboardModel: DashboardModel;
|
|
507
|
+
}
|
|
508
|
+
declare const ServiceRow: React.FC<ServiceRowProps>;
|
|
509
|
+
|
|
510
|
+
//#endregion
|
|
511
|
+
//#region src/components/ServiceCard.d.ts
|
|
512
|
+
interface ServiceCardProps {
|
|
513
|
+
service: ServiceDefinition;
|
|
514
|
+
connectionManager: ConnectionManagerModel;
|
|
515
|
+
dashboardModel: DashboardModel;
|
|
516
|
+
}
|
|
517
|
+
declare const ServiceCard: React.FC<ServiceCardProps>;
|
|
518
|
+
|
|
519
|
+
//#endregion
|
|
520
|
+
//#region src/components/CapabilityCell.d.ts
|
|
521
|
+
interface CapabilityCellProps {
|
|
522
|
+
service: ServiceDefinition;
|
|
523
|
+
capabilityId: CapabilityId;
|
|
524
|
+
connectionManager: ConnectionManagerModel;
|
|
525
|
+
dashboardModel: DashboardModel;
|
|
526
|
+
}
|
|
527
|
+
declare const CapabilityCell: React.FC<CapabilityCellProps>;
|
|
528
|
+
|
|
529
|
+
//#endregion
|
|
530
|
+
//#region src/components/CapabilityPill.d.ts
|
|
531
|
+
interface CapabilityPillProps {
|
|
532
|
+
label: string;
|
|
533
|
+
capabilityId: CapabilityId;
|
|
534
|
+
status: ConnectionStatus;
|
|
535
|
+
isSelected: boolean;
|
|
536
|
+
hasScopes: boolean;
|
|
537
|
+
onSelect: () => void;
|
|
538
|
+
disabled?: boolean;
|
|
539
|
+
}
|
|
540
|
+
declare const CapabilityPill: React.FC<CapabilityPillProps>;
|
|
541
|
+
|
|
542
|
+
//#endregion
|
|
543
|
+
//#region src/components/ConnectButton.d.ts
|
|
544
|
+
interface ConnectButtonProps {
|
|
545
|
+
service: ServiceDefinition;
|
|
546
|
+
connectionManager: ConnectionManagerModel;
|
|
547
|
+
}
|
|
548
|
+
declare const ConnectButton: React.FC<ConnectButtonProps>;
|
|
549
|
+
|
|
550
|
+
//#endregion
|
|
551
|
+
//#region src/components/ConnectedMenu.d.ts
|
|
552
|
+
interface ConnectedMenuProps {
|
|
553
|
+
service: ServiceDefinition;
|
|
554
|
+
connectionManager: ConnectionManagerModel;
|
|
555
|
+
/** @deprecated Use profile instead */
|
|
556
|
+
user: {
|
|
557
|
+
name: string;
|
|
558
|
+
image?: string;
|
|
559
|
+
} | null;
|
|
560
|
+
profile?: IUserProfile;
|
|
561
|
+
isOAuth: boolean;
|
|
562
|
+
}
|
|
563
|
+
declare function ConnectedMenu({
|
|
564
|
+
service,
|
|
565
|
+
connectionManager,
|
|
566
|
+
user,
|
|
567
|
+
profile,
|
|
568
|
+
isOAuth
|
|
569
|
+
}: ConnectedMenuProps): react_jsx_runtime16.JSX.Element;
|
|
570
|
+
|
|
571
|
+
//#endregion
|
|
572
|
+
//#region src/components/CredentialForm.d.ts
|
|
573
|
+
interface CredentialFormProps {
|
|
574
|
+
model: CredentialFormModel;
|
|
575
|
+
onSubmit: (credentials: string) => void;
|
|
576
|
+
}
|
|
577
|
+
declare const CredentialForm: React.FC<CredentialFormProps>;
|
|
578
|
+
|
|
579
|
+
//#endregion
|
|
580
|
+
//#region src/components/ServiceIcon.d.ts
|
|
581
|
+
interface ServiceIconProps extends LucideProps {
|
|
582
|
+
name: string;
|
|
583
|
+
}
|
|
584
|
+
declare const ServiceIcon: React.FC<ServiceIconProps>;
|
|
585
|
+
|
|
586
|
+
//#endregion
|
|
587
|
+
//#region src/components/CapabilityPanel.d.ts
|
|
588
|
+
interface CapabilityPanelProps {
|
|
589
|
+
dashboardModel: DashboardModel;
|
|
590
|
+
connectionManager: ConnectionManagerModel;
|
|
591
|
+
}
|
|
592
|
+
declare const CapabilityPanel: React.FC<CapabilityPanelProps>;
|
|
593
|
+
|
|
594
|
+
//#endregion
|
|
595
|
+
//#region src/components/ConnectionStatus.d.ts
|
|
596
|
+
//# sourceMappingURL=CapabilityPanel.d.ts.map
|
|
597
|
+
interface ConnectionStatusProps {
|
|
598
|
+
status: ConnectionStatus;
|
|
599
|
+
}
|
|
600
|
+
declare const ConnectionStatusIndicator: React.FC<ConnectionStatusProps>;
|
|
601
|
+
|
|
602
|
+
//#endregion
|
|
603
|
+
//#region src/components/ObjectStorageBrowser.d.ts
|
|
604
|
+
interface ObjectStorageBrowserProps {
|
|
605
|
+
storage: IObjectStorage;
|
|
606
|
+
bucket: string;
|
|
607
|
+
}
|
|
608
|
+
declare const ObjectStorageBrowser: React.FC<ObjectStorageBrowserProps>;
|
|
609
|
+
|
|
610
|
+
//#endregion
|
|
611
|
+
//#region src/components/GitBrowser.d.ts
|
|
612
|
+
interface GitRepoBrowserProps {
|
|
613
|
+
gitRepo: IGitRepo;
|
|
614
|
+
owner: string;
|
|
615
|
+
repo: string;
|
|
616
|
+
/** Creates an IFileSystem scoped to a particular branch/ref */
|
|
617
|
+
createFileSystem: (branch: string) => Promise<IFileSystem>;
|
|
618
|
+
/** Optional git host adapter for PRs/Issues tabs */
|
|
619
|
+
gitHost?: IGitHost;
|
|
620
|
+
onError?: (err: {
|
|
621
|
+
message: string;
|
|
622
|
+
}) => void;
|
|
623
|
+
/** Optional action notifications model for recording actions */
|
|
624
|
+
actionNotifications?: ActionNotificationModel;
|
|
625
|
+
}
|
|
626
|
+
declare const GitRepoBrowser: React.FC<GitRepoBrowserProps>;
|
|
627
|
+
interface GitHostBrowserProps {
|
|
628
|
+
gitHost: IGitHost;
|
|
629
|
+
}
|
|
630
|
+
declare const GitHostBrowser: React.FC<GitHostBrowserProps>;
|
|
631
|
+
|
|
632
|
+
//#endregion
|
|
633
|
+
//#region src/components/GitHubRepoPicker.d.ts
|
|
634
|
+
interface GitHubRepoPickerProps {
|
|
635
|
+
accessToken: string;
|
|
636
|
+
onSelectRepo: (repo: {
|
|
637
|
+
owner: string;
|
|
638
|
+
repo: string;
|
|
639
|
+
}) => void;
|
|
640
|
+
}
|
|
641
|
+
declare function GitHubRepoPicker({
|
|
642
|
+
accessToken,
|
|
643
|
+
onSelectRepo
|
|
644
|
+
}: GitHubRepoPickerProps): react_jsx_runtime17.JSX.Element;
|
|
645
|
+
|
|
646
|
+
//#endregion
|
|
647
|
+
//#region src/components/RepoPicker.d.ts
|
|
648
|
+
interface RepoPickerProps {
|
|
649
|
+
serviceId: string;
|
|
650
|
+
accessToken: string;
|
|
651
|
+
onSelectRepo: (repo: {
|
|
652
|
+
owner: string;
|
|
653
|
+
repo: string;
|
|
654
|
+
}) => void;
|
|
655
|
+
}
|
|
656
|
+
declare const RepoPicker: React.FC<RepoPickerProps>;
|
|
657
|
+
|
|
658
|
+
//#endregion
|
|
659
|
+
//#region src/components/FullScreenBrowser.d.ts
|
|
660
|
+
interface FullScreenBrowserProps {
|
|
661
|
+
dashboardModel: DashboardModel;
|
|
662
|
+
connectionManager: ConnectionManagerModel;
|
|
663
|
+
}
|
|
664
|
+
declare const FullScreenBrowser: React.FC<FullScreenBrowserProps>;
|
|
665
|
+
|
|
666
|
+
//#endregion
|
|
667
|
+
//#region src/components/ActionHistoryPanel.d.ts
|
|
668
|
+
interface ActionHistoryPanelProps {
|
|
669
|
+
model: ActionNotificationModel;
|
|
670
|
+
}
|
|
671
|
+
declare const ActionHistoryPanel: React.FC<ActionHistoryPanelProps>;
|
|
672
|
+
|
|
673
|
+
//#endregion
|
|
674
|
+
//#region src/demos/ServiceDashboardDemo.d.ts
|
|
675
|
+
interface ServiceDashboardDemoProps {
|
|
676
|
+
authBaseURL: string;
|
|
677
|
+
/** Initial service to open (from URL) */
|
|
678
|
+
initialService?: string;
|
|
679
|
+
/** Initial capability to open (from URL) */
|
|
680
|
+
initialCapability?: string;
|
|
681
|
+
/** Initial file browser path (from URL) */
|
|
682
|
+
initialPath?: string;
|
|
683
|
+
/** Callback when selected cell changes (for URL sync) */
|
|
684
|
+
onCellChange?: (cell: {
|
|
685
|
+
serviceId: string;
|
|
686
|
+
capabilityId: string;
|
|
687
|
+
} | null) => void;
|
|
688
|
+
/** Callback when file browser path changes (for URL sync) */
|
|
689
|
+
onPathChange?: (path: string) => void;
|
|
690
|
+
}
|
|
691
|
+
declare const ServiceDashboardDemo: React.FC<ServiceDashboardDemoProps>;
|
|
692
|
+
|
|
693
|
+
//#endregion
|
|
694
|
+
//# sourceMappingURL=ServiceDashboardDemo.d.ts.map
|
|
695
|
+
|
|
696
|
+
export { ActionHistoryPanel, ActionNotificationModel, ActionRecord, ActionType, CapabilityCell, CapabilityId, CapabilityPanel, CapabilityPill, ConnectAuthClient, ConnectButton, ConnectedMenu, ConnectedService, ConnectionManagerModel, ConnectionStatus, ConnectionStatusIndicator, CredentialForm, CredentialFormModel, CredentialServiceType, DashboardModel, DisplayObject, FullScreenBrowser, GitHostBrowser, GitHostBrowserModel, GitHubRepoPicker, GitRepoBrowser, GitRepoBrowserModel, HostTab, IUserProfile, ObjectStorageBrowser, ObjectStorageBrowserModel, RepoInfo, RepoPicker, RepoPickerModel, SelectedCell, ServiceCapability, ServiceCard, ServiceDashboard, ServiceDashboardDemo, ServiceDashboardDemoProps, ServiceDefinition, ServiceIcon, ServiceRow, SidebarTab, TokenManager, bitbucketService, browserFsService, createConnectAuthClient, dropboxService, getScopeLabel, getScopeLabels, giteaService, githubService, gitlabService, googleService, icloudService, indexeddbService, microsoftService, s3Service, serviceRegistry, showActionToast, showErrorToast, showInfoToast, webdavService };
|
|
697
|
+
//# sourceMappingURL=index.d.ts.map
|