@industry-theme/repository-composition-panels 0.2.1 → 0.2.2
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":"DependencyRow.d.ts","sourceRoot":"","sources":["../../../src/panels/components/DependencyRow.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"DependencyRow.d.ts","sourceRoot":"","sources":["../../../src/panels/components/DependencyRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D,UAAU,kBAAkB;IAC1B,UAAU,EAAE,cAAc,CAAC;CAC5B;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA8JtD,CAAC"}
|
package/dist/panels.bundle.js
CHANGED
|
@@ -320,7 +320,7 @@ const createLucideIcon = (iconName, iconNode) => {
|
|
|
320
320
|
* This source code is licensed under the ISC license.
|
|
321
321
|
* See the LICENSE file in the root directory of this source tree.
|
|
322
322
|
*/
|
|
323
|
-
const __iconNode$
|
|
323
|
+
const __iconNode$k = [
|
|
324
324
|
[
|
|
325
325
|
"path",
|
|
326
326
|
{
|
|
@@ -352,47 +352,66 @@ const __iconNode$i = [
|
|
|
352
352
|
["path", { d: "m12 8 4.74-2.85", key: "3rx089" }],
|
|
353
353
|
["path", { d: "M12 13.5V8", key: "1io7kd" }]
|
|
354
354
|
];
|
|
355
|
-
const Boxes = createLucideIcon("boxes", __iconNode$
|
|
355
|
+
const Boxes = createLucideIcon("boxes", __iconNode$k);
|
|
356
356
|
/**
|
|
357
357
|
* @license lucide-react v0.552.0 - ISC
|
|
358
358
|
*
|
|
359
359
|
* This source code is licensed under the ISC license.
|
|
360
360
|
* See the LICENSE file in the root directory of this source tree.
|
|
361
361
|
*/
|
|
362
|
-
const __iconNode$
|
|
363
|
-
const
|
|
362
|
+
const __iconNode$j = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
|
|
363
|
+
const Check = createLucideIcon("check", __iconNode$j);
|
|
364
364
|
/**
|
|
365
365
|
* @license lucide-react v0.552.0 - ISC
|
|
366
366
|
*
|
|
367
367
|
* This source code is licensed under the ISC license.
|
|
368
368
|
* See the LICENSE file in the root directory of this source tree.
|
|
369
369
|
*/
|
|
370
|
-
const __iconNode$
|
|
371
|
-
const
|
|
370
|
+
const __iconNode$i = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
|
|
371
|
+
const ChevronDown = createLucideIcon("chevron-down", __iconNode$i);
|
|
372
372
|
/**
|
|
373
373
|
* @license lucide-react v0.552.0 - ISC
|
|
374
374
|
*
|
|
375
375
|
* This source code is licensed under the ISC license.
|
|
376
376
|
* See the LICENSE file in the root directory of this source tree.
|
|
377
377
|
*/
|
|
378
|
-
const __iconNode$
|
|
378
|
+
const __iconNode$h = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
|
|
379
|
+
const ChevronRight = createLucideIcon("chevron-right", __iconNode$h);
|
|
380
|
+
/**
|
|
381
|
+
* @license lucide-react v0.552.0 - ISC
|
|
382
|
+
*
|
|
383
|
+
* This source code is licensed under the ISC license.
|
|
384
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
385
|
+
*/
|
|
386
|
+
const __iconNode$g = [
|
|
379
387
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
380
388
|
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
381
389
|
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
382
390
|
];
|
|
383
|
-
const CircleAlert = createLucideIcon("circle-alert", __iconNode$
|
|
391
|
+
const CircleAlert = createLucideIcon("circle-alert", __iconNode$g);
|
|
384
392
|
/**
|
|
385
393
|
* @license lucide-react v0.552.0 - ISC
|
|
386
394
|
*
|
|
387
395
|
* This source code is licensed under the ISC license.
|
|
388
396
|
* See the LICENSE file in the root directory of this source tree.
|
|
389
397
|
*/
|
|
390
|
-
const __iconNode$
|
|
398
|
+
const __iconNode$f = [
|
|
391
399
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
392
400
|
["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
|
|
393
401
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
394
402
|
];
|
|
395
|
-
const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$
|
|
403
|
+
const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$f);
|
|
404
|
+
/**
|
|
405
|
+
* @license lucide-react v0.552.0 - ISC
|
|
406
|
+
*
|
|
407
|
+
* This source code is licensed under the ISC license.
|
|
408
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
409
|
+
*/
|
|
410
|
+
const __iconNode$e = [
|
|
411
|
+
["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
|
|
412
|
+
["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" }]
|
|
413
|
+
];
|
|
414
|
+
const Copy = createLucideIcon("copy", __iconNode$e);
|
|
396
415
|
/**
|
|
397
416
|
* @license lucide-react v0.552.0 - ISC
|
|
398
417
|
*
|
|
@@ -9153,6 +9172,8 @@ const InfoItem = ({ badge, title, description, theme: theme2 }) => /* @__PURE__
|
|
|
9153
9172
|
);
|
|
9154
9173
|
const DependencyRow = ({ dependency }) => {
|
|
9155
9174
|
const { theme: theme2 } = useTheme();
|
|
9175
|
+
const [isHovered, setIsHovered] = useState(false);
|
|
9176
|
+
const [copied, setCopied] = useState(false);
|
|
9156
9177
|
const getDependencyTypeBadgeStyle = (type) => {
|
|
9157
9178
|
const baseStyle = {
|
|
9158
9179
|
padding: `${theme2.space[1]}px ${theme2.space[2]}px`,
|
|
@@ -9189,6 +9210,31 @@ const DependencyRow = ({ dependency }) => {
|
|
|
9189
9210
|
};
|
|
9190
9211
|
}
|
|
9191
9212
|
};
|
|
9213
|
+
const handleCopy = async (e) => {
|
|
9214
|
+
e.preventDefault();
|
|
9215
|
+
e.stopPropagation();
|
|
9216
|
+
try {
|
|
9217
|
+
const copyText = `${dependency.name}@${dependency.version}`;
|
|
9218
|
+
await navigator.clipboard.writeText(copyText);
|
|
9219
|
+
setCopied(true);
|
|
9220
|
+
setTimeout(() => setCopied(false), 2e3);
|
|
9221
|
+
} catch (err) {
|
|
9222
|
+
console.error("Failed to copy:", err);
|
|
9223
|
+
}
|
|
9224
|
+
};
|
|
9225
|
+
const actionButtonStyle = {
|
|
9226
|
+
padding: `${theme2.space[1]}px`,
|
|
9227
|
+
borderRadius: `${theme2.radii[1]}px`,
|
|
9228
|
+
display: "flex",
|
|
9229
|
+
alignItems: "center",
|
|
9230
|
+
justifyContent: "center",
|
|
9231
|
+
border: "none",
|
|
9232
|
+
backgroundColor: "transparent",
|
|
9233
|
+
cursor: "pointer",
|
|
9234
|
+
transition: "all 0.15s ease",
|
|
9235
|
+
opacity: isHovered ? 1 : 0,
|
|
9236
|
+
pointerEvents: isHovered ? "auto" : "none"
|
|
9237
|
+
};
|
|
9192
9238
|
return /* @__PURE__ */ jsxs(
|
|
9193
9239
|
"div",
|
|
9194
9240
|
{
|
|
@@ -9203,6 +9249,8 @@ const DependencyRow = ({ dependency }) => {
|
|
|
9203
9249
|
border: `1px solid ${theme2.colors.border}`,
|
|
9204
9250
|
transition: "all 0.2s"
|
|
9205
9251
|
},
|
|
9252
|
+
onMouseEnter: () => setIsHovered(true),
|
|
9253
|
+
onMouseLeave: () => setIsHovered(false),
|
|
9206
9254
|
children: [
|
|
9207
9255
|
/* @__PURE__ */ jsxs(
|
|
9208
9256
|
"div",
|
|
@@ -9228,6 +9276,22 @@ const DependencyRow = ({ dependency }) => {
|
|
|
9228
9276
|
},
|
|
9229
9277
|
children: dependency.name
|
|
9230
9278
|
}
|
|
9279
|
+
),
|
|
9280
|
+
/* @__PURE__ */ jsx(
|
|
9281
|
+
"a",
|
|
9282
|
+
{
|
|
9283
|
+
href: `https://www.npmjs.com/package/${dependency.name}`,
|
|
9284
|
+
target: "_blank",
|
|
9285
|
+
rel: "noopener noreferrer",
|
|
9286
|
+
style: {
|
|
9287
|
+
...actionButtonStyle,
|
|
9288
|
+
color: theme2.colors.textSecondary,
|
|
9289
|
+
textDecoration: "none",
|
|
9290
|
+
flexShrink: 0
|
|
9291
|
+
},
|
|
9292
|
+
title: "View on npm",
|
|
9293
|
+
children: /* @__PURE__ */ jsx(ExternalLink, { size: 12 })
|
|
9294
|
+
}
|
|
9231
9295
|
)
|
|
9232
9296
|
]
|
|
9233
9297
|
}
|
|
@@ -9238,27 +9302,23 @@ const DependencyRow = ({ dependency }) => {
|
|
|
9238
9302
|
style: {
|
|
9239
9303
|
display: "flex",
|
|
9240
9304
|
alignItems: "center",
|
|
9241
|
-
gap: "
|
|
9305
|
+
gap: "4px"
|
|
9242
9306
|
},
|
|
9243
9307
|
children: [
|
|
9244
|
-
/* @__PURE__ */ jsx("span", { style: { color: theme2.colors.textSecondary }, children: dependency.version }),
|
|
9245
9308
|
/* @__PURE__ */ jsx(
|
|
9246
|
-
"
|
|
9309
|
+
"button",
|
|
9247
9310
|
{
|
|
9248
|
-
|
|
9249
|
-
|
|
9250
|
-
rel: "noopener noreferrer",
|
|
9311
|
+
type: "button",
|
|
9312
|
+
onClick: handleCopy,
|
|
9251
9313
|
style: {
|
|
9252
|
-
|
|
9253
|
-
|
|
9254
|
-
display: "flex",
|
|
9255
|
-
alignItems: "center",
|
|
9256
|
-
transition: "background-color 0.2s"
|
|
9314
|
+
...actionButtonStyle,
|
|
9315
|
+
color: copied ? theme2.colors.success || "#10b981" : theme2.colors.textSecondary
|
|
9257
9316
|
},
|
|
9258
|
-
title: "
|
|
9259
|
-
children: /* @__PURE__ */ jsx(
|
|
9317
|
+
title: copied ? "Copied!" : `Copy ${dependency.name}@${dependency.version}`,
|
|
9318
|
+
children: copied ? /* @__PURE__ */ jsx(Check, { size: 12 }) : /* @__PURE__ */ jsx(Copy, { size: 12 })
|
|
9260
9319
|
}
|
|
9261
|
-
)
|
|
9320
|
+
),
|
|
9321
|
+
/* @__PURE__ */ jsx("span", { style: { color: theme2.colors.textSecondary }, children: dependency.version })
|
|
9262
9322
|
]
|
|
9263
9323
|
}
|
|
9264
9324
|
)
|