@industry-theme/alexandria-panels 0.1.0 → 0.1.2
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 +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/panels/WorkspaceRepositoriesPanel/WorkspaceRepositoriesPanel.stories.d.ts +11 -0
- package/dist/panels/WorkspaceRepositoriesPanel/WorkspaceRepositoriesPanel.stories.d.ts.map +1 -0
- package/dist/panels/WorkspaceRepositoriesPanel/WorkspaceRepositoryCard.d.ts +10 -0
- package/dist/panels/WorkspaceRepositoriesPanel/WorkspaceRepositoryCard.d.ts.map +1 -0
- package/dist/panels/WorkspaceRepositoriesPanel/index.d.ts +23 -0
- package/dist/panels/WorkspaceRepositoriesPanel/index.d.ts.map +1 -0
- package/dist/panels/WorkspaceRepositoriesPanel/tools.d.ts +27 -0
- package/dist/panels/WorkspaceRepositoriesPanel/tools.d.ts.map +1 -0
- package/dist/panels/WorkspaceRepositoriesPanel/types.d.ts +91 -0
- package/dist/panels/WorkspaceRepositoriesPanel/types.d.ts.map +1 -0
- package/dist/panels.bundle.js +1097 -33
- package/dist/panels.bundle.js.map +1 -1
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -17,12 +17,15 @@ export declare const onPackageUnload: () => Promise<void>;
|
|
|
17
17
|
* Use '@industry-theme/alexandria-panels/tools' to import without React dependencies.
|
|
18
18
|
*/
|
|
19
19
|
export { localProjectsPanelTools, localProjectsPanelToolsMetadata, filterProjectsTool, selectProjectTool, openProjectTool, } from './panels/LocalProjectsPanel/tools';
|
|
20
|
+
export { workspaceRepositoriesPanelTools, workspaceRepositoriesPanelToolsMetadata, selectRepositoryTool, refreshWorkspaceTool, openRepositoryTool, } from './panels/WorkspaceRepositoriesPanel/tools';
|
|
20
21
|
/**
|
|
21
22
|
* Export panel components for direct use
|
|
22
23
|
*/
|
|
23
24
|
export { LocalProjectsPanel, LocalProjectsPanelPreview, LocalProjectCard, RepositoryAvatar, } from './panels/LocalProjectsPanel';
|
|
25
|
+
export { WorkspaceRepositoriesPanel, WorkspaceRepositoryCard, } from './panels/WorkspaceRepositoriesPanel';
|
|
24
26
|
/**
|
|
25
27
|
* Export types
|
|
26
28
|
*/
|
|
27
29
|
export type { LocalProjectCardProps, RepositoryAvatarProps, AlexandriaRepositoriesSlice, LocalProjectsPanelActions, CardActionMode, RepositoryWindowState, } from './panels/LocalProjectsPanel/types';
|
|
30
|
+
export type { Workspace, WorkspaceRepositoriesPanelActions, WorkspaceRepositoryCardProps, RepositorySelectedPayload, RepositoryOpenedPayload, } from './panels/WorkspaceRepositoriesPanel/types';
|
|
28
31
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAqB,MAAM,SAAS,CAAC;AAIlE;;;GAGG;AACH,eAAO,MAAM,MAAM,EAAE,eAAe,EAyDnC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,qBAGzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,qBAG3B,CAAC;AAEF;;;GAGG;AACH,OAAO,EACL,uBAAuB,EACvB,+BAA+B,EAC/B,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,GAChB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EACL,+BAA+B,EAC/B,uCAAuC,EACvC,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,2CAA2C,CAAC;AAEnD;;GAEG;AACH,OAAO,EACL,kBAAkB,EAClB,yBAAyB,EACzB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EACL,0BAA0B,EAC1B,uBAAuB,GACxB,MAAM,qCAAqC,CAAC;AAE7C;;GAEG;AACH,YAAY,EACV,qBAAqB,EACrB,qBAAqB,EACrB,2BAA2B,EAC3B,yBAAyB,EACzB,cAAc,EACd,qBAAqB,GACtB,MAAM,mCAAmC,CAAC;AAE3C,YAAY,EACV,SAAS,EACT,iCAAiC,EACjC,4BAA4B,EAC5B,yBAAyB,EACzB,uBAAuB,GACxB,MAAM,2CAA2C,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { WorkspaceRepositoriesPanel } from './index';
|
|
3
|
+
declare const meta: Meta<typeof WorkspaceRepositoriesPanel>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof WorkspaceRepositoriesPanel>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const NoWorkspaceSelected: Story;
|
|
8
|
+
export declare const EmptyWorkspace: Story;
|
|
9
|
+
export declare const Loading: Story;
|
|
10
|
+
export declare const MixedLocations: Story;
|
|
11
|
+
//# sourceMappingURL=WorkspaceRepositoriesPanel.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WorkspaceRepositoriesPanel.stories.d.ts","sourceRoot":"","sources":["../../../src/panels/WorkspaceRepositoriesPanel/WorkspaceRepositoriesPanel.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AA0GrD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,0BAA0B,CAcjD,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAEzD,eAAO,MAAM,OAAO,EAAE,KAerB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KAcjC,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAe5B,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAiBrB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAgE5B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { WorkspaceRepositoryCardProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* WorkspaceRepositoryCard - Repository card for workspace panel
|
|
5
|
+
*
|
|
6
|
+
* Displays repository info with workspace-specific actions like
|
|
7
|
+
* move to workspace directory and remove from workspace.
|
|
8
|
+
*/
|
|
9
|
+
export declare const WorkspaceRepositoryCard: React.FC<WorkspaceRepositoryCardProps>;
|
|
10
|
+
//# sourceMappingURL=WorkspaceRepositoryCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WorkspaceRepositoryCard.d.ts","sourceRoot":"","sources":["../../../src/panels/WorkspaceRepositoriesPanel/WorkspaceRepositoryCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAIxC,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAC;AAE5D;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,4BAA4B,CAqU1E,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PanelComponentProps } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* WorkspaceRepositoriesPanel - Workspace repository management panel
|
|
5
|
+
*
|
|
6
|
+
* Features:
|
|
7
|
+
* - List all repositories in a workspace
|
|
8
|
+
* - Group by in/outside workspace directory
|
|
9
|
+
* - Move repositories to workspace directory
|
|
10
|
+
* - Remove repositories from workspace
|
|
11
|
+
*
|
|
12
|
+
* Data Slices:
|
|
13
|
+
* - workspace: Workspace object
|
|
14
|
+
* - workspaceRepositories: AlexandriaEntry[]
|
|
15
|
+
*
|
|
16
|
+
* Events Emitted:
|
|
17
|
+
* - repository:selected
|
|
18
|
+
* - repository:opened
|
|
19
|
+
*/
|
|
20
|
+
export declare const WorkspaceRepositoriesPanel: React.FC<PanelComponentProps>;
|
|
21
|
+
export { WorkspaceRepositoryCard } from './WorkspaceRepositoryCard';
|
|
22
|
+
export type { Workspace, WorkspaceRepositoriesPanelActions, WorkspaceRepositoryCardProps, RepositorySelectedPayload, RepositoryOpenedPayload, } from './types';
|
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/panels/WorkspaceRepositoriesPanel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAI/D,OAAO,KAAK,EAAE,mBAAmB,EAAqB,MAAM,aAAa,CAAC;AA2iB1E;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAMpE,CAAC;AAGF,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,YAAY,EACV,SAAS,EACT,iCAAiC,EACjC,4BAA4B,EAC5B,yBAAyB,EACzB,uBAAuB,GACxB,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workspace Repositories Panel Tools
|
|
3
|
+
*
|
|
4
|
+
* UTCP-compatible tools for the Workspace Repositories panel.
|
|
5
|
+
*/
|
|
6
|
+
import type { PanelTool, PanelToolsMetadata } from '@principal-ade/panel-framework-core';
|
|
7
|
+
/**
|
|
8
|
+
* Tool: Select Repository
|
|
9
|
+
*/
|
|
10
|
+
export declare const selectRepositoryTool: PanelTool;
|
|
11
|
+
/**
|
|
12
|
+
* Tool: Refresh Workspace
|
|
13
|
+
*/
|
|
14
|
+
export declare const refreshWorkspaceTool: PanelTool;
|
|
15
|
+
/**
|
|
16
|
+
* Tool: Open Repository
|
|
17
|
+
*/
|
|
18
|
+
export declare const openRepositoryTool: PanelTool;
|
|
19
|
+
/**
|
|
20
|
+
* All tools exported as an array.
|
|
21
|
+
*/
|
|
22
|
+
export declare const workspaceRepositoriesPanelTools: PanelTool[];
|
|
23
|
+
/**
|
|
24
|
+
* Panel tools metadata for registration.
|
|
25
|
+
*/
|
|
26
|
+
export declare const workspaceRepositoriesPanelToolsMetadata: PanelToolsMetadata;
|
|
27
|
+
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/panels/WorkspaceRepositoriesPanel/tools.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAIzF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAyBlC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAwBlC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,SAyBhC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,+BAA+B,EAAE,SAAS,EAItD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uCAAuC,EAAE,kBAKrD,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WorkspaceRepositoriesPanel Type Definitions
|
|
3
|
+
*
|
|
4
|
+
* Types for the Workspace Repositories panel
|
|
5
|
+
*/
|
|
6
|
+
import type { AlexandriaEntry } from '@principal-ai/alexandria-core-library/types';
|
|
7
|
+
import type { PanelActions } from '../../types';
|
|
8
|
+
/**
|
|
9
|
+
* Workspace type
|
|
10
|
+
*/
|
|
11
|
+
export interface Workspace {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
createdAt: number;
|
|
16
|
+
updatedAt: number;
|
|
17
|
+
suggestedClonePath?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Extended actions for WorkspaceRepositoriesPanel
|
|
21
|
+
*/
|
|
22
|
+
export interface WorkspaceRepositoriesPanelActions extends PanelActions {
|
|
23
|
+
/** Remove a repository from a workspace */
|
|
24
|
+
removeRepositoryFromWorkspace?: (repositoryId: string, workspaceId: string) => Promise<void>;
|
|
25
|
+
/** Copy text to clipboard */
|
|
26
|
+
copyToClipboard?: (text: string) => Promise<void>;
|
|
27
|
+
/** Check if repository is in workspace directory */
|
|
28
|
+
isRepositoryInWorkspaceDirectory?: (repository: AlexandriaEntry, workspaceId: string) => Promise<boolean | null>;
|
|
29
|
+
/** Move repository to workspace directory */
|
|
30
|
+
moveRepositoryToWorkspaceDirectory?: (repository: AlexandriaEntry, workspaceId: string) => Promise<string>;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Props for WorkspaceRepositoryCard component
|
|
34
|
+
*/
|
|
35
|
+
export interface WorkspaceRepositoryCardProps {
|
|
36
|
+
/** Repository entry */
|
|
37
|
+
repository: AlexandriaEntry;
|
|
38
|
+
/** Parent workspace */
|
|
39
|
+
workspace?: Workspace | null;
|
|
40
|
+
/** Panel actions */
|
|
41
|
+
actions: WorkspaceRepositoriesPanelActions;
|
|
42
|
+
/** Whether edit mode is active */
|
|
43
|
+
isEditMode?: boolean;
|
|
44
|
+
/** Whether repository is in workspace directory */
|
|
45
|
+
isInWorkspaceDirectory?: boolean | null;
|
|
46
|
+
/** Callback for repository selection */
|
|
47
|
+
onSelect?: (repository: AlexandriaEntry) => void;
|
|
48
|
+
/** Callback for opening repository */
|
|
49
|
+
onOpen?: (repository: AlexandriaEntry) => void;
|
|
50
|
+
/** Callback for removing from workspace */
|
|
51
|
+
onRemoveFromWorkspace?: (repository: AlexandriaEntry) => void;
|
|
52
|
+
/** Callback for moving to workspace directory */
|
|
53
|
+
onMoveToWorkspace?: (repository: AlexandriaEntry) => void;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Repository selected event payload
|
|
57
|
+
*/
|
|
58
|
+
export interface RepositorySelectedPayload {
|
|
59
|
+
repositoryId: string;
|
|
60
|
+
repository: AlexandriaEntry;
|
|
61
|
+
repositoryPath: string;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Repository opened event payload
|
|
65
|
+
*/
|
|
66
|
+
export interface RepositoryOpenedPayload {
|
|
67
|
+
repositoryId: string;
|
|
68
|
+
repository: AlexandriaEntry;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Event payloads for WorkspaceRepositoriesPanel
|
|
72
|
+
*/
|
|
73
|
+
export interface WorkspaceRepositoriesPanelEventPayloads {
|
|
74
|
+
/** Select repository event */
|
|
75
|
+
'select-repository': {
|
|
76
|
+
repositoryPath: string;
|
|
77
|
+
};
|
|
78
|
+
/** Open repository event */
|
|
79
|
+
'open-repository': {
|
|
80
|
+
repositoryPath: string;
|
|
81
|
+
};
|
|
82
|
+
/** Refresh workspace event */
|
|
83
|
+
'refresh-workspace': {
|
|
84
|
+
force?: boolean;
|
|
85
|
+
};
|
|
86
|
+
/** Repository selected notification */
|
|
87
|
+
'repository:selected': RepositorySelectedPayload;
|
|
88
|
+
/** Repository opened notification */
|
|
89
|
+
'repository:opened': RepositoryOpenedPayload;
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/panels/WorkspaceRepositoriesPanel/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AACnF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,EAAE,EAA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