@industry-theme/alexandria-panels 0.1.55 → 0.1.57
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/panels/UserCollectionsPanel/index.d.ts.map +1 -1
- package/dist/panels/UserProfilePanel/index.d.ts.map +1 -1
- package/dist/panels/UserProfilePanel/types.d.ts +6 -3
- package/dist/panels/UserProfilePanel/types.d.ts.map +1 -1
- package/dist/panels.bundle.js +158 -39
- package/dist/panels.bundle.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/panels/UserCollectionsPanel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAczE,OAAO,KAAK,EACV,8BAA8B,EAE/B,MAAM,SAAS,CAAC;AAajB,MAAM,WAAW,yBAA0B,SAAQ,8BAA8B;IAC/E,gDAAgD;IAChD,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,2FAA2F;IAC3F,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/panels/UserCollectionsPanel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAczE,OAAO,KAAK,EACV,8BAA8B,EAE/B,MAAM,SAAS,CAAC;AAajB,MAAM,WAAW,yBAA0B,SAAQ,8BAA8B;IAC/E,gDAAgD;IAChD,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,2FAA2F;IAC3F,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAivBD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAIpE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,KAAK,CAAC,EAsC/C,CAAC;AAGF,YAAY,EACV,oBAAoB,EACpB,2BAA2B,EAC3B,mBAAmB,EACnB,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,EACxB,sBAAsB,EACtB,wBAAwB,EACxB,iCAAiC,GAClC,MAAM,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/panels/UserProfilePanel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/panels/UserProfilePanel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAiBzE,OAAO,KAAK,EAIV,0BAA0B,EAG3B,MAAM,SAAS,CAAC;AAuhCjB;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,CAEjE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAsC3C,CAAC;AAGF,YAAY,EACV,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,uBAAuB,EACvB,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,0BAA0B,EAC1B,2BAA2B,EAC3B,yBAAyB,EACzB,+BAA+B,EAC/B,6BAA6B,GAC9B,MAAM,SAAS,CAAC"}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type { PanelActions, DataSlice, PanelComponentProps } from '../../types';
|
|
8
8
|
import type { GitHubRepository, GitHubOrganization } from '../shared/github-types';
|
|
9
|
+
import type { Collection } from '@principal-ai/alexandria-collections';
|
|
9
10
|
/**
|
|
10
11
|
* GitHub User profile - matches GitHubUser from electron-app
|
|
11
12
|
*/
|
|
@@ -25,7 +26,7 @@ export interface GitHubUserProfile {
|
|
|
25
26
|
created_at: string;
|
|
26
27
|
updated_at: string;
|
|
27
28
|
}
|
|
28
|
-
export type { GitHubRepository, GitHubOrganization };
|
|
29
|
+
export type { GitHubRepository, GitHubOrganization, Collection };
|
|
29
30
|
/**
|
|
30
31
|
* User presence status from network
|
|
31
32
|
*/
|
|
@@ -41,6 +42,8 @@ export interface UserPresenceStatus {
|
|
|
41
42
|
export interface UserProfileSlice {
|
|
42
43
|
/** The user's GitHub profile */
|
|
43
44
|
user: GitHubUserProfile | null;
|
|
45
|
+
/** User's collections */
|
|
46
|
+
collections: Collection[];
|
|
44
47
|
/** User's GitHub organizations */
|
|
45
48
|
organizations: GitHubOrganization[];
|
|
46
49
|
/** User's starred repositories (public) */
|
|
@@ -180,11 +183,11 @@ export interface UserProfilePanelEventPayloads {
|
|
|
180
183
|
'repository:clone-requested': RepositoryCloneRequestedPayload;
|
|
181
184
|
/** Profile view changed (switched tabs) */
|
|
182
185
|
'view:changed': {
|
|
183
|
-
view: 'organizations' | 'starred';
|
|
186
|
+
view: 'collections' | 'organizations' | 'starred';
|
|
184
187
|
};
|
|
185
188
|
}
|
|
186
189
|
/**
|
|
187
190
|
* Active view tab in the panel
|
|
188
191
|
*/
|
|
189
|
-
export type UserProfileView = 'organizations' | 'starred';
|
|
192
|
+
export type UserProfileView = 'collections' | 'organizations' | 'starred';
|
|
190
193
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/panels/UserProfilePanel/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAChF,OAAO,KAAK,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/panels/UserProfil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E,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACrD,yCAAyC;IACzC,uBAAuB,EAAE,2BAA2B,CAAC;IACrD,uCAAuC;IACvC,qBAAqB,EAAE,yBAAyB,CAAC;IACjD,8CAA8C;IAC9C,4BAA4B,EAAE,+BAA+B,CAAC;IAC9D,2CAA2C;IAC3C,cAAc,EAAE;QAAE,IAAI,EAAE,aAAa,GAAG,eAAe,GAAG,SAAS,CAAA;KAAE,CAAC;CACvE;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,aAAa,GAAG,eAAe,GAAG,SAAS,CAAC"}
|
package/dist/panels.bundle.js
CHANGED
|
@@ -5603,33 +5603,108 @@ const RepositoryCard = ({ repository, onClick, onClone, onOpenInBrowser }) => {
|
|
|
5603
5603
|
}
|
|
5604
5604
|
);
|
|
5605
5605
|
};
|
|
5606
|
+
const CollectionCard$1 = ({ collection, onClick }) => {
|
|
5607
|
+
const { theme } = useTheme();
|
|
5608
|
+
const [isHovered, setIsHovered] = useState(false);
|
|
5609
|
+
return /* @__PURE__ */ jsxs(
|
|
5610
|
+
"div",
|
|
5611
|
+
{
|
|
5612
|
+
onClick: () => onClick == null ? void 0 : onClick(collection),
|
|
5613
|
+
onMouseEnter: () => setIsHovered(true),
|
|
5614
|
+
onMouseLeave: () => setIsHovered(false),
|
|
5615
|
+
style: {
|
|
5616
|
+
display: "flex",
|
|
5617
|
+
alignItems: "center",
|
|
5618
|
+
gap: "12px",
|
|
5619
|
+
padding: "12px",
|
|
5620
|
+
borderRadius: "8px",
|
|
5621
|
+
backgroundColor: isHovered ? theme.colors.backgroundTertiary : theme.colors.background,
|
|
5622
|
+
border: `1px solid ${theme.colors.border}`,
|
|
5623
|
+
cursor: onClick ? "pointer" : "default",
|
|
5624
|
+
transition: "all 0.15s ease"
|
|
5625
|
+
},
|
|
5626
|
+
children: [
|
|
5627
|
+
/* @__PURE__ */ jsx(
|
|
5628
|
+
"div",
|
|
5629
|
+
{
|
|
5630
|
+
style: {
|
|
5631
|
+
width: "40px",
|
|
5632
|
+
height: "40px",
|
|
5633
|
+
borderRadius: "8px",
|
|
5634
|
+
backgroundColor: theme.colors.backgroundTertiary,
|
|
5635
|
+
display: "flex",
|
|
5636
|
+
alignItems: "center",
|
|
5637
|
+
justifyContent: "center"
|
|
5638
|
+
},
|
|
5639
|
+
children: /* @__PURE__ */ jsx(FolderOpen, { size: 20, style: { color: theme.colors.primary } })
|
|
5640
|
+
}
|
|
5641
|
+
),
|
|
5642
|
+
/* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
5643
|
+
/* @__PURE__ */ jsx(
|
|
5644
|
+
"div",
|
|
5645
|
+
{
|
|
5646
|
+
style: {
|
|
5647
|
+
fontSize: `${theme.fontSizes[1]}px`,
|
|
5648
|
+
fontWeight: theme.fontWeights.semibold,
|
|
5649
|
+
color: theme.colors.text,
|
|
5650
|
+
fontFamily: theme.fonts.body
|
|
5651
|
+
},
|
|
5652
|
+
children: collection.name
|
|
5653
|
+
}
|
|
5654
|
+
),
|
|
5655
|
+
collection.description && /* @__PURE__ */ jsx(
|
|
5656
|
+
"div",
|
|
5657
|
+
{
|
|
5658
|
+
style: {
|
|
5659
|
+
fontSize: `${theme.fontSizes[0]}px`,
|
|
5660
|
+
color: theme.colors.textSecondary,
|
|
5661
|
+
fontFamily: theme.fonts.body,
|
|
5662
|
+
overflow: "hidden",
|
|
5663
|
+
textOverflow: "ellipsis",
|
|
5664
|
+
whiteSpace: "nowrap"
|
|
5665
|
+
},
|
|
5666
|
+
children: collection.description
|
|
5667
|
+
}
|
|
5668
|
+
)
|
|
5669
|
+
] })
|
|
5670
|
+
]
|
|
5671
|
+
}
|
|
5672
|
+
);
|
|
5673
|
+
};
|
|
5606
5674
|
const UserProfilePanelContent = ({
|
|
5607
5675
|
context,
|
|
5608
5676
|
actions,
|
|
5609
5677
|
events
|
|
5610
5678
|
}) => {
|
|
5611
|
-
var _a, _b, _c, _d;
|
|
5679
|
+
var _a, _b, _c, _d, _e;
|
|
5612
5680
|
const { theme } = useTheme();
|
|
5613
|
-
const [activeView, setActiveView] = useState("
|
|
5681
|
+
const [activeView, setActiveView] = useState("collections");
|
|
5614
5682
|
const [searchQuery, setSearchQuery] = useState("");
|
|
5615
5683
|
const panelActions = actions;
|
|
5616
5684
|
const { userProfile: profileSlice } = context;
|
|
5617
5685
|
const user = ((_a = profileSlice == null ? void 0 : profileSlice.data) == null ? void 0 : _a.user) ?? null;
|
|
5686
|
+
const collections = useMemo(
|
|
5687
|
+
() => {
|
|
5688
|
+
var _a2;
|
|
5689
|
+
return ((_a2 = profileSlice == null ? void 0 : profileSlice.data) == null ? void 0 : _a2.collections) || [];
|
|
5690
|
+
},
|
|
5691
|
+
[(_b = profileSlice == null ? void 0 : profileSlice.data) == null ? void 0 : _b.collections]
|
|
5692
|
+
);
|
|
5618
5693
|
const organizations = useMemo(
|
|
5619
5694
|
() => {
|
|
5620
5695
|
var _a2;
|
|
5621
5696
|
return ((_a2 = profileSlice == null ? void 0 : profileSlice.data) == null ? void 0 : _a2.organizations) || [];
|
|
5622
5697
|
},
|
|
5623
|
-
[(
|
|
5698
|
+
[(_c = profileSlice == null ? void 0 : profileSlice.data) == null ? void 0 : _c.organizations]
|
|
5624
5699
|
);
|
|
5625
5700
|
const starredRepositories = useMemo(
|
|
5626
5701
|
() => {
|
|
5627
5702
|
var _a2;
|
|
5628
5703
|
return ((_a2 = profileSlice == null ? void 0 : profileSlice.data) == null ? void 0 : _a2.starredRepositories) || [];
|
|
5629
5704
|
},
|
|
5630
|
-
[(
|
|
5705
|
+
[(_d = profileSlice == null ? void 0 : profileSlice.data) == null ? void 0 : _d.starredRepositories]
|
|
5631
5706
|
);
|
|
5632
|
-
const presence = (
|
|
5707
|
+
const presence = (_e = profileSlice == null ? void 0 : profileSlice.data) == null ? void 0 : _e.presence;
|
|
5633
5708
|
const loading = (profileSlice == null ? void 0 : profileSlice.loading) ?? false;
|
|
5634
5709
|
const filteredStarred = useMemo(() => {
|
|
5635
5710
|
if (!searchQuery.trim()) return starredRepositories;
|
|
@@ -5641,6 +5716,17 @@ const UserProfilePanelContent = ({
|
|
|
5641
5716
|
}
|
|
5642
5717
|
);
|
|
5643
5718
|
}, [starredRepositories, searchQuery]);
|
|
5719
|
+
const handleCollectionSelect = useCallback(
|
|
5720
|
+
(collection) => {
|
|
5721
|
+
events.emit(
|
|
5722
|
+
createPanelEvent$1(`${PANEL_ID$8}:collection:selected`, {
|
|
5723
|
+
collectionId: collection.id,
|
|
5724
|
+
collection
|
|
5725
|
+
})
|
|
5726
|
+
);
|
|
5727
|
+
},
|
|
5728
|
+
[events]
|
|
5729
|
+
);
|
|
5644
5730
|
const handleOrganizationSelect = useCallback(
|
|
5645
5731
|
(organization) => {
|
|
5646
5732
|
var _a2;
|
|
@@ -5864,35 +5950,6 @@ const UserProfilePanelContent = ({
|
|
|
5864
5950
|
) });
|
|
5865
5951
|
}
|
|
5866
5952
|
return /* @__PURE__ */ jsxs("div", { style: baseContainerStyle, children: [
|
|
5867
|
-
/* @__PURE__ */ jsxs(
|
|
5868
|
-
"div",
|
|
5869
|
-
{
|
|
5870
|
-
style: {
|
|
5871
|
-
height: "40px",
|
|
5872
|
-
minHeight: "40px",
|
|
5873
|
-
padding: "0 16px",
|
|
5874
|
-
borderBottom: `1px solid ${theme.colors.border}`,
|
|
5875
|
-
display: "flex",
|
|
5876
|
-
alignItems: "center",
|
|
5877
|
-
gap: "8px"
|
|
5878
|
-
},
|
|
5879
|
-
children: [
|
|
5880
|
-
/* @__PURE__ */ jsx(User, { size: 18, color: theme.colors.primary }),
|
|
5881
|
-
/* @__PURE__ */ jsx(
|
|
5882
|
-
"span",
|
|
5883
|
-
{
|
|
5884
|
-
style: {
|
|
5885
|
-
fontSize: `${theme.fontSizes[2]}px`,
|
|
5886
|
-
fontWeight: theme.fontWeights.medium,
|
|
5887
|
-
color: theme.colors.text,
|
|
5888
|
-
fontFamily: theme.fonts.body
|
|
5889
|
-
},
|
|
5890
|
-
children: "User Profile"
|
|
5891
|
-
}
|
|
5892
|
-
)
|
|
5893
|
-
]
|
|
5894
|
-
}
|
|
5895
|
-
),
|
|
5896
5953
|
/* @__PURE__ */ jsxs(
|
|
5897
5954
|
"div",
|
|
5898
5955
|
{
|
|
@@ -5946,10 +6003,15 @@ const UserProfilePanelContent = ({
|
|
|
5946
6003
|
/* @__PURE__ */ jsxs(
|
|
5947
6004
|
"div",
|
|
5948
6005
|
{
|
|
6006
|
+
onClick: () => {
|
|
6007
|
+
var _a2;
|
|
6008
|
+
return (_a2 = panelActions.openInBrowser) == null ? void 0 : _a2.call(panelActions, `https://github.com/${user.login}`);
|
|
6009
|
+
},
|
|
5949
6010
|
style: {
|
|
5950
6011
|
fontSize: `${theme.fontSizes[1]}px`,
|
|
5951
|
-
color: theme.colors.
|
|
5952
|
-
fontFamily: theme.fonts.body
|
|
6012
|
+
color: theme.colors.primary,
|
|
6013
|
+
fontFamily: theme.fonts.body,
|
|
6014
|
+
cursor: panelActions.openInBrowser ? "pointer" : "default"
|
|
5953
6015
|
},
|
|
5954
6016
|
children: [
|
|
5955
6017
|
"@",
|
|
@@ -6045,6 +6107,35 @@ const UserProfilePanelContent = ({
|
|
|
6045
6107
|
backgroundColor: theme.colors.background
|
|
6046
6108
|
},
|
|
6047
6109
|
children: [
|
|
6110
|
+
/* @__PURE__ */ jsxs(
|
|
6111
|
+
"button",
|
|
6112
|
+
{
|
|
6113
|
+
onClick: () => handleViewChange("collections"),
|
|
6114
|
+
style: {
|
|
6115
|
+
flex: 1,
|
|
6116
|
+
display: "flex",
|
|
6117
|
+
alignItems: "center",
|
|
6118
|
+
justifyContent: "center",
|
|
6119
|
+
gap: "6px",
|
|
6120
|
+
padding: "12px",
|
|
6121
|
+
border: "none",
|
|
6122
|
+
backgroundColor: "transparent",
|
|
6123
|
+
color: activeView === "collections" ? theme.colors.primary : theme.colors.textSecondary,
|
|
6124
|
+
fontSize: `${theme.fontSizes[1]}px`,
|
|
6125
|
+
fontWeight: activeView === "collections" ? theme.fontWeights.semibold : theme.fontWeights.medium,
|
|
6126
|
+
fontFamily: theme.fonts.body,
|
|
6127
|
+
cursor: "pointer",
|
|
6128
|
+
borderBottom: activeView === "collections" ? `2px solid ${theme.colors.primary}` : "2px solid transparent",
|
|
6129
|
+
transition: "all 0.15s ease"
|
|
6130
|
+
},
|
|
6131
|
+
children: [
|
|
6132
|
+
/* @__PURE__ */ jsx(FolderOpen, { size: 16 }),
|
|
6133
|
+
"Collections (",
|
|
6134
|
+
collections.length,
|
|
6135
|
+
")"
|
|
6136
|
+
]
|
|
6137
|
+
}
|
|
6138
|
+
),
|
|
6048
6139
|
/* @__PURE__ */ jsxs(
|
|
6049
6140
|
"button",
|
|
6050
6141
|
{
|
|
@@ -6181,6 +6272,33 @@ const UserProfilePanelContent = ({
|
|
|
6181
6272
|
gap: "8px"
|
|
6182
6273
|
},
|
|
6183
6274
|
children: [
|
|
6275
|
+
activeView === "collections" && /* @__PURE__ */ jsx(Fragment, { children: collections.length === 0 ? /* @__PURE__ */ jsxs(
|
|
6276
|
+
"div",
|
|
6277
|
+
{
|
|
6278
|
+
style: {
|
|
6279
|
+
padding: "32px",
|
|
6280
|
+
textAlign: "center",
|
|
6281
|
+
color: theme.colors.textSecondary
|
|
6282
|
+
},
|
|
6283
|
+
children: [
|
|
6284
|
+
/* @__PURE__ */ jsx(
|
|
6285
|
+
FolderOpen,
|
|
6286
|
+
{
|
|
6287
|
+
size: 32,
|
|
6288
|
+
style: { marginBottom: "12px", opacity: 0.5 }
|
|
6289
|
+
}
|
|
6290
|
+
),
|
|
6291
|
+
/* @__PURE__ */ jsx("p", { style: { margin: 0 }, children: "No collections" })
|
|
6292
|
+
]
|
|
6293
|
+
}
|
|
6294
|
+
) : collections.map((collection) => /* @__PURE__ */ jsx(
|
|
6295
|
+
CollectionCard$1,
|
|
6296
|
+
{
|
|
6297
|
+
collection,
|
|
6298
|
+
onClick: handleCollectionSelect
|
|
6299
|
+
},
|
|
6300
|
+
collection.id
|
|
6301
|
+
)) }),
|
|
6184
6302
|
activeView === "organizations" && /* @__PURE__ */ jsx(Fragment, { children: organizations.length === 0 ? /* @__PURE__ */ jsxs(
|
|
6185
6303
|
"div",
|
|
6186
6304
|
{
|
|
@@ -6536,9 +6654,10 @@ const UserCollectionsPanelContent = ({
|
|
|
6536
6654
|
[events]
|
|
6537
6655
|
);
|
|
6538
6656
|
const handleCreateCollection = useCallback(() => {
|
|
6539
|
-
|
|
6540
|
-
|
|
6541
|
-
);
|
|
6657
|
+
console.log("[UserCollectionsPanel] handleCreateCollection called, events:", events);
|
|
6658
|
+
const event = createPanelEvent(`${PANEL_ID$7}:create-collection-requested`, {});
|
|
6659
|
+
console.log("[UserCollectionsPanel] Emitting event:", event);
|
|
6660
|
+
events.emit(event);
|
|
6542
6661
|
}, [events]);
|
|
6543
6662
|
const handleEnableGitHubSync = useCallback(async () => {
|
|
6544
6663
|
if (panelActions.enableGitHubSync) {
|