@industry-theme/repository-composition-panels 0.2.12 → 0.2.14

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,5 +1,6 @@
1
1
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
2
  import React2, { createContext, useContext, forwardRef, createElement, useRef, useEffect, memo, PureComponent, isValidElement, cloneElement, useLayoutEffect, useMemo, useState, useCallback, useImperativeHandle } from "react";
3
+ import { createPortal } from "react-dom";
3
4
  var ThemeContext;
4
5
  var getThemeContext = () => {
5
6
  if (typeof window !== "undefined") {
@@ -128,18 +129,18 @@ const createLucideIcon = (iconName, iconNode) => {
128
129
  * This source code is licensed under the ISC license.
129
130
  * See the LICENSE file in the root directory of this source tree.
130
131
  */
131
- const __iconNode$p = [
132
+ const __iconNode$r = [
132
133
  ["path", { d: "M5 12h14", key: "1ays0h" }],
133
134
  ["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
134
135
  ];
135
- const ArrowRight = createLucideIcon("arrow-right", __iconNode$p);
136
+ const ArrowRight = createLucideIcon("arrow-right", __iconNode$r);
136
137
  /**
137
138
  * @license lucide-react v0.552.0 - ISC
138
139
  *
139
140
  * This source code is licensed under the ISC license.
140
141
  * See the LICENSE file in the root directory of this source tree.
141
142
  */
142
- const __iconNode$o = [
143
+ const __iconNode$q = [
143
144
  [
144
145
  "path",
145
146
  {
@@ -150,93 +151,93 @@ const __iconNode$o = [
150
151
  ["path", { d: "m3.3 7 8.7 5 8.7-5", key: "g66t2b" }],
151
152
  ["path", { d: "M12 22V12", key: "d0xqtd" }]
152
153
  ];
153
- const Box = createLucideIcon("box", __iconNode$o);
154
+ const Box = createLucideIcon("box", __iconNode$q);
154
155
  /**
155
156
  * @license lucide-react v0.552.0 - ISC
156
157
  *
157
158
  * This source code is licensed under the ISC license.
158
159
  * See the LICENSE file in the root directory of this source tree.
159
160
  */
160
- const __iconNode$n = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
161
- const Check = createLucideIcon("check", __iconNode$n);
161
+ const __iconNode$p = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
162
+ const Check = createLucideIcon("check", __iconNode$p);
162
163
  /**
163
164
  * @license lucide-react v0.552.0 - ISC
164
165
  *
165
166
  * This source code is licensed under the ISC license.
166
167
  * See the LICENSE file in the root directory of this source tree.
167
168
  */
168
- const __iconNode$m = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
169
- const ChevronDown = createLucideIcon("chevron-down", __iconNode$m);
169
+ const __iconNode$o = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
170
+ const ChevronDown = createLucideIcon("chevron-down", __iconNode$o);
170
171
  /**
171
172
  * @license lucide-react v0.552.0 - ISC
172
173
  *
173
174
  * This source code is licensed under the ISC license.
174
175
  * See the LICENSE file in the root directory of this source tree.
175
176
  */
176
- const __iconNode$l = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
177
- const ChevronLeft = createLucideIcon("chevron-left", __iconNode$l);
177
+ const __iconNode$n = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
178
+ const ChevronLeft = createLucideIcon("chevron-left", __iconNode$n);
178
179
  /**
179
180
  * @license lucide-react v0.552.0 - ISC
180
181
  *
181
182
  * This source code is licensed under the ISC license.
182
183
  * See the LICENSE file in the root directory of this source tree.
183
184
  */
184
- const __iconNode$k = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
185
- const ChevronRight = createLucideIcon("chevron-right", __iconNode$k);
185
+ const __iconNode$m = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
186
+ const ChevronRight = createLucideIcon("chevron-right", __iconNode$m);
186
187
  /**
187
188
  * @license lucide-react v0.552.0 - ISC
188
189
  *
189
190
  * This source code is licensed under the ISC license.
190
191
  * See the LICENSE file in the root directory of this source tree.
191
192
  */
192
- const __iconNode$j = [
193
+ const __iconNode$l = [
193
194
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
194
195
  ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
195
196
  ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
196
197
  ];
197
- const CircleAlert = createLucideIcon("circle-alert", __iconNode$j);
198
+ const CircleAlert = createLucideIcon("circle-alert", __iconNode$l);
198
199
  /**
199
200
  * @license lucide-react v0.552.0 - ISC
200
201
  *
201
202
  * This source code is licensed under the ISC license.
202
203
  * See the LICENSE file in the root directory of this source tree.
203
204
  */
204
- const __iconNode$i = [
205
+ const __iconNode$k = [
205
206
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
206
207
  ["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
207
208
  ["path", { d: "M12 17h.01", key: "p32p05" }]
208
209
  ];
209
- const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$i);
210
+ const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$k);
210
211
  /**
211
212
  * @license lucide-react v0.552.0 - ISC
212
213
  *
213
214
  * This source code is licensed under the ISC license.
214
215
  * See the LICENSE file in the root directory of this source tree.
215
216
  */
216
- const __iconNode$h = [
217
+ const __iconNode$j = [
217
218
  ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
218
219
  ["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
219
220
  ];
220
- const Copy = createLucideIcon("copy", __iconNode$h);
221
+ const Copy = createLucideIcon("copy", __iconNode$j);
221
222
  /**
222
223
  * @license lucide-react v0.552.0 - ISC
223
224
  *
224
225
  * This source code is licensed under the ISC license.
225
226
  * See the LICENSE file in the root directory of this source tree.
226
227
  */
227
- const __iconNode$g = [
228
+ const __iconNode$i = [
228
229
  ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
229
230
  ["path", { d: "M10 14 21 3", key: "gplh6r" }],
230
231
  ["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
231
232
  ];
232
- const ExternalLink = createLucideIcon("external-link", __iconNode$g);
233
+ const ExternalLink = createLucideIcon("external-link", __iconNode$i);
233
234
  /**
234
235
  * @license lucide-react v0.552.0 - ISC
235
236
  *
236
237
  * This source code is licensed under the ISC license.
237
238
  * See the LICENSE file in the root directory of this source tree.
238
239
  */
239
- const __iconNode$f = [
240
+ const __iconNode$h = [
240
241
  [
241
242
  "path",
242
243
  {
@@ -248,14 +249,14 @@ const __iconNode$f = [
248
249
  ["path", { d: "M10 12.5 8 15l2 2.5", key: "1tg20x" }],
249
250
  ["path", { d: "m14 12.5 2 2.5-2 2.5", key: "yinavb" }]
250
251
  ];
251
- const FileCode = createLucideIcon("file-code", __iconNode$f);
252
+ const FileCode = createLucideIcon("file-code", __iconNode$h);
252
253
  /**
253
254
  * @license lucide-react v0.552.0 - ISC
254
255
  *
255
256
  * This source code is licensed under the ISC license.
256
257
  * See the LICENSE file in the root directory of this source tree.
257
258
  */
258
- const __iconNode$e = [
259
+ const __iconNode$g = [
259
260
  [
260
261
  "path",
261
262
  {
@@ -266,14 +267,32 @@ const __iconNode$e = [
266
267
  ["path", { d: "M12 17h.01", key: "p32p05" }],
267
268
  ["path", { d: "M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3", key: "mhlwft" }]
268
269
  ];
269
- const FileQuestionMark = createLucideIcon("file-question-mark", __iconNode$e);
270
+ const FileQuestionMark = createLucideIcon("file-question-mark", __iconNode$g);
270
271
  /**
271
272
  * @license lucide-react v0.552.0 - ISC
272
273
  *
273
274
  * This source code is licensed under the ISC license.
274
275
  * See the LICENSE file in the root directory of this source tree.
275
276
  */
276
- const __iconNode$d = [
277
+ const __iconNode$f = [
278
+ [
279
+ "path",
280
+ {
281
+ d: "M4 11V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h7",
282
+ key: "huwfnr"
283
+ }
284
+ ],
285
+ ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }],
286
+ ["path", { d: "m10 18 3-3-3-3", key: "18f6ys" }]
287
+ ];
288
+ const FileSymlink = createLucideIcon("file-symlink", __iconNode$f);
289
+ /**
290
+ * @license lucide-react v0.552.0 - ISC
291
+ *
292
+ * This source code is licensed under the ISC license.
293
+ * See the LICENSE file in the root directory of this source tree.
294
+ */
295
+ const __iconNode$e = [
277
296
  [
278
297
  "path",
279
298
  {
@@ -286,7 +305,23 @@ const __iconNode$d = [
286
305
  ["path", { d: "M16 13H8", key: "t4e002" }],
287
306
  ["path", { d: "M16 17H8", key: "z1uh3a" }]
288
307
  ];
289
- const FileText = createLucideIcon("file-text", __iconNode$d);
308
+ const FileText = createLucideIcon("file-text", __iconNode$e);
309
+ /**
310
+ * @license lucide-react v0.552.0 - ISC
311
+ *
312
+ * This source code is licensed under the ISC license.
313
+ * See the LICENSE file in the root directory of this source tree.
314
+ */
315
+ const __iconNode$d = [
316
+ [
317
+ "path",
318
+ {
319
+ d: "m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",
320
+ key: "usdka0"
321
+ }
322
+ ]
323
+ ];
324
+ const FolderOpen = createLucideIcon("folder-open", __iconNode$d);
290
325
  /**
291
326
  * @license lucide-react v0.552.0 - ISC
292
327
  *
@@ -8089,11 +8124,31 @@ const GitChangesPanelContent = ({
8089
8124
  rootPath,
8090
8125
  isLoading = false,
8091
8126
  onFileClick,
8127
+ onContextMenuAction,
8092
8128
  emptyMessage = "No git changes to display",
8093
8129
  loadingMessage = "Loading git changes...",
8094
8130
  selectedFile
8095
8131
  }) => {
8096
8132
  const { theme } = useTheme();
8133
+ const [contextMenu, setContextMenu] = useState({
8134
+ visible: false,
8135
+ x: 0,
8136
+ y: 0,
8137
+ nodePath: "",
8138
+ isFolder: false
8139
+ });
8140
+ const contextMenuRef = useRef(null);
8141
+ useEffect(() => {
8142
+ const handleClickOutside = (e) => {
8143
+ if (contextMenuRef.current && !contextMenuRef.current.contains(e.target)) {
8144
+ setContextMenu((prev) => ({ ...prev, visible: false }));
8145
+ }
8146
+ };
8147
+ if (contextMenu.visible) {
8148
+ document.addEventListener("mousedown", handleClickOutside);
8149
+ return () => document.removeEventListener("mousedown", handleClickOutside);
8150
+ }
8151
+ }, [contextMenu.visible]);
8097
8152
  const hasChanges = gitStatus.staged.length > 0 || gitStatus.unstaged.length > 0 || gitStatus.untracked.length > 0 || gitStatus.deleted.length > 0;
8098
8153
  const [showFullTree, setShowFullTree] = useState(false);
8099
8154
  const userHasToggledView = useRef(false);
@@ -8130,6 +8185,52 @@ const GitChangesPanelContent = ({
8130
8185
  },
8131
8186
  [getFileStatus, onFileClick]
8132
8187
  );
8188
+ const handleContextMenu = useCallback(
8189
+ (event, nodePath, isFolder) => {
8190
+ event.preventDefault();
8191
+ setContextMenu({
8192
+ visible: true,
8193
+ x: event.clientX,
8194
+ y: event.clientY,
8195
+ nodePath,
8196
+ isFolder
8197
+ });
8198
+ },
8199
+ []
8200
+ );
8201
+ const closeContextMenu = useCallback(() => {
8202
+ setContextMenu((prev) => ({ ...prev, visible: false }));
8203
+ }, []);
8204
+ const getFullPath = useCallback(
8205
+ (nodePath) => {
8206
+ if (rootPath && !nodePath.startsWith(rootPath)) {
8207
+ return `${rootPath}/${nodePath}`;
8208
+ }
8209
+ return nodePath;
8210
+ },
8211
+ [rootPath]
8212
+ );
8213
+ const handleCopyFullPath = useCallback(() => {
8214
+ const fullPath = getFullPath(contextMenu.nodePath);
8215
+ navigator.clipboard.writeText(fullPath);
8216
+ onContextMenuAction == null ? void 0 : onContextMenuAction({ type: "copyFullPath", path: fullPath });
8217
+ closeContextMenu();
8218
+ }, [contextMenu.nodePath, getFullPath, onContextMenuAction, closeContextMenu]);
8219
+ const handleCopyRelativePath = useCallback(() => {
8220
+ navigator.clipboard.writeText(contextMenu.nodePath);
8221
+ onContextMenuAction == null ? void 0 : onContextMenuAction({ type: "copyRelativePath", path: contextMenu.nodePath });
8222
+ closeContextMenu();
8223
+ }, [contextMenu.nodePath, onContextMenuAction, closeContextMenu]);
8224
+ const handleOpenFile = useCallback(() => {
8225
+ const fullPath = getFullPath(contextMenu.nodePath);
8226
+ onContextMenuAction == null ? void 0 : onContextMenuAction({ type: "openFile", path: fullPath });
8227
+ closeContextMenu();
8228
+ }, [contextMenu.nodePath, getFullPath, onContextMenuAction, closeContextMenu]);
8229
+ const handleOpenFolder = useCallback(() => {
8230
+ const fullPath = getFullPath(contextMenu.nodePath);
8231
+ onContextMenuAction == null ? void 0 : onContextMenuAction({ type: "openFolder", path: fullPath });
8232
+ closeContextMenu();
8233
+ }, [contextMenu.nodePath, getFullPath, onContextMenuAction, closeContextMenu]);
8133
8234
  const gitChangesData = useMemo(() => {
8134
8235
  if (isLoading) {
8135
8236
  return null;
@@ -8217,7 +8318,7 @@ const GitChangesPanelContent = ({
8217
8318
  fontSize: theme.fontSizes[1],
8218
8319
  backgroundColor: showFullTree ? theme.colors.backgroundSecondary : "transparent",
8219
8320
  color: showFullTree ? theme.colors.text : theme.colors.textSecondary,
8220
- border: showFullTree ? `1px solid ${theme.colors.border}` : "1px solid transparent",
8321
+ border: "none",
8221
8322
  cursor: "pointer",
8222
8323
  fontWeight: showFullTree ? 600 : 400,
8223
8324
  transition: "all 0.2s"
@@ -8238,12 +8339,12 @@ const GitChangesPanelContent = ({
8238
8339
  fontSize: theme.fontSizes[1],
8239
8340
  backgroundColor: !showFullTree ? theme.colors.backgroundSecondary : "transparent",
8240
8341
  color: !showFullTree ? theme.colors.text : theme.colors.textSecondary,
8241
- border: !showFullTree ? `1px solid ${theme.colors.border}` : "1px solid transparent",
8342
+ border: "none",
8242
8343
  cursor: "pointer",
8243
8344
  fontWeight: !showFullTree ? 600 : 400,
8244
8345
  transition: "all 0.2s"
8245
8346
  },
8246
- children: "Changes Only"
8347
+ children: "Changes"
8247
8348
  }
8248
8349
  )
8249
8350
  ]
@@ -8286,6 +8387,7 @@ const GitChangesPanelContent = ({
8286
8387
  theme,
8287
8388
  gitStatusData: gitChangesData.statusData,
8288
8389
  onFileSelect: handleFileSelect,
8390
+ onContextMenu: handleContextMenu,
8289
8391
  selectedFile,
8290
8392
  transparentBackground: true,
8291
8393
  horizontalNodePadding: "16px",
@@ -8294,9 +8396,93 @@ const GitChangesPanelContent = ({
8294
8396
  showFullTree ? "full" : "changes"
8295
8397
  );
8296
8398
  };
8399
+ const contextMenuButtonStyle = {
8400
+ display: "flex",
8401
+ alignItems: "center",
8402
+ gap: "8px",
8403
+ width: "100%",
8404
+ padding: "8px 12px",
8405
+ border: "none",
8406
+ background: "none",
8407
+ cursor: "pointer",
8408
+ fontSize: theme.fontSizes[1],
8409
+ color: theme.colors.text,
8410
+ textAlign: "left"
8411
+ };
8297
8412
  return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", height: "100%" }, children: [
8298
8413
  /* @__PURE__ */ jsx("div", { style: { height: 40, borderBottom: `1px solid ${theme.colors.border}` }, children: /* @__PURE__ */ jsx(ToggleButtons, {}) }),
8299
- /* @__PURE__ */ jsx("div", { style: { flex: 1, overflow: "auto" }, children: /* @__PURE__ */ jsx(Content, {}) })
8414
+ /* @__PURE__ */ jsx("div", { style: { flex: 1, overflow: "auto" }, children: /* @__PURE__ */ jsx(Content, {}) }),
8415
+ contextMenu.visible && createPortal(
8416
+ /* @__PURE__ */ jsxs(
8417
+ "div",
8418
+ {
8419
+ ref: contextMenuRef,
8420
+ style: {
8421
+ position: "fixed",
8422
+ top: contextMenu.y,
8423
+ left: contextMenu.x,
8424
+ backgroundColor: theme.colors.background,
8425
+ border: `1px solid ${theme.colors.border}`,
8426
+ borderRadius: "6px",
8427
+ boxShadow: "0 4px 12px rgba(0, 0, 0, 0.15)",
8428
+ zIndex: 1e3,
8429
+ minWidth: "180px",
8430
+ padding: "4px 0",
8431
+ fontFamily: theme.fonts.body,
8432
+ ["--theme-bg-tertiary"]: theme.colors.backgroundTertiary
8433
+ },
8434
+ children: [
8435
+ /* @__PURE__ */ jsxs(
8436
+ "button",
8437
+ {
8438
+ onClick: contextMenu.isFolder ? handleOpenFolder : handleOpenFile,
8439
+ className: "context-menu-item",
8440
+ style: contextMenuButtonStyle,
8441
+ children: [
8442
+ contextMenu.isFolder ? /* @__PURE__ */ jsx(FolderOpen, { size: 14 }) : /* @__PURE__ */ jsx(ExternalLink, { size: 14 }),
8443
+ contextMenu.isFolder ? "Open Folder" : "Open File"
8444
+ ]
8445
+ }
8446
+ ),
8447
+ /* @__PURE__ */ jsx(
8448
+ "div",
8449
+ {
8450
+ style: {
8451
+ height: "1px",
8452
+ backgroundColor: theme.colors.border,
8453
+ margin: "4px 0"
8454
+ }
8455
+ }
8456
+ ),
8457
+ /* @__PURE__ */ jsxs(
8458
+ "button",
8459
+ {
8460
+ onClick: handleCopyFullPath,
8461
+ className: "context-menu-item",
8462
+ style: contextMenuButtonStyle,
8463
+ children: [
8464
+ /* @__PURE__ */ jsx(Copy, { size: 14 }),
8465
+ "Copy Full Path"
8466
+ ]
8467
+ }
8468
+ ),
8469
+ /* @__PURE__ */ jsxs(
8470
+ "button",
8471
+ {
8472
+ onClick: handleCopyRelativePath,
8473
+ className: "context-menu-item",
8474
+ style: contextMenuButtonStyle,
8475
+ children: [
8476
+ /* @__PURE__ */ jsx(FileSymlink, { size: 14 }),
8477
+ "Copy Relative Path"
8478
+ ]
8479
+ }
8480
+ )
8481
+ ]
8482
+ }
8483
+ ),
8484
+ document.body
8485
+ )
8300
8486
  ] });
8301
8487
  };
8302
8488
  const GitChangesPanelPreview = () => {
@@ -8362,7 +8548,7 @@ const GitChangesPanelPreview = () => {
8362
8548
  }
8363
8549
  );
8364
8550
  };
8365
- const GitChangesPanel = ({ context }) => {
8551
+ const GitChangesPanel = ({ context, events }) => {
8366
8552
  var _a;
8367
8553
  const gitSlice = context.getSlice("git");
8368
8554
  const fileTreeSlice = context.getSlice("fileTree");
@@ -8375,13 +8561,37 @@ const GitChangesPanel = ({ context }) => {
8375
8561
  const fileTree = (fileTreeSlice == null ? void 0 : fileTreeSlice.data) ?? null;
8376
8562
  const isLoading = (gitSlice == null ? void 0 : gitSlice.loading) || (fileTreeSlice == null ? void 0 : fileTreeSlice.loading) || false;
8377
8563
  const rootPath = context.currentScope.type === "repository" ? (_a = context.currentScope.repository) == null ? void 0 : _a.path : void 0;
8564
+ const handleFileClick = useCallback(
8565
+ (filePath, status) => {
8566
+ events == null ? void 0 : events.emit({
8567
+ type: "file:open",
8568
+ source: "git-changes-panel",
8569
+ timestamp: Date.now(),
8570
+ payload: { path: filePath, gitStatus: status }
8571
+ });
8572
+ },
8573
+ [events]
8574
+ );
8575
+ const handleContextMenuAction = useCallback(
8576
+ (action) => {
8577
+ events == null ? void 0 : events.emit({
8578
+ type: `contextMenu:${action.type}`,
8579
+ source: "git-changes-panel",
8580
+ timestamp: Date.now(),
8581
+ payload: { path: action.path }
8582
+ });
8583
+ },
8584
+ [events]
8585
+ );
8378
8586
  return /* @__PURE__ */ jsx(
8379
8587
  GitChangesPanelContent,
8380
8588
  {
8381
8589
  gitStatus,
8382
8590
  fileTree,
8383
8591
  rootPath,
8384
- isLoading
8592
+ isLoading,
8593
+ onFileClick: handleFileClick,
8594
+ onContextMenuAction: handleContextMenuAction
8385
8595
  }
8386
8596
  );
8387
8597
  };
@@ -9219,6 +9429,57 @@ const PackageSummaryCard = ({ pkg, allPackages, onClick, onHover }) => {
9219
9429
  ),
9220
9430
  /* @__PURE__ */ jsx(ChevronRight, { size: 16, color: theme.colors.textSecondary })
9221
9431
  ] }),
9432
+ (pkg.packageData.description || pkg.packageData.license) && /* @__PURE__ */ jsxs(
9433
+ "div",
9434
+ {
9435
+ style: {
9436
+ display: "flex",
9437
+ flexDirection: "column",
9438
+ gap: "4px"
9439
+ },
9440
+ children: [
9441
+ pkg.packageData.description && /* @__PURE__ */ jsx(
9442
+ "div",
9443
+ {
9444
+ style: {
9445
+ fontSize: theme.fontSizes[0],
9446
+ color: theme.colors.textSecondary,
9447
+ lineHeight: 1.4,
9448
+ overflow: "hidden",
9449
+ display: "-webkit-box",
9450
+ WebkitLineClamp: 2,
9451
+ WebkitBoxOrient: "vertical"
9452
+ },
9453
+ children: pkg.packageData.description
9454
+ }
9455
+ ),
9456
+ pkg.packageData.license && /* @__PURE__ */ jsx(
9457
+ "div",
9458
+ {
9459
+ style: {
9460
+ display: "flex",
9461
+ alignItems: "center",
9462
+ gap: "4px",
9463
+ fontSize: theme.fontSizes[0]
9464
+ },
9465
+ children: /* @__PURE__ */ jsx(
9466
+ "span",
9467
+ {
9468
+ style: {
9469
+ padding: "1px 6px",
9470
+ backgroundColor: theme.colors.textSecondary + "15",
9471
+ color: theme.colors.textSecondary,
9472
+ borderRadius: "3px",
9473
+ fontWeight: 500
9474
+ },
9475
+ children: pkg.packageData.license
9476
+ }
9477
+ )
9478
+ }
9479
+ )
9480
+ ]
9481
+ }
9482
+ ),
9222
9483
  hasInternalDeps && /* @__PURE__ */ jsxs(
9223
9484
  "div",
9224
9485
  {
@@ -9316,6 +9577,7 @@ const PackageCard = ({
9316
9577
  onPackageClick,
9317
9578
  standalone = false
9318
9579
  }) => {
9580
+ var _a, _b;
9319
9581
  const { theme } = useTheme();
9320
9582
  const [activeTab, setActiveTab] = useState("dependencies");
9321
9583
  const [activeFilters, setActiveFilters] = useState(/* @__PURE__ */ new Set());
@@ -9427,6 +9689,60 @@ const PackageCard = ({
9427
9689
  ]
9428
9690
  }
9429
9691
  ),
9692
+ (pkg.packageData.description || pkg.packageData.license || pkg.packageData.author) && /* @__PURE__ */ jsxs(
9693
+ "div",
9694
+ {
9695
+ style: {
9696
+ padding: "8px 16px 12px",
9697
+ borderBottom: `1px solid ${theme.colors.border}`,
9698
+ display: "flex",
9699
+ flexDirection: "column",
9700
+ gap: "6px"
9701
+ },
9702
+ children: [
9703
+ pkg.packageData.description && /* @__PURE__ */ jsx(
9704
+ "div",
9705
+ {
9706
+ style: {
9707
+ fontSize: theme.fontSizes[1],
9708
+ color: theme.colors.textSecondary,
9709
+ lineHeight: 1.5
9710
+ },
9711
+ children: pkg.packageData.description
9712
+ }
9713
+ ),
9714
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: "8px", flexWrap: "wrap", alignItems: "center" }, children: [
9715
+ pkg.packageData.license && /* @__PURE__ */ jsx(
9716
+ "span",
9717
+ {
9718
+ style: {
9719
+ padding: "2px 8px",
9720
+ backgroundColor: theme.colors.textSecondary + "15",
9721
+ color: theme.colors.textSecondary,
9722
+ borderRadius: "4px",
9723
+ fontSize: theme.fontSizes[0],
9724
+ fontWeight: 500
9725
+ },
9726
+ children: pkg.packageData.license
9727
+ }
9728
+ ),
9729
+ (pkg.packageData.author || ((_a = pkg.packageData.authors) == null ? void 0 : _a[0])) && /* @__PURE__ */ jsxs(
9730
+ "span",
9731
+ {
9732
+ style: {
9733
+ fontSize: theme.fontSizes[0],
9734
+ color: theme.colors.textSecondary
9735
+ },
9736
+ children: [
9737
+ "by ",
9738
+ pkg.packageData.author || ((_b = pkg.packageData.authors) == null ? void 0 : _b[0])
9739
+ ]
9740
+ }
9741
+ )
9742
+ ] })
9743
+ ]
9744
+ }
9745
+ ),
9430
9746
  /* @__PURE__ */ jsx(
9431
9747
  "div",
9432
9748
  {