@industry-theme/alexandria-panels 0.1.52 → 0.1.53

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/panels/GitHubProjectsPanel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAczE,OAAO,KAAK,EAEV,6BAA6B,EAC9B,MAAM,SAAS,CAAC;AAOjB,OAAO,sBAAsB,CAAC;AAI9B,MAAM,WAAW,wBAAyB,SAAQ,6BAA6B;IAC7E,gDAAgD;IAChD,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAUD;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAIlE,CAAC;AAu4BF;;GAEG;AACH,eAAO,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAsC9C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/panels/GitHubProjectsPanel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAczE,OAAO,KAAK,EAEV,6BAA6B,EAC9B,MAAM,SAAS,CAAC;AAOjB,OAAO,sBAAsB,CAAC;AAI9B,MAAM,WAAW,wBAAyB,SAAQ,6BAA6B;IAC7E,gDAAgD;IAChD,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAUD;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAIlE,CAAC;AAw5BF;;GAEG;AACH,eAAO,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAsC9C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/panels/GitHubStarredPanel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAGzE,OAAO,KAAK,EAEV,4BAA4B,EAC7B,MAAM,SAAS,CAAC;AAOjB,OAAO,sBAAsB,CAAC;AAI9B,MAAM,WAAW,uBAAwB,SAAQ,4BAA4B;IAC3E,gDAAgD;IAChD,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAUD;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAIhE,CAAC;AAgsBF;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAsC7C,CAAC;AAEF,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/panels/GitHubStarredPanel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAGzE,OAAO,KAAK,EAEV,4BAA4B,EAC7B,MAAM,SAAS,CAAC;AAOjB,OAAO,sBAAsB,CAAC;AAI9B,MAAM,WAAW,uBAAwB,SAAQ,4BAA4B;IAC3E,gDAAgD;IAChD,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAUD;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAIhE,CAAC;AA8rBF;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAsC7C,CAAC;AAEF,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC"}
@@ -4,6 +4,8 @@ import type { WorkspaceRepositoriesPanelPropsTyped } from './types';
4
4
  /**
5
5
  * WorkspaceRepositoriesPanel - Workspace repository management panel
6
6
  *
7
+ * @deprecated This panel is deprecated. Use WorkspaceCollectionPanel instead.
8
+ *
7
9
  * Features:
8
10
  * - List all repositories in a workspace
9
11
  * - Group by in/outside workspace directory
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/panels/WorkspaceRepositoriesPanel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAKzE,OAAO,8CAA8C,CAAC;AACtD,OAAO,KAAK,EACV,oCAAoC,EACrC,MAAM,SAAS,CAAC;AA+hBjB;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAAE,CAAC,oCAAoC,CAIrF,CAAC;AAGF,YAAY,EACV,SAAS,EACT,iCAAiC,EACjC,yBAAyB,EACzB,uBAAuB,GACxB,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/panels/WorkspaceRepositoriesPanel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAKzE,OAAO,8CAA8C,CAAC;AACtD,OAAO,KAAK,EACV,oCAAoC,EACrC,MAAM,SAAS,CAAC;AA+hBjB;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAAE,CAAC,oCAAoC,CAIrF,CAAC;AAGF,YAAY,EACV,SAAS,EACT,iCAAiC,EACjC,yBAAyB,EACzB,uBAAuB,GACxB,MAAM,SAAS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"GitHubRepositoryCard.d.ts","sourceRoot":"","sources":["../../../src/panels/shared/GitHubRepositoryCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAcrD,OAAO,KAAK,EACV,gBAAgB,EAChB,wBAAwB,EACzB,MAAM,gBAAgB,CAAC;AAGxB,MAAM,WAAW,yBAAyB;IACxC,6BAA6B;IAC7B,UAAU,EAAE,gBAAgB,CAAC;IAC7B,2CAA2C;IAC3C,SAAS,CAAC,EAAE,wBAAwB,CAAC;IACrC,4CAA4C;IAC5C,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC3C,6DAA6D;IAC7D,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,0CAA0C;IAC1C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,mCAAmC;IACnC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC5C,wDAAwD;IACxD,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACrD,kEAAkE;IAClE,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mDAAmD;IACnD,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CA2YpE,CAAC"}
1
+ {"version":3,"file":"GitHubRepositoryCard.d.ts","sourceRoot":"","sources":["../../../src/panels/shared/GitHubRepositoryCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAcrD,OAAO,KAAK,EACV,gBAAgB,EAChB,wBAAwB,EACzB,MAAM,gBAAgB,CAAC;AAGxB,MAAM,WAAW,yBAAyB;IACxC,6BAA6B;IAC7B,UAAU,EAAE,gBAAgB,CAAC;IAC7B,2CAA2C;IAC3C,SAAS,CAAC,EAAE,wBAAwB,CAAC;IACrC,4CAA4C;IAC5C,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC3C,6DAA6D;IAC7D,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,0CAA0C;IAC1C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,mCAAmC;IACnC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC5C,wDAAwD;IACxD,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACrD,kEAAkE;IAClE,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mDAAmD;IACnD,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAyYpE,CAAC"}
@@ -4569,8 +4569,8 @@ const GitHubRepositoryCard = ({
4569
4569
  ...isInCollection ? {} : dragProps,
4570
4570
  style: {
4571
4571
  display: "flex",
4572
- alignItems: "flex-start",
4573
- gap: "12px",
4572
+ flexDirection: "column",
4573
+ gap: "8px",
4574
4574
  padding: "12px",
4575
4575
  borderRadius: "8px",
4576
4576
  backgroundColor: isSelected ? `${theme.colors.primary}15` : isHovered ? theme.colors.backgroundTertiary : "transparent",
@@ -4580,15 +4580,71 @@ const GitHubRepositoryCard = ({
4580
4580
  transition: "background-color 0.15s, border-color 0.15s, opacity 0.15s"
4581
4581
  },
4582
4582
  children: [
4583
- /* @__PURE__ */ jsx(
4584
- RepositoryAvatar,
4585
- {
4586
- owner: repository.owner.login,
4587
- customAvatarUrl: repository.owner.avatar_url,
4588
- size: 40
4589
- }
4590
- ),
4591
- /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
4583
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: "12px" }, children: [
4584
+ /* @__PURE__ */ jsx(
4585
+ RepositoryAvatar,
4586
+ {
4587
+ owner: repository.owner.login,
4588
+ customAvatarUrl: repository.owner.avatar_url,
4589
+ size: 40
4590
+ }
4591
+ ),
4592
+ /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
4593
+ /* @__PURE__ */ jsxs(
4594
+ "div",
4595
+ {
4596
+ style: {
4597
+ display: "flex",
4598
+ alignItems: "center",
4599
+ gap: "8px",
4600
+ marginBottom: "2px"
4601
+ },
4602
+ children: [
4603
+ /* @__PURE__ */ jsx(
4604
+ "span",
4605
+ {
4606
+ style: {
4607
+ fontSize: `${theme.fontSizes[2]}px`,
4608
+ fontWeight: theme.fontWeights.semibold,
4609
+ fontFamily: theme.fonts.body,
4610
+ color: isCloned ? "#10b981" : theme.colors.text,
4611
+ overflow: "hidden",
4612
+ textOverflow: "ellipsis",
4613
+ whiteSpace: "nowrap"
4614
+ },
4615
+ title: repository.full_name,
4616
+ children: repository.name
4617
+ }
4618
+ ),
4619
+ repository.private && /* @__PURE__ */ jsx("span", { title: "Private repository", children: /* @__PURE__ */ jsx(
4620
+ Lock,
4621
+ {
4622
+ size: 12,
4623
+ style: { color: theme.colors.textSecondary, flexShrink: 0 }
4624
+ }
4625
+ ) }),
4626
+ repository.fork && /* @__PURE__ */ jsx("span", { title: "Forked repository", children: /* @__PURE__ */ jsx(
4627
+ GitFork,
4628
+ {
4629
+ size: 12,
4630
+ style: { color: theme.colors.textSecondary, flexShrink: 0 }
4631
+ }
4632
+ ) })
4633
+ ]
4634
+ }
4635
+ ),
4636
+ /* @__PURE__ */ jsx(
4637
+ "div",
4638
+ {
4639
+ style: {
4640
+ fontSize: `${theme.fontSizes[0]}px`,
4641
+ fontFamily: theme.fonts.body,
4642
+ color: theme.colors.textSecondary
4643
+ },
4644
+ children: repository.owner.login
4645
+ }
4646
+ )
4647
+ ] }),
4592
4648
  /* @__PURE__ */ jsxs(
4593
4649
  "div",
4594
4650
  {
@@ -4596,248 +4652,185 @@ const GitHubRepositoryCard = ({
4596
4652
  display: "flex",
4597
4653
  alignItems: "center",
4598
4654
  gap: "8px",
4599
- marginBottom: "4px"
4655
+ flexShrink: 0
4600
4656
  },
4601
4657
  children: [
4602
4658
  /* @__PURE__ */ jsx(
4603
- "span",
4659
+ "button",
4604
4660
  {
4661
+ type: "button",
4662
+ onClick: handleOpenOnGitHub,
4605
4663
  style: {
4606
- fontSize: `${theme.fontSizes[2]}px`,
4607
- fontWeight: theme.fontWeights.semibold,
4608
- fontFamily: theme.fonts.body,
4609
- color: isCloned ? "#10b981" : theme.colors.text,
4610
- overflow: "hidden",
4611
- textOverflow: "ellipsis",
4612
- whiteSpace: "nowrap"
4664
+ display: "flex",
4665
+ alignItems: "center",
4666
+ justifyContent: "center",
4667
+ width: "32px",
4668
+ height: "32px",
4669
+ borderRadius: "6px",
4670
+ border: `1px solid ${theme.colors.border}`,
4671
+ backgroundColor: "transparent",
4672
+ color: theme.colors.textSecondary,
4673
+ cursor: "pointer",
4674
+ transition: "background-color 0.15s, color 0.15s"
4613
4675
  },
4614
- title: repository.full_name,
4615
- children: repository.name
4676
+ title: "Open on GitHub",
4677
+ onMouseEnter: (e) => {
4678
+ e.currentTarget.style.backgroundColor = theme.colors.backgroundTertiary;
4679
+ e.currentTarget.style.color = theme.colors.text;
4680
+ },
4681
+ onMouseLeave: (e) => {
4682
+ e.currentTarget.style.backgroundColor = "transparent";
4683
+ e.currentTarget.style.color = theme.colors.textSecondary;
4684
+ },
4685
+ children: /* @__PURE__ */ jsx(ExternalLink, { size: 16 })
4616
4686
  }
4617
4687
  ),
4618
- repository.private && /* @__PURE__ */ jsx("span", { title: "Private repository", children: /* @__PURE__ */ jsx(
4619
- Lock,
4688
+ onAddToCollection && /* @__PURE__ */ jsxs(
4689
+ "button",
4620
4690
  {
4621
- size: 12,
4622
- style: { color: theme.colors.textSecondary, flexShrink: 0 }
4691
+ type: "button",
4692
+ onClick: handleAddToCollection,
4693
+ disabled: isLoading || isInCollection,
4694
+ style: {
4695
+ display: "flex",
4696
+ alignItems: "center",
4697
+ gap: "6px",
4698
+ padding: "6px 12px",
4699
+ borderRadius: "6px",
4700
+ border: "none",
4701
+ backgroundColor: isInCollection ? "#10b981" : theme.colors.secondary,
4702
+ color: isInCollection ? "#ffffff" : theme.colors.text,
4703
+ fontSize: `${theme.fontSizes[1]}px`,
4704
+ fontWeight: theme.fontWeights.medium,
4705
+ fontFamily: theme.fonts.body,
4706
+ cursor: isLoading || isInCollection ? "not-allowed" : "pointer",
4707
+ opacity: isLoading ? 0.6 : 1,
4708
+ transition: "opacity 0.15s, background-color 0.15s"
4709
+ },
4710
+ title: isInCollection ? `Already in ${collectionName || "collection"}` : `Add to ${collectionName || "collection"}`,
4711
+ children: [
4712
+ isInCollection ? /* @__PURE__ */ jsx(Check, { size: 14 }) : /* @__PURE__ */ jsx(FolderPlus, { size: 14 }),
4713
+ isInCollection ? "Added" : "Add"
4714
+ ]
4623
4715
  }
4624
- ) }),
4625
- repository.fork && /* @__PURE__ */ jsx("span", { title: "Forked repository", children: /* @__PURE__ */ jsx(
4626
- GitFork,
4716
+ ),
4717
+ isCloned && onOpen && /* @__PURE__ */ jsxs(
4718
+ "button",
4627
4719
  {
4628
- size: 12,
4629
- style: { color: theme.colors.textSecondary, flexShrink: 0 }
4720
+ type: "button",
4721
+ onClick: handleOpen,
4722
+ disabled: isLoading,
4723
+ style: {
4724
+ display: "flex",
4725
+ alignItems: "center",
4726
+ gap: "6px",
4727
+ padding: "6px 12px",
4728
+ borderRadius: "6px",
4729
+ border: "none",
4730
+ backgroundColor: "#10b981",
4731
+ color: "#ffffff",
4732
+ fontSize: `${theme.fontSizes[1]}px`,
4733
+ fontWeight: theme.fontWeights.medium,
4734
+ fontFamily: theme.fonts.body,
4735
+ cursor: isLoading ? "not-allowed" : "pointer",
4736
+ opacity: isLoading ? 0.6 : 1,
4737
+ transition: "opacity 0.15s"
4738
+ },
4739
+ title: "Open in workspace",
4740
+ children: [
4741
+ /* @__PURE__ */ jsx(FolderOpen, { size: 14 }),
4742
+ "Open"
4743
+ ]
4630
4744
  }
4631
- ) })
4632
- ]
4633
- }
4634
- ),
4635
- /* @__PURE__ */ jsx(
4636
- "div",
4637
- {
4638
- style: {
4639
- fontSize: `${theme.fontSizes[0]}px`,
4640
- fontFamily: theme.fonts.body,
4641
- color: theme.colors.textSecondary,
4642
- marginBottom: "4px"
4643
- },
4644
- children: repository.owner.login
4645
- }
4646
- ),
4647
- repository.description && /* @__PURE__ */ jsx(
4648
- "div",
4649
- {
4650
- style: {
4651
- fontSize: `${theme.fontSizes[1]}px`,
4652
- fontFamily: theme.fonts.body,
4653
- color: theme.colors.textSecondary,
4654
- lineHeight: theme.lineHeights.body,
4655
- overflow: "hidden",
4656
- textOverflow: "ellipsis",
4657
- display: "-webkit-box",
4658
- WebkitLineClamp: 2,
4659
- WebkitBoxOrient: "vertical",
4660
- marginBottom: "8px"
4661
- },
4662
- children: repository.description
4663
- }
4664
- ),
4665
- /* @__PURE__ */ jsxs(
4666
- "div",
4667
- {
4668
- style: {
4669
- display: "flex",
4670
- alignItems: "center",
4671
- gap: "12px",
4672
- fontSize: `${theme.fontSizes[0]}px`,
4673
- fontFamily: theme.fonts.body,
4674
- color: theme.colors.textSecondary
4675
- },
4676
- children: [
4677
- repository.language && /* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
4678
- /* @__PURE__ */ jsx(
4679
- "span",
4680
- {
4681
- style: {
4682
- width: "8px",
4683
- height: "8px",
4684
- borderRadius: "50%",
4685
- backgroundColor: getLanguageColor(repository.language)
4686
- }
4687
- }
4688
- ),
4689
- repository.language
4690
- ] }),
4691
- repository.stargazers_count !== void 0 && repository.stargazers_count > 0 && /* @__PURE__ */ jsxs(
4692
- "span",
4745
+ ),
4746
+ !isCloned && onClone && /* @__PURE__ */ jsxs(
4747
+ "button",
4693
4748
  {
4694
- style: { display: "flex", alignItems: "center", gap: "4px" },
4749
+ type: "button",
4750
+ onClick: handleClone,
4751
+ disabled: isLoading,
4752
+ style: {
4753
+ display: "flex",
4754
+ alignItems: "center",
4755
+ gap: "6px",
4756
+ padding: "6px 12px",
4757
+ borderRadius: "6px",
4758
+ border: "none",
4759
+ backgroundColor: theme.colors.primary,
4760
+ color: theme.colors.background,
4761
+ fontSize: `${theme.fontSizes[1]}px`,
4762
+ fontWeight: theme.fontWeights.medium,
4763
+ fontFamily: theme.fonts.body,
4764
+ cursor: isLoading ? "not-allowed" : "pointer",
4765
+ opacity: isLoading ? 0.6 : 1,
4766
+ transition: "opacity 0.15s"
4767
+ },
4768
+ title: "Clone repository",
4695
4769
  children: [
4696
- /* @__PURE__ */ jsx(Star, { size: 12 }),
4697
- formatNumber(repository.stargazers_count)
4770
+ /* @__PURE__ */ jsx(Download, { size: 14 }),
4771
+ "Clone"
4698
4772
  ]
4699
4773
  }
4700
- ),
4701
- repository.license && /* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
4702
- /* @__PURE__ */ jsx(Scale, { size: 12 }),
4703
- repository.license
4704
- ] }),
4705
- /* @__PURE__ */ jsxs("span", { children: [
4706
- "Updated",
4707
- " ",
4708
- getRelativeTime(repository.pushed_at || repository.updated_at)
4709
- ] })
4774
+ )
4710
4775
  ]
4711
4776
  }
4712
4777
  )
4713
4778
  ] }),
4779
+ repository.description && /* @__PURE__ */ jsx(
4780
+ "div",
4781
+ {
4782
+ style: {
4783
+ fontSize: `${theme.fontSizes[1]}px`,
4784
+ fontFamily: theme.fonts.body,
4785
+ color: theme.colors.textSecondary,
4786
+ lineHeight: theme.lineHeights.body,
4787
+ overflow: "hidden",
4788
+ textOverflow: "ellipsis",
4789
+ display: "-webkit-box",
4790
+ WebkitLineClamp: 2,
4791
+ WebkitBoxOrient: "vertical"
4792
+ },
4793
+ children: repository.description
4794
+ }
4795
+ ),
4714
4796
  /* @__PURE__ */ jsxs(
4715
4797
  "div",
4716
4798
  {
4717
4799
  style: {
4718
4800
  display: "flex",
4719
4801
  alignItems: "center",
4720
- gap: "8px",
4721
- flexShrink: 0
4802
+ gap: "12px",
4803
+ fontSize: `${theme.fontSizes[0]}px`,
4804
+ fontFamily: theme.fonts.body,
4805
+ color: theme.colors.textSecondary
4722
4806
  },
4723
4807
  children: [
4724
- /* @__PURE__ */ jsx(
4725
- "button",
4726
- {
4727
- type: "button",
4728
- onClick: handleOpenOnGitHub,
4729
- style: {
4730
- display: "flex",
4731
- alignItems: "center",
4732
- justifyContent: "center",
4733
- width: "32px",
4734
- height: "32px",
4735
- borderRadius: "6px",
4736
- border: `1px solid ${theme.colors.border}`,
4737
- backgroundColor: "transparent",
4738
- color: theme.colors.textSecondary,
4739
- cursor: "pointer",
4740
- transition: "background-color 0.15s, color 0.15s"
4741
- },
4742
- title: "Open on GitHub",
4743
- onMouseEnter: (e) => {
4744
- e.currentTarget.style.backgroundColor = theme.colors.backgroundTertiary;
4745
- e.currentTarget.style.color = theme.colors.text;
4746
- },
4747
- onMouseLeave: (e) => {
4748
- e.currentTarget.style.backgroundColor = "transparent";
4749
- e.currentTarget.style.color = theme.colors.textSecondary;
4750
- },
4751
- children: /* @__PURE__ */ jsx(ExternalLink, { size: 16 })
4752
- }
4753
- ),
4754
- onAddToCollection && /* @__PURE__ */ jsxs(
4755
- "button",
4756
- {
4757
- type: "button",
4758
- onClick: handleAddToCollection,
4759
- disabled: isLoading || isInCollection,
4760
- style: {
4761
- display: "flex",
4762
- alignItems: "center",
4763
- gap: "6px",
4764
- padding: "6px 12px",
4765
- borderRadius: "6px",
4766
- border: "none",
4767
- backgroundColor: isInCollection ? "#10b981" : theme.colors.secondary,
4768
- color: isInCollection ? "#ffffff" : theme.colors.text,
4769
- fontSize: `${theme.fontSizes[1]}px`,
4770
- fontWeight: theme.fontWeights.medium,
4771
- fontFamily: theme.fonts.body,
4772
- cursor: isLoading || isInCollection ? "not-allowed" : "pointer",
4773
- opacity: isLoading ? 0.6 : 1,
4774
- transition: "opacity 0.15s, background-color 0.15s"
4775
- },
4776
- title: isInCollection ? `Already in ${collectionName || "collection"}` : `Add to ${collectionName || "collection"}`,
4777
- children: [
4778
- isInCollection ? /* @__PURE__ */ jsx(Check, { size: 14 }) : /* @__PURE__ */ jsx(FolderPlus, { size: 14 }),
4779
- isInCollection ? "Added" : "Add"
4780
- ]
4781
- }
4782
- ),
4783
- isCloned && onOpen && /* @__PURE__ */ jsxs(
4784
- "button",
4785
- {
4786
- type: "button",
4787
- onClick: handleOpen,
4788
- disabled: isLoading,
4789
- style: {
4790
- display: "flex",
4791
- alignItems: "center",
4792
- gap: "6px",
4793
- padding: "6px 12px",
4794
- borderRadius: "6px",
4795
- border: "none",
4796
- backgroundColor: "#10b981",
4797
- color: "#ffffff",
4798
- fontSize: `${theme.fontSizes[1]}px`,
4799
- fontWeight: theme.fontWeights.medium,
4800
- fontFamily: theme.fonts.body,
4801
- cursor: isLoading ? "not-allowed" : "pointer",
4802
- opacity: isLoading ? 0.6 : 1,
4803
- transition: "opacity 0.15s"
4804
- },
4805
- title: "Open in workspace",
4806
- children: [
4807
- /* @__PURE__ */ jsx(FolderOpen, { size: 14 }),
4808
- "Open"
4809
- ]
4810
- }
4811
- ),
4812
- !isCloned && onClone && /* @__PURE__ */ jsxs(
4813
- "button",
4814
- {
4815
- type: "button",
4816
- onClick: handleClone,
4817
- disabled: isLoading,
4818
- style: {
4819
- display: "flex",
4820
- alignItems: "center",
4821
- gap: "6px",
4822
- padding: "6px 12px",
4823
- borderRadius: "6px",
4824
- border: "none",
4825
- backgroundColor: theme.colors.primary,
4826
- color: theme.colors.background,
4827
- fontSize: `${theme.fontSizes[1]}px`,
4828
- fontWeight: theme.fontWeights.medium,
4829
- fontFamily: theme.fonts.body,
4830
- cursor: isLoading ? "not-allowed" : "pointer",
4831
- opacity: isLoading ? 0.6 : 1,
4832
- transition: "opacity 0.15s"
4833
- },
4834
- title: "Clone repository",
4835
- children: [
4836
- /* @__PURE__ */ jsx(Download, { size: 14 }),
4837
- "Clone"
4838
- ]
4839
- }
4840
- )
4808
+ repository.language && /* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
4809
+ /* @__PURE__ */ jsx(
4810
+ "span",
4811
+ {
4812
+ style: {
4813
+ width: "8px",
4814
+ height: "8px",
4815
+ borderRadius: "50%",
4816
+ backgroundColor: getLanguageColor(repository.language)
4817
+ }
4818
+ }
4819
+ ),
4820
+ repository.language
4821
+ ] }),
4822
+ repository.stargazers_count !== void 0 && repository.stargazers_count > 0 && /* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
4823
+ /* @__PURE__ */ jsx(Star, { size: 12 }),
4824
+ formatNumber(repository.stargazers_count)
4825
+ ] }),
4826
+ repository.license && /* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
4827
+ /* @__PURE__ */ jsx(Scale, { size: 12 }),
4828
+ repository.license
4829
+ ] }),
4830
+ /* @__PURE__ */ jsxs("span", { children: [
4831
+ "Updated ",
4832
+ getRelativeTime(repository.pushed_at || repository.updated_at)
4833
+ ] })
4841
4834
  ]
4842
4835
  }
4843
4836
  )
@@ -5534,9 +5527,7 @@ const GitHubStarredPanelContent = ({
5534
5527
  flex: 1,
5535
5528
  overflowY: "auto",
5536
5529
  display: "flex",
5537
- flexDirection: "column",
5538
- gap: "4px",
5539
- padding: "8px"
5530
+ flexDirection: "column"
5540
5531
  },
5541
5532
  children: [
5542
5533
  sortedRepositories.map((repo) => /* @__PURE__ */ jsx(
@@ -5652,6 +5643,7 @@ const GitHubProjectsPanelContent = ({
5652
5643
  const [collapsedSections, setCollapsedSections] = useState(
5653
5644
  /* @__PURE__ */ new Set()
5654
5645
  );
5646
+ const [hasInitializedCollapsed, setHasInitializedCollapsed] = useState(false);
5655
5647
  const [selectedRepo, setSelectedRepo] = useState(
5656
5648
  null
5657
5649
  );
@@ -5704,6 +5696,20 @@ const GitHubProjectsPanelContent = ({
5704
5696
  },
5705
5697
  [(_f = localReposSlice == null ? void 0 : localReposSlice.data) == null ? void 0 : _f.repositories]
5706
5698
  );
5699
+ useEffect(() => {
5700
+ if (hasInitializedCollapsed) return;
5701
+ const hasData2 = userRepositories.length > 0 || organizations.length > 0;
5702
+ if (!hasData2) return;
5703
+ const allSections = /* @__PURE__ */ new Set();
5704
+ if (currentUser) {
5705
+ allSections.add(currentUser);
5706
+ } else if (userRepositories.length > 0) {
5707
+ allSections.add("Your Repositories");
5708
+ }
5709
+ organizations.forEach((org) => allSections.add(org.login));
5710
+ setCollapsedSections(allSections);
5711
+ setHasInitializedCollapsed(true);
5712
+ }, [hasInitializedCollapsed, userRepositories, organizations, currentUser]);
5707
5713
  const currentWorkspace = (_g = workspaceSlice == null ? void 0 : workspaceSlice.data) == null ? void 0 : _g.workspace;
5708
5714
  const collectionName = currentWorkspace == null ? void 0 : currentWorkspace.name;
5709
5715
  const collectionRepos = useMemo(
@@ -6412,9 +6418,7 @@ const GitHubProjectsPanelContent = ({
6412
6418
  flex: 1,
6413
6419
  overflowY: "auto",
6414
6420
  display: "flex",
6415
- flexDirection: "column",
6416
- gap: "16px",
6417
- padding: "8px"
6421
+ flexDirection: "column"
6418
6422
  },
6419
6423
  children: [
6420
6424
  filteredUserRepos.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
@@ -6426,7 +6430,7 @@ const GitHubProjectsPanelContent = ({
6426
6430
  !collapsedSections.has(currentUser || "Your Repositories") && /* @__PURE__ */ jsx(
6427
6431
  "div",
6428
6432
  {
6429
- style: { display: "flex", flexDirection: "column", gap: "4px" },
6433
+ style: { display: "flex", flexDirection: "column" },
6430
6434
  children: filteredUserRepos.sort(
6431
6435
  (a, b) => a.name.localeCompare(b.name, void 0, {
6432
6436
  sensitivity: "base"
@@ -6463,8 +6467,7 @@ const GitHubProjectsPanelContent = ({
6463
6467
  {
6464
6468
  style: {
6465
6469
  display: "flex",
6466
- flexDirection: "column",
6467
- gap: "4px"
6470
+ flexDirection: "column"
6468
6471
  },
6469
6472
  children: repos.sort(
6470
6473
  (a, b) => a.name.localeCompare(b.name, void 0, {