@industry-theme/github-panels 0.3.1 → 0.4.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/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/panels/ProfilePanel/index.d.ts +56 -0
- package/dist/panels/ProfilePanel/index.d.ts.map +1 -0
- package/dist/panels/ProfilePanel/tools.d.ts +49 -0
- package/dist/panels/ProfilePanel/tools.d.ts.map +1 -0
- package/dist/panels/ProfilePanel/types.d.ts +272 -0
- package/dist/panels/ProfilePanel/types.d.ts.map +1 -0
- package/dist/panels.bundle.js +373 -233
- package/dist/panels.bundle.js.map +1 -1
- package/dist/types/github.d.ts +2 -1
- package/dist/types/github.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/panels/OrgProfilePanel/index.d.ts +0 -46
- package/dist/panels/OrgProfilePanel/index.d.ts.map +0 -1
- package/dist/panels/OrgProfilePanel/tools.d.ts +0 -46
- package/dist/panels/OrgProfilePanel/tools.d.ts.map +0 -1
- package/dist/panels/OrgProfilePanel/types.d.ts +0 -172
- package/dist/panels/OrgProfilePanel/types.d.ts.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -23,9 +23,10 @@ export { GitHubMessagesPanel } from './panels/GitHubMessagesPanel';
|
|
|
23
23
|
export { OwnerRepositoriesPanel, type OwnerRepositoriesPanelProps } from './panels/OwnerRepositoriesPanel';
|
|
24
24
|
export { RecentRepositoriesPanel, addRecentRepository, addRecentOwner } from './panels/RecentRepositoriesPanel';
|
|
25
25
|
export type { OwnerInfo } from './panels/RecentRepositoriesPanel';
|
|
26
|
-
export {
|
|
27
|
-
export type { GitHubOwner, GitHubRepository, GitHubOrganization, GitHubRepositoriesSliceData, RepositorySelectedEventPayload, RepositoryPreviewEventPayload, GitHubPanelEventType, GitHubIssue, GitHubIssueLabel, GitHubIssueUser, GitHubIssuesSliceData, IssueSelectedEventPayload, GitHubPullRequest, GitHubPullRequestRef, PullRequestSelectedEventPayload, GitHubComment, GitHubReview, GitHubReviewComment, GitHubReactions, GitHubApp, GitHubTimelineEvent, GitHubTimelineCommentEvent, GitHubTimelineReviewEvent, GitHubTimelineCommitEvent, GitHubTimelineLabelEvent, GitHubTimelineAssignEvent, GitHubTimelineReviewRequestEvent, GitHubTimelineMergeEvent, GitHubTimelineStateEvent, GitHubTimelineRefEvent, GitHubTimelineDeployEvent, GitHubTimelineRenameEvent, GitHubTimelineMilestoneEvent, GitHubTimelineCrossReferenceEvent, GitHubCommitAuthor, GitHubCommitVerification, GitHubMessagesTarget, GitHubMessagesSliceData, MessagesRequestEventPayload, OwnerRepositoriesSliceData, WorkspaceRepositoriesSlice, GitHubWorkspaceRepositoriesSlice,
|
|
26
|
+
export { ProfilePanel, ProfilePanelMetadata, ProfilePanelPreview, isOrgProfile, isUserProfile, getProfileDescription, } from './panels/ProfilePanel';
|
|
27
|
+
export type { GitHubOwner, GitHubRepository, GitHubOrganization, GitHubRepositoriesSliceData, RepositorySelectedEventPayload, RepositoryPreviewEventPayload, GitHubPanelEventType, GitHubIssue, GitHubIssueLabel, GitHubIssueUser, GitHubIssuesSliceData, IssueSelectedEventPayload, GitHubPullRequest, GitHubPullRequestRef, PullRequestSelectedEventPayload, GitHubComment, GitHubReview, GitHubReviewComment, GitHubReactions, GitHubApp, GitHubTimelineEvent, GitHubTimelineCommentEvent, GitHubTimelineReviewEvent, GitHubTimelineCommitEvent, GitHubTimelineLabelEvent, GitHubTimelineAssignEvent, GitHubTimelineReviewRequestEvent, GitHubTimelineMergeEvent, GitHubTimelineStateEvent, GitHubTimelineRefEvent, GitHubTimelineDeployEvent, GitHubTimelineRenameEvent, GitHubTimelineMilestoneEvent, GitHubTimelineCrossReferenceEvent, GitHubCommitAuthor, GitHubCommitVerification, GitHubMessagesTarget, GitHubMessagesSliceData, MessagesRequestEventPayload, OwnerRepositoriesSliceData, WorkspaceRepositoriesSlice, GitHubWorkspaceRepositoriesSlice, } from './types/github';
|
|
28
|
+
export type { GitHubUserProfile, GitHubOrgProfile, GitHubProfile, ProfileSlice, ProfilePanelActions, ProfilePanelContext, ProfilePanelExtensions, ProfilePanelBaseProps, ProfilePanelPropsTyped, ProfileView, ProfileType, CollectionSelectedPayload, RepositorySelectedPayload, RepositoryCloneRequestedPayload, ProfilePanelEventPayloads, } from './panels/ProfilePanel';
|
|
28
29
|
export { getTimelineEventType, isCommentEvent, isReviewEvent, isCommitEvent, } from './types/github';
|
|
29
30
|
export { githubTools, githubToolsMetadata, listRepositoriesTool, selectRepositoryTool, previewRepositoryTool, searchRepositoriesTool, openRepositorySwitcherTool, requestGitHubLoginTool, listIssuesTool, refreshIssuesTool, viewIssueMessagesTool, viewPullRequestMessagesTool, refreshMessagesTool, } from './tools';
|
|
30
|
-
export {
|
|
31
|
+
export { profileTools, profileToolsMetadata, setProfileViewTool, selectProfileCollectionTool, selectProfileRepositoryTool, cloneProfileRepositoryTool, filterProfileRepositoriesTool, } from './panels/ProfilePanel/tools';
|
|
31
32
|
//# 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":"AAQA,OAAO,KAAK,EAAE,eAAe,EAAqB,MAAM,SAAS,CAAC;AAIlE;;;GAGG;AAEH,eAAO,MAAM,MAAM,EAAE,eAAe,CAAC,GAAG,EAAE,GAAG,CAAC,EAuH7C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa,qBAGzB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,qBAG3B,CAAC;AAGF,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,C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AAM,SAAS,CAAC;AAGjB,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,kBAAkB,EAClB,2BAA2B,EAC3B,2BAA2B,EAC3B,0BAA0B,EAC1B,6BAA6B,GAC9B,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ProfilePanelPropsTyped, ProfileType } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* ProfilePanel - View user or organization profiles with their collections and repos
|
|
5
|
+
*
|
|
6
|
+
* Features:
|
|
7
|
+
* - Display profile header with avatar, bio/description, stats
|
|
8
|
+
* - Show profile's collections
|
|
9
|
+
* - Show profile's repositories with search/filter
|
|
10
|
+
* - Show starred repositories (user only)
|
|
11
|
+
* - Clone repositories
|
|
12
|
+
* - Extension points for additional features (presence, drag-and-drop)
|
|
13
|
+
*
|
|
14
|
+
* Props:
|
|
15
|
+
* - profileType: 'user' | 'organization'
|
|
16
|
+
* - panelId: Custom panel ID for events (optional)
|
|
17
|
+
* - extensions: Extension points for customization (optional)
|
|
18
|
+
*
|
|
19
|
+
* Data Slices:
|
|
20
|
+
* - profile: ProfileSlice object
|
|
21
|
+
*
|
|
22
|
+
* Events Emitted:
|
|
23
|
+
* - {panelId}:collection:selected
|
|
24
|
+
* - {panelId}:repository:selected
|
|
25
|
+
* - {panelId}:repository:clone-requested
|
|
26
|
+
* - {panelId}:view:changed
|
|
27
|
+
*
|
|
28
|
+
* Events Listened:
|
|
29
|
+
* - {panelId}:set-view
|
|
30
|
+
* - {panelId}:select-collection
|
|
31
|
+
* - {panelId}:select-repository
|
|
32
|
+
* - {panelId}:clone-repository
|
|
33
|
+
* - {panelId}:filter-repositories
|
|
34
|
+
*/
|
|
35
|
+
export declare const ProfilePanel: React.FC<ProfilePanelPropsTyped>;
|
|
36
|
+
/**
|
|
37
|
+
* ProfilePanelPreview - Compact preview for panel tabs/thumbnails
|
|
38
|
+
*/
|
|
39
|
+
export declare const ProfilePanelPreview: React.FC<{
|
|
40
|
+
profileType?: ProfileType;
|
|
41
|
+
}>;
|
|
42
|
+
/**
|
|
43
|
+
* Panel metadata for registration
|
|
44
|
+
*/
|
|
45
|
+
export declare const ProfilePanelMetadata: {
|
|
46
|
+
id: string;
|
|
47
|
+
name: string;
|
|
48
|
+
description: string;
|
|
49
|
+
icon: string;
|
|
50
|
+
version: string;
|
|
51
|
+
slices: string[];
|
|
52
|
+
surfaces: string[];
|
|
53
|
+
};
|
|
54
|
+
export type { GitHubUserProfile, GitHubOrgProfile, GitHubProfile, GitHubRepository, Collection, ProfileSlice, ProfilePanelActions, ProfilePanelContext, ProfilePanelExtensions, ProfilePanelBaseProps, ProfilePanelPropsTyped, ProfileView, ProfileType, CollectionCardProps, RepositoryCardProps, CollectionSelectedPayload, RepositorySelectedPayload, RepositoryCloneRequestedPayload, ProfilePanelEventPayloads, } from './types';
|
|
55
|
+
export { isOrgProfile, isUserProfile, getProfileDescription } from './types';
|
|
56
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/panels/ProfilePanel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAezE,OAAO,KAAK,EAIV,sBAAsB,EAEtB,WAAW,EACZ,MAAM,SAAS,CAAC;AAgzBjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAEzD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,WAAW,CAAC,EAAE,WAAW,CAAA;CAAE,CA0CvE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;CAQhC,CAAC;AAGF,YAAY,EACV,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EAChB,UAAU,EACV,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,sBAAsB,EACtB,WAAW,EACX,WAAW,EACX,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,EACzB,yBAAyB,EACzB,+BAA+B,EAC/B,yBAAyB,GAC1B,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ProfilePanel Tools
|
|
3
|
+
*
|
|
4
|
+
* UTCP-compatible tools for profile panel operations.
|
|
5
|
+
* These tools emit events that the ProfilePanel listens for.
|
|
6
|
+
*
|
|
7
|
+
* Note: The panel ID can be customized via the panelId prop.
|
|
8
|
+
* These tools use the default panel ID 'industry-theme.profile'.
|
|
9
|
+
*/
|
|
10
|
+
import type { PanelTool, PanelToolsMetadata } from '@principal-ade/utcp-panel-event';
|
|
11
|
+
/**
|
|
12
|
+
* Tool: Set View
|
|
13
|
+
*
|
|
14
|
+
* Switch between collections, repositories, and starred views.
|
|
15
|
+
*/
|
|
16
|
+
export declare const setProfileViewTool: PanelTool;
|
|
17
|
+
/**
|
|
18
|
+
* Tool: Select Collection
|
|
19
|
+
*
|
|
20
|
+
* Select a collection from the profile's collections.
|
|
21
|
+
*/
|
|
22
|
+
export declare const selectProfileCollectionTool: PanelTool;
|
|
23
|
+
/**
|
|
24
|
+
* Tool: Select Repository
|
|
25
|
+
*
|
|
26
|
+
* Select a repository from the profile's repositories or starred repos.
|
|
27
|
+
*/
|
|
28
|
+
export declare const selectProfileRepositoryTool: PanelTool;
|
|
29
|
+
/**
|
|
30
|
+
* Tool: Clone Repository
|
|
31
|
+
*
|
|
32
|
+
* Clone a repository from the profile.
|
|
33
|
+
*/
|
|
34
|
+
export declare const cloneProfileRepositoryTool: PanelTool;
|
|
35
|
+
/**
|
|
36
|
+
* Tool: Filter Repositories
|
|
37
|
+
*
|
|
38
|
+
* Filter repositories in the profile by search query.
|
|
39
|
+
*/
|
|
40
|
+
export declare const filterProfileRepositoriesTool: PanelTool;
|
|
41
|
+
/**
|
|
42
|
+
* All ProfilePanel tools exported as an array.
|
|
43
|
+
*/
|
|
44
|
+
export declare const profileTools: PanelTool[];
|
|
45
|
+
/**
|
|
46
|
+
* ProfilePanel tools metadata for registration.
|
|
47
|
+
*/
|
|
48
|
+
export declare const profileToolsMetadata: PanelToolsMetadata;
|
|
49
|
+
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/panels/ProfilePanel/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,SAAS,EACT,kBAAkB,EACnB,MAAM,iCAAiC,CAAC;AAIzC;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,SA2BhC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,EAAE,SA0BzC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,EAAE,SA8BzC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,EAAE,SA6BxC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,6BAA6B,EAAE,SAyB3C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,SAAS,EAMnC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,kBAMlC,CAAC"}
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ProfilePanel Type Definitions
|
|
3
|
+
*
|
|
4
|
+
* Unified types for displaying user and organization profiles,
|
|
5
|
+
* including their collections and repositories.
|
|
6
|
+
*/
|
|
7
|
+
import type { PanelActions, DataSlice, PanelComponentProps } from '@principal-ade/panel-framework-core';
|
|
8
|
+
import type { GitHubRepository } from '../../types/github';
|
|
9
|
+
import type { Collection } from '@principal-ai/alexandria-collections';
|
|
10
|
+
import type { ReactNode } from 'react';
|
|
11
|
+
export type { GitHubRepository, Collection };
|
|
12
|
+
/**
|
|
13
|
+
* Profile type discriminator
|
|
14
|
+
*/
|
|
15
|
+
export type ProfileType = 'user' | 'organization';
|
|
16
|
+
/**
|
|
17
|
+
* GitHub User profile
|
|
18
|
+
*/
|
|
19
|
+
export interface GitHubUserProfile {
|
|
20
|
+
login: string;
|
|
21
|
+
id: number;
|
|
22
|
+
avatar_url: string;
|
|
23
|
+
name: string | null;
|
|
24
|
+
company: string | null;
|
|
25
|
+
location: string | null;
|
|
26
|
+
email: string | null;
|
|
27
|
+
bio: string | null;
|
|
28
|
+
blog?: string | null;
|
|
29
|
+
twitter_username?: string | null;
|
|
30
|
+
public_repos: number;
|
|
31
|
+
public_gists: number;
|
|
32
|
+
followers: number;
|
|
33
|
+
following: number;
|
|
34
|
+
html_url?: string;
|
|
35
|
+
created_at: string;
|
|
36
|
+
updated_at: string;
|
|
37
|
+
type?: 'User';
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* GitHub Organization profile
|
|
41
|
+
*/
|
|
42
|
+
export interface GitHubOrgProfile {
|
|
43
|
+
login: string;
|
|
44
|
+
id: number;
|
|
45
|
+
avatar_url: string;
|
|
46
|
+
name: string | null;
|
|
47
|
+
description: string | null;
|
|
48
|
+
company: string | null;
|
|
49
|
+
blog: string | null;
|
|
50
|
+
location: string | null;
|
|
51
|
+
email: string | null;
|
|
52
|
+
twitter_username: string | null;
|
|
53
|
+
is_verified: boolean;
|
|
54
|
+
has_organization_projects: boolean;
|
|
55
|
+
has_repository_projects: boolean;
|
|
56
|
+
public_repos: number;
|
|
57
|
+
public_gists: number;
|
|
58
|
+
followers: number;
|
|
59
|
+
following: number;
|
|
60
|
+
html_url: string;
|
|
61
|
+
created_at: string;
|
|
62
|
+
updated_at: string;
|
|
63
|
+
type: 'Organization';
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Union type for profile data
|
|
67
|
+
*/
|
|
68
|
+
export type GitHubProfile = GitHubUserProfile | GitHubOrgProfile;
|
|
69
|
+
/**
|
|
70
|
+
* Active view tab in the panel
|
|
71
|
+
* - 'collections': Show collections
|
|
72
|
+
* - 'repositories': Show owned/org repositories
|
|
73
|
+
* - 'starred': Show starred repositories (user only)
|
|
74
|
+
*/
|
|
75
|
+
export type ProfileView = 'collections' | 'repositories' | 'starred';
|
|
76
|
+
/**
|
|
77
|
+
* Data slice for profile panel
|
|
78
|
+
*/
|
|
79
|
+
export interface ProfileSlice {
|
|
80
|
+
/** The profile (user or org) */
|
|
81
|
+
profile: GitHubProfile | null;
|
|
82
|
+
/** Profile's collections */
|
|
83
|
+
collections: Collection[];
|
|
84
|
+
/** Profile's repositories (owned for users, org repos for orgs) */
|
|
85
|
+
repositories: GitHubRepository[];
|
|
86
|
+
/** Starred repositories (user only) */
|
|
87
|
+
starredRepositories?: GitHubRepository[];
|
|
88
|
+
/** Currently selected collection ID (for highlighting) */
|
|
89
|
+
selectedCollectionId?: string | null;
|
|
90
|
+
/** Currently selected repository ID (for highlighting) */
|
|
91
|
+
selectedRepositoryId?: number | null;
|
|
92
|
+
/** Currently active view tab */
|
|
93
|
+
currentView?: ProfileView;
|
|
94
|
+
/** Whether data is loading */
|
|
95
|
+
loading: boolean;
|
|
96
|
+
/** Error message if loading failed */
|
|
97
|
+
error?: string;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Extended actions for ProfilePanel
|
|
101
|
+
*/
|
|
102
|
+
export interface ProfilePanelActions extends PanelActions {
|
|
103
|
+
/**
|
|
104
|
+
* View a repository's details
|
|
105
|
+
* @param owner - Repository owner
|
|
106
|
+
* @param repo - Repository name
|
|
107
|
+
*/
|
|
108
|
+
viewRepository?: (owner: string, repo: string) => Promise<void>;
|
|
109
|
+
/**
|
|
110
|
+
* Clone a repository
|
|
111
|
+
* @param repository - Repository to clone
|
|
112
|
+
*/
|
|
113
|
+
cloneRepository?: (repository: GitHubRepository) => Promise<void>;
|
|
114
|
+
/**
|
|
115
|
+
* Open URL in browser
|
|
116
|
+
* @param url - URL to open
|
|
117
|
+
*/
|
|
118
|
+
openInBrowser?: (url: string) => Promise<void>;
|
|
119
|
+
/**
|
|
120
|
+
* Fetch user profile by username
|
|
121
|
+
* @param username - GitHub username
|
|
122
|
+
*/
|
|
123
|
+
fetchUserProfile?: (username: string) => Promise<GitHubUserProfile | null>;
|
|
124
|
+
/**
|
|
125
|
+
* Fetch organization profile by login
|
|
126
|
+
* @param login - Organization login
|
|
127
|
+
*/
|
|
128
|
+
fetchOrgProfile?: (login: string) => Promise<GitHubOrgProfile | null>;
|
|
129
|
+
/**
|
|
130
|
+
* Fetch repositories for user/org
|
|
131
|
+
* @param login - User/org login
|
|
132
|
+
*/
|
|
133
|
+
fetchRepositories?: (login: string) => Promise<GitHubRepository[]>;
|
|
134
|
+
/**
|
|
135
|
+
* Fetch starred repositories (user only)
|
|
136
|
+
* @param username - GitHub username
|
|
137
|
+
*/
|
|
138
|
+
fetchStarredRepositories?: (username: string) => Promise<GitHubRepository[]>;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Context interface for ProfilePanel
|
|
142
|
+
* Declares which slices this panel requires
|
|
143
|
+
*/
|
|
144
|
+
export interface ProfilePanelContext {
|
|
145
|
+
/** Profile data slice (required) */
|
|
146
|
+
profile: DataSlice<ProfileSlice>;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Extension points for customizing ProfilePanel behavior
|
|
150
|
+
*/
|
|
151
|
+
export interface ProfilePanelExtensions {
|
|
152
|
+
/**
|
|
153
|
+
* Render additional content in the header (e.g., presence indicator)
|
|
154
|
+
* @param profile - The current profile
|
|
155
|
+
*/
|
|
156
|
+
renderHeaderExtra?: (profile: GitHubProfile) => ReactNode;
|
|
157
|
+
/**
|
|
158
|
+
* Render additional actions for repository cards
|
|
159
|
+
* @param repository - The repository
|
|
160
|
+
*/
|
|
161
|
+
renderRepositoryActions?: (repository: GitHubRepository) => ReactNode;
|
|
162
|
+
/**
|
|
163
|
+
* Custom repository card wrapper (e.g., for drag-and-drop)
|
|
164
|
+
* @param children - The repository card element
|
|
165
|
+
* @param repository - The repository data
|
|
166
|
+
*/
|
|
167
|
+
wrapRepositoryCard?: (children: ReactNode, repository: GitHubRepository) => ReactNode;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Base props for ProfilePanel component (before typed props)
|
|
171
|
+
*/
|
|
172
|
+
export interface ProfilePanelBaseProps {
|
|
173
|
+
/**
|
|
174
|
+
* Type of profile being displayed
|
|
175
|
+
* Defaults to 'user' if not specified
|
|
176
|
+
*/
|
|
177
|
+
profileType?: ProfileType;
|
|
178
|
+
/**
|
|
179
|
+
* Panel ID for events (defaults to 'industry-theme.profile')
|
|
180
|
+
*/
|
|
181
|
+
panelId?: string;
|
|
182
|
+
/**
|
|
183
|
+
* Extension points for customization
|
|
184
|
+
*/
|
|
185
|
+
extensions?: ProfilePanelExtensions;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Props type for ProfilePanel component
|
|
189
|
+
*/
|
|
190
|
+
export type ProfilePanelPropsTyped = PanelComponentProps<ProfilePanelActions, ProfilePanelContext> & ProfilePanelBaseProps;
|
|
191
|
+
/**
|
|
192
|
+
* Collection selected event payload
|
|
193
|
+
*/
|
|
194
|
+
export interface CollectionSelectedPayload {
|
|
195
|
+
collectionId: string;
|
|
196
|
+
collection: Collection;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Repository selected event payload
|
|
200
|
+
*/
|
|
201
|
+
export interface RepositorySelectedPayload {
|
|
202
|
+
owner: string;
|
|
203
|
+
repo: string;
|
|
204
|
+
repository: GitHubRepository;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Repository clone requested event payload
|
|
208
|
+
*/
|
|
209
|
+
export interface RepositoryCloneRequestedPayload {
|
|
210
|
+
repository: GitHubRepository;
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Event payloads for ProfilePanel
|
|
214
|
+
*/
|
|
215
|
+
export interface ProfilePanelEventPayloads {
|
|
216
|
+
/** Select collection event (from tools) */
|
|
217
|
+
'select-collection': {
|
|
218
|
+
collectionId: string;
|
|
219
|
+
};
|
|
220
|
+
/** Select repository event (from tools) */
|
|
221
|
+
'select-repository': {
|
|
222
|
+
owner: string;
|
|
223
|
+
repo: string;
|
|
224
|
+
};
|
|
225
|
+
/** Collection selected notification */
|
|
226
|
+
'collection:selected': CollectionSelectedPayload;
|
|
227
|
+
/** Repository selected notification */
|
|
228
|
+
'repository:selected': RepositorySelectedPayload;
|
|
229
|
+
/** Repository clone requested notification */
|
|
230
|
+
'repository:clone-requested': RepositoryCloneRequestedPayload;
|
|
231
|
+
/** Profile view changed (switched tabs) */
|
|
232
|
+
'view:changed': {
|
|
233
|
+
view: ProfileView;
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Props for CollectionCard component
|
|
238
|
+
*/
|
|
239
|
+
export interface CollectionCardProps {
|
|
240
|
+
/** Collection data */
|
|
241
|
+
collection: Collection;
|
|
242
|
+
/** Whether this collection is selected */
|
|
243
|
+
isSelected?: boolean;
|
|
244
|
+
/** Callback when card is clicked */
|
|
245
|
+
onClick?: (collection: Collection) => void;
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Props for RepositoryCard component
|
|
249
|
+
*/
|
|
250
|
+
export interface RepositoryCardProps {
|
|
251
|
+
/** Repository data */
|
|
252
|
+
repository: GitHubRepository;
|
|
253
|
+
/** Callback when card is clicked */
|
|
254
|
+
onClick?: (repository: GitHubRepository) => void;
|
|
255
|
+
/** Callback when clone button is clicked */
|
|
256
|
+
onClone?: (repository: GitHubRepository) => void;
|
|
257
|
+
/** Callback when open in browser is clicked */
|
|
258
|
+
onOpenInBrowser?: (repository: GitHubRepository) => void;
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Helper to check if profile is an organization
|
|
262
|
+
*/
|
|
263
|
+
export declare function isOrgProfile(profile: GitHubProfile): profile is GitHubOrgProfile;
|
|
264
|
+
/**
|
|
265
|
+
* Helper to check if profile is a user
|
|
266
|
+
*/
|
|
267
|
+
export declare function isUserProfile(profile: GitHubProfile): profile is GitHubUserProfile;
|
|
268
|
+
/**
|
|
269
|
+
* Get description from profile (handles both user bio and org description)
|
|
270
|
+
*/
|
|
271
|
+
export declare function getProfileDescription(profile: GitHubProfile): string | null;
|
|
272
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/panels/ProfilePanel/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,SAAS,EACT,mBAAmB,EACpB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,YAAY,EAAE,gBAAgB,EAAE,UAAU,EAAE,CAAC;AAE7C;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,cAAc,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,GAAG,EAAE,MAAM,GAAG,IAAI,C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