@industry-theme/github-panels 0.1.39 → 0.1.40

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.
@@ -130,18 +130,18 @@ const createLucideIcon = (iconName, iconNode) => {
130
130
  * This source code is licensed under the ISC license.
131
131
  * See the LICENSE file in the root directory of this source tree.
132
132
  */
133
- const __iconNode$v = [
133
+ const __iconNode$u = [
134
134
  ["path", { d: "m12 19-7-7 7-7", key: "1l729n" }],
135
135
  ["path", { d: "M19 12H5", key: "x3x0zl" }]
136
136
  ];
137
- const ArrowLeft = createLucideIcon("arrow-left", __iconNode$v);
137
+ const ArrowLeft = createLucideIcon("arrow-left", __iconNode$u);
138
138
  /**
139
139
  * @license lucide-react v0.552.0 - ISC
140
140
  *
141
141
  * This source code is licensed under the ISC license.
142
142
  * See the LICENSE file in the root directory of this source tree.
143
143
  */
144
- const __iconNode$u = [
144
+ const __iconNode$t = [
145
145
  ["path", { d: "M12 7v14", key: "1akyts" }],
146
146
  [
147
147
  "path",
@@ -151,14 +151,14 @@ const __iconNode$u = [
151
151
  }
152
152
  ]
153
153
  ];
154
- const BookOpen = createLucideIcon("book-open", __iconNode$u);
154
+ const BookOpen = createLucideIcon("book-open", __iconNode$t);
155
155
  /**
156
156
  * @license lucide-react v0.552.0 - ISC
157
157
  *
158
158
  * This source code is licensed under the ISC license.
159
159
  * See the LICENSE file in the root directory of this source tree.
160
160
  */
161
- const __iconNode$t = [
161
+ const __iconNode$s = [
162
162
  ["path", { d: "M10 12h4", key: "a56b0p" }],
163
163
  ["path", { d: "M10 8h4", key: "1sr2af" }],
164
164
  ["path", { d: "M14 21v-3a2 2 0 0 0-4 0v3", key: "1rgiei" }],
@@ -171,67 +171,56 @@ const __iconNode$t = [
171
171
  ],
172
172
  ["path", { d: "M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16", key: "16ra0t" }]
173
173
  ];
174
- const Building2 = createLucideIcon("building-2", __iconNode$t);
174
+ const Building2 = createLucideIcon("building-2", __iconNode$s);
175
175
  /**
176
176
  * @license lucide-react v0.552.0 - ISC
177
177
  *
178
178
  * This source code is licensed under the ISC license.
179
179
  * See the LICENSE file in the root directory of this source tree.
180
180
  */
181
- const __iconNode$s = [
181
+ const __iconNode$r = [
182
182
  ["path", { d: "M8 2v4", key: "1cmpym" }],
183
183
  ["path", { d: "M16 2v4", key: "4m81vk" }],
184
184
  ["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
185
185
  ["path", { d: "M3 10h18", key: "8toen8" }]
186
186
  ];
187
- const Calendar = createLucideIcon("calendar", __iconNode$s);
187
+ const Calendar = createLucideIcon("calendar", __iconNode$r);
188
188
  /**
189
189
  * @license lucide-react v0.552.0 - ISC
190
190
  *
191
191
  * This source code is licensed under the ISC license.
192
192
  * See the LICENSE file in the root directory of this source tree.
193
193
  */
194
- const __iconNode$r = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
195
- const Check = createLucideIcon("check", __iconNode$r);
194
+ const __iconNode$q = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
195
+ const Check = createLucideIcon("check", __iconNode$q);
196
196
  /**
197
197
  * @license lucide-react v0.552.0 - ISC
198
198
  *
199
199
  * This source code is licensed under the ISC license.
200
200
  * See the LICENSE file in the root directory of this source tree.
201
201
  */
202
- const __iconNode$q = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
203
- const ChevronDown = createLucideIcon("chevron-down", __iconNode$q);
202
+ const __iconNode$p = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
203
+ const ChevronDown = createLucideIcon("chevron-down", __iconNode$p);
204
204
  /**
205
205
  * @license lucide-react v0.552.0 - ISC
206
206
  *
207
207
  * This source code is licensed under the ISC license.
208
208
  * See the LICENSE file in the root directory of this source tree.
209
209
  */
210
- const __iconNode$p = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
211
- const ChevronRight = createLucideIcon("chevron-right", __iconNode$p);
210
+ const __iconNode$o = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
211
+ const ChevronRight = createLucideIcon("chevron-right", __iconNode$o);
212
212
  /**
213
213
  * @license lucide-react v0.552.0 - ISC
214
214
  *
215
215
  * This source code is licensed under the ISC license.
216
216
  * See the LICENSE file in the root directory of this source tree.
217
217
  */
218
- const __iconNode$o = [
218
+ const __iconNode$n = [
219
219
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
220
220
  ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
221
221
  ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
222
222
  ];
223
- const CircleAlert = createLucideIcon("circle-alert", __iconNode$o);
224
- /**
225
- * @license lucide-react v0.552.0 - ISC
226
- *
227
- * This source code is licensed under the ISC license.
228
- * See the LICENSE file in the root directory of this source tree.
229
- */
230
- const __iconNode$n = [
231
- ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
232
- ["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
233
- ];
234
- const CircleCheck = createLucideIcon("circle-check", __iconNode$n);
223
+ const CircleAlert = createLucideIcon("circle-alert", __iconNode$n);
235
224
  /**
236
225
  * @license lucide-react v0.552.0 - ISC
237
226
  *
@@ -1642,9 +1631,12 @@ const formatDate$1 = (dateString) => {
1642
1631
  if (diffDays === 0) return "Today";
1643
1632
  if (diffDays === 1) return "Yesterday";
1644
1633
  if (diffDays < 7) return `${diffDays} days ago`;
1645
- if (diffDays < 30) return `${Math.floor(diffDays / 7)} weeks ago`;
1646
- if (diffDays < 365) return `${Math.floor(diffDays / 30)} months ago`;
1647
- return `${Math.floor(diffDays / 365)} years ago`;
1634
+ const weeks = Math.floor(diffDays / 7);
1635
+ if (diffDays < 30) return `${weeks} ${weeks === 1 ? "week" : "weeks"} ago`;
1636
+ const months = Math.floor(diffDays / 30);
1637
+ if (diffDays < 365) return `${months} ${months === 1 ? "month" : "months"} ago`;
1638
+ const years = Math.floor(diffDays / 365);
1639
+ return `${years} ${years === 1 ? "year" : "years"} ago`;
1648
1640
  };
1649
1641
  const GitHubIssuesPanelContent = ({
1650
1642
  context,
@@ -1660,9 +1652,6 @@ const GitHubIssuesPanelContent = ({
1660
1652
  const repo = ((_c = issuesSlice == null ? void 0 : issuesSlice.data) == null ? void 0 : _c.repo) ?? "";
1661
1653
  const isAuthenticated = ((_d = issuesSlice == null ? void 0 : issuesSlice.data) == null ? void 0 : _d.isAuthenticated) ?? false;
1662
1654
  const sliceError = (_e = issuesSlice == null ? void 0 : issuesSlice.data) == null ? void 0 : _e.error;
1663
- const [selectedIssues, setSelectedIssues] = useState(/* @__PURE__ */ new Set());
1664
- const [copiedPrompt, setCopiedPrompt] = useState(false);
1665
- const [issueFilter, setIssueFilter] = useState("open");
1666
1655
  useEffect(() => {
1667
1656
  events.emit({
1668
1657
  type: "github-issues:request",
@@ -1671,36 +1660,10 @@ const GitHubIssuesPanelContent = ({
1671
1660
  payload: {}
1672
1661
  });
1673
1662
  }, [events]);
1674
- const filteredIssues = useMemo(() => {
1675
- if (issueFilter === "all") return issues;
1676
- return issues.filter((issue) => issue.state === issueFilter);
1677
- }, [issues, issueFilter]);
1678
- const issueCounts = useMemo(() => ({
1679
- all: issues.length,
1680
- open: issues.filter((i) => i.state === "open").length,
1681
- closed: issues.filter((i) => i.state === "closed").length
1682
- }), [issues]);
1683
- const handleSelectAll = () => {
1684
- if (selectedIssues.size === filteredIssues.length) {
1685
- setSelectedIssues(/* @__PURE__ */ new Set());
1686
- } else {
1687
- setSelectedIssues(new Set(filteredIssues.map((i) => i.number)));
1688
- }
1689
- };
1690
- const handleToggleIssue = (issueNumber, event) => {
1691
- const newSelected = new Set(selectedIssues);
1692
- if (newSelected.has(issueNumber)) {
1693
- newSelected.delete(issueNumber);
1694
- } else {
1695
- newSelected.add(issueNumber);
1696
- }
1697
- setSelectedIssues(newSelected);
1698
- };
1699
- const handleIssueClick = (issue, event) => {
1700
- const target = event.target;
1701
- if (target.tagName === "INPUT" || target.closest("a")) {
1702
- return;
1703
- }
1663
+ const openIssues = useMemo(() => {
1664
+ return issues.filter((issue) => issue.state === "open");
1665
+ }, [issues]);
1666
+ const handleIssueClick = (issue) => {
1704
1667
  events.emit({
1705
1668
  type: "issue:selected",
1706
1669
  source: "github-issues-panel",
@@ -1728,46 +1691,6 @@ const GitHubIssuesPanelContent = ({
1728
1691
  payload: {}
1729
1692
  });
1730
1693
  };
1731
- const generatePrompt = () => {
1732
- const selectedIssueData = issues.filter(
1733
- (i) => selectedIssues.has(i.number)
1734
- );
1735
- if (selectedIssueData.length === 0) return "";
1736
- let prompt = `I'm working on the GitHub repository ${owner}/${repo}. Here are the issues I need help with:
1737
-
1738
- `;
1739
- selectedIssueData.forEach((issue) => {
1740
- prompt += `## Issue #${issue.number}: ${issue.title}
1741
- `;
1742
- prompt += `- Status: ${issue.state}
1743
- `;
1744
- prompt += `- URL: ${issue.html_url}
1745
- `;
1746
- if (issue.labels.length > 0) {
1747
- prompt += `- Labels: ${issue.labels.map((l) => l.name).join(", ")}
1748
- `;
1749
- }
1750
- if (issue.body) {
1751
- prompt += `- Description:
1752
- ${issue.body}
1753
- `;
1754
- }
1755
- prompt += "\n";
1756
- });
1757
- prompt += `Please help me understand and address these issues.`;
1758
- return prompt;
1759
- };
1760
- const handleCopyPrompt = async () => {
1761
- const prompt = generatePrompt();
1762
- if (!prompt) return;
1763
- try {
1764
- await navigator.clipboard.writeText(prompt);
1765
- setCopiedPrompt(true);
1766
- setTimeout(() => setCopiedPrompt(false), 2e3);
1767
- } catch (err) {
1768
- console.error("Failed to copy to clipboard:", err);
1769
- }
1770
- };
1771
1694
  const renderState = (icon, title, description, action) => /* @__PURE__ */ jsx(
1772
1695
  "div",
1773
1696
  {
@@ -1926,164 +1849,66 @@ ${issue.body}
1926
1849
  fontFamily: theme2.fonts.body
1927
1850
  },
1928
1851
  children: [
1929
- /* @__PURE__ */ jsxs(
1852
+ /* @__PURE__ */ jsx(
1930
1853
  "div",
1931
1854
  {
1932
1855
  style: {
1856
+ position: "relative",
1933
1857
  height: "40px",
1934
- minHeight: "40px",
1935
1858
  padding: "0 16px",
1936
- borderBottom: `1px solid ${theme2.colors.border}`,
1937
- display: "flex",
1938
- alignItems: "center",
1939
- gap: "12px",
1940
- boxSizing: "border-box"
1941
- },
1942
- children: [
1943
- /* @__PURE__ */ jsx(Github, { size: 20, color: theme2.colors.primary }),
1944
- /* @__PURE__ */ jsx(
1945
- "h2",
1946
- {
1947
- style: {
1948
- margin: 0,
1949
- fontSize: `${theme2.fontSizes[3]}px`,
1950
- fontWeight: theme2.fontWeights.semibold,
1951
- flex: 1
1952
- },
1953
- children: "Issues"
1954
- }
1955
- ),
1956
- /* @__PURE__ */ jsxs(
1957
- "span",
1958
- {
1959
- style: {
1960
- fontSize: `${theme2.fontSizes[1]}px`,
1961
- color: theme2.colors.textSecondary
1962
- },
1963
- children: [
1964
- owner,
1965
- "/",
1966
- repo
1967
- ]
1968
- }
1969
- )
1970
- ]
1971
- }
1972
- ),
1973
- /* @__PURE__ */ jsxs(
1974
- "div",
1975
- {
1976
- style: {
1977
1859
  display: "flex",
1978
- alignItems: "center",
1979
- justifyContent: "space-between",
1980
- padding: "12px 16px",
1860
+ flexDirection: "column",
1861
+ justifyContent: "center",
1981
1862
  borderBottom: `1px solid ${theme2.colors.border}`,
1982
- backgroundColor: theme2.colors.backgroundSecondary,
1983
- flexWrap: "wrap",
1984
- gap: "8px"
1863
+ backgroundColor: theme2.colors.backgroundLight,
1864
+ boxSizing: "border-box"
1985
1865
  },
1986
- children: [
1987
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
1988
- /* @__PURE__ */ jsx("div", { style: { display: "flex", gap: "4px" }, children: ["open", "closed", "all"].map((filter) => /* @__PURE__ */ jsxs(
1989
- "button",
1990
- {
1991
- type: "button",
1992
- onClick: () => setIssueFilter(filter),
1993
- style: {
1994
- padding: "6px 12px",
1995
- borderRadius: "6px",
1996
- border: issueFilter === filter ? "none" : `1px solid ${theme2.colors.border}`,
1997
- backgroundColor: issueFilter === filter ? theme2.colors.primary : theme2.colors.background,
1998
- color: issueFilter === filter ? theme2.colors.background : theme2.colors.text,
1999
- fontSize: `${theme2.fontSizes[1]}px`,
2000
- fontWeight: issueFilter === filter ? theme2.fontWeights.semibold : theme2.fontWeights.body,
2001
- cursor: "pointer",
2002
- textTransform: "capitalize"
2003
- },
2004
- children: [
2005
- filter === "all" ? "All" : filter === "open" ? "Open" : "Closed",
2006
- /* @__PURE__ */ jsxs("span", { style: { marginLeft: "6px", opacity: 0.8 }, children: [
2007
- "(",
2008
- issueCounts[filter],
2009
- ")"
2010
- ] })
2011
- ]
2012
- },
2013
- filter
2014
- )) }),
2015
- filteredIssues.length > 0 && /* @__PURE__ */ jsx(
2016
- "button",
2017
- {
2018
- type: "button",
2019
- onClick: handleSelectAll,
2020
- style: {
2021
- padding: "6px 12px",
2022
- borderRadius: "6px",
2023
- border: `1px solid ${theme2.colors.border}`,
2024
- backgroundColor: theme2.colors.background,
2025
- color: theme2.colors.textSecondary,
2026
- fontSize: `${theme2.fontSizes[1]}px`,
2027
- cursor: "pointer"
2028
- },
2029
- children: selectedIssues.size === filteredIssues.length ? "Deselect All" : "Select All"
2030
- }
2031
- )
2032
- ] }),
2033
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: "8px" }, children: [
2034
- /* @__PURE__ */ jsx(
2035
- "button",
2036
- {
2037
- type: "button",
2038
- onClick: handleRefresh,
2039
- disabled: isLoading,
2040
- style: {
2041
- display: "flex",
2042
- alignItems: "center",
2043
- gap: "6px",
2044
- padding: "6px 12px",
2045
- borderRadius: "6px",
2046
- border: `1px solid ${theme2.colors.border}`,
2047
- backgroundColor: theme2.colors.background,
2048
- color: theme2.colors.text,
2049
- fontSize: `${theme2.fontSizes[1]}px`,
2050
- cursor: isLoading ? "not-allowed" : "pointer",
2051
- opacity: isLoading ? 0.5 : 1
2052
- },
2053
- children: /* @__PURE__ */ jsx(RefreshCw, { size: 14, className: isLoading ? "animate-spin" : "" })
2054
- }
2055
- ),
2056
- /* @__PURE__ */ jsxs(
2057
- "button",
2058
- {
2059
- type: "button",
2060
- onClick: handleCopyPrompt,
2061
- disabled: selectedIssues.size === 0,
2062
- style: {
2063
- display: "flex",
2064
- alignItems: "center",
2065
- gap: "6px",
2066
- padding: "6px 12px",
2067
- borderRadius: "6px",
2068
- border: "none",
2069
- backgroundColor: selectedIssues.size > 0 ? theme2.colors.primary : theme2.colors.backgroundTertiary,
2070
- color: selectedIssues.size > 0 ? theme2.colors.background : theme2.colors.textSecondary,
2071
- fontSize: `${theme2.fontSizes[1]}px`,
2072
- fontWeight: theme2.fontWeights.semibold,
2073
- cursor: selectedIssues.size > 0 ? "pointer" : "not-allowed",
2074
- opacity: selectedIssues.size > 0 ? 1 : 0.5
2075
- },
2076
- children: [
2077
- copiedPrompt ? /* @__PURE__ */ jsx(CircleCheck, { size: 14 }) : /* @__PURE__ */ jsx(Copy, { size: 14 }),
2078
- copiedPrompt ? "Copied!" : `Copy Prompt (${selectedIssues.size})`
2079
- ]
2080
- }
2081
- )
2082
- ] })
2083
- ]
1866
+ children: /* @__PURE__ */ jsxs(
1867
+ "div",
1868
+ {
1869
+ style: {
1870
+ display: "flex",
1871
+ alignItems: "center",
1872
+ justifyContent: "space-between"
1873
+ },
1874
+ children: [
1875
+ /* @__PURE__ */ jsx(
1876
+ "span",
1877
+ {
1878
+ style: {
1879
+ fontFamily: theme2.fonts.body,
1880
+ fontSize: theme2.fontSizes[1],
1881
+ color: theme2.colors.textSecondary,
1882
+ fontWeight: 500
1883
+ },
1884
+ children: "Open Issues"
1885
+ }
1886
+ ),
1887
+ /* @__PURE__ */ jsx(
1888
+ "button",
1889
+ {
1890
+ type: "button",
1891
+ onClick: handleRefresh,
1892
+ disabled: isLoading,
1893
+ style: {
1894
+ background: "none",
1895
+ border: "none",
1896
+ cursor: isLoading ? "not-allowed" : "pointer",
1897
+ padding: "4px",
1898
+ color: theme2.colors.textSecondary,
1899
+ opacity: isLoading ? 0.5 : 1,
1900
+ display: "flex",
1901
+ alignItems: "center"
1902
+ },
1903
+ children: /* @__PURE__ */ jsx(RefreshCw, { size: 14, className: isLoading ? "animate-spin" : "" })
1904
+ }
1905
+ )
1906
+ ]
1907
+ }
1908
+ )
2084
1909
  }
2085
1910
  ),
2086
- /* @__PURE__ */ jsx("div", { style: { flex: 1, overflow: "auto" }, children: filteredIssues.length === 0 ? /* @__PURE__ */ jsxs(
1911
+ /* @__PURE__ */ jsx("div", { style: { flex: 1, overflow: "auto" }, children: openIssues.length === 0 ? /* @__PURE__ */ jsxs(
2087
1912
  "div",
2088
1913
  {
2089
1914
  style: {
@@ -2106,14 +1931,10 @@ ${issue.body}
2106
1931
  marginBottom: "8px",
2107
1932
  fontSize: `${theme2.fontSizes[3]}px`
2108
1933
  },
2109
- children: "No Issues Found"
1934
+ children: "No Open Issues"
2110
1935
  }
2111
1936
  ),
2112
- /* @__PURE__ */ jsxs("p", { style: { margin: 0, fontSize: `${theme2.fontSizes[2]}px` }, children: [
2113
- "There are no ",
2114
- issueFilter !== "all" ? issueFilter : "",
2115
- " issues in this repository."
2116
- ] })
1937
+ /* @__PURE__ */ jsx("p", { style: { margin: 0, fontSize: `${theme2.fontSizes[2]}px` }, children: "There are no open issues in this repository." })
2117
1938
  ] })
2118
1939
  ]
2119
1940
  }
@@ -2121,236 +1942,126 @@ ${issue.body}
2121
1942
  "div",
2122
1943
  {
2123
1944
  style: { display: "flex", flexDirection: "column" },
2124
- children: filteredIssues.map((issue) => /* @__PURE__ */ jsx(
1945
+ children: openIssues.map((issue) => /* @__PURE__ */ jsx(
2125
1946
  "button",
2126
1947
  {
2127
1948
  type: "button",
2128
- onClick: (e) => handleIssueClick(issue, e),
1949
+ onClick: () => handleIssueClick(issue),
2129
1950
  style: {
2130
1951
  width: "100%",
2131
- padding: "8px 12px",
1952
+ padding: "16px 16px",
2132
1953
  borderRadius: 0,
2133
1954
  border: "none",
2134
- borderBottom: `1px solid ${selectedIssues.has(issue.number) ? theme2.colors.primary : theme2.colors.border}`,
2135
- backgroundColor: selectedIssues.has(issue.number) ? `${theme2.colors.primary}10` : theme2.colors.surface,
1955
+ borderBottom: `1px solid ${theme2.colors.border}`,
1956
+ backgroundColor: theme2.colors.surface,
2136
1957
  cursor: "pointer",
2137
1958
  textAlign: "left"
2138
1959
  },
2139
- children: /* @__PURE__ */ jsxs(
2140
- "div",
2141
- {
2142
- style: {
2143
- display: "flex",
2144
- alignItems: "flex-start",
2145
- gap: "12px"
2146
- },
2147
- children: [
2148
- /* @__PURE__ */ jsx(
2149
- "input",
2150
- {
2151
- type: "checkbox",
2152
- checked: selectedIssues.has(issue.number),
2153
- onChange: () => handleToggleIssue(issue.number),
2154
- onClick: (e) => e.stopPropagation(),
2155
- style: { marginTop: "2px", cursor: "pointer" }
2156
- }
2157
- ),
2158
- /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
2159
- /* @__PURE__ */ jsxs(
2160
- "div",
1960
+ children: /* @__PURE__ */ jsxs("div", { style: { minWidth: 0 }, children: [
1961
+ issue.labels.length > 0 && /* @__PURE__ */ jsxs(
1962
+ "div",
1963
+ {
1964
+ style: {
1965
+ display: "flex",
1966
+ alignItems: "center",
1967
+ gap: "8px",
1968
+ marginBottom: "6px",
1969
+ flexWrap: "wrap"
1970
+ },
1971
+ children: [
1972
+ issue.labels.slice(0, 3).map((label) => /* @__PURE__ */ jsxs(
1973
+ "span",
2161
1974
  {
2162
1975
  style: {
2163
- display: "flex",
1976
+ display: "inline-flex",
2164
1977
  alignItems: "center",
2165
- gap: "8px",
2166
- marginBottom: "6px",
2167
- flexWrap: "wrap"
1978
+ gap: "4px",
1979
+ padding: "2px 6px",
1980
+ borderRadius: "12px",
1981
+ backgroundColor: `#${label.color}22`,
1982
+ color: `#${label.color}`,
1983
+ fontSize: `${theme2.fontSizes[0]}px`,
1984
+ fontWeight: theme2.fontWeights.medium
2168
1985
  },
2169
1986
  children: [
2170
- /* @__PURE__ */ jsx(
2171
- "span",
2172
- {
2173
- style: {
2174
- display: "inline-flex",
2175
- alignItems: "center",
2176
- padding: "2px 8px",
2177
- borderRadius: "12px",
2178
- backgroundColor: issue.state === "open" ? "#22c55e22" : "#6b728022",
2179
- color: issue.state === "open" ? "#22c55e" : "#6b7280",
2180
- fontSize: `${theme2.fontSizes[0]}px`,
2181
- fontWeight: theme2.fontWeights.semibold,
2182
- textTransform: "uppercase"
2183
- },
2184
- children: issue.state
2185
- }
2186
- ),
2187
- /* @__PURE__ */ jsxs(
2188
- "span",
2189
- {
2190
- style: {
2191
- color: theme2.colors.textSecondary,
2192
- fontSize: `${theme2.fontSizes[1]}px`
2193
- },
2194
- children: [
2195
- "#",
2196
- issue.number
2197
- ]
2198
- }
2199
- ),
2200
- /* @__PURE__ */ jsx(
2201
- "a",
2202
- {
2203
- href: issue.html_url,
2204
- target: "_blank",
2205
- rel: "noopener noreferrer",
2206
- onClick: (e) => e.stopPropagation(),
2207
- style: {
2208
- color: theme2.colors.primary,
2209
- textDecoration: "none",
2210
- display: "inline-flex",
2211
- alignItems: "center"
2212
- },
2213
- children: /* @__PURE__ */ jsx(ExternalLink, { size: 12 })
2214
- }
2215
- )
1987
+ /* @__PURE__ */ jsx(Tag, { size: 10 }),
1988
+ label.name
2216
1989
  ]
2217
- }
2218
- ),
2219
- /* @__PURE__ */ jsx(
2220
- "h4",
2221
- {
2222
- style: {
2223
- margin: 0,
2224
- marginBottom: "6px",
2225
- color: theme2.colors.text,
2226
- fontSize: `${theme2.fontSizes[2]}px`,
2227
- fontWeight: theme2.fontWeights.semibold,
2228
- overflow: "hidden",
2229
- textOverflow: "ellipsis",
2230
- whiteSpace: "nowrap"
2231
- },
2232
- children: issue.title
2233
- }
2234
- ),
2235
- issue.labels.length > 0 && /* @__PURE__ */ jsxs(
2236
- "div",
1990
+ },
1991
+ label.id
1992
+ )),
1993
+ issue.labels.length > 3 && /* @__PURE__ */ jsxs(
1994
+ "span",
2237
1995
  {
2238
1996
  style: {
2239
- display: "flex",
2240
- flexWrap: "wrap",
2241
- gap: "4px",
2242
- marginBottom: "6px"
1997
+ fontSize: `${theme2.fontSizes[0]}px`,
1998
+ color: theme2.colors.textSecondary
2243
1999
  },
2244
2000
  children: [
2245
- issue.labels.slice(0, 3).map((label) => /* @__PURE__ */ jsxs(
2246
- "span",
2247
- {
2248
- style: {
2249
- display: "inline-flex",
2250
- alignItems: "center",
2251
- gap: "4px",
2252
- padding: "2px 6px",
2253
- borderRadius: "12px",
2254
- backgroundColor: `#${label.color}22`,
2255
- color: `#${label.color}`,
2256
- fontSize: `${theme2.fontSizes[0]}px`,
2257
- fontWeight: theme2.fontWeights.medium
2258
- },
2259
- children: [
2260
- /* @__PURE__ */ jsx(Tag, { size: 10 }),
2261
- label.name
2262
- ]
2263
- },
2264
- label.id
2265
- )),
2266
- issue.labels.length > 3 && /* @__PURE__ */ jsxs(
2267
- "span",
2268
- {
2269
- style: {
2270
- fontSize: `${theme2.fontSizes[0]}px`,
2271
- color: theme2.colors.textSecondary
2272
- },
2273
- children: [
2274
- "+",
2275
- issue.labels.length - 3
2276
- ]
2277
- }
2278
- )
2001
+ "+",
2002
+ issue.labels.length - 3
2279
2003
  ]
2280
2004
  }
2281
- ),
2282
- /* @__PURE__ */ jsxs(
2283
- "div",
2005
+ )
2006
+ ]
2007
+ }
2008
+ ),
2009
+ /* @__PURE__ */ jsx(
2010
+ "h4",
2011
+ {
2012
+ style: {
2013
+ margin: 0,
2014
+ marginBottom: "6px",
2015
+ color: theme2.colors.text,
2016
+ fontSize: `${theme2.fontSizes[2]}px`,
2017
+ fontWeight: theme2.fontWeights.semibold,
2018
+ overflow: "hidden",
2019
+ textOverflow: "ellipsis",
2020
+ whiteSpace: "nowrap"
2021
+ },
2022
+ children: issue.title
2023
+ }
2024
+ ),
2025
+ /* @__PURE__ */ jsxs(
2026
+ "div",
2027
+ {
2028
+ style: {
2029
+ display: "flex",
2030
+ alignItems: "center",
2031
+ gap: "6px",
2032
+ fontSize: `${theme2.fontSizes[0]}px`,
2033
+ color: theme2.colors.textSecondary,
2034
+ flexWrap: "wrap"
2035
+ },
2036
+ children: [
2037
+ /* @__PURE__ */ jsxs("span", { children: [
2038
+ "#",
2039
+ issue.number
2040
+ ] }),
2041
+ /* @__PURE__ */ jsxs("span", { children: [
2042
+ "Created by",
2043
+ " ",
2044
+ /* @__PURE__ */ jsx("span", { style: { color: theme2.colors.primary }, children: issue.user.login })
2045
+ ] }),
2046
+ /* @__PURE__ */ jsx("span", { children: formatDate$1(issue.created_at) }),
2047
+ issue.comments > 0 && /* @__PURE__ */ jsxs(
2048
+ "span",
2284
2049
  {
2285
2050
  style: {
2286
2051
  display: "flex",
2287
2052
  alignItems: "center",
2288
- gap: "12px",
2289
- fontSize: `${theme2.fontSizes[0]}px`,
2290
- color: theme2.colors.textSecondary,
2291
- flexWrap: "wrap"
2053
+ gap: "4px"
2292
2054
  },
2293
2055
  children: [
2294
- /* @__PURE__ */ jsxs(
2295
- "span",
2296
- {
2297
- style: {
2298
- display: "flex",
2299
- alignItems: "center",
2300
- gap: "4px"
2301
- },
2302
- children: [
2303
- /* @__PURE__ */ jsx(
2304
- "img",
2305
- {
2306
- src: issue.user.avatar_url,
2307
- alt: issue.user.login,
2308
- style: {
2309
- width: "14px",
2310
- height: "14px",
2311
- borderRadius: "50%"
2312
- }
2313
- }
2314
- ),
2315
- issue.user.login
2316
- ]
2317
- }
2318
- ),
2319
- /* @__PURE__ */ jsxs(
2320
- "span",
2321
- {
2322
- style: {
2323
- display: "flex",
2324
- alignItems: "center",
2325
- gap: "4px"
2326
- },
2327
- children: [
2328
- /* @__PURE__ */ jsx(Calendar, { size: 12 }),
2329
- formatDate$1(issue.created_at)
2330
- ]
2331
- }
2332
- ),
2333
- issue.comments > 0 && /* @__PURE__ */ jsxs(
2334
- "span",
2335
- {
2336
- style: {
2337
- display: "flex",
2338
- alignItems: "center",
2339
- gap: "4px"
2340
- },
2341
- children: [
2342
- /* @__PURE__ */ jsx(MessageSquare, { size: 12 }),
2343
- issue.comments
2344
- ]
2345
- }
2346
- )
2056
+ /* @__PURE__ */ jsx(MessageSquare, { size: 12 }),
2057
+ issue.comments
2347
2058
  ]
2348
2059
  }
2349
2060
  )
2350
- ] })
2351
- ]
2352
- }
2353
- )
2061
+ ]
2062
+ }
2063
+ )
2064
+ ] })
2354
2065
  },
2355
2066
  issue.id
2356
2067
  ))