tabby-tabbyspaces 0.1.0 → 0.2.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/.claude/settings.local.json +2 -1
- package/.github/workflows/ci.yml +26 -0
- package/.github/workflows/claude-code-review.yml +44 -0
- package/.github/workflows/claude.yml +81 -0
- package/.github/workflows/release.yml +30 -0
- package/CHANGELOG.md +46 -0
- package/CLAUDE.md +33 -0
- package/CONTRIBUTING.md +3 -1
- package/README.md +21 -18
- package/TODO.md +5 -0
- package/dist/build-config.d.ts +3 -3
- package/dist/components/deleteConfirmModal.component.d.ts +7 -0
- package/dist/components/deleteConfirmModal.component.d.ts.map +1 -0
- package/dist/components/paneEditor.component.d.ts +9 -18
- package/dist/components/paneEditor.component.d.ts.map +1 -1
- package/dist/components/splitPreview.component.d.ts +50 -50
- package/dist/components/splitPreview.component.d.ts.map +1 -1
- package/dist/components/workspaceEditor.component.d.ts +61 -54
- package/dist/components/workspaceEditor.component.d.ts.map +1 -1
- package/dist/components/workspaceList.component.d.ts +56 -39
- package/dist/components/workspaceList.component.d.ts.map +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.LICENSE.txt +1 -1
- package/dist/index.js.map +1 -1
- package/dist/models/workspace.model.d.ts +118 -78
- package/dist/models/workspace.model.d.ts.map +1 -1
- package/dist/package.json +1 -1
- package/dist/providers/config.provider.d.ts +8 -8
- package/dist/providers/settings.provider.d.ts +7 -7
- package/dist/providers/toolbar.provider.d.ts +23 -15
- package/dist/providers/toolbar.provider.d.ts.map +1 -1
- package/dist/services/startupCommand.service.d.ts +27 -19
- package/dist/services/startupCommand.service.d.ts.map +1 -1
- package/dist/services/workspaceBackground.service.d.ts +38 -0
- package/dist/services/workspaceBackground.service.d.ts.map +1 -0
- package/dist/services/workspaceEditor.service.d.ts +46 -32
- package/dist/services/workspaceEditor.service.d.ts.map +1 -1
- package/docs/DESIGN.md +57 -0
- package/docs/SESSION-2026-01-14-S1-DESIGN.md +134 -0
- package/mockups/index.html +162 -0
- package/mockups/s1-tight-sharp.html +522 -0
- package/mockups/shared/base.css +216 -0
- package/mockups/v06-tabbed.html +643 -0
- package/package.json +2 -1
- package/screenshots/editor.png +0 -0
- package/scripts/build-dev.js +2 -1
- package/scripts/build-prod.js +2 -1
- package/src/components/deleteConfirmModal.component.ts +23 -0
- package/src/components/paneEditor.component.pug +27 -43
- package/src/components/paneEditor.component.scss +37 -85
- package/src/components/paneEditor.component.ts +4 -32
- package/src/components/splitPreview.component.pug +0 -9
- package/src/components/splitPreview.component.scss +46 -70
- package/src/components/splitPreview.component.ts +15 -25
- package/src/components/workspaceEditor.component.pug +140 -112
- package/src/components/workspaceEditor.component.scss +270 -202
- package/src/components/workspaceEditor.component.ts +161 -85
- package/src/components/workspaceList.component.pug +31 -51
- package/src/components/workspaceList.component.scss +86 -77
- package/src/components/workspaceList.component.ts +89 -34
- package/src/index.ts +4 -0
- package/src/models/workspace.model.ts +80 -2
- package/src/providers/toolbar.provider.ts +78 -9
- package/src/services/startupCommand.service.ts +30 -32
- package/src/services/workspaceBackground.service.ts +167 -0
- package/src/services/workspaceEditor.service.ts +77 -40
- package/src/styles/_index.scss +3 -0
- package/src/styles/_mixins.scss +180 -0
- package/src/styles/_variables.scss +67 -0
- package/TEST_MCP.md +0 -176
- package/cdp-click.js +0 -22
- package/cdp-test.js +0 -28
- package/screenshots/pane-edit.png +0 -0
- package/test_cdp.py +0 -50
|
@@ -1,79 +1,119 @@
|
|
|
1
|
-
export interface TabbyProfileOptions {
|
|
2
|
-
command?: string;
|
|
3
|
-
args?: string[];
|
|
4
|
-
cwd?: string;
|
|
5
|
-
env?: Record<string, string>;
|
|
6
|
-
restoreFromPTYID?: boolean;
|
|
7
|
-
width?: number | null;
|
|
8
|
-
height?: number | null;
|
|
9
|
-
pauseAfterExit?: boolean;
|
|
10
|
-
runAsAdministrator?: boolean;
|
|
11
|
-
}
|
|
12
|
-
export interface TabbyProfile {
|
|
13
|
-
id: string;
|
|
14
|
-
type: string;
|
|
15
|
-
name: string;
|
|
16
|
-
group?: string;
|
|
17
|
-
icon?: string;
|
|
18
|
-
color?: string;
|
|
19
|
-
options?: TabbyProfileOptions;
|
|
20
|
-
isBuiltin?: boolean;
|
|
21
|
-
isTemplate?: boolean;
|
|
22
|
-
weight?: number;
|
|
23
|
-
disableDynamicTitle?: boolean;
|
|
24
|
-
terminalColorScheme?: string | null;
|
|
25
|
-
behaviorOnSessionEnd?: string;
|
|
26
|
-
}
|
|
27
|
-
export interface TabbyRecoveryToken {
|
|
28
|
-
type: string;
|
|
29
|
-
orientation?: 'h' | 'v';
|
|
30
|
-
ratios?: number[];
|
|
31
|
-
children?: TabbyRecoveryToken[];
|
|
32
|
-
profile?: Partial<TabbyProfile>;
|
|
33
|
-
savedState?: boolean;
|
|
34
|
-
tabTitle?: string;
|
|
35
|
-
tabCustomTitle?: string;
|
|
36
|
-
disableDynamicTitle?: boolean;
|
|
37
|
-
cwd?: string;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
export interface WorkspaceSplit {
|
|
59
|
-
orientation: 'horizontal' | 'vertical';
|
|
60
|
-
ratios: number[];
|
|
61
|
-
children: (WorkspacePane | WorkspaceSplit)[];
|
|
62
|
-
}
|
|
63
|
-
export interface
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
export declare
|
|
77
|
-
|
|
78
|
-
|
|
1
|
+
export interface TabbyProfileOptions {
|
|
2
|
+
command?: string;
|
|
3
|
+
args?: string[];
|
|
4
|
+
cwd?: string;
|
|
5
|
+
env?: Record<string, string>;
|
|
6
|
+
restoreFromPTYID?: boolean;
|
|
7
|
+
width?: number | null;
|
|
8
|
+
height?: number | null;
|
|
9
|
+
pauseAfterExit?: boolean;
|
|
10
|
+
runAsAdministrator?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface TabbyProfile {
|
|
13
|
+
id: string;
|
|
14
|
+
type: string;
|
|
15
|
+
name: string;
|
|
16
|
+
group?: string;
|
|
17
|
+
icon?: string;
|
|
18
|
+
color?: string;
|
|
19
|
+
options?: TabbyProfileOptions;
|
|
20
|
+
isBuiltin?: boolean;
|
|
21
|
+
isTemplate?: boolean;
|
|
22
|
+
weight?: number;
|
|
23
|
+
disableDynamicTitle?: boolean;
|
|
24
|
+
terminalColorScheme?: string | null;
|
|
25
|
+
behaviorOnSessionEnd?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface TabbyRecoveryToken {
|
|
28
|
+
type: string;
|
|
29
|
+
orientation?: 'h' | 'v';
|
|
30
|
+
ratios?: number[];
|
|
31
|
+
children?: TabbyRecoveryToken[];
|
|
32
|
+
profile?: Partial<TabbyProfile>;
|
|
33
|
+
savedState?: boolean;
|
|
34
|
+
tabTitle?: string;
|
|
35
|
+
tabCustomTitle?: string;
|
|
36
|
+
disableDynamicTitle?: boolean;
|
|
37
|
+
cwd?: string;
|
|
38
|
+
[key: string]: any;
|
|
39
|
+
}
|
|
40
|
+
export interface TabbySplitLayoutProfile {
|
|
41
|
+
id: string;
|
|
42
|
+
type: 'split-layout';
|
|
43
|
+
name: string;
|
|
44
|
+
group: string;
|
|
45
|
+
icon?: string;
|
|
46
|
+
color?: string;
|
|
47
|
+
isBuiltin: boolean;
|
|
48
|
+
options: {
|
|
49
|
+
recoveryToken: TabbyRecoveryToken;
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
export interface WorkspacePane {
|
|
53
|
+
id: string;
|
|
54
|
+
profileId: string;
|
|
55
|
+
cwd?: string;
|
|
56
|
+
startupCommand?: string;
|
|
57
|
+
}
|
|
58
|
+
export interface WorkspaceSplit {
|
|
59
|
+
orientation: 'horizontal' | 'vertical';
|
|
60
|
+
ratios: number[];
|
|
61
|
+
children: (WorkspacePane | WorkspaceSplit)[];
|
|
62
|
+
}
|
|
63
|
+
export interface WorkspaceBackground {
|
|
64
|
+
type: 'none' | 'solid' | 'gradient' | 'image';
|
|
65
|
+
value: string;
|
|
66
|
+
}
|
|
67
|
+
export interface Workspace {
|
|
68
|
+
id: string;
|
|
69
|
+
name: string;
|
|
70
|
+
icon?: string;
|
|
71
|
+
color?: string;
|
|
72
|
+
background?: WorkspaceBackground;
|
|
73
|
+
root: WorkspaceSplit;
|
|
74
|
+
launchOnStartup?: boolean;
|
|
75
|
+
}
|
|
76
|
+
export declare const BACKGROUND_PRESETS: WorkspaceBackground[];
|
|
77
|
+
/**
|
|
78
|
+
* Type guard to check if a node is a WorkspaceSplit.
|
|
79
|
+
* @param node - The node to check
|
|
80
|
+
* @returns True if the node is a WorkspaceSplit
|
|
81
|
+
*/
|
|
82
|
+
export declare function isWorkspaceSplit(node: WorkspacePane | WorkspaceSplit): node is WorkspaceSplit;
|
|
83
|
+
/**
|
|
84
|
+
* Creates a new pane with default configuration.
|
|
85
|
+
* @returns A new WorkspacePane with generated UUID and empty settings
|
|
86
|
+
*/
|
|
87
|
+
export declare function createDefaultPane(): WorkspacePane;
|
|
88
|
+
/**
|
|
89
|
+
* Creates a new split with two default panes.
|
|
90
|
+
* @param orientation - Split direction ('horizontal' or 'vertical'), defaults to 'horizontal'
|
|
91
|
+
* @returns A new WorkspaceSplit with two panes at 50/50 ratio
|
|
92
|
+
*/
|
|
93
|
+
export declare function createDefaultSplit(orientation?: 'horizontal' | 'vertical'): WorkspaceSplit;
|
|
94
|
+
/** Returns a random color from the workspace color palette. */
|
|
95
|
+
export declare function getRandomColor(): string;
|
|
96
|
+
/** Returns a random icon from the workspace icon set. */
|
|
97
|
+
export declare function getRandomIcon(): string;
|
|
98
|
+
/**
|
|
99
|
+
* Creates a new workspace with default configuration.
|
|
100
|
+
* @param name - Display name for the workspace (optional)
|
|
101
|
+
* @returns A new Workspace with generated UUID, random icon/color, and a default split
|
|
102
|
+
*/
|
|
103
|
+
export declare function createDefaultWorkspace(name?: string): Workspace;
|
|
104
|
+
/** Generates a random UUID v4 string. */
|
|
105
|
+
export declare function generateUUID(): string;
|
|
106
|
+
/**
|
|
107
|
+
* Recursively counts the total number of panes in a split tree.
|
|
108
|
+
* @param node - The root node to count from
|
|
109
|
+
* @returns Total number of panes in the tree
|
|
110
|
+
*/
|
|
111
|
+
export declare function countPanes(node: WorkspacePane | WorkspaceSplit): number;
|
|
112
|
+
/**
|
|
113
|
+
* Creates a deep clone of an object, preserving type information.
|
|
114
|
+
* More efficient than JSON.parse(JSON.stringify()) for simple objects.
|
|
115
|
+
* @param obj - The object to clone
|
|
116
|
+
* @returns A deep copy of the object
|
|
117
|
+
*/
|
|
118
|
+
export declare function deepClone<T>(obj: T): T;
|
|
79
119
|
//# sourceMappingURL=workspace.model.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace.model.d.ts","sourceRoot":"","sources":["../../src/models/workspace.model.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,mBAAmB;IAClC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC5B,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,cAAc,CAAC,EAAE,OAAO,CAAA;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,iBAAiB,IAAI,aAAa,CAOjD;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,GAAE,YAAY,GAAG,UAAyB,GAAG,cAAc,CAMxG;AAqBD,+DAA+D;AAC/D,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED,yDAAyD;AACzD,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,GAAE,MAAW,GAAG,SAAS,CASnE;AAED,yCAAyC;AACzC,wBAAgB,YAAY,IAAI,MAAM,CAMrC;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,aAAa,GAAG,cAAc,GAAG,MAAM,CAKvE;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CActC"}
|
package/dist/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ConfigProvider } from 'tabby-core';
|
|
2
|
-
export declare class WorkspaceEditorConfigProvider extends ConfigProvider {
|
|
3
|
-
defaults: {
|
|
4
|
-
[x: string]: {
|
|
5
|
-
workspaces: never[];
|
|
6
|
-
};
|
|
7
|
-
};
|
|
8
|
-
}
|
|
1
|
+
import { ConfigProvider } from 'tabby-core';
|
|
2
|
+
export declare class WorkspaceEditorConfigProvider extends ConfigProvider {
|
|
3
|
+
defaults: {
|
|
4
|
+
[x: string]: {
|
|
5
|
+
workspaces: never[];
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
9
|
//# sourceMappingURL=config.provider.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { SettingsTabProvider } from 'tabby-settings';
|
|
2
|
-
export declare class WorkspaceEditorSettingsProvider extends SettingsTabProvider {
|
|
3
|
-
id: string;
|
|
4
|
-
icon: string;
|
|
5
|
-
title: string;
|
|
6
|
-
getComponentType(): any;
|
|
7
|
-
}
|
|
1
|
+
import { SettingsTabProvider } from 'tabby-settings';
|
|
2
|
+
export declare class WorkspaceEditorSettingsProvider extends SettingsTabProvider {
|
|
3
|
+
id: string;
|
|
4
|
+
icon: string;
|
|
5
|
+
title: string;
|
|
6
|
+
getComponentType(): any;
|
|
7
|
+
}
|
|
8
8
|
//# sourceMappingURL=settings.provider.d.ts.map
|
|
@@ -1,16 +1,24 @@
|
|
|
1
|
-
import { ToolbarButtonProvider, ToolbarButton, ProfilesService, AppService } from 'tabby-core';
|
|
2
|
-
import { WorkspaceEditorService } from '../services/workspaceEditor.service';
|
|
3
|
-
import { StartupCommandService } from '../services/startupCommand.service';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
private
|
|
7
|
-
private
|
|
8
|
-
private
|
|
9
|
-
|
|
10
|
-
private
|
|
11
|
-
|
|
12
|
-
private
|
|
13
|
-
private
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { ToolbarButtonProvider, ToolbarButton, ProfilesService, AppService } from 'tabby-core';
|
|
2
|
+
import { WorkspaceEditorService } from '../services/workspaceEditor.service';
|
|
3
|
+
import { StartupCommandService } from '../services/startupCommand.service';
|
|
4
|
+
import { WorkspaceBackgroundService } from '../services/workspaceBackground.service';
|
|
5
|
+
export declare class WorkspaceToolbarProvider extends ToolbarButtonProvider {
|
|
6
|
+
private workspaceService;
|
|
7
|
+
private profilesService;
|
|
8
|
+
private app;
|
|
9
|
+
private startupService;
|
|
10
|
+
private backgroundService;
|
|
11
|
+
constructor(workspaceService: WorkspaceEditorService, profilesService: ProfilesService, app: AppService, startupService: StartupCommandService, backgroundService: WorkspaceBackgroundService);
|
|
12
|
+
private waitForTabbyReady;
|
|
13
|
+
private launchStartupWorkspaces;
|
|
14
|
+
/**
|
|
15
|
+
* Type-safe helper to extract workspace ID from tab's recovery token.
|
|
16
|
+
*/
|
|
17
|
+
private getRecoveryWorkspaceId;
|
|
18
|
+
private isWorkspaceAlreadyOpen;
|
|
19
|
+
provide(): ToolbarButton[];
|
|
20
|
+
private showWorkspaceSelector;
|
|
21
|
+
private openSettings;
|
|
22
|
+
private openWorkspace;
|
|
23
|
+
}
|
|
16
24
|
//# sourceMappingURL=toolbar.provider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolbar.provider.d.ts","sourceRoot":"","sources":["../../src/providers/toolbar.provider.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,eAAe,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"toolbar.provider.d.ts","sourceRoot":"","sources":["../../src/providers/toolbar.provider.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,eAAe,EAAE,UAAU,EAAqB,MAAM,YAAY,CAAA;AAEjH,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAA;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAA;AAC1E,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAA;AAwBpF,qBACa,wBAAyB,SAAQ,qBAAqB;IAE/D,OAAO,CAAC,gBAAgB;IACxB,OAAO,CAAC,eAAe;IACvB,OAAO,CAAC,GAAG;IACX,OAAO,CAAC,cAAc;IACtB,OAAO,CAAC,iBAAiB;gBAJjB,gBAAgB,EAAE,sBAAsB,EACxC,eAAe,EAAE,eAAe,EAChC,GAAG,EAAE,UAAU,EACf,cAAc,EAAE,qBAAqB,EACrC,iBAAiB,EAAE,0BAA0B;IAavD,OAAO,CAAC,iBAAiB;YAiBX,uBAAuB;IAarC;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAQ9B,OAAO,CAAC,sBAAsB;IAyB9B,OAAO,IAAI,aAAa,EAAE;YAWZ,qBAAqB;IAkCnC,OAAO,CAAC,YAAY;YAIN,aAAa;CAgB5B"}
|
|
@@ -1,20 +1,28 @@
|
|
|
1
|
-
import { AppService } from 'tabby-core';
|
|
2
|
-
export interface PendingCommand {
|
|
3
|
-
paneId: string;
|
|
4
|
-
command?: string;
|
|
5
|
-
originalTitle: string;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
private
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
import { AppService } from 'tabby-core';
|
|
2
|
+
export interface PendingCommand {
|
|
3
|
+
paneId: string;
|
|
4
|
+
command?: string;
|
|
5
|
+
originalTitle: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Handles startup commands for workspace panes.
|
|
9
|
+
*
|
|
10
|
+
* This service listens to tab open events and sends startup commands
|
|
11
|
+
* to terminals that match registered pane IDs.
|
|
12
|
+
*
|
|
13
|
+
* NOTE: This is a module-level singleton that lives for the app lifetime.
|
|
14
|
+
* The tabOpened$ subscription intentionally runs forever - no cleanup needed.
|
|
15
|
+
*/
|
|
16
|
+
export declare class StartupCommandService {
|
|
17
|
+
private app;
|
|
18
|
+
private pendingCommands;
|
|
19
|
+
constructor(app: AppService);
|
|
20
|
+
registerCommands(commands: PendingCommand[]): void;
|
|
21
|
+
private onTabOpened;
|
|
22
|
+
private processChildTabs;
|
|
23
|
+
private processTerminalTab;
|
|
24
|
+
private buildFullCommand;
|
|
25
|
+
private clearProfileArgs;
|
|
26
|
+
private setTabTitle;
|
|
27
|
+
}
|
|
20
28
|
//# sourceMappingURL=startupCommand.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"startupCommand.service.d.ts","sourceRoot":"","sources":["../../src/services/startupCommand.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAuC,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"startupCommand.service.d.ts","sourceRoot":"","sources":["../../src/services/startupCommand.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAuC,MAAM,YAAY,CAAA;AAK5E,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,aAAa,EAAE,MAAM,CAAA;CACtB;AAED;;;;;;;;GAQG;AACH,qBACa,qBAAqB;IAGpB,OAAO,CAAC,GAAG;IAFvB,OAAO,CAAC,eAAe,CAAyC;gBAE5C,GAAG,EAAE,UAAU;IAInC,gBAAgB,CAAC,QAAQ,EAAE,cAAc,EAAE,GAAG,IAAI;IAOlD,OAAO,CAAC,WAAW;IAoBnB,OAAO,CAAC,gBAAgB;IAaxB,OAAO,CAAC,kBAAkB;IAkD1B,OAAO,CAAC,gBAAgB;IAKxB,OAAO,CAAC,gBAAgB;IAWxB,OAAO,CAAC,WAAW;CAIpB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { AppService } from 'tabby-core';
|
|
2
|
+
import { WorkspaceEditorService } from './workspaceEditor.service';
|
|
3
|
+
/**
|
|
4
|
+
* Service for applying custom backgrounds to workspace tabs.
|
|
5
|
+
* Injects CSS dynamically based on workspace configuration.
|
|
6
|
+
*/
|
|
7
|
+
export declare class WorkspaceBackgroundService {
|
|
8
|
+
private app;
|
|
9
|
+
private workspaceService;
|
|
10
|
+
private styleElement;
|
|
11
|
+
private appliedWorkspaces;
|
|
12
|
+
constructor(app: AppService, workspaceService: WorkspaceEditorService);
|
|
13
|
+
/**
|
|
14
|
+
* Initialize the service by setting up tab event listeners.
|
|
15
|
+
* Must be called once during app initialization.
|
|
16
|
+
*/
|
|
17
|
+
initialize(): void;
|
|
18
|
+
private setupTabListeners;
|
|
19
|
+
private onTabOpened;
|
|
20
|
+
private onTabClosed;
|
|
21
|
+
/**
|
|
22
|
+
* Extract workspace ID from a SplitTabComponent.
|
|
23
|
+
* Tries multiple strategies: _recoveredState and child profile ID.
|
|
24
|
+
*/
|
|
25
|
+
private extractWorkspaceId;
|
|
26
|
+
private applyBackground;
|
|
27
|
+
private markSplitTabElement;
|
|
28
|
+
private generateCSS;
|
|
29
|
+
private injectCSS;
|
|
30
|
+
private removeBackground;
|
|
31
|
+
private updateStyleElement;
|
|
32
|
+
/**
|
|
33
|
+
* Refresh background for a specific workspace.
|
|
34
|
+
* Call this when workspace background is updated in settings.
|
|
35
|
+
*/
|
|
36
|
+
refreshWorkspaceBackground(workspaceId: string): void;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=workspaceBackground.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspaceBackground.service.d.ts","sourceRoot":"","sources":["../../src/services/workspaceBackground.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAqB,MAAM,YAAY,CAAA;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AAIlE;;;GAGG;AACH,qBACa,0BAA0B;IAKnC,OAAO,CAAC,GAAG;IACX,OAAO,CAAC,gBAAgB;IAL1B,OAAO,CAAC,YAAY,CAAgC;IACpD,OAAO,CAAC,iBAAiB,CAA4B;gBAG3C,GAAG,EAAE,UAAU,EACf,gBAAgB,EAAE,sBAAsB;IAGlD;;;OAGG;IACH,UAAU,IAAI,IAAI;IAIlB,OAAO,CAAC,iBAAiB;IAQzB,OAAO,CAAC,WAAW;IAiBnB,OAAO,CAAC,WAAW;IASnB;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAsB1B,OAAO,CAAC,eAAe;IASvB,OAAO,CAAC,mBAAmB;IAY3B,OAAO,CAAC,WAAW;IAcnB,OAAO,CAAC,SAAS;IAWjB,OAAO,CAAC,gBAAgB;IAKxB,OAAO,CAAC,kBAAkB;IAM1B;;;OAGG;IACH,0BAA0B,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;CAiBtD"}
|
|
@@ -1,33 +1,47 @@
|
|
|
1
|
-
import { ConfigService, NotificationsService, ProfilesService } from 'tabby-core';
|
|
2
|
-
import { Workspace, TabbyProfile, TabbySplitLayoutProfile } from '../models/workspace.model';
|
|
3
|
-
import { PendingCommand } from './startupCommand.service';
|
|
4
|
-
export declare class WorkspaceEditorService {
|
|
5
|
-
private config;
|
|
6
|
-
private notifications;
|
|
7
|
-
private profilesService;
|
|
8
|
-
private cachedProfiles;
|
|
9
|
-
|
|
10
|
-
private
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
1
|
+
import { ConfigService, NotificationsService, ProfilesService } from 'tabby-core';
|
|
2
|
+
import { Workspace, TabbyProfile, TabbySplitLayoutProfile } from '../models/workspace.model';
|
|
3
|
+
import { PendingCommand } from './startupCommand.service';
|
|
4
|
+
export declare class WorkspaceEditorService {
|
|
5
|
+
private config;
|
|
6
|
+
private notifications;
|
|
7
|
+
private profilesService;
|
|
8
|
+
private cachedProfiles;
|
|
9
|
+
private cacheTimestamp;
|
|
10
|
+
private readonly CACHE_TTL;
|
|
11
|
+
constructor(config: ConfigService, notifications: NotificationsService, profilesService: ProfilesService);
|
|
12
|
+
private getCachedProfiles;
|
|
13
|
+
/** Returns all saved workspaces from config. */
|
|
14
|
+
getWorkspaces(): Workspace[];
|
|
15
|
+
/**
|
|
16
|
+
* Saves the workspace list to config.
|
|
17
|
+
* @throws Error if config store is not initialized
|
|
18
|
+
*/
|
|
19
|
+
saveWorkspaces(workspaces: Workspace[]): Promise<void>;
|
|
20
|
+
/** Adds a new workspace and shows notification. */
|
|
21
|
+
addWorkspace(workspace: Workspace): Promise<void>;
|
|
22
|
+
/** Updates an existing workspace by ID and shows notification. */
|
|
23
|
+
updateWorkspace(workspace: Workspace): Promise<void>;
|
|
24
|
+
/** Deletes a workspace by ID and shows notification. */
|
|
25
|
+
deleteWorkspace(workspaceId: string): Promise<void>;
|
|
26
|
+
/** Returns all local shell profiles available for use in workspaces. */
|
|
27
|
+
getAvailableProfiles(): Promise<TabbyProfile[]>;
|
|
28
|
+
/**
|
|
29
|
+
* Cleanup orphaned profiles from previous plugin versions.
|
|
30
|
+
* Call this once on plugin init.
|
|
31
|
+
*/
|
|
32
|
+
cleanupOrphanedProfiles(): void;
|
|
33
|
+
/** Generates a Tabby split-layout profile from a workspace for opening. */
|
|
34
|
+
generateTabbyProfile(workspace: Workspace): Promise<TabbySplitLayoutProfile>;
|
|
35
|
+
private generateRecoveryToken;
|
|
36
|
+
private generatePaneToken;
|
|
37
|
+
/** Creates a deep copy of a workspace with new IDs. */
|
|
38
|
+
duplicateWorkspace(workspace: Workspace): Workspace;
|
|
39
|
+
private regenerateIds;
|
|
40
|
+
private sanitizeForProfileId;
|
|
41
|
+
private getProfileById;
|
|
42
|
+
/** Collects all startup commands from panes in a workspace. */
|
|
43
|
+
collectStartupCommands(workspace: Workspace): PendingCommand[];
|
|
44
|
+
private collectCommandsFromNode;
|
|
45
|
+
private saveConfig;
|
|
46
|
+
}
|
|
33
47
|
//# sourceMappingURL=workspaceEditor.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspaceEditor.service.d.ts","sourceRoot":"","sources":["../../src/services/workspaceEditor.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AACjF,OAAO,EACL,SAAS,
|
|
1
|
+
{"version":3,"file":"workspaceEditor.service.d.ts","sourceRoot":"","sources":["../../src/services/workspaceEditor.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AACjF,OAAO,EACL,SAAS,EAMT,YAAY,EAEZ,uBAAuB,EACxB,MAAM,2BAA2B,CAAA;AAElC,OAAO,E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package/docs/DESIGN.md
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Design System
|
|
2
|
+
|
|
3
|
+
TabbySpaces uses a modular DRY SCSS architecture.
|
|
4
|
+
|
|
5
|
+
## Structure
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
src/styles/
|
|
9
|
+
├── _index.scss # Entry point (imports all)
|
|
10
|
+
├── _variables.scss # Spacing, radius, colors, z-index, transitions
|
|
11
|
+
└── _mixins.scss # Reusable patterns (flex, inputs, buttons, overlays)
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
All component SCSS files import shared styles:
|
|
17
|
+
|
|
18
|
+
```scss
|
|
19
|
+
@use '../styles/index' as *;
|
|
20
|
+
|
|
21
|
+
.my-component {
|
|
22
|
+
padding: $spacing-md;
|
|
23
|
+
border-radius: $radius-lg;
|
|
24
|
+
@include flex-center;
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Variables
|
|
29
|
+
|
|
30
|
+
@src/styles/_variables.scss
|
|
31
|
+
|
|
32
|
+
## Mixins
|
|
33
|
+
|
|
34
|
+
Key mixins available:
|
|
35
|
+
|
|
36
|
+
| Mixin | Purpose |
|
|
37
|
+
|-------|---------|
|
|
38
|
+
| `flex-center` | Center content with flexbox |
|
|
39
|
+
| `form-input($bg)` | Styled input field with focus state |
|
|
40
|
+
| `form-label` | Uppercase compact label (S1 design) |
|
|
41
|
+
| `toolbar-btn` | Small toolbar button with hover state |
|
|
42
|
+
| `btn-success` | Green success button |
|
|
43
|
+
| `btn-base` | Base button styling with flex layout |
|
|
44
|
+
| `btn-ghost` | Ghost button with border |
|
|
45
|
+
| `btn-primary` | Primary button with theme color |
|
|
46
|
+
| `icon-btn-sm($size)` | Small icon button with border |
|
|
47
|
+
| `full-overlay($z)` | Fixed fullscreen overlay |
|
|
48
|
+
| `dropdown-panel` | Dropdown with border/shadow |
|
|
49
|
+
| `text-ellipsis` | Truncate text with ellipsis |
|
|
50
|
+
|
|
51
|
+
## Theming
|
|
52
|
+
|
|
53
|
+
Plugin uses Tabby's CSS custom properties (`--theme-*`) for automatic theme support:
|
|
54
|
+
- `--theme-bg`, `--theme-bg-more`, `--theme-bg-more-more`
|
|
55
|
+
- `--theme-fg`, `--theme-fg-more`
|
|
56
|
+
- `--theme-border`, `--theme-primary`
|
|
57
|
+
- `--theme-success`, `--theme-danger`
|