@industry-theme/alexandria-panels 0.1.28 → 0.1.29
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/UserCollectionsPanel/index.d.ts +41 -0
- package/dist/panels/UserCollectionsPanel/index.d.ts.map +1 -0
- package/dist/panels/UserCollectionsPanel/tools.d.ts +56 -0
- package/dist/panels/UserCollectionsPanel/tools.d.ts.map +1 -0
- package/dist/panels/UserCollectionsPanel/types.d.ts +202 -0
- package/dist/panels/UserCollectionsPanel/types.d.ts.map +1 -0
- package/dist/panels.bundle.js +1297 -215
- package/dist/panels.bundle.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export { workspaceCollectionPanelTools, workspaceCollectionPanelToolsMetadata, f
|
|
|
23
23
|
export { githubStarredPanelTools, githubStarredPanelToolsMetadata, filterStarredTool, selectStarredRepositoryTool, cloneStarredRepositoryTool, } from './panels/GitHubStarredPanel/tools';
|
|
24
24
|
export { githubProjectsPanelTools, githubProjectsPanelToolsMetadata, filterProjectsTool as filterGitHubProjectsTool, toggleOwnerSectionTool, selectProjectRepositoryTool, cloneProjectRepositoryTool, } from './panels/GitHubProjectsPanel/tools';
|
|
25
25
|
export { userProfilePanelTools, userProfilePanelToolsMetadata, viewOrganizationsTool, viewStarredTool, selectOrganizationTool, selectRepositoryTool as selectUserRepositoryTool, cloneRepositoryTool as cloneUserRepositoryTool, filterStarredTool as filterUserStarredTool, } from './panels/UserProfilePanel/tools';
|
|
26
|
+
export { userCollectionsPanelTools, userCollectionsPanelToolsMetadata, filterCollectionsTool, selectCollectionTool, createCollectionTool, deleteCollectionTool, addRepositoryTool as addCollectionRepositoryTool, removeRepositoryTool as removeCollectionRepositoryTool, enableGitHubSyncTool, refreshCollectionsTool, } from './panels/UserCollectionsPanel/tools';
|
|
26
27
|
/**
|
|
27
28
|
* Export panel components for direct use
|
|
28
29
|
*/
|
|
@@ -33,6 +34,7 @@ export { WorkspaceCollectionPanel, WorkspaceCollectionPanelPreview, type Workspa
|
|
|
33
34
|
export { GitHubStarredPanel, GitHubStarredPanelPreview, type GitHubStarredPanelProps, } from './panels/GitHubStarredPanel';
|
|
34
35
|
export { GitHubProjectsPanel, GitHubProjectsPanelPreview, type GitHubProjectsPanelProps, } from './panels/GitHubProjectsPanel';
|
|
35
36
|
export { UserProfilePanel, UserProfilePanelPreview, } from './panels/UserProfilePanel';
|
|
37
|
+
export { UserCollectionsPanel, UserCollectionsPanelPreview, type UserCollectionsPanelProps, } from './panels/UserCollectionsPanel';
|
|
36
38
|
export { GitHubRepositoryCard } from './panels/shared/GitHubRepositoryCard';
|
|
37
39
|
/**
|
|
38
40
|
* Export types
|
|
@@ -46,4 +48,5 @@ export type { GitHubStarredSlice, GitHubStarredPanelActions, GitHubStarredPanelE
|
|
|
46
48
|
export type { GitHubProjectsSlice, GitHubProjectsPanelActions, GitHubProjectsPanelEventPayloads, } from './panels/GitHubProjectsPanel/types';
|
|
47
49
|
export type { GitHubUserProfile, GitHubOrganization as UserProfileOrganization, GitHubRepository as UserProfileRepository, UserProfileSlice, UserProfilePanelActions, UserProfileView, UserPresenceStatus, UserProfileCardProps, OrganizationCardProps, StarredRepositoryCardProps, OrganizationSelectedPayload, RepositorySelectedPayload as UserRepositorySelectedPayload, RepositoryCloneRequestedPayload, UserProfilePanelEventPayloads, } from './panels/UserProfilePanel/types';
|
|
48
50
|
export type { GitHubRepositoryCardProps } from './panels/shared/GitHubRepositoryCard';
|
|
51
|
+
export type { Collection, CollectionMembership, UserCollectionsSlice, UserCollectionsPanelActions, CollectionCardProps, CollectionSelectedPayload, CollectionCreatedPayload, CollectionDeletedPayload, RepositoryAddedPayload as CollectionRepositoryAddedPayload, RepositoryRemovedPayload as CollectionRepositoryRemovedPayload, UserCollectionsPanelEventPayloads, } from './panels/UserCollectionsPanel/types';
|
|
49
52
|
//# 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":"AAQA,OAAO,KAAK,EAAE,eAAe,EAAqB,MAAM,SAAS,CAAC;AAUlE;;;GAGG;AACH,eAAO,MAAM,MAAM,EAAE,eAAe,EAyOnC,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,OAAO,EACL,wBAAwB,EACxB,gCAAgC,EAChC,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EACL,6BAA6B,EAC7B,qCAAqC,EACrC,sBAAsB,EACtB,oBAAoB,IAAI,8BAA8B,EACtD,sBAAsB,EACtB,oBAAoB,EACpB,8BAA8B,GAC/B,MAAM,yCAAyC,CAAC;AAEjD,OAAO,EACL,uBAAuB,EACvB,+BAA+B,EAC/B,iBAAiB,EACjB,2BAA2B,EAC3B,0BAA0B,GAC3B,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EACL,wBAAwB,EACxB,gCAAgC,EAChC,kBAAkB,IAAI,wBAAwB,EAC9C,sBAAsB,EACtB,2BAA2B,EAC3B,0BAA0B,GAC3B,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EACL,qBA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AAkC,EAC9D,iCAAiC,GAClC,MAAM,qCAAqC,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PanelComponentProps } from '../../types';
|
|
3
|
+
export interface UserCollectionsPanelProps extends PanelComponentProps {
|
|
4
|
+
/** Whether to show the search bar by default */
|
|
5
|
+
defaultShowSearch?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* UserCollectionsPanel - Browse and manage user repository collections
|
|
9
|
+
*
|
|
10
|
+
* Features:
|
|
11
|
+
* - Grid view of all collections
|
|
12
|
+
* - Search/filter by collection name or description
|
|
13
|
+
* - Create new collections
|
|
14
|
+
* - Edit/delete collections
|
|
15
|
+
* - GitHub sync status indicator
|
|
16
|
+
* - Enable GitHub sync for cross-device persistence
|
|
17
|
+
*
|
|
18
|
+
* Data Slices:
|
|
19
|
+
* - userCollections: UserCollectionsSlice object
|
|
20
|
+
*
|
|
21
|
+
* Events Emitted:
|
|
22
|
+
* - industry-theme.user-collections:collection:selected
|
|
23
|
+
* - industry-theme.user-collections:collection:created
|
|
24
|
+
* - industry-theme.user-collections:collection:deleted
|
|
25
|
+
* - industry-theme.user-collections:create-collection-requested
|
|
26
|
+
* - industry-theme.user-collections:edit-collection-requested
|
|
27
|
+
*
|
|
28
|
+
* Events Listened:
|
|
29
|
+
* - industry-theme.user-collections:select-collection
|
|
30
|
+
* - industry-theme.user-collections:create-collection
|
|
31
|
+
* - industry-theme.user-collections:delete-collection
|
|
32
|
+
* - industry-theme.user-collections:enable-github-sync
|
|
33
|
+
* - industry-theme.user-collections:refresh-collections
|
|
34
|
+
*/
|
|
35
|
+
export declare const UserCollectionsPanel: React.FC<UserCollectionsPanelProps>;
|
|
36
|
+
/**
|
|
37
|
+
* UserCollectionsPanelPreview - Compact preview for panel tabs/thumbnails
|
|
38
|
+
*/
|
|
39
|
+
export declare const UserCollectionsPanelPreview: React.FC;
|
|
40
|
+
export type { Collection, CollectionMembership, UserCollectionsSlice, UserCollectionsPanelActions, CollectionCardProps, CollectionSelectedPayload, CollectionCreatedPayload, CollectionDeletedPayload, RepositoryAddedPayload, RepositoryRemovedPayload, UserCollectionsPanelEventPayloads, } from './types';
|
|
41
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/panels/UserCollectionsPanel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAazE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAmBvD,MAAM,WAAW,yBAA0B,SAAQ,mBAAmB;IACpE,gDAAgD;IAChD,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAkuBD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAEpE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,KAAK,CAAC,EAsC/C,CAAC;AAGF,YAAY,EACV,UAAU,EACV,oBAAoB,EACpB,oBAAoB,EACpB,2BAA2B,EAC3B,mBAAmB,EACnB,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,EACxB,sBAAsB,EACtB,wBAAwB,EACxB,iCAAiC,GAClC,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UTCP Tools for UserCollectionsPanel
|
|
3
|
+
*
|
|
4
|
+
* These tools allow AI agents to interact with the User Collections panel
|
|
5
|
+
* through the Universal Tool Communication Protocol.
|
|
6
|
+
*/
|
|
7
|
+
import type { PanelTool, PanelToolsMetadata } from '../../types';
|
|
8
|
+
/**
|
|
9
|
+
* Filter collections tool
|
|
10
|
+
* Allows filtering the collection list by search term
|
|
11
|
+
*/
|
|
12
|
+
export declare const filterCollectionsTool: PanelTool;
|
|
13
|
+
/**
|
|
14
|
+
* Select collection tool
|
|
15
|
+
* Allows selecting a specific collection in the list
|
|
16
|
+
*/
|
|
17
|
+
export declare const selectCollectionTool: PanelTool;
|
|
18
|
+
/**
|
|
19
|
+
* Create collection tool
|
|
20
|
+
* Allows creating a new collection
|
|
21
|
+
*/
|
|
22
|
+
export declare const createCollectionTool: PanelTool;
|
|
23
|
+
/**
|
|
24
|
+
* Delete collection tool
|
|
25
|
+
* Allows deleting a collection
|
|
26
|
+
*/
|
|
27
|
+
export declare const deleteCollectionTool: PanelTool;
|
|
28
|
+
/**
|
|
29
|
+
* Add repository to collection tool
|
|
30
|
+
* Allows adding a repository to a collection
|
|
31
|
+
*/
|
|
32
|
+
export declare const addRepositoryTool: PanelTool;
|
|
33
|
+
/**
|
|
34
|
+
* Remove repository from collection tool
|
|
35
|
+
* Allows removing a repository from a collection
|
|
36
|
+
*/
|
|
37
|
+
export declare const removeRepositoryTool: PanelTool;
|
|
38
|
+
/**
|
|
39
|
+
* Enable GitHub sync tool
|
|
40
|
+
* Allows enabling GitHub sync for collections
|
|
41
|
+
*/
|
|
42
|
+
export declare const enableGitHubSyncTool: PanelTool;
|
|
43
|
+
/**
|
|
44
|
+
* Refresh collections tool
|
|
45
|
+
* Allows refreshing collections from GitHub
|
|
46
|
+
*/
|
|
47
|
+
export declare const refreshCollectionsTool: PanelTool;
|
|
48
|
+
/**
|
|
49
|
+
* All tools for the UserCollectionsPanel
|
|
50
|
+
*/
|
|
51
|
+
export declare const userCollectionsPanelTools: PanelTool[];
|
|
52
|
+
/**
|
|
53
|
+
* Tools metadata for registration
|
|
54
|
+
*/
|
|
55
|
+
export declare const userCollectionsPanelToolsMetadata: PanelToolsMetadata;
|
|
56
|
+
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/panels/UserCollectionsPanel/tools.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAIjE;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,SA2BnC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAyBlC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,SA8BlC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAyBlC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,SA6B/B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,SA6BlC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAqBlC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,SAoBpC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,SAAS,EAShD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iCAAiC,EAAE,kBAK/C,CAAC"}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UserCollectionsPanel Type Definitions
|
|
3
|
+
*
|
|
4
|
+
* Types for the User Collections panel - displays and manages
|
|
5
|
+
* user-created repository collections that sync to GitHub.
|
|
6
|
+
*/
|
|
7
|
+
import type { PanelActions } from '../../types';
|
|
8
|
+
/**
|
|
9
|
+
* Collection type - matches @principal-ai/alexandria-collections
|
|
10
|
+
*/
|
|
11
|
+
export interface Collection {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
icon?: string;
|
|
16
|
+
theme?: string;
|
|
17
|
+
isDefault?: boolean;
|
|
18
|
+
suggestedClonePath?: string;
|
|
19
|
+
metadata?: Record<string, unknown>;
|
|
20
|
+
createdAt: number;
|
|
21
|
+
updatedAt: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Collection membership - links repositories to collections
|
|
25
|
+
*/
|
|
26
|
+
export interface CollectionMembership {
|
|
27
|
+
collectionId: string;
|
|
28
|
+
repositoryId: string;
|
|
29
|
+
addedAt: number;
|
|
30
|
+
metadata?: {
|
|
31
|
+
pinned?: boolean;
|
|
32
|
+
notes?: string;
|
|
33
|
+
[key: string]: unknown;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Data slice for user collections
|
|
38
|
+
*/
|
|
39
|
+
export interface UserCollectionsSlice {
|
|
40
|
+
/** List of user's collections */
|
|
41
|
+
collections: Collection[];
|
|
42
|
+
/** Collection memberships (repos in collections) */
|
|
43
|
+
memberships: CollectionMembership[];
|
|
44
|
+
/** Whether collections are loading */
|
|
45
|
+
loading: boolean;
|
|
46
|
+
/** Whether a save operation is in progress */
|
|
47
|
+
saving?: boolean;
|
|
48
|
+
/** Error message if loading/saving failed */
|
|
49
|
+
error?: string;
|
|
50
|
+
/** Whether GitHub sync is enabled */
|
|
51
|
+
gitHubRepoExists?: boolean;
|
|
52
|
+
/** URL to the GitHub collections repo */
|
|
53
|
+
gitHubRepoUrl?: string | null;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Extended actions for UserCollectionsPanel
|
|
57
|
+
*/
|
|
58
|
+
export interface UserCollectionsPanelActions extends PanelActions {
|
|
59
|
+
/**
|
|
60
|
+
* Create a new collection
|
|
61
|
+
* @param name - Collection name
|
|
62
|
+
* @param description - Optional description
|
|
63
|
+
* @param icon - Optional icon name
|
|
64
|
+
*/
|
|
65
|
+
createCollection?: (name: string, description?: string, icon?: string) => Promise<Collection | null>;
|
|
66
|
+
/**
|
|
67
|
+
* Update a collection
|
|
68
|
+
* @param collectionId - Collection ID
|
|
69
|
+
* @param updates - Fields to update
|
|
70
|
+
*/
|
|
71
|
+
updateCollection?: (collectionId: string, updates: Partial<Omit<Collection, 'id' | 'createdAt' | 'updatedAt'>>) => Promise<void>;
|
|
72
|
+
/**
|
|
73
|
+
* Delete a collection
|
|
74
|
+
* @param collectionId - Collection ID
|
|
75
|
+
*/
|
|
76
|
+
deleteCollection?: (collectionId: string) => Promise<void>;
|
|
77
|
+
/**
|
|
78
|
+
* Add a repository to a collection
|
|
79
|
+
* @param collectionId - Collection ID
|
|
80
|
+
* @param repositoryId - Repository identifier (owner/repo format)
|
|
81
|
+
* @param metadata - Optional metadata (pinned, notes)
|
|
82
|
+
*/
|
|
83
|
+
addRepository?: (collectionId: string, repositoryId: string, metadata?: {
|
|
84
|
+
pinned?: boolean;
|
|
85
|
+
notes?: string;
|
|
86
|
+
}) => Promise<void>;
|
|
87
|
+
/**
|
|
88
|
+
* Remove a repository from a collection
|
|
89
|
+
* @param collectionId - Collection ID
|
|
90
|
+
* @param repositoryId - Repository identifier
|
|
91
|
+
*/
|
|
92
|
+
removeRepository?: (collectionId: string, repositoryId: string) => Promise<void>;
|
|
93
|
+
/**
|
|
94
|
+
* Enable GitHub sync (creates web-ade-collections repo)
|
|
95
|
+
*/
|
|
96
|
+
enableGitHubSync?: () => Promise<void>;
|
|
97
|
+
/**
|
|
98
|
+
* Refresh collections from GitHub
|
|
99
|
+
*/
|
|
100
|
+
refreshCollections?: () => Promise<void>;
|
|
101
|
+
/**
|
|
102
|
+
* Navigate to a repository (open in browser or app)
|
|
103
|
+
* @param repositoryId - Repository identifier (owner/repo)
|
|
104
|
+
*/
|
|
105
|
+
navigateToRepository?: (repositoryId: string) => void;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Props for CollectionCard component
|
|
109
|
+
*/
|
|
110
|
+
export interface CollectionCardProps {
|
|
111
|
+
/** Collection data */
|
|
112
|
+
collection: Collection;
|
|
113
|
+
/** Number of repositories in this collection */
|
|
114
|
+
repositoryCount: number;
|
|
115
|
+
/** Whether this collection is selected */
|
|
116
|
+
isSelected?: boolean;
|
|
117
|
+
/** Callback when card is clicked */
|
|
118
|
+
onClick?: (collection: Collection) => void;
|
|
119
|
+
/** Callback when edit button is clicked */
|
|
120
|
+
onEdit?: (collection: Collection) => void;
|
|
121
|
+
/** Callback when delete button is clicked */
|
|
122
|
+
onDelete?: (collection: Collection) => void;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Collection selected event payload
|
|
126
|
+
*/
|
|
127
|
+
export interface CollectionSelectedPayload {
|
|
128
|
+
collectionId: string;
|
|
129
|
+
collection: Collection;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Collection created event payload
|
|
133
|
+
*/
|
|
134
|
+
export interface CollectionCreatedPayload {
|
|
135
|
+
collectionId: string;
|
|
136
|
+
collection: Collection;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Collection deleted event payload
|
|
140
|
+
*/
|
|
141
|
+
export interface CollectionDeletedPayload {
|
|
142
|
+
collectionId: string;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Repository added to collection event payload
|
|
146
|
+
*/
|
|
147
|
+
export interface RepositoryAddedPayload {
|
|
148
|
+
collectionId: string;
|
|
149
|
+
repositoryId: string;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Repository removed from collection event payload
|
|
153
|
+
*/
|
|
154
|
+
export interface RepositoryRemovedPayload {
|
|
155
|
+
collectionId: string;
|
|
156
|
+
repositoryId: string;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Event payloads for UserCollectionsPanel
|
|
160
|
+
*/
|
|
161
|
+
export interface UserCollectionsPanelEventPayloads {
|
|
162
|
+
/** Select collection event (from tools) */
|
|
163
|
+
'select-collection': {
|
|
164
|
+
collectionId: string;
|
|
165
|
+
};
|
|
166
|
+
/** Create collection event (from tools) */
|
|
167
|
+
'create-collection': {
|
|
168
|
+
name: string;
|
|
169
|
+
description?: string;
|
|
170
|
+
};
|
|
171
|
+
/** Create collection requested - emitted when user clicks add button */
|
|
172
|
+
'create-collection-requested': Record<string, never>;
|
|
173
|
+
/** Delete collection event (from tools) */
|
|
174
|
+
'delete-collection': {
|
|
175
|
+
collectionId: string;
|
|
176
|
+
};
|
|
177
|
+
/** Add repository event (from tools) */
|
|
178
|
+
'add-repository': {
|
|
179
|
+
collectionId: string;
|
|
180
|
+
repositoryId: string;
|
|
181
|
+
};
|
|
182
|
+
/** Remove repository event (from tools) */
|
|
183
|
+
'remove-repository': {
|
|
184
|
+
collectionId: string;
|
|
185
|
+
repositoryId: string;
|
|
186
|
+
};
|
|
187
|
+
/** Enable GitHub sync event */
|
|
188
|
+
'enable-github-sync': Record<string, never>;
|
|
189
|
+
/** Refresh collections event */
|
|
190
|
+
'refresh-collections': Record<string, never>;
|
|
191
|
+
/** Collection selected notification */
|
|
192
|
+
'collection:selected': CollectionSelectedPayload;
|
|
193
|
+
/** Collection created notification */
|
|
194
|
+
'collection:created': CollectionCreatedPayload;
|
|
195
|
+
/** Collection deleted notification */
|
|
196
|
+
'collection:deleted': CollectionDeletedPayload;
|
|
197
|
+
/** Repository added notification */
|
|
198
|
+
'collection:repository-added': RepositoryAddedPayload;
|
|
199
|
+
/** Repository removed notification */
|
|
200
|
+
'collection:repository-removed': RepositoryRemovedPayload;
|
|
201
|
+
}
|
|
202
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/panels/UserCollectionsPanel/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,QA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