paperclip-github-plugin 0.4.8 → 0.4.9

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.
package/dist/manifest.js CHANGED
@@ -511,7 +511,7 @@ var require2 = createRequire(import.meta.url);
511
511
  var packageJson = require2("../package.json");
512
512
  var DASHBOARD_WIDGET_CAPABILITY = "ui.dashboardWidget.register";
513
513
  var SCHEDULE_TICK_CRON = "* * * * *";
514
- var MANIFEST_VERSION = "0.4.8"?.trim() || typeof packageJson.version === "string" && packageJson.version.trim() || process.env.npm_package_version?.trim() || "0.0.0-dev";
514
+ var MANIFEST_VERSION = "0.4.9"?.trim() || typeof packageJson.version === "string" && packageJson.version.trim() || process.env.npm_package_version?.trim() || "0.0.0-dev";
515
515
  var manifest = {
516
516
  id: "paperclip-github-plugin",
517
517
  apiVersion: 1,
package/dist/ui/index.js CHANGED
@@ -26458,12 +26458,6 @@ var EXTENSION_SURFACE_STYLES = `
26458
26458
  text-transform: uppercase;
26459
26459
  }
26460
26460
 
26461
- .ghsync-issue-detail__creator .ghsync-prs-avatar {
26462
- width: 20px;
26463
- height: 20px;
26464
- font-size: 10px;
26465
- }
26466
-
26467
26461
  .ghsync-extension-heading h3,
26468
26462
  .ghsync-extension-heading h4 {
26469
26463
  margin: 0;
@@ -27268,6 +27262,22 @@ function formatShortDateTime(value, fallback = "Unknown time") {
27268
27262
  function pluralize(count, singular, plural = `${singular}s`) {
27269
27263
  return `${count} ${count === 1 ? singular : plural}`;
27270
27264
  }
27265
+ function resolvePreviewPersonLabels(person) {
27266
+ const displayHandle = person.handle.trim();
27267
+ const displayName = person.name.trim() || displayHandle || "Unknown user";
27268
+ const normalizedName = displayName.replace(/^@/, "").trim().toLowerCase();
27269
+ const normalizedHandle = displayHandle.replace(/^@/, "").trim().toLowerCase();
27270
+ if (displayHandle && normalizedName && normalizedHandle && normalizedName === normalizedHandle) {
27271
+ return {
27272
+ primary: displayHandle,
27273
+ secondary: null
27274
+ };
27275
+ }
27276
+ return {
27277
+ primary: displayName,
27278
+ secondary: displayHandle && displayHandle !== displayName ? displayHandle : null
27279
+ };
27280
+ }
27271
27281
  function hashString(value) {
27272
27282
  let hash = 0;
27273
27283
  for (const character of value) {
@@ -28772,17 +28782,38 @@ function SyncDiagnosticsPanel(props) {
28772
28782
  function PreviewAvatar(props) {
28773
28783
  const backgroundColor = getPreviewAvatarColor(props.person.handle);
28774
28784
  const className = props.stacked ? "ghsync-prs-avatar-stack__item" : "ghsync-prs-avatar";
28785
+ const avatarSizePx = props.size === "sm" ? 20 : 28;
28786
+ const fontSizePx = props.size === "sm" ? 10 : 11;
28787
+ const labels = resolvePreviewPersonLabels(props.person);
28788
+ const initialsSource = props.person.name.trim() || props.person.handle.replace(/^@/, "").trim();
28789
+ const title = labels.secondary ? `${labels.primary} (${labels.secondary})` : labels.primary;
28775
28790
  return /* @__PURE__ */ jsx2(
28776
28791
  "span",
28777
28792
  {
28778
28793
  className,
28779
- style: { backgroundColor },
28780
- title: `${props.person.name} (${props.person.handle})`,
28794
+ style: {
28795
+ backgroundColor,
28796
+ width: avatarSizePx,
28797
+ height: avatarSizePx,
28798
+ fontSize: fontSizePx
28799
+ },
28800
+ title,
28781
28801
  "aria-hidden": "true",
28782
- children: props.person.avatarUrl ? /* @__PURE__ */ jsx2("img", { src: props.person.avatarUrl, alt: "", loading: "lazy" }) : getInitials(props.person.name)
28802
+ children: props.person.avatarUrl ? /* @__PURE__ */ jsx2("img", { src: props.person.avatarUrl, alt: "", loading: "lazy" }) : getInitials(initialsSource)
28783
28803
  }
28784
28804
  );
28785
28805
  }
28806
+ function PreviewPersonCopy(props) {
28807
+ const labels = resolvePreviewPersonLabels(props.person);
28808
+ return /* @__PURE__ */ jsxs2("span", { className: "ghsync-prs-table__person-copy", children: [
28809
+ /* @__PURE__ */ jsx2("span", { className: "ghsync-prs-table__person-name", children: labels.primary }),
28810
+ labels.secondary ? /* @__PURE__ */ jsx2("span", { className: "ghsync-prs-table__person-handle", children: labels.secondary }) : null
28811
+ ] });
28812
+ }
28813
+ function PreviewPersonInlineLabel(props) {
28814
+ const labels = resolvePreviewPersonLabels(props.person);
28815
+ return /* @__PURE__ */ jsx2("span", { children: labels.secondary ? `${labels.primary} (${labels.secondary})` : labels.primary });
28816
+ }
28786
28817
  function PreviewMarkdown(props) {
28787
28818
  return /* @__PURE__ */ jsx2("div", { className: "ghsync-prs-markdown paperclip-markdown prose prose-sm max-w-none break-words overflow-hidden", children: /* @__PURE__ */ jsx2(
28788
28819
  Markdown,
@@ -29964,10 +29995,7 @@ function GitHubSyncProjectPullRequestsPage() {
29964
29995
  rel: "noreferrer",
29965
29996
  children: [
29966
29997
  /* @__PURE__ */ jsx2(PreviewAvatar, { person: pullRequest.author }),
29967
- /* @__PURE__ */ jsxs2("span", { className: "ghsync-prs-table__person-copy", children: [
29968
- /* @__PURE__ */ jsx2("span", { className: "ghsync-prs-table__person-name", children: pullRequest.author.name }),
29969
- /* @__PURE__ */ jsx2("span", { className: "ghsync-prs-table__person-handle", children: pullRequest.author.handle })
29970
- ] })
29998
+ /* @__PURE__ */ jsx2(PreviewPersonCopy, { person: pullRequest.author })
29971
29999
  ]
29972
30000
  }
29973
30001
  ) }),
@@ -30453,12 +30481,7 @@ function GitHubSyncProjectPullRequestsPage() {
30453
30481
  /* @__PURE__ */ jsx2("span", { className: "ghsync-prs-meta__label", children: "Author" }),
30454
30482
  /* @__PURE__ */ jsxs2("div", { className: "ghsync-prs-meta__value ghsync-prs-meta__value--stack", children: [
30455
30483
  /* @__PURE__ */ jsx2(PreviewAvatar, { person: selectedPullRequest.author }),
30456
- /* @__PURE__ */ jsxs2("span", { children: [
30457
- selectedPullRequest.author.name,
30458
- " (",
30459
- selectedPullRequest.author.handle,
30460
- ")"
30461
- ] })
30484
+ /* @__PURE__ */ jsx2(PreviewPersonInlineLabel, { person: selectedPullRequest.author })
30462
30485
  ] })
30463
30486
  ] }),
30464
30487
  /* @__PURE__ */ jsxs2("div", { className: "ghsync-prs-meta__row", children: [
@@ -33515,11 +33538,8 @@ function GitHubSyncIssueDetailTabContent(props) {
33515
33538
  rel: "noreferrer",
33516
33539
  className: "ghsync-prs-table__person ghsync-issue-detail__creator",
33517
33540
  children: [
33518
- /* @__PURE__ */ jsx2(PreviewAvatar, { person: issueDetails.creator }),
33519
- /* @__PURE__ */ jsxs2("span", { className: "ghsync-prs-table__person-copy", children: [
33520
- /* @__PURE__ */ jsx2("span", { className: "ghsync-prs-table__person-name", children: issueDetails.creator.name }),
33521
- /* @__PURE__ */ jsx2("span", { className: "ghsync-prs-table__person-handle", children: issueDetails.creator.handle })
33522
- ] })
33541
+ /* @__PURE__ */ jsx2(PreviewAvatar, { person: issueDetails.creator, size: "sm" }),
33542
+ /* @__PURE__ */ jsx2(PreviewPersonCopy, { person: issueDetails.creator })
33523
33543
  ]
33524
33544
  }
33525
33545
  )
@@ -33705,6 +33725,7 @@ export {
33705
33725
  index_default as default,
33706
33726
  resolveGitHubIssueDetailTabState,
33707
33727
  resolveOrCreateProject,
33728
+ resolvePreviewPersonLabels,
33708
33729
  resolveSavedTokenUiState,
33709
33730
  resolveToolbarButtonState,
33710
33731
  syncGitHubTokenPropagationForAgents