@feedlog-ai/webcomponents 0.0.26 → 0.0.27

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.
@@ -1531,7 +1531,7 @@ function parseMarkdown(markdown) {
1531
1531
  });
1532
1532
  }
1533
1533
 
1534
- const feedlogIssueCss = () => `:host{display:block;font-family:ui-sans-serif,\\n system-ui,\\n -apple-system,\\n BlinkMacSystemFont,\\n 'Segoe UI',\\n Roboto,\\n 'Helvetica Neue',\\n Arial,\\n sans-serif;--feedlog-background:#ffffff;--feedlog-foreground:oklch(0.145 0 0);--feedlog-card:#ffffff;--feedlog-card-foreground:oklch(0.145 0 0);--feedlog-muted:#f1f5f9;--feedlog-muted-foreground:#64748b;--feedlog-border:rgba(0, 0, 0, 0.08);--feedlog-accent-color:#2563eb;--feedlog-destructive:#d4183d;--feedlog-blue-400:oklch(0.707 0.165 254.624);--feedlog-blue-600:oklch(0.546 0.245 262.881);--feedlog-blue-100:oklch(0.932 0.032 255.585);--feedlog-red-100:#fce7f3;--feedlog-red-400:#f472b6;--feedlog-red-600:#db2777;--feedlog-radius:0.625rem;--feedlog-gap:0.5rem;--feedlog-card-padding:1.25rem;--feedlog-title-font-size:0.9375rem;--feedlog-title-font-weight:600;--feedlog-body-font-size:0.8125rem;--feedlog-body-line-height:1.5;--feedlog-timestamp-font-size:0.6875rem;--feedlog-timestamp-color:var(--feedlog-muted-foreground);--feedlog-card-accent-width:3px;--feedlog-icon-color:var(--feedlog-muted-foreground);--feedlog-icon-color-muted:var(--feedlog-muted-foreground);--feedlog-pin-color:var(--feedlog-accent-color);--feedlog-upvote-icon-color:var(--feedlog-blue-600);--feedlog-upvote-icon-filled-color:var(--feedlog-red-600);--feedlog-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.08);--feedlog-shadow-hover:0 4px 12px -2px rgba(0, 0, 0, 0.1), 0 2px 6px -2px rgba(0, 0, 0, 0.08)}:host(.dark){--feedlog-background:oklch(0.18 0.01 260);--feedlog-foreground:oklch(0.985 0 0);--feedlog-card:oklch(0.24 0.01 260);--feedlog-card-foreground:oklch(0.985 0 0);--feedlog-muted:oklch(0.32 0.01 260);--feedlog-muted-foreground:oklch(0.72 0.02 260);--feedlog-border:oklch(0.34 0.01 260);--feedlog-accent-color:#3b82f6;--feedlog-destructive:oklch(0.396 0.141 25.723);--feedlog-blue-400:oklch(0.707 0.165 254.624);--feedlog-blue-600:oklch(0.546 0.245 262.881);--feedlog-blue-900-30:color-mix(in oklab, oklch(0.379 0.146 265.522) 30%, transparent);--feedlog-red-900-30:color-mix(in oklab, oklch(0.396 0.141 25.723) 30%, transparent);--feedlog-upvote-icon-color:var(--feedlog-blue-400);--feedlog-upvote-icon-filled-color:var(--feedlog-red-600);--feedlog-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.3);--feedlog-shadow-hover:0 4px 12px -2px rgba(0, 0, 0, 0.4)}.issue-card{background-color:var(--feedlog-card);border:1px solid var(--feedlog-border);border-radius:var(--feedlog-radius);box-shadow:var(--feedlog-shadow);transition:box-shadow 0.2s ease,\\n transform 0.2s ease;position:relative;overflow:hidden}.issue-card::before{content:'';position:absolute;left:0;top:0;bottom:0;width:var(--feedlog-card-accent-width);background:var(--feedlog-accent-color)}.issue-card.issue-type-bug::before{background:var(--feedlog-destructive)}.issue-card:hover{box-shadow:var(--feedlog-shadow-hover)}.issue-content{padding:var(--feedlog-card-padding);padding-left:calc(var(--feedlog-card-padding) + var(--feedlog-card-accent-width));display:flex;flex-direction:column;gap:0.875rem}.issue-header{display:flex;align-items:flex-start;justify-content:space-between;gap:0.75rem;min-height:1.5rem}.issue-header-left{display:flex;align-items:center;gap:0.375rem;flex-wrap:wrap}.issue-type-badge{width:fit-content}.pinned-indicator{display:flex;align-items:center;color:var(--feedlog-pin-color, var(--feedlog-accent-color));opacity:0.9}.pin-icon{width:0.875rem;height:0.875rem;color:inherit}.issue-timestamp{font-size:var(--feedlog-timestamp-font-size);color:var(--feedlog-timestamp-color);white-space:nowrap;flex-shrink:0;cursor:help}.issue-main{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}.issue-details{flex:1;min-width:0}.issue-title{color:var(--feedlog-card-foreground);font-size:var(--feedlog-title-font-size);font-weight:var(--feedlog-title-font-weight);margin:0 0 0.5rem 0;line-height:1.4;word-break:break-word}.issue-body{color:var(--feedlog-muted-foreground);font-size:var(--feedlog-body-font-size);line-height:var(--feedlog-body-line-height);margin:0 0 0.75rem 0;word-break:break-word}.issue-body :first-child{margin-top:0}.issue-body :last-child{margin-bottom:0}.issue-body p{margin:0 0 0.5em 0}.issue-body p:last-child{margin-bottom:0}.issue-body a{color:var(--feedlog-accent-color);text-decoration:none}.issue-body a:hover{text-decoration:underline}.issue-body code{background-color:var(--feedlog-muted);padding:0.125em 0.375em;border-radius:0.25rem;font-size:0.9em}.issue-body pre{margin:0.5em 0;padding:0.75rem;background-color:var(--feedlog-muted);border-radius:0.25rem;overflow-x:auto;font-size:0.85em}.issue-body pre code{background:none;padding:0}.issue-body strong{font-weight:600}.issue-body ul,.issue-body ol{margin:0.5em 0;padding-left:1.25em}.issue-body li{margin:0.25em 0}.issue-body blockquote{margin:0.5em 0;padding-left:1em;border-left:3px solid var(--feedlog-muted);color:var(--feedlog-muted-foreground)}.issue-repository{display:flex;align-items:center;gap:0.5rem;font-size:0.75rem;color:var(--feedlog-muted-foreground);flex-wrap:wrap}.repo-name{font-weight:500}.github-link{display:inline-flex;align-items:center;gap:0.25rem;color:var(--feedlog-accent-color);text-decoration:none;font-weight:500;font-size:0.75rem;padding:0.125rem 0.375rem;border-radius:0.25rem;transition:background-color 0.15s ease,\\n color 0.15s ease}.github-link:hover{text-decoration:underline}.github-link-icon{flex-shrink:0;color:inherit}.github-link-text{white-space:nowrap}.github-number{color:var(--feedlog-blue-600);font-weight:600}:host(.dark) .github-number{color:var(--feedlog-blue-400)}.upvote-button{display:flex;flex-direction:column;align-items:center;gap:0.125rem;padding:0.5rem 0.75rem;border-radius:0.5rem;background-color:var(--feedlog-muted);border:1px solid transparent;cursor:pointer;transition:all 0.2s ease;flex-shrink:0;font-size:0.75rem;font-weight:600}.upvote-button:hover{background-color:var(--feedlog-blue-100);border-color:var(--feedlog-blue-400)}.upvote-button.upvoted{background-color:var(--feedlog-red-100);border-color:var(--feedlog-red-400)}.upvote-button.upvoted:hover{background-color:var(--feedlog-red-100);border-color:var(--feedlog-red-600)}:host(.dark) .upvote-button:hover{background-color:var(--feedlog-blue-900-30);border-color:var(--feedlog-blue-600)}:host(.dark) .upvote-button.upvoted{background-color:var(--feedlog-red-900-30);border-color:var(--feedlog-red-600)}.upvote-icon{width:1rem;height:1rem;color:inherit}.upvote-icon.filled{color:var(--feedlog-upvote-icon-filled-color)}.upvote-icon.outline{color:var(--feedlog-upvote-icon-color)}.upvote-count{font-size:0.75rem;font-weight:600;color:var(--feedlog-card-foreground)}`;
1534
+ const feedlogIssueCss = () => `:host{display:block;font-family:ui-sans-serif,\\n system-ui,\\n -apple-system,\\n BlinkMacSystemFont,\\n 'Segoe UI',\\n Roboto,\\n 'Helvetica Neue',\\n Arial,\\n sans-serif;--feedlog-background:#ffffff;--feedlog-foreground:oklch(0.145 0 0);--feedlog-card:#ffffff;--feedlog-card-foreground:oklch(0.145 0 0);--feedlog-muted:#f1f5f9;--feedlog-muted-foreground:#64748b;--feedlog-border:rgba(0, 0, 0, 0.08);--feedlog-accent-color:#2563eb;--feedlog-destructive:#d4183d;--feedlog-blue-400:oklch(0.707 0.165 254.624);--feedlog-blue-600:oklch(0.546 0.245 262.881);--feedlog-blue-100:oklch(0.932 0.032 255.585);--feedlog-red-100:#fce7f3;--feedlog-red-400:#f472b6;--feedlog-red-600:#db2777;--feedlog-radius:0.625rem;--feedlog-gap:0.5rem;--feedlog-card-padding:1.25rem;--feedlog-title-font-size:0.9375rem;--feedlog-title-font-weight:600;--feedlog-body-font-size:0.8125rem;--feedlog-body-line-height:1.5;--feedlog-timestamp-font-size:0.6875rem;--feedlog-timestamp-color:var(--feedlog-muted-foreground);--feedlog-card-accent-width:3px;--feedlog-icon-color:var(--feedlog-muted-foreground);--feedlog-icon-color-muted:var(--feedlog-muted-foreground);--feedlog-pin-color:var(--feedlog-accent-color);--feedlog-upvote-icon-color:var(--feedlog-blue-600);--feedlog-upvote-icon-filled-color:var(--feedlog-red-600);--feedlog-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.08);--feedlog-shadow-hover:0 4px 12px -2px rgba(0, 0, 0, 0.1), 0 2px 6px -2px rgba(0, 0, 0, 0.08)}:host(.dark){--feedlog-background:oklch(0.18 0.01 260);--feedlog-foreground:oklch(0.985 0 0);--feedlog-card:oklch(0.24 0.01 260);--feedlog-card-foreground:oklch(0.985 0 0);--feedlog-muted:oklch(0.32 0.01 260);--feedlog-muted-foreground:oklch(0.72 0.02 260);--feedlog-border:oklch(0.34 0.01 260);--feedlog-accent-color:#3b82f6;--feedlog-destructive:oklch(0.396 0.141 25.723);--feedlog-blue-400:oklch(0.707 0.165 254.624);--feedlog-blue-600:oklch(0.546 0.245 262.881);--feedlog-blue-900-30:color-mix(in oklab, oklch(0.379 0.146 265.522) 30%, transparent);--feedlog-red-900-30:color-mix(in oklab, oklch(0.396 0.141 25.723) 30%, transparent);--feedlog-upvote-icon-color:var(--feedlog-blue-400);--feedlog-upvote-icon-filled-color:var(--feedlog-red-600);--feedlog-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.3);--feedlog-shadow-hover:0 4px 12px -2px rgba(0, 0, 0, 0.4)}.issue-card{background-color:var(--feedlog-card);border:1px solid var(--feedlog-border);border-radius:var(--feedlog-radius);box-shadow:var(--feedlog-shadow);transition:box-shadow 0.2s ease,\\n transform 0.2s ease;position:relative;overflow:hidden}.issue-card::before{content:'';position:absolute;left:0;top:0;bottom:0;width:var(--feedlog-card-accent-width);background:var(--feedlog-accent-color)}.issue-card.issue-type-bug::before{background:var(--feedlog-destructive)}.issue-card:hover{box-shadow:var(--feedlog-shadow-hover)}.issue-content{padding:var(--feedlog-card-padding);padding-left:calc(var(--feedlog-card-padding) + var(--feedlog-card-accent-width));display:flex;flex-direction:column;gap:0.875rem}.issue-header{display:flex;align-items:flex-start;justify-content:space-between;gap:0.75rem;min-height:1.5rem}.issue-header-left{display:flex;align-items:center;gap:0.375rem;flex-wrap:wrap}.issue-type-badge{width:fit-content}.pinned-indicator{display:flex;align-items:center;color:var(--feedlog-pin-color, var(--feedlog-accent-color));opacity:0.9}.pin-icon{width:0.875rem;height:0.875rem;color:inherit}.issue-timestamp{font-size:var(--feedlog-timestamp-font-size);color:var(--feedlog-timestamp-color);white-space:nowrap;flex-shrink:0;cursor:help}.issue-main{display:flex;flex-direction:column;gap:0}.issue-footer{display:flex;align-items:center;justify-content:flex-end;margin-top:0.75rem}.issue-title{color:var(--feedlog-card-foreground);font-size:var(--feedlog-title-font-size);font-weight:var(--feedlog-title-font-weight);margin:0 0 0.5rem 0;line-height:1.4;word-break:break-word}.issue-body{color:var(--feedlog-muted-foreground);font-size:var(--feedlog-body-font-size);line-height:var(--feedlog-body-line-height);margin:0 0 0.75rem 0;word-break:break-word}.issue-body :first-child{margin-top:0}.issue-body :last-child{margin-bottom:0}.issue-body p{margin:0 0 0.5em 0}.issue-body p:last-child{margin-bottom:0}.issue-body a{color:var(--feedlog-accent-color);text-decoration:none}.issue-body a:hover{text-decoration:underline}.issue-body code{background-color:var(--feedlog-muted);padding:0.125em 0.375em;border-radius:0.25rem;font-size:0.9em}.issue-body pre{margin:0.5em 0;padding:0.75rem;background-color:var(--feedlog-muted);border-radius:0.25rem;overflow-x:auto;font-size:0.85em}.issue-body pre code{background:none;padding:0}.issue-body strong{font-weight:600}.issue-body ul,.issue-body ol{margin:0.5em 0;padding-left:1.25em}.issue-body li{margin:0.25em 0}.issue-body blockquote{margin:0.5em 0;padding-left:1em;border-left:3px solid var(--feedlog-muted);color:var(--feedlog-muted-foreground)}.issue-repository{display:flex;align-items:center;gap:0.5rem;font-size:0.75rem;color:var(--feedlog-muted-foreground);flex-wrap:wrap}.repo-name{font-weight:500}.github-link{display:inline-flex;align-items:center;gap:0.25rem;color:var(--feedlog-accent-color);text-decoration:none;font-weight:500;font-size:0.75rem;padding:0.125rem 0.375rem;border-radius:0.25rem;transition:background-color 0.15s ease,\\n color 0.15s ease}.github-link:hover{text-decoration:underline}.github-link-icon{flex-shrink:0;color:inherit}.github-link-text{white-space:nowrap}.github-number{color:var(--feedlog-blue-600);font-weight:600}:host(.dark) .github-number{color:var(--feedlog-blue-400)}.upvote-button{display:inline-flex;flex-direction:row;align-items:center;border-radius:0.375rem;background-color:#ffffff;border:1px solid #e2e8f0;cursor:pointer;transition:all 0.2s cubic-bezier(0.4, 0, 0.2, 1);flex-shrink:0;box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.05);overflow:hidden;padding:0.375rem 0.75rem;gap:0.5rem;font-family:inherit;line-height:1}.upvote-button:hover{background-color:#f8fafc;border-color:#cbd5e1;transform:translateY(-1px);box-shadow:0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.04)}.upvote-button:active{transform:translateY(0);box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.05)}.upvote-button.upvoted{background-color:#eff6ff;border-color:#bfdbfe}.upvote-button.upvoted:hover{background-color:#dbeafe;border-color:#93c5fd}.upvote-action{display:flex;flex-direction:row;align-items:center;gap:0.375rem;color:#475569;font-size:0.875rem;font-weight:600;transition:color 0.2s ease}.upvote-button:hover .upvote-action{color:#0f172a}.upvote-button.upvoted .upvote-action{color:#2563eb}.upvote-button.upvoted:hover .upvote-action{color:#1d4ed8}.upvote-icon{width:1.125rem;height:1.125rem;min-width:1.125rem;min-height:1.125rem;color:inherit;flex-shrink:0;display:block;vertical-align:middle;transition:transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)}.upvote-button:hover .upvote-icon{transform:translateY(-2px)}.upvote-button:active .upvote-icon{transform:translateY(0) scale(0.9)}.upvote-icon.filled{color:inherit}.upvote-icon.outline{color:inherit}.reel-container{position:relative;display:inline-flex;align-items:center;height:1.25rem;overflow:hidden;border-left:1px solid #e2e8f0;padding-left:0.5rem;transition:border-color 0.2s ease}.upvote-button:hover .reel-container{border-color:#cbd5e1}.upvote-button.upvoted .reel-container{border-color:#bfdbfe}.upvote-button.upvoted:hover .reel-container{border-color:#93c5fd}.upvote-count{font-size:0.875rem;font-weight:600;color:#475569;transition:color 0.2s ease;line-height:1.25rem}.upvote-button:hover .upvote-count{color:#0f172a}.upvote-button.upvoted .upvote-count{color:#2563eb}.upvote-button.upvoted:hover .upvote-count{color:#1d4ed8}.reel-number{display:inline-block;animation:reelIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards}@keyframes reelIn{0%{transform:translateY(100%);opacity:0}100%{transform:translateY(0);opacity:1}}:host(.dark) .upvote-button{background-color:var(--feedlog-card);border-color:var(--feedlog-border)}:host(.dark) .upvote-button:hover{background-color:var(--feedlog-muted);border-color:var(--feedlog-muted-foreground)}:host(.dark) .upvote-button.upvoted{background-color:rgba(37, 99, 235, 0.15);border-color:rgba(37, 99, 235, 0.3)}:host(.dark) .upvote-button.upvoted:hover{background-color:rgba(37, 99, 235, 0.25);border-color:rgba(37, 99, 235, 0.4)}:host(.dark) .upvote-action,:host(.dark) .upvote-count{color:var(--feedlog-muted-foreground)}:host(.dark) .upvote-button:hover .upvote-action,:host(.dark) .upvote-button:hover .upvote-count{color:var(--feedlog-card-foreground)}:host(.dark) .upvote-button.upvoted .upvote-action,:host(.dark) .upvote-button.upvoted .upvote-count{color:var(--feedlog-blue-400)}:host(.dark) .upvote-button.upvoted:hover .upvote-action,:host(.dark) .upvote-button.upvoted:hover .upvote-count{color:var(--feedlog-blue-300)}:host(.dark) .reel-container{border-color:var(--feedlog-border)}:host(.dark) .upvote-button:hover .reel-container{border-color:var(--feedlog-muted-foreground)}:host(.dark) .upvote-button.upvoted .reel-container{border-color:rgba(37, 99, 235, 0.3)}:host(.dark) .upvote-button.upvoted:hover .reel-container{border-color:rgba(37, 99, 235, 0.4)}`;
1535
1535
 
1536
1536
  const FeedlogIssueComponent = class {
1537
1537
  constructor(hostRef) {
@@ -1557,13 +1557,15 @@ const FeedlogIssueComponent = class {
1557
1557
  return (index.h("svg", { class: "pin-icon", xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, index.h("path", { d: "M12 17v5" }), index.h("path", { d: "M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16h1v2a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1v-2h1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z" })));
1558
1558
  }
1559
1559
  /**
1560
- * Renders the upvote (thumbs-up) icon SVG
1560
+ * Renders the upvote (caret-up / arrow) icon SVG
1561
+ * Path centered in 24x24 viewBox for proper vertical alignment
1561
1562
  */
1562
1563
  renderUpvoteIcon(filled) {
1564
+ const path = 'M12 7l7 10H5l7-10z';
1563
1565
  if (filled) {
1564
- return (index.h("svg", { class: "upvote-icon filled", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor" }, index.h("path", { d: "M7 10v12" }), index.h("path", { d: "M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2h0a3.13 3.13 0 0 1 3 3.88Z" })));
1566
+ return (index.h("svg", { class: "upvote-icon filled", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor" }, index.h("path", { d: path })));
1565
1567
  }
1566
- return (index.h("svg", { class: "upvote-icon outline", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, index.h("path", { d: "M7 10v12" }), index.h("path", { d: "M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2h0a3.13 3.13 0 0 1 3 3.88Z" })));
1568
+ return (index.h("svg", { class: "upvote-icon outline", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, index.h("path", { d: path })));
1567
1569
  }
1568
1570
  /**
1569
1571
  * Format an ISO date string to a relative time string
@@ -1632,12 +1634,12 @@ const FeedlogIssueComponent = class {
1632
1634
  const statusBadgeLabel = this.getStatusBadgeLabel();
1633
1635
  const githubUrl = (_b = issue.githubIssueLink) !== null && _b !== void 0 ? _b : issueUrl;
1634
1636
  const showGithubButton = githubUrl != null && githubUrl !== '';
1635
- return (index.h(index.Host, { class: this.theme === 'dark' ? 'dark' : '', "data-upvoted": issue.hasUpvoted ? 'true' : 'false' }, index.h("div", { class: `issue-card issue-type-${issue.type}` }, index.h("div", { class: "issue-content" }, index.h("div", { class: "issue-header" }, index.h("div", { class: "issue-header-left" }, index.h("div", { class: "issue-type-badge" }, issue.type === 'bug' ? (index.h("feedlog-badge", { variant: "destructive" }, "Bug")) : (index.h("feedlog-badge", { variant: "enhancement" }, "Enhancement"))), statusBadgeLabel && (index.h("feedlog-badge", { variant: "secondary" }, statusBadgeLabel)), issue.pinnedAt && (index.h("div", { class: "pinned-indicator", title: "Pinned issue" }, this.renderPinIcon()))), index.h("span", { class: "issue-timestamp", title: timestampTitle }, timestampLabel, " ", this.formatDate(timestampDate))), index.h("div", { class: "issue-main" }, index.h("div", { class: "issue-details" }, index.h("h3", { class: "issue-title" }, displayTitle), issue.body != null && issue.body !== '' && (index.h("div", { class: "issue-body", innerHTML: parseMarkdown(issue.body) })), index.h("div", { class: "issue-repository" }, repoName != null && (index.h("span", { class: "repo-name", title: repoTooltip }, repoName)), showGithubButton && (index.h("a", { part: "github-link", class: "github-link", href: githubUrl, target: "_blank", rel: "noopener noreferrer", title: "View on GitHub" }, this.renderExternalLinkIcon(), index.h("span", { class: "github-link-text" }, "View on GitHub"))))), issue.type !== 'bug' && (index.h("button", { part: "upvote-button", class: `upvote-button ${issue.hasUpvoted ? 'upvoted' : ''}`, onClick: (e) => this.handleUpvote(e), title: issue.hasUpvoted ? 'Remove upvote' : 'Upvote this issue' }, index.h("slot", { name: "upvote-icon" }, this.renderUpvoteIcon(issue.hasUpvoted)), index.h("span", { class: "upvote-count" }, issue.upvoteCount))))))));
1637
+ return (index.h(index.Host, { class: this.theme === 'dark' ? 'dark' : '', "data-upvoted": issue.hasUpvoted ? 'true' : 'false' }, index.h("div", { class: `issue-card issue-type-${issue.type}` }, index.h("div", { class: "issue-content" }, index.h("div", { class: "issue-header" }, index.h("div", { class: "issue-header-left" }, index.h("div", { class: "issue-type-badge" }, issue.type === 'bug' ? (index.h("feedlog-badge", { variant: "destructive" }, "Bug")) : (index.h("feedlog-badge", { variant: "enhancement" }, "Enhancement"))), statusBadgeLabel && (index.h("feedlog-badge", { variant: "secondary" }, statusBadgeLabel)), issue.pinnedAt && (index.h("div", { class: "pinned-indicator", title: "Pinned issue" }, this.renderPinIcon()))), index.h("span", { class: "issue-timestamp", title: timestampTitle }, timestampLabel, " ", this.formatDate(timestampDate))), index.h("div", { class: "issue-main" }, index.h("h3", { class: "issue-title" }, displayTitle), issue.body != null && issue.body !== '' && (index.h("div", { class: "issue-body", innerHTML: parseMarkdown(issue.body) })), index.h("div", { class: "issue-repository" }, repoName != null && (index.h("span", { class: "repo-name", title: repoTooltip }, repoName)), showGithubButton && (index.h("a", { part: "github-link", class: "github-link", href: githubUrl, target: "_blank", rel: "noopener noreferrer", title: "View on GitHub" }, this.renderExternalLinkIcon(), index.h("span", { class: "github-link-text" }, "View on GitHub")))), issue.type !== 'bug' && (index.h("div", { class: "issue-footer" }, index.h("button", { part: "upvote-button", class: `upvote-button ${issue.hasUpvoted ? 'upvoted' : ''}`, onClick: (e) => this.handleUpvote(e), title: issue.hasUpvoted ? 'Remove upvote' : 'Upvote this issue' }, index.h("div", { class: "upvote-action" }, index.h("slot", { name: "upvote-icon" }, this.renderUpvoteIcon(issue.hasUpvoted)), index.h("span", { class: "upvote-label" }, "Upvote")), index.h("div", { class: "reel-container" }, index.h("span", { class: "upvote-count reel-number", key: issue.upvoteCount }, issue.upvoteCount))))))))));
1636
1638
  }
1637
1639
  };
1638
1640
  FeedlogIssueComponent.style = feedlogIssueCss();
1639
1641
 
1640
- const feedlogIssuesListCss = () => `:host{display:block;--feedlog-muted-foreground:#64748b;--feedlog-foreground:oklch(0.145 0 0);--feedlog-empty-illustration-bg:oklch(0.96 0.01 260);--feedlog-empty-illustration-stroke:oklch(0.75 0.02 260);--feedlog-empty-illustration-muted:oklch(0.82 0.01 260)}:host(.dark){--feedlog-muted-foreground:oklch(0.72 0.02 260);--feedlog-foreground:oklch(0.985 0 0);--feedlog-empty-illustration-bg:oklch(0.28 0.02 260);--feedlog-empty-illustration-stroke:oklch(0.45 0.02 260);--feedlog-empty-illustration-muted:oklch(0.38 0.01 260)}.issues-list{display:flex;flex-direction:column;gap:0.5rem}.empty-state{text-align:center;padding:3rem 1.5rem;color:var(--feedlog-muted-foreground);font-size:0.875rem}.empty-state-content{display:flex;flex-direction:column;align-items:center;text-align:center;max-width:20rem}.empty-state-illustration{margin-bottom:1.5rem;opacity:0.9}.empty-state-title{margin:0 0 0.5rem 0;font-size:1.125rem;font-weight:600;color:var(--feedlog-foreground);line-height:1.4}.empty-state-message{margin:0;font-size:0.875rem;color:var(--feedlog-muted-foreground);line-height:1.5}.pagination{display:flex;align-items:center;justify-content:center;gap:0.25rem;margin-top:1.5rem;flex-wrap:wrap}.pagination-btn{min-width:2rem;height:2rem;padding:0 0.5rem;color:var(--feedlog-foreground);background:transparent;border:1px solid var(--feedlog-border, oklch(0.9 0 0));border-radius:var(--feedlog-radius, 0.375rem);font-size:0.875rem;font-weight:500;cursor:pointer;transition:background-color 0.15s, border-color 0.15s}.pagination-btn:hover:not(:disabled){background:var(--feedlog-muted, oklch(0.96 0 0))}.pagination-btn[aria-current='page']{background:var(--feedlog-accent-color, oklch(0.55 0.2 250));color:white;border-color:var(--feedlog-accent-color, oklch(0.55 0.2 250))}.pagination-btn:disabled{opacity:0.5;cursor:not-allowed}.pagination-arrow{font-size:1.25rem;line-height:1}.pagination-ellipsis{padding:0 0.25rem;color:var(--feedlog-muted-foreground);font-size:0.875rem}:host(.dark) .pagination-btn{border-color:oklch(0.4 0.02 260)}:host(.dark) .pagination-btn:hover:not(:disabled){background:oklch(0.35 0.02 260)}`;
1642
+ const feedlogIssuesListCss = () => `:host{display:block;--feedlog-muted-foreground:#64748b;--feedlog-foreground:oklch(0.145 0 0);--feedlog-empty-illustration-bg:oklch(0.96 0.01 260);--feedlog-empty-illustration-stroke:oklch(0.75 0.02 260);--feedlog-empty-illustration-muted:oklch(0.82 0.01 260)}:host(.dark){--feedlog-muted-foreground:oklch(0.72 0.02 260);--feedlog-foreground:oklch(0.985 0 0);--feedlog-empty-illustration-bg:oklch(0.28 0.02 260);--feedlog-empty-illustration-stroke:oklch(0.45 0.02 260);--feedlog-empty-illustration-muted:oklch(0.38 0.01 260)}.issues-list{display:flex;flex-direction:column;gap:0.5rem}.empty-state{text-align:center;padding:3rem 1.5rem;color:var(--feedlog-muted-foreground);font-size:0.875rem}.empty-state-content{display:flex;flex-direction:column;align-items:center;text-align:center;max-width:20rem;margin-inline:auto}.empty-state-illustration{margin-bottom:1.5rem;opacity:0.9}.empty-state-title{margin:0 0 0.5rem 0;font-size:1.125rem;font-weight:600;color:var(--feedlog-foreground);line-height:1.4}.empty-state-message{margin:0;font-size:0.875rem;color:var(--feedlog-muted-foreground);line-height:1.5}.pagination{display:flex;align-items:center;justify-content:center;gap:0.25rem;margin-top:1.5rem;flex-wrap:wrap}.pagination-btn{min-width:2rem;height:2rem;padding:0 0.5rem;color:var(--feedlog-foreground);background:transparent;border:1px solid var(--feedlog-border, oklch(0.9 0 0));border-radius:var(--feedlog-radius, 0.375rem);font-size:0.875rem;font-weight:500;cursor:pointer;transition:background-color 0.15s, border-color 0.15s}.pagination-btn:hover:not(:disabled){background:var(--feedlog-muted, oklch(0.96 0 0))}.pagination-btn[aria-current='page']{background:var(--feedlog-accent-color, oklch(0.55 0.2 250));color:white;border-color:var(--feedlog-accent-color, oklch(0.55 0.2 250))}.pagination-btn:disabled{opacity:0.5;cursor:not-allowed}.pagination-arrow{font-size:1.25rem;line-height:1}.pagination-ellipsis{padding:0 0.25rem;color:var(--feedlog-muted-foreground);font-size:0.875rem}:host(.dark) .pagination-btn{border-color:oklch(0.4 0.02 260)}:host(.dark) .pagination-btn:hover:not(:disabled){background:oklch(0.35 0.02 260)}`;
1641
1643
 
1642
1644
  const FeedlogIssuesList = class {
1643
1645
  constructor(hostRef) {
@@ -149,14 +149,15 @@
149
149
 
150
150
  .issue-main {
151
151
  display: flex;
152
- align-items: flex-start;
153
- justify-content: space-between;
154
- gap: 1rem;
152
+ flex-direction: column;
153
+ gap: 0;
155
154
  }
156
155
 
157
- .issue-details {
158
- flex: 1;
159
- min-width: 0;
156
+ .issue-footer {
157
+ display: flex;
158
+ align-items: center;
159
+ justify-content: flex-end;
160
+ margin-top: 0.75rem;
160
161
  }
161
162
 
162
163
  .issue-title {
@@ -294,62 +295,208 @@
294
295
  }
295
296
 
296
297
  .upvote-button {
297
- display: flex;
298
- flex-direction: column;
298
+ display: inline-flex;
299
+ flex-direction: row;
299
300
  align-items: center;
300
- gap: 0.125rem;
301
- padding: 0.5rem 0.75rem;
302
- border-radius: 0.5rem;
303
- background-color: var(--feedlog-muted);
304
- border: 1px solid transparent;
301
+ border-radius: 0.375rem; /* 6px */
302
+ background-color: #ffffff;
303
+ border: 1px solid #e2e8f0;
305
304
  cursor: pointer;
306
- transition: all 0.2s ease;
305
+ transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
307
306
  flex-shrink: 0;
308
- font-size: 0.75rem;
309
- font-weight: 600;
307
+ box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
308
+ overflow: hidden;
309
+ padding: 0.375rem 0.75rem;
310
+ gap: 0.5rem;
311
+ font-family: inherit;
312
+ line-height: 1;
310
313
  }
311
314
 
312
315
  .upvote-button:hover {
313
- background-color: var(--feedlog-blue-100);
314
- border-color: var(--feedlog-blue-400);
316
+ background-color: #f8fafc;
317
+ border-color: #cbd5e1;
318
+ transform: translateY(-1px);
319
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
320
+ }
321
+
322
+ .upvote-button:active {
323
+ transform: translateY(0);
324
+ box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
315
325
  }
316
326
 
317
327
  .upvote-button.upvoted {
318
- background-color: var(--feedlog-red-100);
319
- border-color: var(--feedlog-red-400);
328
+ background-color: #eff6ff;
329
+ border-color: #bfdbfe;
320
330
  }
321
331
 
322
332
  .upvote-button.upvoted:hover {
323
- background-color: var(--feedlog-red-100);
324
- border-color: var(--feedlog-red-600);
333
+ background-color: #dbeafe;
334
+ border-color: #93c5fd;
325
335
  }
326
336
 
327
- :host(.dark) .upvote-button:hover {
328
- background-color: var(--feedlog-blue-900-30);
329
- border-color: var(--feedlog-blue-600);
337
+ .upvote-action {
338
+ display: flex;
339
+ flex-direction: row;
340
+ align-items: center;
341
+ gap: 0.375rem;
342
+ color: #475569;
343
+ font-size: 0.875rem;
344
+ font-weight: 600;
345
+ transition: color 0.2s ease;
330
346
  }
331
347
 
332
- :host(.dark) .upvote-button.upvoted {
333
- background-color: var(--feedlog-red-900-30);
334
- border-color: var(--feedlog-red-600);
348
+ .upvote-button:hover .upvote-action {
349
+ color: #0f172a;
350
+ }
351
+
352
+ .upvote-button.upvoted .upvote-action {
353
+ color: #2563eb;
354
+ }
355
+
356
+ .upvote-button.upvoted:hover .upvote-action {
357
+ color: #1d4ed8;
335
358
  }
336
359
 
337
360
  .upvote-icon {
338
- width: 1rem;
339
- height: 1rem;
361
+ width: 1.125rem;
362
+ height: 1.125rem;
363
+ min-width: 1.125rem;
364
+ min-height: 1.125rem;
340
365
  color: inherit;
366
+ flex-shrink: 0;
367
+ display: block;
368
+ vertical-align: middle;
369
+ transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
370
+ }
371
+
372
+ .upvote-button:hover .upvote-icon {
373
+ transform: translateY(-2px);
374
+ }
375
+
376
+ .upvote-button:active .upvote-icon {
377
+ transform: translateY(0) scale(0.9);
341
378
  }
342
379
 
343
380
  .upvote-icon.filled {
344
- color: var(--feedlog-upvote-icon-filled-color);
381
+ color: inherit;
345
382
  }
346
383
 
347
384
  .upvote-icon.outline {
348
- color: var(--feedlog-upvote-icon-color);
385
+ color: inherit;
386
+ }
387
+
388
+ .reel-container {
389
+ position: relative;
390
+ display: inline-flex;
391
+ align-items: center;
392
+ height: 1.25rem;
393
+ overflow: hidden;
394
+ border-left: 1px solid #e2e8f0;
395
+ padding-left: 0.5rem;
396
+ transition: border-color 0.2s ease;
397
+ }
398
+
399
+ .upvote-button:hover .reel-container {
400
+ border-color: #cbd5e1;
401
+ }
402
+
403
+ .upvote-button.upvoted .reel-container {
404
+ border-color: #bfdbfe;
405
+ }
406
+
407
+ .upvote-button.upvoted:hover .reel-container {
408
+ border-color: #93c5fd;
349
409
  }
350
410
 
351
411
  .upvote-count {
352
- font-size: 0.75rem;
412
+ font-size: 0.875rem;
353
413
  font-weight: 600;
414
+ color: #475569;
415
+ transition: color 0.2s ease;
416
+ line-height: 1.25rem;
417
+ }
418
+
419
+ .upvote-button:hover .upvote-count {
420
+ color: #0f172a;
421
+ }
422
+
423
+ .upvote-button.upvoted .upvote-count {
424
+ color: #2563eb;
425
+ }
426
+
427
+ .upvote-button.upvoted:hover .upvote-count {
428
+ color: #1d4ed8;
429
+ }
430
+
431
+ .reel-number {
432
+ display: inline-block;
433
+ animation: reelIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
434
+ }
435
+
436
+ @keyframes reelIn {
437
+ 0% {
438
+ transform: translateY(100%);
439
+ opacity: 0;
440
+ }
441
+ 100% {
442
+ transform: translateY(0);
443
+ opacity: 1;
444
+ }
445
+ }
446
+
447
+ /* Dark theme overrides */
448
+ :host(.dark) .upvote-button {
449
+ background-color: var(--feedlog-card);
450
+ border-color: var(--feedlog-border);
451
+ }
452
+
453
+ :host(.dark) .upvote-button:hover {
454
+ background-color: var(--feedlog-muted);
455
+ border-color: var(--feedlog-muted-foreground);
456
+ }
457
+
458
+ :host(.dark) .upvote-button.upvoted {
459
+ background-color: rgba(37, 99, 235, 0.15);
460
+ border-color: rgba(37, 99, 235, 0.3);
461
+ }
462
+
463
+ :host(.dark) .upvote-button.upvoted:hover {
464
+ background-color: rgba(37, 99, 235, 0.25);
465
+ border-color: rgba(37, 99, 235, 0.4);
466
+ }
467
+
468
+ :host(.dark) .upvote-action,
469
+ :host(.dark) .upvote-count {
470
+ color: var(--feedlog-muted-foreground);
471
+ }
472
+
473
+ :host(.dark) .upvote-button:hover .upvote-action,
474
+ :host(.dark) .upvote-button:hover .upvote-count {
354
475
  color: var(--feedlog-card-foreground);
355
476
  }
477
+
478
+ :host(.dark) .upvote-button.upvoted .upvote-action,
479
+ :host(.dark) .upvote-button.upvoted .upvote-count {
480
+ color: var(--feedlog-blue-400);
481
+ }
482
+
483
+ :host(.dark) .upvote-button.upvoted:hover .upvote-action,
484
+ :host(.dark) .upvote-button.upvoted:hover .upvote-count {
485
+ color: var(--feedlog-blue-300);
486
+ }
487
+
488
+ :host(.dark) .reel-container {
489
+ border-color: var(--feedlog-border);
490
+ }
491
+
492
+ :host(.dark) .upvote-button:hover .reel-container {
493
+ border-color: var(--feedlog-muted-foreground);
494
+ }
495
+
496
+ :host(.dark) .upvote-button.upvoted .reel-container {
497
+ border-color: rgba(37, 99, 235, 0.3);
498
+ }
499
+
500
+ :host(.dark) .upvote-button.upvoted:hover .reel-container {
501
+ border-color: rgba(37, 99, 235, 0.4);
502
+ }
@@ -27,13 +27,15 @@ export class FeedlogIssueComponent {
27
27
  return (h("svg", { class: "pin-icon", xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { d: "M12 17v5" }), h("path", { d: "M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16h1v2a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1v-2h1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z" })));
28
28
  }
29
29
  /**
30
- * Renders the upvote (thumbs-up) icon SVG
30
+ * Renders the upvote (caret-up / arrow) icon SVG
31
+ * Path centered in 24x24 viewBox for proper vertical alignment
31
32
  */
32
33
  renderUpvoteIcon(filled) {
34
+ const path = 'M12 7l7 10H5l7-10z';
33
35
  if (filled) {
34
- return (h("svg", { class: "upvote-icon filled", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor" }, h("path", { d: "M7 10v12" }), h("path", { d: "M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2h0a3.13 3.13 0 0 1 3 3.88Z" })));
36
+ return (h("svg", { class: "upvote-icon filled", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor" }, h("path", { d: path })));
35
37
  }
36
- return (h("svg", { class: "upvote-icon outline", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { d: "M7 10v12" }), h("path", { d: "M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2h0a3.13 3.13 0 0 1 3 3.88Z" })));
38
+ return (h("svg", { class: "upvote-icon outline", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { d: path })));
37
39
  }
38
40
  /**
39
41
  * Format an ISO date string to a relative time string
@@ -102,7 +104,7 @@ export class FeedlogIssueComponent {
102
104
  const statusBadgeLabel = this.getStatusBadgeLabel();
103
105
  const githubUrl = (_b = issue.githubIssueLink) !== null && _b !== void 0 ? _b : issueUrl;
104
106
  const showGithubButton = githubUrl != null && githubUrl !== '';
105
- return (h(Host, { class: this.theme === 'dark' ? 'dark' : '', "data-upvoted": issue.hasUpvoted ? 'true' : 'false' }, h("div", { class: `issue-card issue-type-${issue.type}` }, h("div", { class: "issue-content" }, h("div", { class: "issue-header" }, h("div", { class: "issue-header-left" }, h("div", { class: "issue-type-badge" }, issue.type === 'bug' ? (h("feedlog-badge", { variant: "destructive" }, "Bug")) : (h("feedlog-badge", { variant: "enhancement" }, "Enhancement"))), statusBadgeLabel && (h("feedlog-badge", { variant: "secondary" }, statusBadgeLabel)), issue.pinnedAt && (h("div", { class: "pinned-indicator", title: "Pinned issue" }, this.renderPinIcon()))), h("span", { class: "issue-timestamp", title: timestampTitle }, timestampLabel, " ", this.formatDate(timestampDate))), h("div", { class: "issue-main" }, h("div", { class: "issue-details" }, h("h3", { class: "issue-title" }, displayTitle), issue.body != null && issue.body !== '' && (h("div", { class: "issue-body", innerHTML: parseMarkdown(issue.body) })), h("div", { class: "issue-repository" }, repoName != null && (h("span", { class: "repo-name", title: repoTooltip }, repoName)), showGithubButton && (h("a", { part: "github-link", class: "github-link", href: githubUrl, target: "_blank", rel: "noopener noreferrer", title: "View on GitHub" }, this.renderExternalLinkIcon(), h("span", { class: "github-link-text" }, "View on GitHub"))))), issue.type !== 'bug' && (h("button", { part: "upvote-button", class: `upvote-button ${issue.hasUpvoted ? 'upvoted' : ''}`, onClick: (e) => this.handleUpvote(e), title: issue.hasUpvoted ? 'Remove upvote' : 'Upvote this issue' }, h("slot", { name: "upvote-icon" }, this.renderUpvoteIcon(issue.hasUpvoted)), h("span", { class: "upvote-count" }, issue.upvoteCount))))))));
107
+ return (h(Host, { class: this.theme === 'dark' ? 'dark' : '', "data-upvoted": issue.hasUpvoted ? 'true' : 'false' }, h("div", { class: `issue-card issue-type-${issue.type}` }, h("div", { class: "issue-content" }, h("div", { class: "issue-header" }, h("div", { class: "issue-header-left" }, h("div", { class: "issue-type-badge" }, issue.type === 'bug' ? (h("feedlog-badge", { variant: "destructive" }, "Bug")) : (h("feedlog-badge", { variant: "enhancement" }, "Enhancement"))), statusBadgeLabel && (h("feedlog-badge", { variant: "secondary" }, statusBadgeLabel)), issue.pinnedAt && (h("div", { class: "pinned-indicator", title: "Pinned issue" }, this.renderPinIcon()))), h("span", { class: "issue-timestamp", title: timestampTitle }, timestampLabel, " ", this.formatDate(timestampDate))), h("div", { class: "issue-main" }, h("h3", { class: "issue-title" }, displayTitle), issue.body != null && issue.body !== '' && (h("div", { class: "issue-body", innerHTML: parseMarkdown(issue.body) })), h("div", { class: "issue-repository" }, repoName != null && (h("span", { class: "repo-name", title: repoTooltip }, repoName)), showGithubButton && (h("a", { part: "github-link", class: "github-link", href: githubUrl, target: "_blank", rel: "noopener noreferrer", title: "View on GitHub" }, this.renderExternalLinkIcon(), h("span", { class: "github-link-text" }, "View on GitHub")))), issue.type !== 'bug' && (h("div", { class: "issue-footer" }, h("button", { part: "upvote-button", class: `upvote-button ${issue.hasUpvoted ? 'upvoted' : ''}`, onClick: (e) => this.handleUpvote(e), title: issue.hasUpvoted ? 'Remove upvote' : 'Upvote this issue' }, h("div", { class: "upvote-action" }, h("slot", { name: "upvote-icon" }, this.renderUpvoteIcon(issue.hasUpvoted)), h("span", { class: "upvote-label" }, "Upvote")), h("div", { class: "reel-container" }, h("span", { class: "upvote-count reel-number", key: issue.upvoteCount }, issue.upvoteCount))))))))));
106
108
  }
107
109
  static get is() { return "feedlog-issue"; }
108
110
  static get encapsulation() { return "shadow"; }
@@ -34,6 +34,7 @@
34
34
  align-items: center;
35
35
  text-align: center;
36
36
  max-width: 20rem;
37
+ margin-inline: auto;
37
38
  }
38
39
 
39
40
  .empty-state-illustration {
@@ -1 +1 @@
1
- import{F as o,d as s}from"./p-BBPFf6g7.js";const p=o,r=s;export{p as FeedlogIssue,r as defineCustomElement}
1
+ import{F as o,d as s}from"./p-BuX7UXwe.js";const p=o,r=s;export{p as FeedlogIssue,r as defineCustomElement}
@@ -1 +1 @@
1
- import{t,p as e,H as s,c as i,h as o}from"./index.js";import{d as r}from"./p-Chc3XZ5Y.js";import{d as n}from"./p-DMdb-G26.js";import{d as h}from"./p-BBPFf6g7.js";import{d as a}from"./p-DeVUfQ0-.js";import{d as u}from"./p-CLFvFGWa.js";function l(t){if("string"!=typeof t)return"";let e=t.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"");return e=e.replace(/\s*on\w+\s*=\s*["'][^"']*["']/gi,""),e=e.replace(/\s*on\w+\s*=\s*[^\s>]*/gi,""),e=e.replace(/<iframe\b[^<]*(?:(?!<\/iframe>)<[^<]*)*<\/iframe>/gi,""),e=e.replace(/<style\b[^<]*(?:(?!<\/style>)<[^<]*)*<\/style>/gi,""),e=e.replace(/<(embed|object)\b[^<]*>/gi,""),e=e.replace(/javascript:/gi,""),e=e.replace(/data:(?!image\/(?:png|jpg|jpeg|gif|webp);)/gi,""),e}class d extends Error{constructor(t,e,s){super(t),this.statusCode=e,this.originalError=s,this.name="FeedlogError",Object.setPrototypeOf(this,d.prototype)}}class c extends d{constructor(t){super(t),this.name="FeedlogValidationError",Object.setPrototypeOf(this,c.prototype)}}class p extends d{constructor(t,e,s){super(t,e,s),this.name="FeedlogNetworkError",Object.setPrototypeOf(this,p.prototype)}}class f extends d{constructor(t="Request timed out"){super(t),this.name="FeedlogTimeoutError",Object.setPrototypeOf(this,f.prototype)}}class g{constructor(t){if(this.config={credentials:"include",...t},this.apiKey=this.config.apiKey,!this.apiKey)throw new c("apiKey is required in FeedlogSDKConfig");this.endpoint=this.config.endpoint||"https://api.feedlog.app",this.timeout=this.config.timeout||3e4,this.endpoint=this.endpoint.replace(/\/$/,"")}async fetchIssues(t={}){try{const e=this.buildIssuesUrl(t),s=await this.fetchWithTimeout(e,{method:"GET",headers:this.getAuthHeaders(),credentials:this.config.credentials||"include"});if(!s.ok)throw new p("Failed to fetch issues: "+s.statusText,s.status);const i=await s.json();return this.validateIssuesResponse(i)}catch(t){if(t instanceof d)throw t;if(t instanceof TypeError&&t.message.includes("fetch"))throw new p("Network error: Unable to reach API",void 0,t);throw new d("Failed to fetch issues: "+(t instanceof Error?t.message:"Unknown error"),void 0,t)}}async toggleUpvote(t){if(!t||"string"!=typeof t)throw new c("Issue ID is required");try{const e=`${this.endpoint}/api/issues/${encodeURIComponent(t)}/upvote`,s=await this.fetchWithTimeout(e,{method:"POST",headers:this.getAuthHeaders(),credentials:this.config.credentials||"include",body:JSON.stringify({})});if(404===s.status)throw new p("Issue not found",404);if(401===s.status)throw new p("Unauthorized",401);if(403===s.status)throw new p("Forbidden: Domain not allowed for this repository",403);if(!s.ok)throw new p("Failed to toggle upvote: "+s.statusText,s.status);const i=await s.json();return this.validateUpvoteResponse(i)}catch(t){if(t instanceof d)throw t;if(t instanceof TypeError&&t.message.includes("fetch"))throw new p("Network error: Unable to reach API",void 0,t);throw new d("Failed to toggle upvote: "+(t instanceof Error?t.message:"Unknown error"),void 0,t)}}buildIssuesUrl(t){const e=new URL(this.endpoint+"/api/issues");if(t.repositoryIds){const s=Array.isArray(t.repositoryIds)?t.repositoryIds:[t.repositoryIds];for(const t of s)e.searchParams.append("repositoryIds",t)}return t.type&&e.searchParams.set("type",t.type),t.sortBy&&e.searchParams.set("sortBy",t.sortBy),t.cursor&&e.searchParams.set("cursor",t.cursor),void 0!==t.limit&&e.searchParams.set("limit",""+t.limit),""+e}getAuthHeaders(){const t={"Content-Type":"application/json"};return this.apiKey&&(t["x-api-key"]=this.apiKey),t}async fetchWithTimeout(t,e){const s=new AbortController,i=setTimeout((()=>s.abort()),this.timeout);try{const o=await fetch(t,{...e,signal:s.signal});return clearTimeout(i),o}catch(t){if(clearTimeout(i),t instanceof Error&&"AbortError"===t.name)throw new f(`Request timed out after ${this.timeout}ms`);throw t}}validateIssuesResponse(t){if(!t||"object"!=typeof t)throw new c("Invalid API response: expected object");const e=t;if(!Array.isArray(e.issues))throw new c("Invalid API response: issues must be an array");if(!e.pagination||"object"!=typeof e.pagination)throw new c("Invalid API response: pagination is required");return{issues:e.issues.map((t=>this.validateIssue(t))),pagination:{cursor:e.pagination.cursor,hasMore:!!e.pagination.hasMore}}}validateIssue(t){if(!t||"object"!=typeof t)throw new c("Invalid issue: expected object");const e=t;if("string"!=typeof e.id)throw new c("Invalid issue: id is required and must be a string");if(!["bug","enhancement"].includes(e.type+""))throw new c('Invalid issue: type must be "bug" or "enhancement"');if(!["open","in_progress","closed"].includes(e.status+""))throw new c('Invalid issue: status must be "open", "in_progress", or "closed"');if(!e.repository||"object"!=typeof e.repository)throw new c("Invalid issue: repository is required");const s=e.repository;if("string"!=typeof s.id)throw new c("Invalid issue: repository must have id");const i=null!==e.githubIssueLink&&"string"==typeof e.githubIssueLink?e.githubIssueLink+"":null,o=e.title,r=null!=o&&""!==o?l(o+""):null,n=e.body,h=null!=n&&""!==n?l(n+""):null,a=s.name,u=null!=a&&""!==a?a+"":null,d=s.description,p=null!=d&&""!==d?l(d+""):null;return{id:e.id+"",githubIssueLink:i,type:e.type||"bug",status:e.status||"open",pinnedAt:e.pinnedAt?e.pinnedAt+"":null,revision:Number(e.revision)||1,title:r,body:h,repository:{id:s.id+"",name:u,description:p},updatedAt:e.updatedAt+""||(new Date).toISOString(),createdAt:e.createdAt+""||(new Date).toISOString(),upvoteCount:Number(e.upvoteCount)||0,hasUpvoted:!!e.hasUpvoted}}validateUpvoteResponse(t){if(!t||"object"!=typeof t)throw new c("Invalid upvote response: expected object");const e=t;if("boolean"!=typeof e.upvoted)throw new c("Invalid upvote response: upvoted must be a boolean");if("number"!=typeof e.upvoteCount)throw new c("Invalid upvote response: upvoteCount must be a number");if("string"!=typeof e.anonymousUserId)throw new c("Invalid upvote response: anonymousUserId must be a string");return{upvoted:e.upvoted,upvoteCount:e.upvoteCount,anonymousUserId:e.anonymousUserId}}getEndpoint(){return this.endpoint}getTimeout(){return this.timeout}}const m=e(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.feedlogUpvote=i(this,"feedlogUpvote"),this.feedlogError=i(this,"feedlogError"),this.maxWidth="42rem",this.theme="light",this.issues=[],this.loading=!0,this.error=null,this.cursor=null,this.hasMore=!1,this.isLoadingMore=!1,this.sdk=null,this.fetchRequestId=0,this.isDisconnected=!1,this.upvoteRequestIds=new Map,this.handleUpvote=async t=>{if(!this.sdk||this.isDisconnected)return;const{issueId:e,currentUpvoted:s,currentCount:i}=t.detail,o=(this.upvoteRequestIds.get(e)||0)+1;this.upvoteRequestIds.set(e,o),this.issues=this.issues.map((t=>t.id===e?Object.assign(Object.assign({},t),{hasUpvoted:!s,upvoteCount:s?i-1:i+1}):t));try{const t=await this.sdk.toggleUpvote(e);if(this.isDisconnected||this.upvoteRequestIds.get(e)!==o)return;this.issues=this.issues.map((s=>s.id===e?Object.assign(Object.assign({},s),{hasUpvoted:t.upvoted,upvoteCount:t.upvoteCount}):s)),this.feedlogUpvote.emit({issueId:e,upvoted:t.upvoted,upvoteCount:t.upvoteCount})}catch(t){if(this.isDisconnected||this.upvoteRequestIds.get(e)!==o)return;this.issues=this.issues.map((t=>t.id===e?Object.assign(Object.assign({},t),{hasUpvoted:s,upvoteCount:i}):t)),this.feedlogError.emit({error:t instanceof Error?t.message:"Failed to toggle upvote"})}}}componentWillLoad(){this.previousType=this.type,this.previousLimit=this.limit,this.previousSortBy=this.sortBy,this.initializeSDK(),this.fetchIssues()}disconnectedCallback(){this.isDisconnected=!0,this.fetchRequestId++}componentDidUpdate(){(this.previousType!==this.type||this.previousLimit!==this.limit||this.previousSortBy!==this.sortBy)&&(this.fetchRequestId++,this.cursor=null,this.hasMore=!1,this.issues=[],this.fetchIssues(),this.previousType=this.type,this.previousLimit=this.limit,this.previousSortBy=this.sortBy)}initializeSDK(){try{if(!this.apiKey)throw Error("API key is required for the Feedlog SDK");this.sdk=new g(Object.assign({apiKey:this.apiKey},this.endpoint&&{endpoint:this.endpoint})),this.error=null}catch(t){const e=t instanceof Error?t.message:"Failed to initialize SDK";this.error=e,this.feedlogError.emit({error:e})}}async fetchIssues(){if(!this.sdk)return;const t=this.fetchRequestId;try{this.loading=!0,this.error=null;const e={};this.type&&(e.type=this.type),this.sortBy&&(e.sortBy=this.sortBy),this.limit&&(e.limit=this.limit),this.cursor&&(e.cursor=this.cursor);const s=await this.sdk.fetchIssues(e);if(this.isDisconnected||t!==this.fetchRequestId)return;this.issues=s.issues,this.cursor=s.pagination.cursor,this.hasMore=s.pagination.hasMore}catch(e){if(this.isDisconnected||t!==this.fetchRequestId)return;const s=e instanceof Error?e.message:"Couldn't load updates";this.error=s,this.issues=[],this.feedlogError.emit({error:s,code:null==e?void 0:e.statusCode})}finally{this.isDisconnected||t!==this.fetchRequestId||(this.loading=!1,this.isLoadingMore=!1)}}async loadMore(){if(!this.sdk||!this.hasMore||this.isLoadingMore||this.loading)return;const t=this.fetchRequestId;this.isLoadingMore=!0;try{const e={};this.type&&(e.type=this.type),this.sortBy&&(e.sortBy=this.sortBy),this.limit&&(e.limit=this.limit),this.cursor&&(e.cursor=this.cursor);const s=await this.sdk.fetchIssues(e);if(this.isDisconnected||t!==this.fetchRequestId)return;this.issues=[...this.issues,...s.issues],this.cursor=s.pagination.cursor,this.hasMore=s.pagination.hasMore}catch(e){if(this.isDisconnected||t!==this.fetchRequestId)return;this.feedlogError.emit({error:e instanceof Error?e.message:"Failed to load more issues",code:null==e?void 0:e.statusCode})}finally{this.isDisconnected||t!==this.fetchRequestId||(this.isLoadingMore=!1)}}render(){var t,e;const s=null===(e=null===(t=this.el)||void 0===t?void 0:t.style)||void 0===e?void 0:e.getPropertyValue("--feedlog-background");return o("feedlog-issues",{key:"15ae96d7d7b51964026f873f8b97e10530ed02b4",style:s?{"--feedlog-background":s}:void 0,issues:this.issues,limit:this.limit,maxWidth:this.maxWidth,theme:this.theme,heading:this.heading,subtitle:this.subtitle,emptyStateTitle:this.emptyStateTitle,emptyStateMessage:this.emptyStateMessage,getIssueUrl:this.getIssueUrl,loading:this.loading,error:this.error,hasMore:this.hasMore,isLoadingMore:this.isLoadingMore,onFeedlogUpvote:this.handleUpvote,onFeedlogLoadMore:async()=>this.loadMore()})}get el(){return this}},[1,"feedlog-issues-client",{apiKey:[1,"api-key"],type:[1],limit:[2],sortBy:[1,"sort-by"],endpoint:[1],maxWidth:[1,"max-width"],theme:[1],heading:[1],subtitle:[1],emptyStateTitle:[1,"empty-state-title"],emptyStateMessage:[1,"empty-state-message"],getIssueUrl:[16],issues:[32],loading:[32],error:[32],cursor:[32],hasMore:[32],isLoadingMore:[32]}]);function w(){"undefined"!=typeof customElements&&["feedlog-issues-client","feedlog-badge","feedlog-button","feedlog-issue","feedlog-issues","feedlog-issues-list"].forEach((e=>{switch(e){case"feedlog-issues-client":customElements.get(t(e))||customElements.define(t(e),m);break;case"feedlog-badge":customElements.get(t(e))||r();break;case"feedlog-button":customElements.get(t(e))||n();break;case"feedlog-issue":customElements.get(t(e))||h();break;case"feedlog-issues":customElements.get(t(e))||a();break;case"feedlog-issues-list":customElements.get(t(e))||u()}}))}w();const b=m,y=w;export{b as FeedlogIssuesClient,y as defineCustomElement}
1
+ import{t,p as e,H as s,c as i,h as o}from"./index.js";import{d as r}from"./p-Chc3XZ5Y.js";import{d as n}from"./p-DMdb-G26.js";import{d as h}from"./p-BuX7UXwe.js";import{d as a}from"./p-GzOCQT_k.js";import{d as u}from"./p-DMKFbFjj.js";function l(t){if("string"!=typeof t)return"";let e=t.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"");return e=e.replace(/\s*on\w+\s*=\s*["'][^"']*["']/gi,""),e=e.replace(/\s*on\w+\s*=\s*[^\s>]*/gi,""),e=e.replace(/<iframe\b[^<]*(?:(?!<\/iframe>)<[^<]*)*<\/iframe>/gi,""),e=e.replace(/<style\b[^<]*(?:(?!<\/style>)<[^<]*)*<\/style>/gi,""),e=e.replace(/<(embed|object)\b[^<]*>/gi,""),e=e.replace(/javascript:/gi,""),e=e.replace(/data:(?!image\/(?:png|jpg|jpeg|gif|webp);)/gi,""),e}class d extends Error{constructor(t,e,s){super(t),this.statusCode=e,this.originalError=s,this.name="FeedlogError",Object.setPrototypeOf(this,d.prototype)}}class c extends d{constructor(t){super(t),this.name="FeedlogValidationError",Object.setPrototypeOf(this,c.prototype)}}class p extends d{constructor(t,e,s){super(t,e,s),this.name="FeedlogNetworkError",Object.setPrototypeOf(this,p.prototype)}}class f extends d{constructor(t="Request timed out"){super(t),this.name="FeedlogTimeoutError",Object.setPrototypeOf(this,f.prototype)}}class g{constructor(t){if(this.config={credentials:"include",...t},this.apiKey=this.config.apiKey,!this.apiKey)throw new c("apiKey is required in FeedlogSDKConfig");this.endpoint=this.config.endpoint||"https://api.feedlog.app",this.timeout=this.config.timeout||3e4,this.endpoint=this.endpoint.replace(/\/$/,"")}async fetchIssues(t={}){try{const e=this.buildIssuesUrl(t),s=await this.fetchWithTimeout(e,{method:"GET",headers:this.getAuthHeaders(),credentials:this.config.credentials||"include"});if(!s.ok)throw new p("Failed to fetch issues: "+s.statusText,s.status);const i=await s.json();return this.validateIssuesResponse(i)}catch(t){if(t instanceof d)throw t;if(t instanceof TypeError&&t.message.includes("fetch"))throw new p("Network error: Unable to reach API",void 0,t);throw new d("Failed to fetch issues: "+(t instanceof Error?t.message:"Unknown error"),void 0,t)}}async toggleUpvote(t){if(!t||"string"!=typeof t)throw new c("Issue ID is required");try{const e=`${this.endpoint}/api/issues/${encodeURIComponent(t)}/upvote`,s=await this.fetchWithTimeout(e,{method:"POST",headers:this.getAuthHeaders(),credentials:this.config.credentials||"include",body:JSON.stringify({})});if(404===s.status)throw new p("Issue not found",404);if(401===s.status)throw new p("Unauthorized",401);if(403===s.status)throw new p("Forbidden: Domain not allowed for this repository",403);if(!s.ok)throw new p("Failed to toggle upvote: "+s.statusText,s.status);const i=await s.json();return this.validateUpvoteResponse(i)}catch(t){if(t instanceof d)throw t;if(t instanceof TypeError&&t.message.includes("fetch"))throw new p("Network error: Unable to reach API",void 0,t);throw new d("Failed to toggle upvote: "+(t instanceof Error?t.message:"Unknown error"),void 0,t)}}buildIssuesUrl(t){const e=new URL(this.endpoint+"/api/issues");if(t.repositoryIds){const s=Array.isArray(t.repositoryIds)?t.repositoryIds:[t.repositoryIds];for(const t of s)e.searchParams.append("repositoryIds",t)}return t.type&&e.searchParams.set("type",t.type),t.sortBy&&e.searchParams.set("sortBy",t.sortBy),t.cursor&&e.searchParams.set("cursor",t.cursor),void 0!==t.limit&&e.searchParams.set("limit",""+t.limit),""+e}getAuthHeaders(){const t={"Content-Type":"application/json"};return this.apiKey&&(t["x-api-key"]=this.apiKey),t}async fetchWithTimeout(t,e){const s=new AbortController,i=setTimeout((()=>s.abort()),this.timeout);try{const o=await fetch(t,{...e,signal:s.signal});return clearTimeout(i),o}catch(t){if(clearTimeout(i),t instanceof Error&&"AbortError"===t.name)throw new f(`Request timed out after ${this.timeout}ms`);throw t}}validateIssuesResponse(t){if(!t||"object"!=typeof t)throw new c("Invalid API response: expected object");const e=t;if(!Array.isArray(e.issues))throw new c("Invalid API response: issues must be an array");if(!e.pagination||"object"!=typeof e.pagination)throw new c("Invalid API response: pagination is required");return{issues:e.issues.map((t=>this.validateIssue(t))),pagination:{cursor:e.pagination.cursor,hasMore:!!e.pagination.hasMore}}}validateIssue(t){if(!t||"object"!=typeof t)throw new c("Invalid issue: expected object");const e=t;if("string"!=typeof e.id)throw new c("Invalid issue: id is required and must be a string");if(!["bug","enhancement"].includes(e.type+""))throw new c('Invalid issue: type must be "bug" or "enhancement"');if(!["open","in_progress","closed"].includes(e.status+""))throw new c('Invalid issue: status must be "open", "in_progress", or "closed"');if(!e.repository||"object"!=typeof e.repository)throw new c("Invalid issue: repository is required");const s=e.repository;if("string"!=typeof s.id)throw new c("Invalid issue: repository must have id");const i=null!==e.githubIssueLink&&"string"==typeof e.githubIssueLink?e.githubIssueLink+"":null,o=e.title,r=null!=o&&""!==o?l(o+""):null,n=e.body,h=null!=n&&""!==n?l(n+""):null,a=s.name,u=null!=a&&""!==a?a+"":null,d=s.description,p=null!=d&&""!==d?l(d+""):null;return{id:e.id+"",githubIssueLink:i,type:e.type||"bug",status:e.status||"open",pinnedAt:e.pinnedAt?e.pinnedAt+"":null,revision:Number(e.revision)||1,title:r,body:h,repository:{id:s.id+"",name:u,description:p},updatedAt:e.updatedAt+""||(new Date).toISOString(),createdAt:e.createdAt+""||(new Date).toISOString(),upvoteCount:Number(e.upvoteCount)||0,hasUpvoted:!!e.hasUpvoted}}validateUpvoteResponse(t){if(!t||"object"!=typeof t)throw new c("Invalid upvote response: expected object");const e=t;if("boolean"!=typeof e.upvoted)throw new c("Invalid upvote response: upvoted must be a boolean");if("number"!=typeof e.upvoteCount)throw new c("Invalid upvote response: upvoteCount must be a number");if("string"!=typeof e.anonymousUserId)throw new c("Invalid upvote response: anonymousUserId must be a string");return{upvoted:e.upvoted,upvoteCount:e.upvoteCount,anonymousUserId:e.anonymousUserId}}getEndpoint(){return this.endpoint}getTimeout(){return this.timeout}}const m=e(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.feedlogUpvote=i(this,"feedlogUpvote"),this.feedlogError=i(this,"feedlogError"),this.maxWidth="42rem",this.theme="light",this.issues=[],this.loading=!0,this.error=null,this.cursor=null,this.hasMore=!1,this.isLoadingMore=!1,this.sdk=null,this.fetchRequestId=0,this.isDisconnected=!1,this.upvoteRequestIds=new Map,this.handleUpvote=async t=>{if(!this.sdk||this.isDisconnected)return;const{issueId:e,currentUpvoted:s,currentCount:i}=t.detail,o=(this.upvoteRequestIds.get(e)||0)+1;this.upvoteRequestIds.set(e,o),this.issues=this.issues.map((t=>t.id===e?Object.assign(Object.assign({},t),{hasUpvoted:!s,upvoteCount:s?i-1:i+1}):t));try{const t=await this.sdk.toggleUpvote(e);if(this.isDisconnected||this.upvoteRequestIds.get(e)!==o)return;this.issues=this.issues.map((s=>s.id===e?Object.assign(Object.assign({},s),{hasUpvoted:t.upvoted,upvoteCount:t.upvoteCount}):s)),this.feedlogUpvote.emit({issueId:e,upvoted:t.upvoted,upvoteCount:t.upvoteCount})}catch(t){if(this.isDisconnected||this.upvoteRequestIds.get(e)!==o)return;this.issues=this.issues.map((t=>t.id===e?Object.assign(Object.assign({},t),{hasUpvoted:s,upvoteCount:i}):t)),this.feedlogError.emit({error:t instanceof Error?t.message:"Failed to toggle upvote"})}}}componentWillLoad(){this.previousType=this.type,this.previousLimit=this.limit,this.previousSortBy=this.sortBy,this.initializeSDK(),this.fetchIssues()}disconnectedCallback(){this.isDisconnected=!0,this.fetchRequestId++}componentDidUpdate(){(this.previousType!==this.type||this.previousLimit!==this.limit||this.previousSortBy!==this.sortBy)&&(this.fetchRequestId++,this.cursor=null,this.hasMore=!1,this.issues=[],this.fetchIssues(),this.previousType=this.type,this.previousLimit=this.limit,this.previousSortBy=this.sortBy)}initializeSDK(){try{if(!this.apiKey)throw Error("API key is required for the Feedlog SDK");this.sdk=new g(Object.assign({apiKey:this.apiKey},this.endpoint&&{endpoint:this.endpoint})),this.error=null}catch(t){const e=t instanceof Error?t.message:"Failed to initialize SDK";this.error=e,this.feedlogError.emit({error:e})}}async fetchIssues(){if(!this.sdk)return;const t=this.fetchRequestId;try{this.loading=!0,this.error=null;const e={};this.type&&(e.type=this.type),this.sortBy&&(e.sortBy=this.sortBy),this.limit&&(e.limit=this.limit),this.cursor&&(e.cursor=this.cursor);const s=await this.sdk.fetchIssues(e);if(this.isDisconnected||t!==this.fetchRequestId)return;this.issues=s.issues,this.cursor=s.pagination.cursor,this.hasMore=s.pagination.hasMore}catch(e){if(this.isDisconnected||t!==this.fetchRequestId)return;const s=e instanceof Error?e.message:"Couldn't load updates";this.error=s,this.issues=[],this.feedlogError.emit({error:s,code:null==e?void 0:e.statusCode})}finally{this.isDisconnected||t!==this.fetchRequestId||(this.loading=!1,this.isLoadingMore=!1)}}async loadMore(){if(!this.sdk||!this.hasMore||this.isLoadingMore||this.loading)return;const t=this.fetchRequestId;this.isLoadingMore=!0;try{const e={};this.type&&(e.type=this.type),this.sortBy&&(e.sortBy=this.sortBy),this.limit&&(e.limit=this.limit),this.cursor&&(e.cursor=this.cursor);const s=await this.sdk.fetchIssues(e);if(this.isDisconnected||t!==this.fetchRequestId)return;this.issues=[...this.issues,...s.issues],this.cursor=s.pagination.cursor,this.hasMore=s.pagination.hasMore}catch(e){if(this.isDisconnected||t!==this.fetchRequestId)return;this.feedlogError.emit({error:e instanceof Error?e.message:"Failed to load more issues",code:null==e?void 0:e.statusCode})}finally{this.isDisconnected||t!==this.fetchRequestId||(this.isLoadingMore=!1)}}render(){var t,e;const s=null===(e=null===(t=this.el)||void 0===t?void 0:t.style)||void 0===e?void 0:e.getPropertyValue("--feedlog-background");return o("feedlog-issues",{key:"15ae96d7d7b51964026f873f8b97e10530ed02b4",style:s?{"--feedlog-background":s}:void 0,issues:this.issues,limit:this.limit,maxWidth:this.maxWidth,theme:this.theme,heading:this.heading,subtitle:this.subtitle,emptyStateTitle:this.emptyStateTitle,emptyStateMessage:this.emptyStateMessage,getIssueUrl:this.getIssueUrl,loading:this.loading,error:this.error,hasMore:this.hasMore,isLoadingMore:this.isLoadingMore,onFeedlogUpvote:this.handleUpvote,onFeedlogLoadMore:async()=>this.loadMore()})}get el(){return this}},[1,"feedlog-issues-client",{apiKey:[1,"api-key"],type:[1],limit:[2],sortBy:[1,"sort-by"],endpoint:[1],maxWidth:[1,"max-width"],theme:[1],heading:[1],subtitle:[1],emptyStateTitle:[1,"empty-state-title"],emptyStateMessage:[1,"empty-state-message"],getIssueUrl:[16],issues:[32],loading:[32],error:[32],cursor:[32],hasMore:[32],isLoadingMore:[32]}]);function w(){"undefined"!=typeof customElements&&["feedlog-issues-client","feedlog-badge","feedlog-button","feedlog-issue","feedlog-issues","feedlog-issues-list"].forEach((e=>{switch(e){case"feedlog-issues-client":customElements.get(t(e))||customElements.define(t(e),m);break;case"feedlog-badge":customElements.get(t(e))||r();break;case"feedlog-button":customElements.get(t(e))||n();break;case"feedlog-issue":customElements.get(t(e))||h();break;case"feedlog-issues":customElements.get(t(e))||a();break;case"feedlog-issues-list":customElements.get(t(e))||u()}}))}w();const b=m,y=w;export{b as FeedlogIssuesClient,y as defineCustomElement}
@@ -1 +1 @@
1
- import{F as o,d as s}from"./p-CLFvFGWa.js";const a=o,p=s;export{a as FeedlogIssuesList,p as defineCustomElement}
1
+ import{F as o,d as s}from"./p-DMKFbFjj.js";const j=o,p=s;export{j as FeedlogIssuesList,p as defineCustomElement}
@@ -1 +1 @@
1
- import{F as o,d as s}from"./p-DeVUfQ0-.js";const p=o,r=s;export{p as FeedlogIssues,r as defineCustomElement}
1
+ import{F as o,d as s}from"./p-GzOCQT_k.js";const p=o,r=s;export{p as FeedlogIssues,r as defineCustomElement}