@hachej/boring-workspace 0.1.59 → 0.1.61
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/{FileTree-ChkSU4gL.js → FileTree-zGmxifl_.js} +11 -11
- package/dist/{MarkdownEditor-BlYGosmH.js → MarkdownEditor-BykEKKxv.js} +222 -206
- package/dist/{WorkspaceLoadingState-BYTO4wdt.js → WorkspaceLoadingState-Dfnk7JjR.js} +425 -335
- package/dist/WorkspaceProvider-kf-pjz6V.js +8530 -0
- package/dist/app-front.d.ts +141 -37
- package/dist/app-front.js +2037 -891
- package/dist/boring-workspace.css +1 -1
- package/dist/events.d.ts +2 -2
- package/dist/plugin.d.ts +27 -33
- package/dist/plugin.js +15 -13
- package/dist/shared.d.ts +1 -1
- package/dist/{surface-DmIalUmP.d.ts → surface-CDklwi48.d.ts} +34 -6
- package/dist/testing.d.ts +4 -4
- package/dist/testing.js +20 -21
- package/dist/workspace.css +488 -138
- package/dist/workspace.d.ts +207 -33
- package/dist/workspace.js +259 -255
- package/docs/INTERFACES.md +2 -2
- package/docs/README.md +3 -3
- package/package.json +4 -4
- package/dist/WorkspaceProvider-Bp1Sm40K.js +0 -8004
- package/dist/panel-DnvDNQac.js +0 -6
package/dist/app-front.d.ts
CHANGED
|
@@ -11,8 +11,8 @@ declare interface BoringFrontAPI {
|
|
|
11
11
|
registerBinding(registration: BoringFrontBindingRegistration): void;
|
|
12
12
|
registerCatalog(registration: CatalogConfig): void;
|
|
13
13
|
registerPanel<T = unknown>(registration: BoringFrontPanelRegistration<T>): void;
|
|
14
|
+
registerWorkspaceSource<T = unknown>(registration: BoringFrontWorkspaceSourceRegistration<T>): void;
|
|
14
15
|
registerPanelCommand(registration: BoringFrontPanelCommandRegistration): void;
|
|
15
|
-
registerLeftTab<T = LeftTabParams>(registration: BoringFrontLeftTabRegistration<T>): void;
|
|
16
16
|
registerSurfaceResolver(registration: BoringFrontSurfaceResolverRegistration): void;
|
|
17
17
|
registerToolRenderer(registration: BoringFrontToolRendererRegistration): void;
|
|
18
18
|
}
|
|
@@ -34,20 +34,6 @@ declare type BoringFrontFactoryWithId = BoringFrontFactory & {
|
|
|
34
34
|
pluginLabel?: string;
|
|
35
35
|
};
|
|
36
36
|
|
|
37
|
-
declare interface BoringFrontLeftTabRegistration<T = LeftTabParams> {
|
|
38
|
-
id: string;
|
|
39
|
-
title: string;
|
|
40
|
-
panelId: string;
|
|
41
|
-
icon?: ComponentType<{
|
|
42
|
-
className?: string;
|
|
43
|
-
}>;
|
|
44
|
-
component?: PanelConfig<T>["component"];
|
|
45
|
-
lazy?: boolean;
|
|
46
|
-
chromeless?: boolean;
|
|
47
|
-
requiresCapabilities?: string[];
|
|
48
|
-
source?: string;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
37
|
declare interface BoringFrontPanelCommandRegistration {
|
|
52
38
|
id: string;
|
|
53
39
|
title: string;
|
|
@@ -67,7 +53,7 @@ declare interface BoringFrontPanelRegistration<T = unknown> {
|
|
|
67
53
|
icon?: ComponentType<{
|
|
68
54
|
className?: string;
|
|
69
55
|
}>;
|
|
70
|
-
placement?:
|
|
56
|
+
placement?: PanelConfig["placement"];
|
|
71
57
|
requiresCapabilities?: string[];
|
|
72
58
|
essential?: boolean;
|
|
73
59
|
lazy?: boolean;
|
|
@@ -84,6 +70,11 @@ declare interface BoringFrontProviderRegistration {
|
|
|
84
70
|
declare interface BoringFrontSurfaceResolverRegistration {
|
|
85
71
|
id?: string;
|
|
86
72
|
kind: string;
|
|
73
|
+
title?: string;
|
|
74
|
+
description?: string;
|
|
75
|
+
targetHint?: string;
|
|
76
|
+
examples?: SurfaceResolverExample[];
|
|
77
|
+
metaSchema?: Record<string, unknown>;
|
|
87
78
|
source?: string;
|
|
88
79
|
resolve: (request: SurfaceOpenRequest) => SurfacePanelResolution | null | undefined;
|
|
89
80
|
}
|
|
@@ -95,6 +86,22 @@ declare interface BoringFrontToolRendererRegistration {
|
|
|
95
86
|
render: BoringFrontToolRenderer;
|
|
96
87
|
}
|
|
97
88
|
|
|
89
|
+
declare interface BoringFrontWorkspaceSourceRegistration<T = unknown> {
|
|
90
|
+
id: string;
|
|
91
|
+
component: ComponentType<WorkspaceSourceProps<T>> | (() => Promise<{
|
|
92
|
+
default: ComponentType<WorkspaceSourceProps<T>>;
|
|
93
|
+
}>);
|
|
94
|
+
label?: string;
|
|
95
|
+
icon?: ComponentType<{
|
|
96
|
+
className?: string;
|
|
97
|
+
}>;
|
|
98
|
+
requiresCapabilities?: string[];
|
|
99
|
+
lazy?: boolean;
|
|
100
|
+
chromeless?: boolean;
|
|
101
|
+
defaultPanelId?: string;
|
|
102
|
+
source?: string;
|
|
103
|
+
}
|
|
104
|
+
|
|
98
105
|
declare type CatalogAdapter = {
|
|
99
106
|
search(args: CatalogSearchArgs): Promise<CatalogSearchResult>;
|
|
100
107
|
fetchFacets?(args: CatalogFacetsArgs): Promise<CatalogFacets>;
|
|
@@ -168,6 +175,10 @@ declare interface ChatLayoutProps {
|
|
|
168
175
|
flashChatPaneId?: string | null;
|
|
169
176
|
surface?: string | null;
|
|
170
177
|
surfaceParams?: Record<string, unknown>;
|
|
178
|
+
/** Opaque overlay rendered over the full chat stage only (not over the workbench). */
|
|
179
|
+
chatOverlay?: ReactNode;
|
|
180
|
+
/** Called when shell chrome needs to dismiss the chat overlay before collapsing chat. */
|
|
181
|
+
onCloseChatOverlay?: () => void;
|
|
171
182
|
surfaceOverlay?: ReactNode;
|
|
172
183
|
sidebar?: string | null;
|
|
173
184
|
sidebarParams?: Record<string, unknown>;
|
|
@@ -196,6 +207,22 @@ declare interface CommandConfig {
|
|
|
196
207
|
pluginId?: string;
|
|
197
208
|
}
|
|
198
209
|
|
|
210
|
+
declare interface CommandPaletteSessionItem {
|
|
211
|
+
id: string;
|
|
212
|
+
title?: string | null;
|
|
213
|
+
updatedAt?: string | number;
|
|
214
|
+
turnCount?: number;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
declare interface CommandPaletteSessionSearchConfig {
|
|
218
|
+
sessions: CommandPaletteSessionItem[];
|
|
219
|
+
activeId?: string | null;
|
|
220
|
+
openIds?: readonly string[];
|
|
221
|
+
search?: (sessions: readonly CommandPaletteSessionItem[], query: string) => CommandPaletteSessionItem[];
|
|
222
|
+
onSwitch: (id: string) => void;
|
|
223
|
+
onOpenAsTab: (id: string) => void;
|
|
224
|
+
}
|
|
225
|
+
|
|
199
226
|
export declare function createLocalStorageSessions(opts?: CreateLocalStorageSessionsOptions): WorkspaceLocalSessionsStore;
|
|
200
227
|
|
|
201
228
|
export declare interface CreateLocalStorageSessionsOptions {
|
|
@@ -217,20 +244,6 @@ export declare const FULL_PAGE_PANEL_RENDER_FAILED = "FULL_PAGE_PANEL_RENDER_FAI
|
|
|
217
244
|
|
|
218
245
|
export declare const FULL_PAGE_PANEL_UNKNOWN_COMPONENT = "FULL_PAGE_PANEL_UNKNOWN_COMPONENT";
|
|
219
246
|
|
|
220
|
-
declare interface LeftTabParams {
|
|
221
|
-
rootDir?: string;
|
|
222
|
-
query?: string;
|
|
223
|
-
searchQuery?: string;
|
|
224
|
-
bridge?: unknown;
|
|
225
|
-
chromeless?: boolean;
|
|
226
|
-
/** Optional DOM target for left-tab toolbar actions owned by the pane. */
|
|
227
|
-
chromeActionsElement?: Element | null;
|
|
228
|
-
revealFileTreeRequest?: {
|
|
229
|
-
path: string;
|
|
230
|
-
seq: number;
|
|
231
|
-
} | null;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
247
|
declare interface OpenPanelConfig {
|
|
235
248
|
/** Panel instance id. If a panel with this id is already open, it's re-activated instead of duplicated. */
|
|
236
249
|
id: string;
|
|
@@ -248,14 +261,12 @@ declare interface PanelConfig<T = any> {
|
|
|
248
261
|
icon?: ComponentType<{
|
|
249
262
|
className?: string;
|
|
250
263
|
}>;
|
|
251
|
-
/** Placement hint
|
|
252
|
-
placement?: string;
|
|
264
|
+
/** Placement hint. Public plugin placements: "workspace-page" | "shared-dockview". */
|
|
265
|
+
placement?: PanelPlacement | string;
|
|
253
266
|
requiresCapabilities?: string[];
|
|
254
267
|
essential?: boolean;
|
|
255
268
|
chromeless?: boolean;
|
|
256
269
|
supportsFullPage?: boolean;
|
|
257
|
-
/** Center-panel id opened when this config is used as a left-tab category. */
|
|
258
|
-
defaultPanelId?: string;
|
|
259
270
|
/** Source: "builtin" | "app" */
|
|
260
271
|
source?: string;
|
|
261
272
|
pluginId?: string;
|
|
@@ -272,6 +283,8 @@ declare interface PanelConfig<T = any> {
|
|
|
272
283
|
}>);
|
|
273
284
|
}
|
|
274
285
|
|
|
286
|
+
declare type PanelPlacement = "left" | "center" | "right" | "bottom" | "shared-dockview" | "workspace-page" | "right-tab";
|
|
287
|
+
|
|
275
288
|
/**
|
|
276
289
|
* Unified prop shape for panel components rendered inside DockviewShell.
|
|
277
290
|
*
|
|
@@ -345,9 +358,17 @@ declare interface SurfacePanelResolution {
|
|
|
345
358
|
score?: number;
|
|
346
359
|
}
|
|
347
360
|
|
|
361
|
+
declare interface SurfaceResolverExample {
|
|
362
|
+
target: string;
|
|
363
|
+
label?: string;
|
|
364
|
+
meta?: Record<string, unknown>;
|
|
365
|
+
}
|
|
366
|
+
|
|
348
367
|
declare interface SurfaceShellApi {
|
|
349
368
|
/** Open a file in the workbench. Idempotent — re-activates an existing pane for the same path. */
|
|
350
|
-
openFile: (path: string
|
|
369
|
+
openFile: (path: string, opts?: {
|
|
370
|
+
mode?: "view" | "edit" | "diff";
|
|
371
|
+
}) => void;
|
|
351
372
|
/** Open a plugin-defined surface target through the registered surface resolvers. */
|
|
352
373
|
openSurface: (request: SurfaceOpenRequest) => void;
|
|
353
374
|
/**
|
|
@@ -377,6 +398,8 @@ declare interface SurfaceShellProps {
|
|
|
377
398
|
onChange?: (snapshot: SurfaceShellSnapshot) => void;
|
|
378
399
|
/** Optional close action for hosts that model the workbench as collapsible. */
|
|
379
400
|
onClose?: () => void;
|
|
401
|
+
/** Render the built-in top-right close affordance. Hosts can set false when they provide their own chrome. */
|
|
402
|
+
showCloseAction?: boolean;
|
|
380
403
|
/**
|
|
381
404
|
* Extra panel ids (registered via WorkspaceProvider's `panels` prop) that
|
|
382
405
|
* this workbench is allowed to render. Defaults to the built-in
|
|
@@ -407,6 +430,8 @@ declare interface SurfaceShellSnapshot {
|
|
|
407
430
|
|
|
408
431
|
declare interface SurfaceShellTab {
|
|
409
432
|
id: string;
|
|
433
|
+
/** Registered panel component id for this tab. May differ from the tab instance id. */
|
|
434
|
+
component?: string;
|
|
410
435
|
title: string;
|
|
411
436
|
params?: Record<string, unknown>;
|
|
412
437
|
}
|
|
@@ -422,9 +447,39 @@ export declare type UseWorkspaceAgentSessions<TSession extends WorkspaceAgentSes
|
|
|
422
447
|
refreshKey?: unknown;
|
|
423
448
|
}) => WorkspaceAgentSessionsApi<TSession>;
|
|
424
449
|
|
|
425
|
-
|
|
450
|
+
declare interface WorkspaceAgentAppLeftAction {
|
|
451
|
+
id: string;
|
|
452
|
+
label: string;
|
|
453
|
+
icon: ReactNode;
|
|
454
|
+
onClick: () => void;
|
|
455
|
+
trailing?: ReactNode;
|
|
456
|
+
emphasis?: boolean;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
declare type WorkspaceAgentAppLeftHeaderMode = "full" | "workspace" | "hidden";
|
|
460
|
+
|
|
461
|
+
declare type WorkspaceAgentAppLeftLayoutMode = "single-project" | "multi-project";
|
|
462
|
+
|
|
463
|
+
declare interface WorkspaceAgentAppLeftProject {
|
|
464
|
+
id: string;
|
|
465
|
+
name: string;
|
|
466
|
+
available?: boolean;
|
|
467
|
+
sessionCount?: number;
|
|
468
|
+
blockedCount?: number;
|
|
469
|
+
sessions?: WorkspaceAgentAppLeftProjectSession[];
|
|
470
|
+
hasMoreSessions?: boolean;
|
|
471
|
+
loadingSessions?: boolean;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
declare interface WorkspaceAgentAppLeftProjectSession {
|
|
475
|
+
id: string;
|
|
476
|
+
title?: string | null;
|
|
477
|
+
updatedAt?: string | number;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
export declare function WorkspaceAgentFront<TSession extends WorkspaceAgentSession = WorkspaceAgentSession>({ workspaceId, chatPanel: chatPanelProp, useSessions: useSessionsProp, requestHeaders, sessionStorageKey, providerStorageKey, surfaceStorageKey, beforeShell, afterShell, panels, commands, catalogs, plugins, excludeDefaults, capabilities, apiBaseUrl, authHeaders, apiTimeout, defaultTheme, onThemeChange, persistenceEnabled, debug, bridgeEndpoint, fullPageBasePath, onAuthError, sessions, activeSessionId, onSwitchSession, onCreateSession, onDeleteSession, onActiveSessionIdChange, appTitle, workspaceLabel, workspaceSectionTitle, appLeftLayoutMode, appLeftHeaderMode, appLeftProjects, appLeftActiveProjectId, onSwitchAppLeftProject, onOpenAppLeftProjectSession, onShowMoreAppLeftProjectSessions, onCreateAppLeftProject, onOpenAppLeftProjectSettings, onOpenAppLeftProjectInNewTab, defaultSessionTitle, workspaceLayout, navEnabled, defaultNavOpen, defaultSurfaceOpen, defaultWorkbenchLeftTab, defaultWorkbenchLeftOpen, surfaceInitialPanels, topBarLeft, topBarRight, showThemeToggle, showSkills, showPlugins, appLeftActions, chatParams, externalPlugins, hotReloadEnabled, frontPluginHotReload, extraPanels, extraCommands, provisionWorkspace, bootPreloadPaths, onWorkspaceWarmupStatusChange, onOpenNav, onOpenSurface, surfaceButtonBottomOffset, className, }: WorkspaceAgentFrontProps<TSession>): JSX.Element;
|
|
426
481
|
|
|
427
|
-
export declare interface WorkspaceAgentFrontProps<TSession extends WorkspaceAgentSession = WorkspaceAgentSession> extends Omit<WorkspaceProviderProps, "children" | "workspaceId" | "storageKey" | "chatPanel">, Omit<ChatLayoutProps, "nav" | "navParams" | "center" | "centerParams" | "chatPanes" | "activeChatPaneId" | "onActiveChatPaneChange" | "onCloseChatPane" | "onCreateChatPaneAfter" | "onDropChatSession" | "flashChatPaneId" | "surface" | "surfaceParams" | "sidebar" | "sidebarParams" | "storageKey"> {
|
|
482
|
+
export declare interface WorkspaceAgentFrontProps<TSession extends WorkspaceAgentSession = WorkspaceAgentSession> extends Omit<WorkspaceProviderProps, "children" | "workspaceId" | "storageKey" | "chatPanel" | "commandPaletteSessionSearch">, Omit<ChatLayoutProps, "nav" | "navParams" | "center" | "centerParams" | "chatPanes" | "activeChatPaneId" | "onActiveChatPaneChange" | "onCloseChatPane" | "onCreateChatPaneAfter" | "onDropChatSession" | "flashChatPaneId" | "surface" | "surfaceParams" | "sidebar" | "sidebarParams" | "storageKey"> {
|
|
428
483
|
workspaceId: string;
|
|
429
484
|
chatPanel?: ComponentType<WorkspaceChatPanelProps>;
|
|
430
485
|
useSessions?: UseWorkspaceAgentSessions<TSession>;
|
|
@@ -436,7 +491,29 @@ export declare interface WorkspaceAgentFrontProps<TSession extends WorkspaceAgen
|
|
|
436
491
|
afterShell?: ReactNode;
|
|
437
492
|
appTitle?: string;
|
|
438
493
|
workspaceLabel?: string;
|
|
494
|
+
/** App-left workspace/project section title. Defaults to "Workspaces". */
|
|
495
|
+
workspaceSectionTitle?: string;
|
|
496
|
+
/** App-left layout mode. single-project uses the workspace dropdown; multi-project renders workspaces inline. */
|
|
497
|
+
appLeftLayoutMode?: WorkspaceAgentAppLeftLayoutMode;
|
|
498
|
+
/** App-left header mode: full brand, workspace picker only, or hidden with collapse-button clearance. */
|
|
499
|
+
appLeftHeaderMode?: WorkspaceAgentAppLeftHeaderMode;
|
|
500
|
+
/** Optional cross-project overview rendered in the app-left workspace/project section. */
|
|
501
|
+
appLeftProjects?: WorkspaceAgentAppLeftProject[];
|
|
502
|
+
appLeftActiveProjectId?: string | null;
|
|
503
|
+
onSwitchAppLeftProject?: (projectId: string) => void;
|
|
504
|
+
onOpenAppLeftProjectSession?: (projectId: string, sessionId: string) => void;
|
|
505
|
+
onShowMoreAppLeftProjectSessions?: (projectId: string) => void;
|
|
506
|
+
onCreateAppLeftProject?: () => void;
|
|
507
|
+
/** Open a project's workspace settings (host wires routing — workspace pkg has no router). */
|
|
508
|
+
onOpenAppLeftProjectSettings?: (projectId: string) => void;
|
|
509
|
+
/** Open a project in a new browser tab (host builds the href). */
|
|
510
|
+
onOpenAppLeftProjectInNewTab?: (projectId: string) => void;
|
|
439
511
|
defaultSessionTitle?: string;
|
|
512
|
+
/**
|
|
513
|
+
* Opt into the Phase 2 app/session left-pane shell. Defaults to the
|
|
514
|
+
* existing classic top-bar + session-drawer workspace layout.
|
|
515
|
+
*/
|
|
516
|
+
workspaceLayout?: WorkspaceAgentLayout;
|
|
440
517
|
navEnabled?: boolean;
|
|
441
518
|
defaultNavOpen?: boolean;
|
|
442
519
|
defaultSurfaceOpen?: boolean;
|
|
@@ -452,6 +529,12 @@ export declare interface WorkspaceAgentFrontProps<TSession extends WorkspaceAgen
|
|
|
452
529
|
* UserMenu) should set this to false to avoid a duplicate control.
|
|
453
530
|
*/
|
|
454
531
|
showThemeToggle?: boolean;
|
|
532
|
+
/** Show the plugin-tabs Skills action/overlay. Defaults to true. */
|
|
533
|
+
showSkills?: boolean;
|
|
534
|
+
/** Show the plugin-tabs Plugins action/overlay. Defaults to true. */
|
|
535
|
+
showPlugins?: boolean;
|
|
536
|
+
/** Extra actions inserted into the app-left primary action list before built-in management actions. */
|
|
537
|
+
appLeftActions?: readonly WorkspaceAgentAppLeftAction[];
|
|
455
538
|
sessions?: Array<{
|
|
456
539
|
id: string;
|
|
457
540
|
title?: string | null;
|
|
@@ -484,6 +567,8 @@ export declare interface WorkspaceAgentFrontProps<TSession extends WorkspaceAgen
|
|
|
484
567
|
onWorkspaceWarmupStatusChange?: (status: WorkspaceWarmupStatus) => void;
|
|
485
568
|
}
|
|
486
569
|
|
|
570
|
+
export declare type WorkspaceAgentLayout = "classic" | "plugin-tabs";
|
|
571
|
+
|
|
487
572
|
export declare interface WorkspaceAgentSession {
|
|
488
573
|
id: string;
|
|
489
574
|
title?: string | null;
|
|
@@ -645,6 +730,7 @@ declare interface WorkspaceProviderProps {
|
|
|
645
730
|
*/
|
|
646
731
|
frontPluginHotReload?: FrontPluginHotReloadMode;
|
|
647
732
|
fullPageBasePath?: string;
|
|
733
|
+
commandPaletteSessionSearch?: CommandPaletteSessionSearchConfig;
|
|
648
734
|
}
|
|
649
735
|
|
|
650
736
|
declare type WorkspaceRuntimeDependenciesWarmupStatus = {
|
|
@@ -653,6 +739,24 @@ declare type WorkspaceRuntimeDependenciesWarmupStatus = {
|
|
|
653
739
|
requirement?: string;
|
|
654
740
|
};
|
|
655
741
|
|
|
742
|
+
declare interface WorkspaceSourceOpenPanelConfig {
|
|
743
|
+
id: string;
|
|
744
|
+
component: string;
|
|
745
|
+
title?: string;
|
|
746
|
+
params?: Record<string, unknown>;
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
/**
|
|
750
|
+
* Props for workspace source panes hosted in the left workspace rail.
|
|
751
|
+
* These are not Dockview panels: they receive only source-pane params and
|
|
752
|
+
* the explicit actions that the source host supports.
|
|
753
|
+
*/
|
|
754
|
+
declare interface WorkspaceSourceProps<T = unknown> {
|
|
755
|
+
params: T;
|
|
756
|
+
className?: string;
|
|
757
|
+
openPanel?: (config: WorkspaceSourceOpenPanelConfig) => void;
|
|
758
|
+
}
|
|
759
|
+
|
|
656
760
|
export declare type WorkspaceWarmupStatus = {
|
|
657
761
|
status: "preparing";
|
|
658
762
|
requirement?: "workspace-fs" | "sandbox-exec" | "ui-bridge";
|