@industry-theme/file-city-panel 0.2.63 → 0.2.64

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":"FileCardList.d.ts","sourceRoot":"","sources":["../../../src/panels/components/FileCardList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAQpD,MAAM,WAAW,YAAY;IAC3B,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,mEAAmE;IACnE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2BAA2B;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,iBAAiB;IACzB,+BAA+B;IAC/B,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,2CAA2C;IAC3C,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,2CAA2C;IAC3C,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAChD,0BAA0B;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mCAAmC;IACnC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gDAAgD;IAChD,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA+MpD,CAAC"}
1
+ {"version":3,"file":"FileCardList.d.ts","sourceRoot":"","sources":["../../../src/panels/components/FileCardList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAQpD,MAAM,WAAW,YAAY;IAC3B,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,mEAAmE;IACnE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2BAA2B;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,iBAAiB;IACzB,+BAA+B;IAC/B,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,2CAA2C;IAC3C,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,2CAA2C;IAC3C,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAChD,0BAA0B;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mCAAmC;IACnC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gDAAgD;IAChD,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA2OpD,CAAC"}
@@ -14263,6 +14263,7 @@ const FileCardList = ({
14263
14263
  showIcons = true
14264
14264
  }) => {
14265
14265
  const { theme: theme2 } = useTheme$1();
14266
+ const [copiedPath, setCopiedPath] = React.useState(null);
14266
14267
  const getFileName = useCallback((path) => {
14267
14268
  const parts = path.split("/");
14268
14269
  return parts[parts.length - 1] || path;
@@ -14331,6 +14332,15 @@ const FileCardList = ({
14331
14332
  onClick: () => onFileClick == null ? void 0 : onFileClick(file.path),
14332
14333
  onMouseEnter: () => onFileHover == null ? void 0 : onFileHover(file.path),
14333
14334
  onMouseLeave: () => onFileHover == null ? void 0 : onFileHover(null),
14335
+ onContextMenu: (e) => {
14336
+ e.preventDefault();
14337
+ navigator.clipboard.writeText(file.path).then(() => {
14338
+ setCopiedPath(file.path);
14339
+ setTimeout(() => setCopiedPath(null), 1500);
14340
+ }).catch((err) => {
14341
+ console.error("Failed to copy file path to clipboard:", err);
14342
+ });
14343
+ },
14334
14344
  style: {
14335
14345
  display: "flex",
14336
14346
  alignItems: "center",
@@ -14437,6 +14447,22 @@ const FileCardList = ({
14437
14447
  },
14438
14448
  children: file.badge
14439
14449
  }
14450
+ ),
14451
+ copiedPath === file.path && /* @__PURE__ */ jsx(
14452
+ "span",
14453
+ {
14454
+ style: {
14455
+ fontFamily: theme2.fonts.body,
14456
+ fontSize: theme2.fontSizes[0],
14457
+ fontWeight: 600,
14458
+ color: "#22c55e",
14459
+ backgroundColor: "#22c55e20",
14460
+ padding: "4px 8px",
14461
+ borderRadius: "4px",
14462
+ flexShrink: 0
14463
+ },
14464
+ children: "Copied!"
14465
+ }
14440
14466
  )
14441
14467
  ]
14442
14468
  },