@industry-theme/alexandria-panels 0.3.1 → 0.3.3

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":"LocalProjectCard.d.ts","sourceRoot":"","sources":["../../../src/panels/LocalProjectsPanel/LocalProjectCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAKxC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AACrD,OAAO,0BAA0B,CAAC;AA+BlC;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAuR5D,CAAC"}
1
+ {"version":3,"file":"LocalProjectCard.d.ts","sourceRoot":"","sources":["../../../src/panels/LocalProjectsPanel/LocalProjectCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAKxC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AACrD,OAAO,0BAA0B,CAAC;AAuDlC;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAwS5D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/panels/WorkspaceCollectionPanel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAIzE,OAAO,KAAK,EAEV,kCAAkC,EACnC,MAAM,SAAS,CAAC;AAEjB,OAAO,sBAAsB,CAAC;AAI9B,MAAM,WAAW,6BAA8B,SAAQ,kCAAkC;IACvF,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,gDAAgD;IAChD,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AA0gCD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAC7C,6BAA6B,CAG9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,+BAA+B,EAAE,KAAK,CAAC,EAsCnD,CAAC;AAGF,YAAY,EACV,SAAS,EACT,wBAAwB,EACxB,oCAAoC,EACpC,+BAA+B,EAC/B,yBAAyB,EACzB,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/panels/WorkspaceCollectionPanel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAIzE,OAAO,KAAK,EAEV,kCAAkC,EACnC,MAAM,SAAS,CAAC;AAEjB,OAAO,sBAAsB,CAAC;AAI9B,MAAM,WAAW,6BAA8B,SAAQ,kCAAkC;IACvF,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,gDAAgD;IAChD,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAohCD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAC7C,6BAA6B,CAG9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,+BAA+B,EAAE,KAAK,CAAC,EAsCnD,CAAC;AAGF,YAAY,EACV,SAAS,EACT,wBAAwB,EACxB,oCAAoC,EACpC,+BAA+B,EAC/B,yBAAyB,EACzB,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,SAAS,CAAC"}
@@ -3,7 +3,7 @@
3
3
  try {
4
4
  if (typeof document != "undefined") {
5
5
  var elementStyle = document.createElement("style");
6
- elementStyle.appendChild(document.createTextNode("/* Spin animation for scanning button */\n@keyframes spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n\n/* Container query for responsive LocalProjectCard */\n.local-projects-panel {\n container-type: inline-size;\n container-name: local-projects;\n height: 100%;\n}\n\n/* Animated underline that grows from left on hover */\n.local-project-card .project-name-underline {\n position: relative;\n text-decoration: none;\n}\n\n.local-project-card .project-name-underline::after {\n content: '';\n position: absolute;\n left: 0;\n bottom: -3px;\n width: 0;\n height: 2px;\n background-color: var(--underline-color);\n transition: width 0.2s ease-out;\n}\n\n.local-project-card:hover .project-name-underline::after {\n width: 100%;\n}\n\n/* Header action buttons - background change on hover */\n.header-action-button {\n transition: background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s !important;\n}\n\n.header-action-button:hover:not(:disabled) {\n background-color: var(--button-hover-bg) !important;\n}\n\n/* Add project button - also show border on hover */\n.add-project-button {\n border: 1px solid transparent !important;\n}\n\n.add-project-button:hover:not(:disabled) {\n border-color: var(--add-button-border-color) !important;\n}\n\n/* Compact mode when container is 400px or less */\n@container local-projects (max-width: 400px) {\n .local-projects-panel {\n padding: 8px !important;\n gap: 8px !important;\n }\n\n .local-projects-list {\n gap: 8px !important;\n }\n\n .local-project-card {\n padding: 8px !important;\n }\n}\n/* Shared Panel Styles */\n\n/* Header button hover states */\n.header-button {\n transition:\n color 0.2s ease,\n background-color 0.2s ease,\n border-color 0.2s ease;\n}\n\n.header-button:not(.active):hover {\n color: var(--theme-text) !important;\n}\n\n/* Search input focus state */\n.search-input:focus {\n border-color: var(--theme-primary) !important;\n}\n\n/* Clear filter button hover */\n.clear-filter-button {\n transition: color 0.2s ease;\n}\n\n.clear-filter-button:hover {\n color: var(--theme-text) !important;\n}\n\n/* Search overlay animation - grows from right to left */\n.search-overlay {\n animation: searchExpand 0.2s ease-out forwards;\n}\n\n@keyframes searchExpand {\n from {\n clip-path: inset(0 0 0 100%);\n }\n to {\n clip-path: inset(0 0 0 0);\n }\n}"));
6
+ elementStyle.appendChild(document.createTextNode("/* Spin animation for scanning button */\n@keyframes spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n\n/* Container query for responsive LocalProjectCard */\n.local-projects-panel {\n container-type: inline-size;\n container-name: local-projects;\n height: 100%;\n}\n\n/* Animated underline that grows from left on hover */\n.local-project-card .project-name-underline {\n position: relative;\n text-decoration: none;\n}\n\n.local-project-card .project-name-underline::after {\n content: '';\n position: absolute;\n left: 0;\n bottom: -3px;\n width: 0;\n height: 2px;\n background-color: var(--underline-color);\n transition: width 0.2s ease-out;\n}\n\n.local-project-card:hover .project-name-underline::after {\n width: 100%;\n}\n\n/* Compact mode when container is 400px or less */\n@container local-projects (max-width: 400px) {\n .local-projects-panel {\n padding: 8px !important;\n gap: 8px !important;\n }\n\n .local-projects-list {\n gap: 8px !important;\n }\n\n .local-project-card {\n padding: 8px !important;\n }\n}\n/* Shared Panel Styles */\n\n/* Header action buttons - background change on hover */\n.header-action-button {\n transition: background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s !important;\n}\n\n.header-action-button:hover:not(:disabled) {\n background-color: var(--button-hover-bg) !important;\n}\n\n/* Add project button - also show border on hover */\n.add-project-button {\n border: 1px solid transparent !important;\n}\n\n.add-project-button:hover:not(:disabled) {\n border-color: var(--add-button-border-color) !important;\n}\n\n/* Header button hover states */\n.header-button {\n transition:\n color 0.2s ease,\n background-color 0.2s ease,\n border-color 0.2s ease;\n}\n\n.header-button:not(.active):hover {\n color: var(--theme-text) !important;\n}\n\n/* Search input focus state */\n.search-input:focus {\n border-color: var(--theme-primary) !important;\n}\n\n/* Clear filter button hover */\n.clear-filter-button {\n transition: color 0.2s ease;\n}\n\n.clear-filter-button:hover {\n color: var(--theme-text) !important;\n}\n\n/* Search overlay animation - grows from right to left */\n.search-overlay {\n animation: searchExpand 0.2s ease-out forwards;\n}\n\n@keyframes searchExpand {\n from {\n clip-path: inset(0 0 0 100%);\n }\n to {\n clip-path: inset(0 0 0 0);\n }\n}"));
7
7
  document.head.appendChild(elementStyle);
8
8
  }
9
9
  } catch (e) {
@@ -8237,6 +8237,25 @@ const LANGUAGE_COLORS = {
8237
8237
  const getLanguageColor$1 = (language) => {
8238
8238
  return LANGUAGE_COLORS[language] || "#6e7681";
8239
8239
  };
8240
+ const formatRelativeTime = (dateString) => {
8241
+ const date = new Date(dateString);
8242
+ const now2 = /* @__PURE__ */ new Date();
8243
+ const diffMs = now2.getTime() - date.getTime();
8244
+ const diffSecs = Math.floor(diffMs / 1e3);
8245
+ const diffMins = Math.floor(diffSecs / 60);
8246
+ const diffHours = Math.floor(diffMins / 60);
8247
+ const diffDays = Math.floor(diffHours / 24);
8248
+ const diffWeeks = Math.floor(diffDays / 7);
8249
+ const diffMonths = Math.floor(diffDays / 30);
8250
+ const diffYears = Math.floor(diffDays / 365);
8251
+ if (diffYears > 0) return `${diffYears}y ago`;
8252
+ if (diffMonths > 0) return `${diffMonths}mo ago`;
8253
+ if (diffWeeks > 0) return `${diffWeeks}w ago`;
8254
+ if (diffDays > 0) return `${diffDays}d ago`;
8255
+ if (diffHours > 0) return `${diffHours}h ago`;
8256
+ if (diffMins > 0) return `${diffMins}m ago`;
8257
+ return "just now";
8258
+ };
8240
8259
  const LocalProjectCard = ({
8241
8260
  entry,
8242
8261
  actionMode = "default",
@@ -8249,7 +8268,7 @@ const LocalProjectCard = ({
8249
8268
  isInSelectedCollection = false,
8250
8269
  selectedCollectionName
8251
8270
  }) => {
8252
- var _a, _b, _c, _d;
8271
+ var _a, _b, _c, _d, _e, _f;
8253
8272
  const { theme } = useTheme();
8254
8273
  const [isHovered, setIsHovered] = useState(false);
8255
8274
  const [copiedPath, setCopiedPath] = useState(false);
@@ -8280,6 +8299,7 @@ const LocalProjectCard = ({
8280
8299
  return path;
8281
8300
  };
8282
8301
  const displayPath = getDisplayPath(entry.path);
8302
+ const displaySubtitle = ((_b = entry.github) == null ? void 0 : _b.owner) || displayPath;
8283
8303
  const handleCardClick = () => {
8284
8304
  onSelect == null ? void 0 : onSelect(entry);
8285
8305
  };
@@ -8333,7 +8353,7 @@ const LocalProjectCard = ({
8333
8353
  fontSize: `${theme.fontSizes[2]}px`,
8334
8354
  fontWeight: theme.fontWeights.semibold
8335
8355
  },
8336
- children: ((_b = entry.name[0]) == null ? void 0 : _b.toUpperCase()) || "?"
8356
+ children: ((_c = entry.name[0]) == null ? void 0 : _c.toUpperCase()) || "?"
8337
8357
  }
8338
8358
  )
8339
8359
  }
@@ -8361,7 +8381,7 @@ const LocalProjectCard = ({
8361
8381
  /* @__PURE__ */ jsx(
8362
8382
  "span",
8363
8383
  {
8364
- className: ((_c = entry.github) == null ? void 0 : _c.primaryLanguage) ? "project-name-underline" : void 0,
8384
+ className: ((_d = entry.github) == null ? void 0 : _d.primaryLanguage) ? "project-name-underline" : void 0,
8365
8385
  style: {
8366
8386
  fontSize: `${theme.fontSizes[2]}px`,
8367
8387
  fontWeight: theme.fontWeights.semibold,
@@ -8369,7 +8389,7 @@ const LocalProjectCard = ({
8369
8389
  overflow: "hidden",
8370
8390
  textOverflow: "ellipsis",
8371
8391
  whiteSpace: "nowrap",
8372
- "--underline-color": ((_d = entry.github) == null ? void 0 : _d.primaryLanguage) ? getLanguageColor$1(entry.github.primaryLanguage) : theme.colors.textSecondary
8392
+ "--underline-color": ((_e = entry.github) == null ? void 0 : _e.primaryLanguage) ? getLanguageColor$1(entry.github.primaryLanguage) : theme.colors.textSecondary
8373
8393
  },
8374
8394
  children: entry.name
8375
8395
  }
@@ -8438,7 +8458,7 @@ const LocalProjectCard = ({
8438
8458
  gap: "6px",
8439
8459
  cursor: disableCopyPaths ? "default" : "pointer"
8440
8460
  },
8441
- title: disableCopyPaths ? displayPath : copiedPath ? "Copied!" : `Click to copy: ${entry.path}`,
8461
+ title: disableCopyPaths ? entry.path : copiedPath ? "Copied!" : `Click to copy: ${entry.path}`,
8442
8462
  children: [
8443
8463
  /* @__PURE__ */ jsx(
8444
8464
  "span",
@@ -8454,7 +8474,20 @@ const LocalProjectCard = ({
8454
8474
  minWidth: 0,
8455
8475
  transition: "color 0.15s ease"
8456
8476
  },
8457
- children: copiedPath ? "✓ Copied!" : displayPath
8477
+ children: copiedPath ? "✓ Copied!" : displaySubtitle
8478
+ }
8479
+ ),
8480
+ ((_f = entry.github) == null ? void 0 : _f.lastCommit) && /* @__PURE__ */ jsx(
8481
+ "span",
8482
+ {
8483
+ style: {
8484
+ fontSize: `${theme.fontSizes[0]}px`,
8485
+ color: theme.colors.textSecondary,
8486
+ whiteSpace: "nowrap",
8487
+ flexShrink: 0
8488
+ },
8489
+ title: `Last commit: ${new Date(entry.github.lastCommit).toLocaleDateString()}`,
8490
+ children: formatRelativeTime(entry.github.lastCommit)
8458
8491
  }
8459
8492
  ),
8460
8493
  !disableCopyPaths && !copiedPath && /* @__PURE__ */ jsx(
@@ -10476,11 +10509,12 @@ const WorkspaceCollectionPanelContent = ({
10476
10509
  position: "relative",
10477
10510
  height: "40px",
10478
10511
  minHeight: "40px",
10479
- padding: defaultShowSearch && showSearch ? "0 16px 0 8px" : "0 16px",
10512
+ padding: "0",
10480
10513
  borderBottom: `1px solid ${theme.colors.border}`,
10481
10514
  display: "flex",
10482
10515
  alignItems: "center",
10483
- boxSizing: "border-box"
10516
+ boxSizing: "border-box",
10517
+ backgroundColor: theme.colors.background
10484
10518
  },
10485
10519
  children: defaultShowSearch && showSearch && repositories.length > 0 ? /* @__PURE__ */ jsxs(
10486
10520
  "div",
@@ -10488,7 +10522,7 @@ const WorkspaceCollectionPanelContent = ({
10488
10522
  style: {
10489
10523
  display: "flex",
10490
10524
  alignItems: "center",
10491
- gap: "8px",
10525
+ gap: "0",
10492
10526
  width: "100%"
10493
10527
  },
10494
10528
  children: [
@@ -10525,12 +10559,13 @@ const WorkspaceCollectionPanelContent = ({
10525
10559
  autoFocus: true,
10526
10560
  style: {
10527
10561
  width: "100%",
10528
- padding: "6px 32px 6px 32px",
10562
+ padding: "0 32px",
10563
+ height: "40px",
10529
10564
  fontSize: `${theme.fontSizes[1]}px`,
10530
10565
  color: theme.colors.text,
10531
10566
  backgroundColor: theme.colors.background,
10532
- border: `1px solid ${theme.colors.border}`,
10533
- borderRadius: "4px",
10567
+ border: "none",
10568
+ borderRadius: "0",
10534
10569
  outline: "none",
10535
10570
  fontFamily: theme.fonts.body,
10536
10571
  transition: "border-color 0.2s ease",
@@ -10562,23 +10597,25 @@ const WorkspaceCollectionPanelContent = ({
10562
10597
  ]
10563
10598
  }
10564
10599
  ),
10565
- /* @__PURE__ */ jsx("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: /* @__PURE__ */ jsx(
10600
+ /* @__PURE__ */ jsx("div", { style: { display: "flex", alignItems: "center", gap: "0" }, children: /* @__PURE__ */ jsx(
10566
10601
  "button",
10567
10602
  {
10603
+ className: "header-action-button",
10568
10604
  onClick: toggleSort,
10569
10605
  style: {
10570
- padding: "4px 10px",
10571
- height: "30px",
10572
- borderRadius: "4px",
10573
- border: `1px solid ${theme.colors.border}`,
10574
- background: theme.colors.backgroundSecondary,
10606
+ padding: "0 12px",
10607
+ height: "40px",
10608
+ borderRadius: "0",
10609
+ border: "none",
10610
+ backgroundColor: theme.colors.background,
10575
10611
  color: theme.colors.text,
10576
10612
  fontSize: `${theme.fontSizes[1]}px`,
10577
10613
  fontFamily: theme.fonts.body,
10578
10614
  cursor: "pointer",
10579
10615
  display: "flex",
10580
10616
  alignItems: "center",
10581
- gap: "4px"
10617
+ gap: "4px",
10618
+ ["--button-hover-bg"]: theme.colors.backgroundSecondary
10582
10619
  },
10583
10620
  children: sortField === "name" ? "A-Z" : "Recent"
10584
10621
  }
@@ -10594,6 +10631,7 @@ const WorkspaceCollectionPanelContent = ({
10594
10631
  alignItems: "center",
10595
10632
  justifyContent: "space-between",
10596
10633
  width: "100%",
10634
+ padding: "0 0 0 12px",
10597
10635
  visibility: showSearch ? "hidden" : "visible"
10598
10636
  },
10599
10637
  children: [
@@ -10623,7 +10661,7 @@ const WorkspaceCollectionPanelContent = ({
10623
10661
  color: theme.colors.textSecondary,
10624
10662
  padding: "2px 8px",
10625
10663
  borderRadius: "12px",
10626
- backgroundColor: theme.colors.background
10664
+ backgroundColor: theme.colors.backgroundSecondary
10627
10665
  },
10628
10666
  children: repositories.length
10629
10667
  }
@@ -10634,25 +10672,26 @@ const WorkspaceCollectionPanelContent = ({
10634
10672
  repositories.length > 0 && /* @__PURE__ */ jsxs(
10635
10673
  "div",
10636
10674
  {
10637
- style: { display: "flex", alignItems: "center", gap: "8px" },
10675
+ style: { display: "flex", alignItems: "center", gap: "0" },
10638
10676
  children: [
10639
10677
  /* @__PURE__ */ jsx(
10640
10678
  "button",
10641
10679
  {
10642
- className: `header-button ${showSearch ? "active" : ""}`,
10680
+ className: `header-button header-action-button ${showSearch ? "active" : ""}`,
10643
10681
  onClick: handleToggleSearch,
10644
10682
  style: {
10645
- background: showSearch ? theme.colors.backgroundSecondary : "none",
10646
- border: `1px solid ${showSearch ? theme.colors.border : "transparent"}`,
10647
- borderRadius: "4px",
10683
+ background: showSearch ? theme.colors.backgroundSecondary : theme.colors.background,
10684
+ border: "none",
10685
+ borderRadius: "0",
10648
10686
  cursor: "pointer",
10649
- padding: "4px 8px",
10650
- height: "30px",
10687
+ padding: "0 12px",
10688
+ height: "40px",
10651
10689
  display: "flex",
10652
10690
  alignItems: "center",
10653
10691
  justifyContent: "center",
10654
10692
  color: showSearch ? theme.colors.primary : theme.colors.textSecondary,
10655
- ["--theme-text"]: theme.colors.text
10693
+ ["--theme-text"]: theme.colors.text,
10694
+ ["--button-hover-bg"]: theme.colors.backgroundSecondary
10656
10695
  },
10657
10696
  title: showSearch ? "Close search" : "Search repositories",
10658
10697
  children: /* @__PURE__ */ jsx(Search, { size: 16 })
@@ -10661,20 +10700,22 @@ const WorkspaceCollectionPanelContent = ({
10661
10700
  /* @__PURE__ */ jsx(
10662
10701
  "button",
10663
10702
  {
10703
+ className: "header-action-button",
10664
10704
  onClick: toggleSort,
10665
10705
  style: {
10666
- padding: "4px 10px",
10667
- height: "30px",
10668
- borderRadius: "4px",
10669
- border: `1px solid ${theme.colors.border}`,
10670
- background: theme.colors.backgroundSecondary,
10706
+ padding: "0 12px",
10707
+ height: "40px",
10708
+ borderRadius: "0",
10709
+ border: "none",
10710
+ backgroundColor: theme.colors.background,
10671
10711
  color: theme.colors.text,
10672
10712
  fontSize: `${theme.fontSizes[1]}px`,
10673
10713
  fontFamily: theme.fonts.body,
10674
10714
  cursor: "pointer",
10675
10715
  display: "flex",
10676
10716
  alignItems: "center",
10677
- gap: "4px"
10717
+ gap: "4px",
10718
+ ["--button-hover-bg"]: theme.colors.backgroundSecondary
10678
10719
  },
10679
10720
  children: sortField === "name" ? "A-Z" : "Recent"
10680
10721
  }
@@ -10697,8 +10738,8 @@ const WorkspaceCollectionPanelContent = ({
10697
10738
  bottom: 0,
10698
10739
  display: "flex",
10699
10740
  alignItems: "center",
10700
- padding: "0 16px",
10701
- backgroundColor: theme.colors.backgroundSecondary,
10741
+ padding: "0",
10742
+ backgroundColor: theme.colors.background,
10702
10743
  zIndex: 10
10703
10744
  },
10704
10745
  children: [
@@ -10735,12 +10776,13 @@ const WorkspaceCollectionPanelContent = ({
10735
10776
  autoFocus: true,
10736
10777
  style: {
10737
10778
  width: "100%",
10738
- padding: "6px 32px 6px 32px",
10779
+ padding: "0 32px",
10780
+ height: "40px",
10739
10781
  fontSize: `${theme.fontSizes[1]}px`,
10740
10782
  color: theme.colors.text,
10741
10783
  backgroundColor: theme.colors.background,
10742
- border: `1px solid ${theme.colors.border}`,
10743
- borderRadius: "4px",
10784
+ border: "none",
10785
+ borderRadius: "0",
10744
10786
  outline: "none",
10745
10787
  fontFamily: theme.fonts.body,
10746
10788
  transition: "border-color 0.2s ease",
@@ -10780,8 +10822,9 @@ const WorkspaceCollectionPanelContent = ({
10780
10822
  background: "none",
10781
10823
  border: "none",
10782
10824
  cursor: "pointer",
10783
- padding: "4px",
10784
- marginLeft: "8px",
10825
+ padding: "0 12px",
10826
+ height: "40px",
10827
+ marginLeft: "0",
10785
10828
  display: "flex",
10786
10829
  alignItems: "center",
10787
10830
  justifyContent: "center",