@industry-theme/alexandria-panels 0.1.18 → 0.1.20

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/WorkspaceCollectionPanel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AASzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAYvD,MAAM,WAAW,6BAA8B,SAAQ,mBAAmB;IACxE,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AA8uBD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC,6BAA6B,CAE5E,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,+BAA+B,EAAE,KAAK,CAAC,EAsCnD,CAAC;AAGF,YAAY,EACV,SAAS,EACT,wBAAwB,EACxB,0BAA0B,EAC1B,+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;AAOzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAYvD,MAAM,WAAW,6BAA8B,SAAQ,mBAAmB;IACxE,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAkrBD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC,6BAA6B,CAE5E,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,+BAA+B,EAAE,KAAK,CAAC,EAsCnD,CAAC;AAGF,YAAY,EACV,SAAS,EACT,wBAAwB,EACxB,0BAA0B,EAC1B,+BAA+B,EAC/B,yBAAyB,EACzB,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,SAAS,CAAC"}
@@ -24,6 +24,14 @@ export interface GitHubRepository {
24
24
  stargazers_count?: number;
25
25
  default_branch: string;
26
26
  fork?: boolean;
27
+ /** Parent repository info (for forks) */
28
+ parent?: {
29
+ full_name: string;
30
+ owner: {
31
+ login: string;
32
+ avatar_url: string;
33
+ };
34
+ };
27
35
  /** License SPDX identifier (e.g., "MIT", "Apache-2.0") */
28
36
  license?: string | null;
29
37
  }
@@ -1 +1 @@
1
- {"version":3,"file":"github-types.d.ts","sourceRoot":"","sources":["../../../src/panels/shared/github-types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE;QACL,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,0DAA0D;IAC1D,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,sBAAsB;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
1
+ {"version":3,"file":"github-types.d.ts","sourceRoot":"","sources":["../../../src/panels/shared/github-types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE;QACL,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,yCAAyC;IACzC,MAAM,CAAC,EAAE;QACP,SAAS,EAAE,MAAM,CAAC;QAClB,KAAK,EAAE;YACL,KAAK,EAAE,MAAM,CAAC;YACd,UAAU,EAAE,MAAM,CAAC;SACpB,CAAC;KACH,CAAC;IACF,0DAA0D;IAC1D,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,sBAAsB;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -134,17 +134,6 @@ const createLucideIcon = (iconName, iconNode) => {
134
134
  Component.displayName = toPascalCase(iconName);
135
135
  return Component;
136
136
  };
137
- /**
138
- * @license lucide-react v0.552.0 - ISC
139
- *
140
- * This source code is licensed under the ISC license.
141
- * See the LICENSE file in the root directory of this source tree.
142
- */
143
- const __iconNode$w = [
144
- ["path", { d: "M5 12h14", key: "1ays0h" }],
145
- ["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
146
- ];
147
- const ArrowRight = createLucideIcon("arrow-right", __iconNode$w);
148
137
  /**
149
138
  * @license lucide-react v0.552.0 - ISC
150
139
  *
@@ -2731,15 +2720,11 @@ const WorkspaceCollectionRepositoryCard = ({
2731
2720
  onSelect(repository);
2732
2721
  }
2733
2722
  }, [onSelect, repository]);
2734
- const handleNavigate = useCallback(
2735
- (e) => {
2736
- e.stopPropagation();
2737
- if (onNavigate) {
2738
- onNavigate(repository);
2739
- }
2740
- },
2741
- [onNavigate, repository]
2742
- );
2723
+ const handleDoubleClick = useCallback(() => {
2724
+ if (onNavigate) {
2725
+ onNavigate(repository);
2726
+ }
2727
+ }, [onNavigate, repository]);
2743
2728
  const handleRemove = useCallback(
2744
2729
  (e) => {
2745
2730
  e.stopPropagation();
@@ -2749,13 +2734,6 @@ const WorkspaceCollectionRepositoryCard = ({
2749
2734
  },
2750
2735
  [onRemove, repository]
2751
2736
  );
2752
- const handleOpenOnGitHub = useCallback(
2753
- (e) => {
2754
- e.stopPropagation();
2755
- window.open(repository.html_url, "_blank", "noopener,noreferrer");
2756
- },
2757
- [repository.html_url]
2758
- );
2759
2737
  const getRelativeTime = (dateString) => {
2760
2738
  const date = new Date(dateString);
2761
2739
  const now = /* @__PURE__ */ new Date();
@@ -2772,6 +2750,7 @@ const WorkspaceCollectionRepositoryCard = ({
2772
2750
  "div",
2773
2751
  {
2774
2752
  onClick: handleClick,
2753
+ onDoubleClick: handleDoubleClick,
2775
2754
  onMouseEnter: () => setIsHovered(true),
2776
2755
  onMouseLeave: () => setIsHovered(false),
2777
2756
  style: {
@@ -2789,8 +2768,8 @@ const WorkspaceCollectionRepositoryCard = ({
2789
2768
  /* @__PURE__ */ jsx(
2790
2769
  RepositoryAvatar,
2791
2770
  {
2792
- owner: repository.owner.login,
2793
- customAvatarUrl: repository.owner.avatar_url,
2771
+ owner: repository.fork && repository.parent ? repository.parent.owner.login : repository.owner.login,
2772
+ customAvatarUrl: repository.fork && repository.parent ? repository.parent.owner.avatar_url : repository.owner.avatar_url,
2794
2773
  size: 40
2795
2774
  }
2796
2775
  ),
@@ -2831,7 +2810,11 @@ const WorkspaceCollectionRepositoryCard = ({
2831
2810
  color: theme.colors.textSecondary,
2832
2811
  marginBottom: "4px"
2833
2812
  },
2834
- children: repository.owner.login
2813
+ children: repository.fork && repository.parent ? /* @__PURE__ */ jsxs(Fragment, { children: [
2814
+ repository.parent.owner.login,
2815
+ /* @__PURE__ */ jsx("span", { style: { opacity: 0.7 }, children: " · forked by " }),
2816
+ repository.owner.login
2817
+ ] }) : repository.owner.login
2835
2818
  }
2836
2819
  ),
2837
2820
  repository.description && /* @__PURE__ */ jsx(
@@ -2886,7 +2869,7 @@ const WorkspaceCollectionRepositoryCard = ({
2886
2869
  }
2887
2870
  )
2888
2871
  ] }),
2889
- /* @__PURE__ */ jsxs(
2872
+ /* @__PURE__ */ jsx(
2890
2873
  "div",
2891
2874
  {
2892
2875
  style: {
@@ -2897,97 +2880,38 @@ const WorkspaceCollectionRepositoryCard = ({
2897
2880
  opacity: isHovered || isSelected ? 1 : 0,
2898
2881
  transition: "opacity 0.15s"
2899
2882
  },
2900
- children: [
2901
- onRemove && /* @__PURE__ */ jsx(
2902
- "button",
2903
- {
2904
- type: "button",
2905
- onClick: handleRemove,
2906
- style: {
2907
- display: "flex",
2908
- alignItems: "center",
2909
- justifyContent: "center",
2910
- width: "32px",
2911
- height: "32px",
2912
- borderRadius: "6px",
2913
- border: `1px solid ${theme.colors.border}`,
2914
- backgroundColor: "transparent",
2915
- color: theme.colors.textSecondary,
2916
- cursor: "pointer",
2917
- transition: "background-color 0.15s, color 0.15s"
2918
- },
2919
- title: "Remove from workspace",
2920
- onMouseEnter: (e) => {
2921
- e.currentTarget.style.backgroundColor = `${theme.colors.error || "#ef4444"}20`;
2922
- e.currentTarget.style.color = theme.colors.error || "#ef4444";
2923
- e.currentTarget.style.borderColor = theme.colors.error || "#ef4444";
2924
- },
2925
- onMouseLeave: (e) => {
2926
- e.currentTarget.style.backgroundColor = "transparent";
2927
- e.currentTarget.style.color = theme.colors.textSecondary;
2928
- e.currentTarget.style.borderColor = theme.colors.border;
2929
- },
2930
- children: /* @__PURE__ */ jsx(Trash2, { size: 16 })
2931
- }
2932
- ),
2933
- /* @__PURE__ */ jsx(
2934
- "button",
2935
- {
2936
- type: "button",
2937
- onClick: handleOpenOnGitHub,
2938
- style: {
2939
- display: "flex",
2940
- alignItems: "center",
2941
- justifyContent: "center",
2942
- width: "32px",
2943
- height: "32px",
2944
- borderRadius: "6px",
2945
- border: `1px solid ${theme.colors.border}`,
2946
- backgroundColor: "transparent",
2947
- color: theme.colors.textSecondary,
2948
- cursor: "pointer",
2949
- transition: "background-color 0.15s, color 0.15s"
2950
- },
2951
- title: "Open on GitHub",
2952
- onMouseEnter: (e) => {
2953
- e.currentTarget.style.backgroundColor = theme.colors.backgroundTertiary;
2954
- e.currentTarget.style.color = theme.colors.text;
2955
- },
2956
- onMouseLeave: (e) => {
2957
- e.currentTarget.style.backgroundColor = "transparent";
2958
- e.currentTarget.style.color = theme.colors.textSecondary;
2959
- },
2960
- children: /* @__PURE__ */ jsx(ExternalLink, { size: 16 })
2961
- }
2962
- ),
2963
- onNavigate && /* @__PURE__ */ jsxs(
2964
- "button",
2965
- {
2966
- type: "button",
2967
- onClick: handleNavigate,
2968
- style: {
2969
- display: "flex",
2970
- alignItems: "center",
2971
- gap: "6px",
2972
- padding: "6px 12px",
2973
- borderRadius: "6px",
2974
- border: "none",
2975
- backgroundColor: theme.colors.primary,
2976
- color: theme.colors.background,
2977
- fontSize: `${theme.fontSizes[1]}px`,
2978
- fontWeight: theme.fontWeights.medium,
2979
- fontFamily: theme.fonts.body,
2980
- cursor: "pointer",
2981
- transition: "opacity 0.15s"
2982
- },
2983
- title: "View repository",
2984
- children: [
2985
- /* @__PURE__ */ jsx(ArrowRight, { size: 14 }),
2986
- "View"
2987
- ]
2988
- }
2989
- )
2990
- ]
2883
+ children: onRemove && /* @__PURE__ */ jsx(
2884
+ "button",
2885
+ {
2886
+ type: "button",
2887
+ onClick: handleRemove,
2888
+ style: {
2889
+ display: "flex",
2890
+ alignItems: "center",
2891
+ justifyContent: "center",
2892
+ width: "32px",
2893
+ height: "32px",
2894
+ borderRadius: "6px",
2895
+ border: `1px solid ${theme.colors.border}`,
2896
+ backgroundColor: "transparent",
2897
+ color: theme.colors.textSecondary,
2898
+ cursor: "pointer",
2899
+ transition: "background-color 0.15s, color 0.15s"
2900
+ },
2901
+ title: "Remove from workspace",
2902
+ onMouseEnter: (e) => {
2903
+ e.currentTarget.style.backgroundColor = `${theme.colors.error || "#ef4444"}20`;
2904
+ e.currentTarget.style.color = theme.colors.error || "#ef4444";
2905
+ e.currentTarget.style.borderColor = theme.colors.error || "#ef4444";
2906
+ },
2907
+ onMouseLeave: (e) => {
2908
+ e.currentTarget.style.backgroundColor = "transparent";
2909
+ e.currentTarget.style.color = theme.colors.textSecondary;
2910
+ e.currentTarget.style.borderColor = theme.colors.border;
2911
+ },
2912
+ children: /* @__PURE__ */ jsx(Trash2, { size: 16 })
2913
+ }
2914
+ )
2991
2915
  }
2992
2916
  )
2993
2917
  ]