@industry-theme/alexandria-panels 0.1.26 → 0.1.28

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/WorkspaceRepositoriesPanel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAIzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,8CAA8C,CAAC;AAoftD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAEpE,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;AAIzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,8CAA8C,CAAC;AAmftD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAEpE,CAAC;AAGF,YAAY,EACV,SAAS,EACT,iCAAiC,EACjC,yBAAyB,EACzB,uBAAuB,GACxB,MAAM,SAAS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/panels/WorkspacesListPanel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAGzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAmBvD,MAAM,WAAW,wBAAyB,SAAQ,mBAAmB;IACnE,gDAAgD;IAChD,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AA6cD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAElE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAsC9C,CAAC;AAGF,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EACV,SAAS,EACT,eAAe,EACf,0BAA0B,EAC1B,kBAAkB,EAClB,wBAAwB,EACxB,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/panels/WorkspacesListPanel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAGzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAmBvD,MAAM,WAAW,wBAAyB,SAAQ,mBAAmB;IACnE,gDAAgD;IAChD,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAsgBD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAElE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAsC9C,CAAC;AAGF,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EACV,SAAS,EACT,eAAe,EACf,0BAA0B,EAC1B,kBAAkB,EAClB,wBAAwB,EACxB,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,SAAS,CAAC"}
@@ -1643,10 +1643,9 @@ const WorkspaceRepositoriesPanelContent = ({
1643
1643
  }, [sortedRepositories, repositoryLocations]);
1644
1644
  const handleSelectRepository = useCallback(
1645
1645
  (repository) => {
1646
- var _a;
1647
1646
  events.emit(
1648
1647
  createPanelEvent$5("repository:selected", {
1649
- repositoryId: ((_a = repository.github) == null ? void 0 : _a.id) || repository.name,
1648
+ repositoryId: repository.name,
1650
1649
  repository,
1651
1650
  repositoryPath: repository.path
1652
1651
  })
@@ -1656,10 +1655,9 @@ const WorkspaceRepositoriesPanelContent = ({
1656
1655
  );
1657
1656
  const handleOpenRepository = useCallback(
1658
1657
  (repository) => {
1659
- var _a;
1660
1658
  events.emit(
1661
1659
  createPanelEvent$5("repository:opened", {
1662
- repositoryId: ((_a = repository.github) == null ? void 0 : _a.id) || repository.name,
1660
+ repositoryId: repository.name,
1663
1661
  repository
1664
1662
  })
1665
1663
  );
@@ -1668,11 +1666,9 @@ const WorkspaceRepositoriesPanelContent = ({
1668
1666
  );
1669
1667
  const handleRemoveFromWorkspace = useCallback(
1670
1668
  async (repository) => {
1671
- var _a;
1672
1669
  if (!(workspace == null ? void 0 : workspace.id) || !panelActions.removeRepositoryFromWorkspace) return;
1673
1670
  try {
1674
- const repositoryId = ((_a = repository.github) == null ? void 0 : _a.id) || repository.name;
1675
- await panelActions.removeRepositoryFromWorkspace(repositoryId, workspace.id);
1671
+ await panelActions.removeRepositoryFromWorkspace(repository.name, workspace.id);
1676
1672
  } catch (error) {
1677
1673
  console.error("Failed to remove repository from workspace:", error);
1678
1674
  alert(
@@ -2672,133 +2668,197 @@ const WorkspacesListPanelContent = ({
2672
2668
  "div",
2673
2669
  {
2674
2670
  style: {
2671
+ position: "relative",
2675
2672
  height: "40px",
2676
2673
  minHeight: "40px",
2677
2674
  padding: "0 16px",
2678
2675
  borderBottom: `1px solid ${theme.colors.border}`,
2679
2676
  display: "flex",
2680
2677
  alignItems: "center",
2681
- justifyContent: "space-between",
2682
- gap: "8px"
2683
- },
2684
- children: [
2685
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
2686
- /* @__PURE__ */ jsx(Layers, { size: 18, color: theme.colors.primary }),
2687
- /* @__PURE__ */ jsx(
2688
- "span",
2689
- {
2690
- style: {
2691
- fontSize: `${theme.fontSizes[2]}px`,
2692
- fontWeight: theme.fontWeights.medium,
2693
- color: theme.colors.text,
2694
- fontFamily: theme.fonts.body
2695
- },
2696
- children: "Workspaces"
2697
- }
2698
- )
2699
- ] }),
2700
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: "8px" }, children: [
2701
- /* @__PURE__ */ jsx(
2702
- "button",
2703
- {
2704
- onClick: () => {
2705
- setShowSearchBox(!showSearchBox);
2706
- if (showSearchBox) {
2707
- setSearchQuery("");
2708
- }
2709
- },
2710
- style: {
2711
- display: "flex",
2712
- alignItems: "center",
2713
- justifyContent: "center",
2714
- width: "28px",
2715
- height: "28px",
2716
- borderRadius: "6px",
2717
- border: `1px solid ${theme.colors.border}`,
2718
- backgroundColor: showSearchBox ? theme.colors.primary : theme.colors.backgroundTertiary,
2719
- color: showSearchBox ? theme.colors.background : theme.colors.text,
2720
- cursor: "pointer",
2721
- transition: "all 0.15s ease"
2722
- },
2723
- title: "Search workspaces",
2724
- children: /* @__PURE__ */ jsx(Search, { size: 16 })
2725
- }
2726
- ),
2727
- /* @__PURE__ */ jsx(
2728
- "button",
2729
- {
2730
- onClick: handleCreateWorkspace,
2731
- style: {
2732
- display: "flex",
2733
- alignItems: "center",
2734
- justifyContent: "center",
2735
- width: "28px",
2736
- height: "28px",
2737
- borderRadius: "6px",
2738
- border: `1px solid ${theme.colors.border}`,
2739
- backgroundColor: theme.colors.primary,
2740
- color: theme.colors.background,
2741
- cursor: "pointer",
2742
- transition: "all 0.15s ease"
2743
- },
2744
- title: "Create new workspace",
2745
- children: /* @__PURE__ */ jsx(Plus, { size: 16 })
2746
- }
2747
- )
2748
- ] })
2749
- ]
2750
- }
2751
- ),
2752
- showSearchBox && /* @__PURE__ */ jsxs(
2753
- "div",
2754
- {
2755
- style: {
2756
- display: "flex",
2757
- alignItems: "center",
2758
- gap: "8px",
2759
- padding: "8px 16px"
2678
+ boxSizing: "border-box"
2760
2679
  },
2761
2680
  children: [
2762
- /* @__PURE__ */ jsx(
2763
- "input",
2681
+ /* @__PURE__ */ jsxs(
2682
+ "div",
2764
2683
  {
2765
- type: "text",
2766
- value: searchQuery,
2767
- onChange: (e) => setSearchQuery(e.target.value),
2768
- placeholder: "Search by workspace or repository name...",
2769
- autoFocus: true,
2770
2684
  style: {
2771
- flex: 1,
2772
- padding: "8px 12px",
2773
- borderRadius: "6px",
2774
- border: `1px solid ${theme.colors.border}`,
2775
- backgroundColor: theme.colors.background,
2776
- color: theme.colors.text,
2777
- fontSize: `${theme.fontSizes[1]}px`,
2778
- fontFamily: theme.fonts.body,
2779
- outline: "none"
2780
- }
2685
+ display: "flex",
2686
+ alignItems: "center",
2687
+ justifyContent: "space-between",
2688
+ width: "100%",
2689
+ visibility: showSearchBox ? "hidden" : "visible"
2690
+ },
2691
+ children: [
2692
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
2693
+ /* @__PURE__ */ jsx(Layers, { size: 18, color: theme.colors.primary }),
2694
+ /* @__PURE__ */ jsx(
2695
+ "span",
2696
+ {
2697
+ style: {
2698
+ fontSize: `${theme.fontSizes[2]}px`,
2699
+ fontWeight: theme.fontWeights.medium,
2700
+ color: theme.colors.text,
2701
+ fontFamily: theme.fonts.body
2702
+ },
2703
+ children: "Workspaces"
2704
+ }
2705
+ ),
2706
+ workspaces.length > 0 && /* @__PURE__ */ jsx(
2707
+ "span",
2708
+ {
2709
+ style: {
2710
+ fontSize: `${theme.fontSizes[1]}px`,
2711
+ color: theme.colors.textSecondary,
2712
+ padding: "2px 8px",
2713
+ borderRadius: "12px",
2714
+ backgroundColor: theme.colors.background
2715
+ },
2716
+ children: workspaces.length
2717
+ }
2718
+ )
2719
+ ] }),
2720
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
2721
+ /* @__PURE__ */ jsx(
2722
+ "button",
2723
+ {
2724
+ onClick: () => {
2725
+ setShowSearchBox(!showSearchBox);
2726
+ if (showSearchBox) {
2727
+ setSearchQuery("");
2728
+ }
2729
+ },
2730
+ style: {
2731
+ background: showSearchBox ? theme.colors.backgroundSecondary : "none",
2732
+ border: `1px solid ${showSearchBox ? theme.colors.border : "transparent"}`,
2733
+ borderRadius: "4px",
2734
+ cursor: "pointer",
2735
+ padding: "4px",
2736
+ display: "flex",
2737
+ alignItems: "center",
2738
+ justifyContent: "center",
2739
+ color: showSearchBox ? theme.colors.primary : theme.colors.textSecondary
2740
+ },
2741
+ title: showSearchBox ? "Close search" : "Search workspaces",
2742
+ children: /* @__PURE__ */ jsx(Search, { size: 16 })
2743
+ }
2744
+ ),
2745
+ /* @__PURE__ */ jsx(
2746
+ "button",
2747
+ {
2748
+ onClick: handleCreateWorkspace,
2749
+ style: {
2750
+ padding: "4px",
2751
+ borderRadius: "4px",
2752
+ border: "none",
2753
+ backgroundColor: theme.colors.primary,
2754
+ color: theme.colors.background,
2755
+ cursor: "pointer",
2756
+ display: "flex",
2757
+ alignItems: "center",
2758
+ justifyContent: "center"
2759
+ },
2760
+ title: "Create new workspace",
2761
+ children: /* @__PURE__ */ jsx(Plus, { size: 16 })
2762
+ }
2763
+ )
2764
+ ] })
2765
+ ]
2781
2766
  }
2782
2767
  ),
2783
- searchQuery && /* @__PURE__ */ jsx(
2784
- "button",
2768
+ showSearchBox && /* @__PURE__ */ jsxs(
2769
+ "div",
2785
2770
  {
2786
- onClick: () => setSearchQuery(""),
2787
2771
  style: {
2772
+ position: "absolute",
2773
+ top: 0,
2774
+ left: 0,
2775
+ right: 0,
2776
+ bottom: 0,
2788
2777
  display: "flex",
2789
2778
  alignItems: "center",
2790
- justifyContent: "center",
2791
- width: "28px",
2792
- height: "28px",
2793
- borderRadius: "6px",
2794
- border: `1px solid ${theme.colors.border}`,
2795
- backgroundColor: theme.colors.backgroundTertiary,
2796
- color: theme.colors.text,
2797
- cursor: "pointer",
2798
- transition: "all 0.15s ease"
2779
+ padding: "0 16px",
2780
+ backgroundColor: theme.colors.backgroundSecondary,
2781
+ zIndex: 10
2799
2782
  },
2800
- title: "Clear search",
2801
- children: /* @__PURE__ */ jsx(X, { size: 16 })
2783
+ children: [
2784
+ /* @__PURE__ */ jsxs("div", { style: { position: "relative", flex: 1, display: "flex", alignItems: "center" }, children: [
2785
+ /* @__PURE__ */ jsx(
2786
+ Search,
2787
+ {
2788
+ size: 16,
2789
+ color: theme.colors.textSecondary,
2790
+ style: {
2791
+ position: "absolute",
2792
+ left: "10px",
2793
+ pointerEvents: "none"
2794
+ }
2795
+ }
2796
+ ),
2797
+ /* @__PURE__ */ jsx(
2798
+ "input",
2799
+ {
2800
+ type: "text",
2801
+ placeholder: "Filter workspaces...",
2802
+ value: searchQuery,
2803
+ onChange: (e) => setSearchQuery(e.target.value),
2804
+ autoFocus: true,
2805
+ style: {
2806
+ width: "100%",
2807
+ padding: "6px 32px 6px 32px",
2808
+ fontSize: `${theme.fontSizes[1]}px`,
2809
+ color: theme.colors.text,
2810
+ backgroundColor: theme.colors.background,
2811
+ border: `1px solid ${theme.colors.border}`,
2812
+ borderRadius: "4px",
2813
+ outline: "none",
2814
+ fontFamily: theme.fonts.body
2815
+ }
2816
+ }
2817
+ ),
2818
+ searchQuery && /* @__PURE__ */ jsx(
2819
+ "button",
2820
+ {
2821
+ onClick: () => setSearchQuery(""),
2822
+ style: {
2823
+ position: "absolute",
2824
+ right: "8px",
2825
+ background: "none",
2826
+ border: "none",
2827
+ cursor: "pointer",
2828
+ padding: "4px",
2829
+ display: "flex",
2830
+ alignItems: "center",
2831
+ justifyContent: "center",
2832
+ color: theme.colors.textSecondary
2833
+ },
2834
+ title: "Clear search",
2835
+ children: /* @__PURE__ */ jsx(X, { size: 16 })
2836
+ }
2837
+ )
2838
+ ] }),
2839
+ /* @__PURE__ */ jsx(
2840
+ "button",
2841
+ {
2842
+ onClick: () => {
2843
+ setShowSearchBox(false);
2844
+ setSearchQuery("");
2845
+ },
2846
+ style: {
2847
+ background: "none",
2848
+ border: "none",
2849
+ cursor: "pointer",
2850
+ padding: "4px",
2851
+ marginLeft: "8px",
2852
+ display: "flex",
2853
+ alignItems: "center",
2854
+ justifyContent: "center",
2855
+ color: theme.colors.textSecondary
2856
+ },
2857
+ title: "Close search",
2858
+ children: /* @__PURE__ */ jsx(X, { size: 16 })
2859
+ }
2860
+ )
2861
+ ]
2802
2862
  }
2803
2863
  )
2804
2864
  ]