@feedlog-ai/webcomponents 0.0.21 → 0.0.22

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.
Files changed (30) hide show
  1. package/dist/cjs/feedlog-github-issues-client.cjs.entry.js +2 -2
  2. package/dist/cjs/feedlog-github-issues.cjs.entry.js +10 -3
  3. package/dist/cjs/feedlog-issues-list.cjs.entry.js +1 -1
  4. package/dist/cjs/feedlog-toolkit.cjs.js +1 -1
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/collection/components/feedlog-github-issues/feedlog-github-issues.css +197 -8
  7. package/dist/collection/components/feedlog-github-issues/feedlog-github-issues.js +47 -2
  8. package/dist/collection/components/feedlog-github-issues/feedlog-github-issues.stories.js +15 -1
  9. package/dist/collection/components/feedlog-github-issues-client/feedlog-github-issues-client.js +40 -2
  10. package/dist/collection/components/feedlog-issues-list/feedlog-issues-list.js +1 -1
  11. package/dist/components/feedlog-github-issues-client.js +1 -1
  12. package/dist/components/feedlog-github-issues.js +1 -1
  13. package/dist/components/feedlog-issues-list.js +1 -1
  14. package/dist/components/p-cag4iyHV.js +1 -0
  15. package/dist/esm/feedlog-github-issues-client.entry.js +2 -2
  16. package/dist/esm/feedlog-github-issues.entry.js +10 -3
  17. package/dist/esm/feedlog-issues-list.entry.js +1 -1
  18. package/dist/esm/feedlog-toolkit.js +1 -1
  19. package/dist/esm/loader.js +1 -1
  20. package/dist/feedlog-toolkit/feedlog-toolkit.esm.js +1 -1
  21. package/dist/feedlog-toolkit/p-13773ed6.entry.js +1 -0
  22. package/dist/feedlog-toolkit/{p-70bf31c4.entry.js → p-9b515728.entry.js} +1 -1
  23. package/dist/feedlog-toolkit/p-e5ba7dd7.entry.js +1 -0
  24. package/dist/types/components/feedlog-github-issues/feedlog-github-issues.d.ts +10 -0
  25. package/dist/types/components/feedlog-github-issues-client/feedlog-github-issues-client.d.ts +8 -0
  26. package/dist/types/components.d.ts +32 -0
  27. package/package.json +2 -2
  28. package/dist/components/p-CyaPkQyN.js +0 -1
  29. package/dist/feedlog-toolkit/p-3154bc80.entry.js +0 -1
  30. package/dist/feedlog-toolkit/p-5688651c.entry.js +0 -1
@@ -488,7 +488,7 @@ const FeedlogGithubIssuesClient = class {
488
488
  if (this.isDisconnected || currentRequestId !== this.fetchRequestId) {
489
489
  return;
490
490
  }
491
- const errorMsg = err instanceof Error ? err.message : 'Failed to fetch issues';
491
+ const errorMsg = err instanceof Error ? err.message : "Couldn't load updates";
492
492
  this.error = errorMsg;
493
493
  this.issues = [];
494
494
  this.feedlogError.emit({
@@ -553,7 +553,7 @@ const FeedlogGithubIssuesClient = class {
553
553
  }
554
554
  }
555
555
  render() {
556
- return (index.h("feedlog-github-issues", { key: '5d5bbd34f21c89b18ecb78f2411cfb825ff78d12', issues: this.issues, maxWidth: this.maxWidth, theme: this.theme, heading: this.heading, subtitle: this.subtitle, getIssueUrl: this.getIssueUrl, loading: this.loading, error: this.error, hasMore: this.hasMore, isLoadingMore: this.isLoadingMore, onFeedlogUpvote: this.handleUpvote, onFeedlogLoadMore: async () => this.loadMore() }));
556
+ return (index.h("feedlog-github-issues", { key: '4bc46e4f2622d4c2c5080835ae436ae9fc37c991', issues: this.issues, 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() }));
557
557
  }
558
558
  };
559
559
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  var index = require('./index-DnsqTPII.js');
4
4
 
5
- const feedlogGithubIssuesCss = () => `:host{display:block;font-family:ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;--feedlog-background:#ffffff;--feedlog-foreground:oklch(0.145 0 0);--feedlog-card:#ffffff;--feedlog-card-foreground:oklch(0.145 0 0);--feedlog-muted:#ececf0;--feedlog-muted-foreground:#717182;--feedlog-border:rgba(0, 0, 0, 0.1);--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-padding:2rem}: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)}.github-issues-container{min-height:100vh;background-color:var(--feedlog-background);padding:var(--feedlog-padding);margin:0 auto}.issues-header{margin-bottom:1.5rem;display:flex;align-items:flex-start;justify-content:space-between}.header-content{flex:1}.issues-title{color:var(--feedlog-foreground);margin:0 0 0.25rem 0;font-size:1.5rem;font-weight:500;line-height:1.5}.issues-subtitle{color:var(--feedlog-muted-foreground);font-size:0.875rem;margin:0}.loading-state,.error-state{padding:2rem;text-align:center;color:var(--feedlog-muted-foreground)}.error-state{color:var(--feedlog-destructive)}.issues-list{display:flex;flex-direction:column;gap:var(--feedlog-gap)}.empty-state{text-align:center;padding:3rem 1.5rem;color:var(--feedlog-muted-foreground);font-size:0.875rem}.load-more-container{display:flex;justify-content:center;padding:2rem 0;gap:1rem}`;
5
+ const feedlogGithubIssuesCss = () => `:host{display:block;font-family:ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;--feedlog-background:#ffffff;--feedlog-foreground:oklch(0.145 0 0);--feedlog-card:#ffffff;--feedlog-card-foreground:oklch(0.145 0 0);--feedlog-muted:#ececf0;--feedlog-muted-foreground:#717182;--feedlog-border:rgba(0, 0, 0, 0.1);--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-padding:2rem;--feedlog-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.08);--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-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-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.3);--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.02 260)}.github-issues-container{min-height:100vh;background-color:var(--feedlog-background);padding:var(--feedlog-padding);margin:0 auto}.issues-header{margin-bottom:1.5rem;display:flex;align-items:flex-start;justify-content:space-between}.header-content{flex:1}.issues-title{color:var(--feedlog-foreground);margin:0 0 0.25rem 0;font-size:1.5rem;font-weight:500;line-height:1.5}.issues-subtitle{color:var(--feedlog-muted-foreground);font-size:0.875rem;margin:0}.loading-state{padding:0}.loading-skeletons{display:flex;flex-direction:column;gap:var(--feedlog-gap)}.skeleton-card{background-color:var(--feedlog-card);border:1px solid var(--feedlog-border);border-radius:var(--feedlog-radius);box-shadow:var(--feedlog-shadow);position:relative;overflow:hidden}.skeleton-card::before{content:'';position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--feedlog-muted)}.skeleton-content{padding:1.25rem;padding-left:calc(1.25rem + 3px);display:flex;flex-direction:column;gap:0.875rem}.skeleton-header{display:flex;align-items:center;justify-content:space-between;gap:0.75rem}.skeleton-badge{width:4.5rem;height:1.25rem;border-radius:0.375rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite}.skeleton-timestamp{width:3rem;height:0.75rem;border-radius:0.25rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite 0.2s}.skeleton-main{display:flex;flex-direction:column;gap:0.5rem}.skeleton-title{height:0.9375rem;border-radius:0.25rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite 0.1s;width:85%}.skeleton-body{display:flex;flex-direction:column;gap:0.375rem}.skeleton-line{height:0.8125rem;border-radius:0.25rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite 0.15s;width:100%}.skeleton-line.short{width:70%}.skeleton-repo{width:6rem;height:0.75rem;border-radius:0.25rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite 0.25s}.skeleton-footer{display:flex;justify-content:flex-end}.skeleton-upvote{width:2.5rem;height:2rem;border-radius:0.5rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite 0.3s}@keyframes skeleton-pulse{0%,100%{opacity:1}50%{opacity:0.5}}.error-state{display:flex;align-items:center;justify-content:center;padding:3rem 2rem;min-height:12rem}.error-state-content{display:flex;flex-direction:column;align-items:center;text-align:center;max-width:20rem;padding:2rem}.error-icon{color:var(--feedlog-muted-foreground);opacity:0.8;margin-bottom:1rem}.error-state-title{margin:0 0 0.5rem 0;font-size:1.125rem;font-weight:600;color:var(--feedlog-foreground);line-height:1.4}.error-state-message{margin:0 0 1.25rem 0;font-size:0.875rem;color:var(--feedlog-muted-foreground);line-height:1.5}.issues-list{display:flex;flex-direction:column;gap:var(--feedlog-gap)}.empty-state{display:flex;align-items:center;justify-content:center;padding:4rem 2rem;min-height:16rem}.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}.load-more-container{display:flex;justify-content:center;padding:2rem 0;gap:1rem}`;
6
6
 
7
7
  const FeedlogGithubIssues = class {
8
8
  constructor(hostRef) {
@@ -52,8 +52,15 @@ const FeedlogGithubIssues = class {
52
52
  componentWillLoad() {
53
53
  this.currentTheme = this.theme;
54
54
  }
55
+ renderEmptyStateIllustration() {
56
+ return (index.h("svg", { class: "empty-state-illustration", xmlns: "http://www.w3.org/2000/svg", width: "120", height: "96", viewBox: "0 0 120 96", fill: "none", "aria-hidden": "true" }, index.h("path", { d: "M20 36h80v44c0 4.4-3.6 8-8 8H28c-4.4 0-8-3.6-8-8V36z", fill: "var(--feedlog-empty-illustration-bg)", stroke: "var(--feedlog-empty-illustration-stroke)", "stroke-width": "1.5", "stroke-linejoin": "round" }), index.h("path", { d: "M20 36l20-24h40l20 24", fill: "none", stroke: "var(--feedlog-empty-illustration-stroke)", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), index.h("path", { d: "M44 52h32M44 60h24M44 68h28", stroke: "var(--feedlog-empty-illustration-muted)", "stroke-width": "1.25", "stroke-linecap": "round" })));
57
+ }
58
+ renderErrorIcon() {
59
+ return (index.h("svg", { class: "error-icon", xmlns: "http://www.w3.org/2000/svg", width: "48", height: "48", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, index.h("circle", { cx: "12", cy: "12", r: "10" }), index.h("line", { x1: "12", y1: "8", x2: "12", y2: "12" }), index.h("line", { x1: "12", y1: "16", x2: "12.01", y2: "16" })));
60
+ }
55
61
  renderIssuesList() {
56
- return (index.h("div", { class: "issues-list" }, this.issues.length === 0 ? (index.h("div", { class: "empty-state" }, index.h("p", null, "No issues found"))) : (this.issues.map(issue => {
62
+ var _a, _b;
63
+ return (index.h("div", { class: "issues-list" }, this.issues.length === 0 ? (index.h("div", { class: "empty-state" }, index.h("div", { class: "empty-state-content" }, this.renderEmptyStateIllustration(), index.h("h2", { class: "empty-state-title" }, (_a = this.emptyStateTitle) !== null && _a !== void 0 ? _a : 'No updates yet'), index.h("p", { class: "empty-state-message" }, (_b = this.emptyStateMessage) !== null && _b !== void 0 ? _b : 'Check back later for new updates.')))) : (this.issues.map(issue => {
57
64
  var _a, _b;
58
65
  return (index.h("feedlog-issue", { key: issue.id, issue: issue, issueUrl: (_b = (_a = this.getIssueUrl) === null || _a === void 0 ? void 0 : _a.call(this, issue)) !== null && _b !== void 0 ? _b : undefined, theme: this.currentTheme, onFeedlogUpvote: (e) => this.handleUpvote(e) }));
59
66
  }))));
@@ -62,7 +69,7 @@ const FeedlogGithubIssues = class {
62
69
  const containerStyle = {
63
70
  maxWidth: this.maxWidth,
64
71
  };
65
- return (index.h(index.Host, { key: '8d371971cf80542020ff10d09e49b1e86cbd1170', class: this.currentTheme === 'dark' ? 'dark' : '' }, index.h("div", { key: '6a46103b04afbd473ca02a5f16125192a00f2e9b', class: "github-issues-container", style: containerStyle }, (this.heading || this.subtitle) && (index.h("header", { key: '55b481d2ea993566769670aeef1959aa76cc422e', class: "issues-header" }, index.h("div", { key: 'c80a94733595b2fc74f9e670b8ebe92498e762f5', class: "header-content" }, this.heading && index.h("h1", { key: '16cb4c7cf71d1d91b52dede91f900a79f9a66458', class: "issues-title" }, this.heading), this.subtitle && index.h("p", { key: 'ee0d7a228dc935b2fa88a03133e79888a60853df', class: "issues-subtitle" }, this.subtitle)))), this.loading && (index.h("div", { key: '3830120b4883517f73133bb3b51f26a3cd2c0503', class: "loading-state" }, index.h("p", { key: '13a5c0d3f466092c77b3cc6b8d3af448c44b4f48' }, "Loading issues..."))), this.error && (index.h("div", { key: '84b1c7407a0b3c858598663feb8d4a782ec1bff2', class: "error-state" }, index.h("p", { key: 'd846f63028dc9134a28270853d1af08cf3b75ef5' }, "Error: ", this.error))), !this.loading && !this.error && (index.h("div", { key: 'e9676a45008da5976db58180d72275e3080a51a1' }, this.renderIssuesList(), this.hasMore && (index.h("div", { key: '85ef1768fbcc1636bbeeaa2a74afaa552455d05e', class: "load-more-container" }, index.h("feedlog-button", { key: 'd408617ab69f6d70acbb9dfc360d3a09c79279b1', onFeedlogClick: this.handleLoadMore, disabled: this.isLoadingMore, variant: "outline" }, this.isLoadingMore ? 'Loading...' : 'Load More Issues'))))))));
72
+ return (index.h(index.Host, { key: 'fbd1890061b47db8b850a8d993e2ac5432c4b3f6', class: this.currentTheme === 'dark' ? 'dark' : '' }, index.h("div", { key: '5ce9267da314ebb69ed8ee00f28015fdad73ab8a', class: "github-issues-container", style: containerStyle }, (this.heading || this.subtitle) && (index.h("header", { key: '461c707df1e5dc7eaab15462de975fafdce872df', class: "issues-header" }, index.h("div", { key: 'e6972c2f0cfe5630cc73fb41a2103c9b0118179c', class: "header-content" }, this.heading && index.h("h1", { key: 'd74e89c1ad981da6c4287e5b75256bfb831f1172', class: "issues-title" }, this.heading), this.subtitle && index.h("p", { key: 'c820d8e3beaa57c0c193ceaace1d13e94a2a6290', class: "issues-subtitle" }, this.subtitle)))), this.loading && (index.h("div", { key: '959be24cb77b257fba5197302448f78af553817e', class: "loading-state", role: "status", "aria-label": "Loading issues" }, index.h("div", { key: 'e69594f18e3268208634a3ad82cb2ae0bc552c11', class: "loading-skeletons" }, [1, 2, 3].map(i => (index.h("div", { key: i, class: "skeleton-card" }, index.h("div", { class: "skeleton-content" }, index.h("div", { class: "skeleton-header" }, index.h("div", { class: "skeleton-badge" }), index.h("div", { class: "skeleton-timestamp" })), index.h("div", { class: "skeleton-main" }, index.h("div", { class: "skeleton-title" }), index.h("div", { class: "skeleton-body" }, index.h("div", { class: "skeleton-line" }), index.h("div", { class: "skeleton-line short" })), index.h("div", { class: "skeleton-repo" })), index.h("div", { class: "skeleton-footer" }, index.h("div", { class: "skeleton-upvote" }))))))))), this.error && (index.h("div", { key: '93e82b0beca0b96c23803b1abfc3d50fe099fa6a', class: "error-state", role: "alert" }, index.h("div", { key: '9276d85925d02bd4c81d5ee44a5d6a8af986c4c9', class: "error-state-content" }, this.renderErrorIcon(), index.h("h2", { key: '6f5762740f908712a46cddeafae675294d3bcc40', class: "error-state-title" }, "Something went wrong"), index.h("p", { key: 'f1587bd9a2abe250aa730d64498a5105a412d657', class: "error-state-message" }, this.error)))), !this.loading && !this.error && (index.h("div", { key: '22c68553352358a9a408ea763af1e63c9c84eabd' }, this.renderIssuesList(), this.hasMore && (index.h("div", { key: '231ec6f4680b4b114ba72c657f9801d84951a6d6', class: "load-more-container" }, index.h("feedlog-button", { key: '18fa475708fe233f3f9d0ec85bf0f8daea9a4a0a', onFeedlogClick: this.handleLoadMore, disabled: this.isLoadingMore, variant: "outline" }, this.isLoadingMore ? 'Loading...' : 'Load More Issues'))))))));
66
73
  }
67
74
  };
68
75
  FeedlogGithubIssues.style = feedlogGithubIssuesCss();
@@ -22,7 +22,7 @@ const FeedlogIssuesList = class {
22
22
  };
23
23
  }
24
24
  render() {
25
- return (index.h(index.Host, { key: '118e81e7928ecdc097c2a29a2a8f5a7cbf9c321f', class: this.theme === 'dark' ? 'dark' : '' }, index.h("div", { key: 'ae6d2cdb78e153640b080fd6c634d7ce00a2c082', class: "issues-list" }, this.issues.length === 0 ? (index.h("div", { class: "empty-state" }, index.h("p", null, "No issues found"))) : (this.issues.map(issue => {
25
+ return (index.h(index.Host, { key: '005de8cf99383128f6973be57d84499c8ca9afd3', class: this.theme === 'dark' ? 'dark' : '' }, index.h("div", { key: '60edc37014f6703b9400dc8bf06726c9a8428a3b', class: "issues-list" }, this.issues.length === 0 ? (index.h("div", { class: "empty-state" }, index.h("p", null, "No issues found"))) : (this.issues.map(issue => {
26
26
  var _a, _b;
27
27
  return (index.h("feedlog-issue", { key: issue.id, issue: issue, issueUrl: (_b = (_a = this.getIssueUrl) === null || _a === void 0 ? void 0 : _a.call(this, issue)) !== null && _b !== void 0 ? _b : undefined, theme: this.theme, onFeedlogUpvote: (e) => this.handleUpvote(e) }));
28
28
  })))));
@@ -18,7 +18,7 @@ var patchBrowser = () => {
18
18
 
19
19
  patchBrowser().then(async (options) => {
20
20
  await index.globalScripts();
21
- return index.bootstrapLazy([["feedlog-issues-list.cjs",[[1,"feedlog-issues-list",{"issues":[16],"theme":[1],"getIssueUrl":[16]}]]],["feedlog-card.cjs",[[257,"feedlog-card"]]],["feedlog-badge.cjs",[[257,"feedlog-badge",{"variant":[1]}]]],["feedlog-button_2.cjs",[[257,"feedlog-button",{"variant":[1],"size":[1],"disabled":[4],"type":[1]}],[257,"feedlog-issue",{"issue":[16],"issueUrl":[1,"issue-url"],"theme":[1]}]]],["feedlog-github-issues.cjs",[[1,"feedlog-github-issues",{"issues":[16],"maxWidth":[1,"max-width"],"theme":[1025],"heading":[1],"subtitle":[1],"loading":[4],"error":[1],"hasMore":[4,"has-more"],"isLoadingMore":[4,"is-loading-more"],"getIssueUrl":[16],"currentTheme":[32]}]]],["feedlog-github-issues-client.cjs",[[1,"feedlog-github-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],"getIssueUrl":[16],"issues":[32],"loading":[32],"error":[32],"cursor":[32],"hasMore":[32],"isLoadingMore":[32]}]]]], options);
21
+ return index.bootstrapLazy([["feedlog-issues-list.cjs",[[1,"feedlog-issues-list",{"issues":[16],"theme":[1],"getIssueUrl":[16]}]]],["feedlog-card.cjs",[[257,"feedlog-card"]]],["feedlog-badge.cjs",[[257,"feedlog-badge",{"variant":[1]}]]],["feedlog-button_2.cjs",[[257,"feedlog-button",{"variant":[1],"size":[1],"disabled":[4],"type":[1]}],[257,"feedlog-issue",{"issue":[16],"issueUrl":[1,"issue-url"],"theme":[1]}]]],["feedlog-github-issues.cjs",[[1,"feedlog-github-issues",{"issues":[16],"maxWidth":[1,"max-width"],"theme":[1025],"heading":[1],"subtitle":[1],"emptyStateTitle":[1,"empty-state-title"],"emptyStateMessage":[1,"empty-state-message"],"loading":[4],"error":[1],"hasMore":[4,"has-more"],"isLoadingMore":[4,"is-loading-more"],"getIssueUrl":[16],"currentTheme":[32]}]]],["feedlog-github-issues-client.cjs",[[1,"feedlog-github-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]}]]]], options);
22
22
  });
23
23
 
24
24
  exports.setNonce = index.setNonce;
@@ -5,7 +5,7 @@ var index = require('./index-DnsqTPII.js');
5
5
  const defineCustomElements = async (win, options) => {
6
6
  if (typeof window === 'undefined') return undefined;
7
7
  await index.globalScripts();
8
- return index.bootstrapLazy([["feedlog-issues-list.cjs",[[1,"feedlog-issues-list",{"issues":[16],"theme":[1],"getIssueUrl":[16]}]]],["feedlog-card.cjs",[[257,"feedlog-card"]]],["feedlog-badge.cjs",[[257,"feedlog-badge",{"variant":[1]}]]],["feedlog-button_2.cjs",[[257,"feedlog-button",{"variant":[1],"size":[1],"disabled":[4],"type":[1]}],[257,"feedlog-issue",{"issue":[16],"issueUrl":[1,"issue-url"],"theme":[1]}]]],["feedlog-github-issues.cjs",[[1,"feedlog-github-issues",{"issues":[16],"maxWidth":[1,"max-width"],"theme":[1025],"heading":[1],"subtitle":[1],"loading":[4],"error":[1],"hasMore":[4,"has-more"],"isLoadingMore":[4,"is-loading-more"],"getIssueUrl":[16],"currentTheme":[32]}]]],["feedlog-github-issues-client.cjs",[[1,"feedlog-github-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],"getIssueUrl":[16],"issues":[32],"loading":[32],"error":[32],"cursor":[32],"hasMore":[32],"isLoadingMore":[32]}]]]], options);
8
+ return index.bootstrapLazy([["feedlog-issues-list.cjs",[[1,"feedlog-issues-list",{"issues":[16],"theme":[1],"getIssueUrl":[16]}]]],["feedlog-card.cjs",[[257,"feedlog-card"]]],["feedlog-badge.cjs",[[257,"feedlog-badge",{"variant":[1]}]]],["feedlog-button_2.cjs",[[257,"feedlog-button",{"variant":[1],"size":[1],"disabled":[4],"type":[1]}],[257,"feedlog-issue",{"issue":[16],"issueUrl":[1,"issue-url"],"theme":[1]}]]],["feedlog-github-issues.cjs",[[1,"feedlog-github-issues",{"issues":[16],"maxWidth":[1,"max-width"],"theme":[1025],"heading":[1],"subtitle":[1],"emptyStateTitle":[1,"empty-state-title"],"emptyStateMessage":[1,"empty-state-message"],"loading":[4],"error":[1],"hasMore":[4,"has-more"],"isLoadingMore":[4,"is-loading-more"],"getIssueUrl":[16],"currentTheme":[32]}]]],["feedlog-github-issues-client.cjs",[[1,"feedlog-github-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]}]]]], options);
9
9
  };
10
10
 
11
11
  exports.setNonce = index.setNonce;
@@ -1,7 +1,8 @@
1
1
  :host {
2
2
  display: block;
3
- font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
4
-
3
+ font-family:
4
+ ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
5
+
5
6
  /* Light theme defaults */
6
7
  --feedlog-background: #ffffff;
7
8
  --feedlog-foreground: oklch(0.145 0 0);
@@ -21,6 +22,10 @@
21
22
  --feedlog-radius: 0.625rem;
22
23
  --feedlog-gap: 0.5rem;
23
24
  --feedlog-padding: 2rem;
25
+ --feedlog-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.08);
26
+ --feedlog-empty-illustration-bg: oklch(0.96 0.01 260);
27
+ --feedlog-empty-illustration-stroke: oklch(0.75 0.02 260);
28
+ --feedlog-empty-illustration-muted: oklch(0.82 0.01 260);
24
29
  }
25
30
 
26
31
  :host(.dark) {
@@ -38,8 +43,13 @@
38
43
  --feedlog-blue-600: oklch(0.546 0.245 262.881);
39
44
  --feedlog-blue-900-30: color-mix(in oklab, oklch(0.379 0.146 265.522) 30%, transparent);
40
45
  --feedlog-red-900-30: color-mix(in oklab, oklch(0.396 0.141 25.723) 30%, transparent);
46
+ --feedlog-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
47
+ --feedlog-empty-illustration-bg: oklch(0.28 0.02 260);
48
+ --feedlog-empty-illustration-stroke: oklch(0.45 0.02 260);
49
+ --feedlog-empty-illustration-muted: oklch(0.38 0.02 260);
41
50
  }
42
51
 
52
+
43
53
  .github-issues-container {
44
54
  min-height: 100vh;
45
55
  background-color: var(--feedlog-background);
@@ -72,15 +82,165 @@
72
82
  margin: 0;
73
83
  }
74
84
 
75
- .loading-state,
85
+ .loading-state {
86
+ padding: 0;
87
+ }
88
+
89
+ .loading-skeletons {
90
+ display: flex;
91
+ flex-direction: column;
92
+ gap: var(--feedlog-gap);
93
+ }
94
+
95
+ .skeleton-card {
96
+ background-color: var(--feedlog-card);
97
+ border: 1px solid var(--feedlog-border);
98
+ border-radius: var(--feedlog-radius);
99
+ box-shadow: var(--feedlog-shadow);
100
+ position: relative;
101
+ overflow: hidden;
102
+ }
103
+
104
+ .skeleton-card::before {
105
+ content: '';
106
+ position: absolute;
107
+ left: 0;
108
+ top: 0;
109
+ bottom: 0;
110
+ width: 3px;
111
+ background: var(--feedlog-muted);
112
+ }
113
+
114
+ .skeleton-content {
115
+ padding: 1.25rem;
116
+ padding-left: calc(1.25rem + 3px);
117
+ display: flex;
118
+ flex-direction: column;
119
+ gap: 0.875rem;
120
+ }
121
+
122
+ .skeleton-header {
123
+ display: flex;
124
+ align-items: center;
125
+ justify-content: space-between;
126
+ gap: 0.75rem;
127
+ }
128
+
129
+ .skeleton-badge {
130
+ width: 4.5rem;
131
+ height: 1.25rem;
132
+ border-radius: 0.375rem;
133
+ background-color: var(--feedlog-muted);
134
+ animation: skeleton-pulse 1.5s ease-in-out infinite;
135
+ }
136
+
137
+ .skeleton-timestamp {
138
+ width: 3rem;
139
+ height: 0.75rem;
140
+ border-radius: 0.25rem;
141
+ background-color: var(--feedlog-muted);
142
+ animation: skeleton-pulse 1.5s ease-in-out infinite 0.2s;
143
+ }
144
+
145
+ .skeleton-main {
146
+ display: flex;
147
+ flex-direction: column;
148
+ gap: 0.5rem;
149
+ }
150
+
151
+ .skeleton-title {
152
+ height: 0.9375rem;
153
+ border-radius: 0.25rem;
154
+ background-color: var(--feedlog-muted);
155
+ animation: skeleton-pulse 1.5s ease-in-out infinite 0.1s;
156
+ width: 85%;
157
+ }
158
+
159
+ .skeleton-body {
160
+ display: flex;
161
+ flex-direction: column;
162
+ gap: 0.375rem;
163
+ }
164
+
165
+ .skeleton-line {
166
+ height: 0.8125rem;
167
+ border-radius: 0.25rem;
168
+ background-color: var(--feedlog-muted);
169
+ animation: skeleton-pulse 1.5s ease-in-out infinite 0.15s;
170
+ width: 100%;
171
+ }
172
+
173
+ .skeleton-line.short {
174
+ width: 70%;
175
+ }
176
+
177
+ .skeleton-repo {
178
+ width: 6rem;
179
+ height: 0.75rem;
180
+ border-radius: 0.25rem;
181
+ background-color: var(--feedlog-muted);
182
+ animation: skeleton-pulse 1.5s ease-in-out infinite 0.25s;
183
+ }
184
+
185
+ .skeleton-footer {
186
+ display: flex;
187
+ justify-content: flex-end;
188
+ }
189
+
190
+ .skeleton-upvote {
191
+ width: 2.5rem;
192
+ height: 2rem;
193
+ border-radius: 0.5rem;
194
+ background-color: var(--feedlog-muted);
195
+ animation: skeleton-pulse 1.5s ease-in-out infinite 0.3s;
196
+ }
197
+
198
+ @keyframes skeleton-pulse {
199
+ 0%,
200
+ 100% {
201
+ opacity: 1;
202
+ }
203
+ 50% {
204
+ opacity: 0.5;
205
+ }
206
+ }
207
+
76
208
  .error-state {
77
- padding: 2rem;
209
+ display: flex;
210
+ align-items: center;
211
+ justify-content: center;
212
+ padding: 3rem 2rem;
213
+ min-height: 12rem;
214
+ }
215
+
216
+ .error-state-content {
217
+ display: flex;
218
+ flex-direction: column;
219
+ align-items: center;
78
220
  text-align: center;
221
+ max-width: 20rem;
222
+ padding: 2rem;
223
+ }
224
+
225
+ .error-icon {
79
226
  color: var(--feedlog-muted-foreground);
227
+ opacity: 0.8;
228
+ margin-bottom: 1rem;
80
229
  }
81
230
 
82
- .error-state {
83
- color: var(--feedlog-destructive);
231
+ .error-state-title {
232
+ margin: 0 0 0.5rem 0;
233
+ font-size: 1.125rem;
234
+ font-weight: 600;
235
+ color: var(--feedlog-foreground);
236
+ line-height: 1.4;
237
+ }
238
+
239
+ .error-state-message {
240
+ margin: 0 0 1.25rem 0;
241
+ font-size: 0.875rem;
242
+ color: var(--feedlog-muted-foreground);
243
+ line-height: 1.5;
84
244
  }
85
245
 
86
246
  .issues-list {
@@ -90,10 +250,39 @@
90
250
  }
91
251
 
92
252
  .empty-state {
253
+ display: flex;
254
+ align-items: center;
255
+ justify-content: center;
256
+ padding: 4rem 2rem;
257
+ min-height: 16rem;
258
+ }
259
+
260
+ .empty-state-content {
261
+ display: flex;
262
+ flex-direction: column;
263
+ align-items: center;
93
264
  text-align: center;
94
- padding: 3rem 1.5rem;
95
- color: var(--feedlog-muted-foreground);
265
+ max-width: 20rem;
266
+ }
267
+
268
+ .empty-state-illustration {
269
+ margin-bottom: 1.5rem;
270
+ opacity: 0.9;
271
+ }
272
+
273
+ .empty-state-title {
274
+ margin: 0 0 0.5rem 0;
275
+ font-size: 1.125rem;
276
+ font-weight: 600;
277
+ color: var(--feedlog-foreground);
278
+ line-height: 1.4;
279
+ }
280
+
281
+ .empty-state-message {
282
+ margin: 0;
96
283
  font-size: 0.875rem;
284
+ color: var(--feedlog-muted-foreground);
285
+ line-height: 1.5;
97
286
  }
98
287
 
99
288
  .load-more-container {
@@ -50,8 +50,15 @@ export class FeedlogGithubIssues {
50
50
  componentWillLoad() {
51
51
  this.currentTheme = this.theme;
52
52
  }
53
+ renderEmptyStateIllustration() {
54
+ return (h("svg", { class: "empty-state-illustration", xmlns: "http://www.w3.org/2000/svg", width: "120", height: "96", viewBox: "0 0 120 96", fill: "none", "aria-hidden": "true" }, h("path", { d: "M20 36h80v44c0 4.4-3.6 8-8 8H28c-4.4 0-8-3.6-8-8V36z", fill: "var(--feedlog-empty-illustration-bg)", stroke: "var(--feedlog-empty-illustration-stroke)", "stroke-width": "1.5", "stroke-linejoin": "round" }), h("path", { d: "M20 36l20-24h40l20 24", fill: "none", stroke: "var(--feedlog-empty-illustration-stroke)", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M44 52h32M44 60h24M44 68h28", stroke: "var(--feedlog-empty-illustration-muted)", "stroke-width": "1.25", "stroke-linecap": "round" })));
55
+ }
56
+ renderErrorIcon() {
57
+ return (h("svg", { class: "error-icon", xmlns: "http://www.w3.org/2000/svg", width: "48", height: "48", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("circle", { cx: "12", cy: "12", r: "10" }), h("line", { x1: "12", y1: "8", x2: "12", y2: "12" }), h("line", { x1: "12", y1: "16", x2: "12.01", y2: "16" })));
58
+ }
53
59
  renderIssuesList() {
54
- return (h("div", { class: "issues-list" }, this.issues.length === 0 ? (h("div", { class: "empty-state" }, h("p", null, "No issues found"))) : (this.issues.map(issue => {
60
+ var _a, _b;
61
+ return (h("div", { class: "issues-list" }, this.issues.length === 0 ? (h("div", { class: "empty-state" }, h("div", { class: "empty-state-content" }, this.renderEmptyStateIllustration(), h("h2", { class: "empty-state-title" }, (_a = this.emptyStateTitle) !== null && _a !== void 0 ? _a : 'No updates yet'), h("p", { class: "empty-state-message" }, (_b = this.emptyStateMessage) !== null && _b !== void 0 ? _b : 'Check back later for new updates.')))) : (this.issues.map(issue => {
55
62
  var _a, _b;
56
63
  return (h("feedlog-issue", { key: issue.id, issue: issue, issueUrl: (_b = (_a = this.getIssueUrl) === null || _a === void 0 ? void 0 : _a.call(this, issue)) !== null && _b !== void 0 ? _b : undefined, theme: this.currentTheme, onFeedlogUpvote: (e) => this.handleUpvote(e) }));
57
64
  }))));
@@ -60,7 +67,7 @@ export class FeedlogGithubIssues {
60
67
  const containerStyle = {
61
68
  maxWidth: this.maxWidth,
62
69
  };
63
- return (h(Host, { key: '8d371971cf80542020ff10d09e49b1e86cbd1170', class: this.currentTheme === 'dark' ? 'dark' : '' }, h("div", { key: '6a46103b04afbd473ca02a5f16125192a00f2e9b', class: "github-issues-container", style: containerStyle }, (this.heading || this.subtitle) && (h("header", { key: '55b481d2ea993566769670aeef1959aa76cc422e', class: "issues-header" }, h("div", { key: 'c80a94733595b2fc74f9e670b8ebe92498e762f5', class: "header-content" }, this.heading && h("h1", { key: '16cb4c7cf71d1d91b52dede91f900a79f9a66458', class: "issues-title" }, this.heading), this.subtitle && h("p", { key: 'ee0d7a228dc935b2fa88a03133e79888a60853df', class: "issues-subtitle" }, this.subtitle)))), this.loading && (h("div", { key: '3830120b4883517f73133bb3b51f26a3cd2c0503', class: "loading-state" }, h("p", { key: '13a5c0d3f466092c77b3cc6b8d3af448c44b4f48' }, "Loading issues..."))), this.error && (h("div", { key: '84b1c7407a0b3c858598663feb8d4a782ec1bff2', class: "error-state" }, h("p", { key: 'd846f63028dc9134a28270853d1af08cf3b75ef5' }, "Error: ", this.error))), !this.loading && !this.error && (h("div", { key: 'e9676a45008da5976db58180d72275e3080a51a1' }, this.renderIssuesList(), this.hasMore && (h("div", { key: '85ef1768fbcc1636bbeeaa2a74afaa552455d05e', class: "load-more-container" }, h("feedlog-button", { key: 'd408617ab69f6d70acbb9dfc360d3a09c79279b1', onFeedlogClick: this.handleLoadMore, disabled: this.isLoadingMore, variant: "outline" }, this.isLoadingMore ? 'Loading...' : 'Load More Issues'))))))));
70
+ return (h(Host, { key: 'fbd1890061b47db8b850a8d993e2ac5432c4b3f6', class: this.currentTheme === 'dark' ? 'dark' : '' }, h("div", { key: '5ce9267da314ebb69ed8ee00f28015fdad73ab8a', class: "github-issues-container", style: containerStyle }, (this.heading || this.subtitle) && (h("header", { key: '461c707df1e5dc7eaab15462de975fafdce872df', class: "issues-header" }, h("div", { key: 'e6972c2f0cfe5630cc73fb41a2103c9b0118179c', class: "header-content" }, this.heading && h("h1", { key: 'd74e89c1ad981da6c4287e5b75256bfb831f1172', class: "issues-title" }, this.heading), this.subtitle && h("p", { key: 'c820d8e3beaa57c0c193ceaace1d13e94a2a6290', class: "issues-subtitle" }, this.subtitle)))), this.loading && (h("div", { key: '959be24cb77b257fba5197302448f78af553817e', class: "loading-state", role: "status", "aria-label": "Loading issues" }, h("div", { key: 'e69594f18e3268208634a3ad82cb2ae0bc552c11', class: "loading-skeletons" }, [1, 2, 3].map(i => (h("div", { key: i, class: "skeleton-card" }, h("div", { class: "skeleton-content" }, h("div", { class: "skeleton-header" }, h("div", { class: "skeleton-badge" }), h("div", { class: "skeleton-timestamp" })), h("div", { class: "skeleton-main" }, h("div", { class: "skeleton-title" }), h("div", { class: "skeleton-body" }, h("div", { class: "skeleton-line" }), h("div", { class: "skeleton-line short" })), h("div", { class: "skeleton-repo" })), h("div", { class: "skeleton-footer" }, h("div", { class: "skeleton-upvote" }))))))))), this.error && (h("div", { key: '93e82b0beca0b96c23803b1abfc3d50fe099fa6a', class: "error-state", role: "alert" }, h("div", { key: '9276d85925d02bd4c81d5ee44a5d6a8af986c4c9', class: "error-state-content" }, this.renderErrorIcon(), h("h2", { key: '6f5762740f908712a46cddeafae675294d3bcc40', class: "error-state-title" }, "Something went wrong"), h("p", { key: 'f1587bd9a2abe250aa730d64498a5105a412d657', class: "error-state-message" }, this.error)))), !this.loading && !this.error && (h("div", { key: '22c68553352358a9a408ea763af1e63c9c84eabd' }, this.renderIssuesList(), this.hasMore && (h("div", { key: '231ec6f4680b4b114ba72c657f9801d84951a6d6', class: "load-more-container" }, h("feedlog-button", { key: '18fa475708fe233f3f9d0ec85bf0f8daea9a4a0a', onFeedlogClick: this.handleLoadMore, disabled: this.isLoadingMore, variant: "outline" }, this.isLoadingMore ? 'Loading...' : 'Load More Issues'))))))));
64
71
  }
65
72
  static get is() { return "feedlog-github-issues"; }
66
73
  static get encapsulation() { return "shadow"; }
@@ -178,6 +185,44 @@ export class FeedlogGithubIssues {
178
185
  "reflect": false,
179
186
  "attribute": "subtitle"
180
187
  },
188
+ "emptyStateTitle": {
189
+ "type": "string",
190
+ "mutable": false,
191
+ "complexType": {
192
+ "original": "string",
193
+ "resolved": "string | undefined",
194
+ "references": {}
195
+ },
196
+ "required": false,
197
+ "optional": true,
198
+ "docs": {
199
+ "tags": [],
200
+ "text": "Empty state title. Defaults to \"No updates yet\"."
201
+ },
202
+ "getter": false,
203
+ "setter": false,
204
+ "reflect": false,
205
+ "attribute": "empty-state-title"
206
+ },
207
+ "emptyStateMessage": {
208
+ "type": "string",
209
+ "mutable": false,
210
+ "complexType": {
211
+ "original": "string",
212
+ "resolved": "string | undefined",
213
+ "references": {}
214
+ },
215
+ "required": false,
216
+ "optional": true,
217
+ "docs": {
218
+ "tags": [],
219
+ "text": "Empty state message. Defaults to \"Check back later for new updates.\"."
220
+ },
221
+ "getter": false,
222
+ "setter": false,
223
+ "reflect": false,
224
+ "attribute": "empty-state-message"
225
+ },
181
226
  "loading": {
182
227
  "type": "boolean",
183
228
  "mutable": false,
@@ -124,6 +124,14 @@ const meta = {
124
124
  control: 'text',
125
125
  description: 'Error message',
126
126
  },
127
+ emptyStateTitle: {
128
+ control: 'text',
129
+ description: 'Empty state title',
130
+ },
131
+ emptyStateMessage: {
132
+ control: 'text',
133
+ description: 'Empty state message',
134
+ },
127
135
  },
128
136
  args: {
129
137
  issues: sampleIssues,
@@ -150,6 +158,8 @@ export const Loading = {
150
158
  args: {
151
159
  issues: [],
152
160
  loading: true,
161
+ heading: 'Community feedback',
162
+ subtitle: 'Upvote issues you care about',
153
163
  },
154
164
  render: props => h("feedlog-github-issues", Object.assign({}, props)),
155
165
  play: async ({ canvasElement, args }) => {
@@ -163,7 +173,9 @@ export const Error = {
163
173
  args: {
164
174
  issues: [],
165
175
  loading: false,
166
- error: 'Failed to fetch issues from GitHub API',
176
+ error: "Couldn't load updates",
177
+ heading: 'Community feedback',
178
+ subtitle: 'Upvote issues you care about',
167
179
  },
168
180
  render: props => h("feedlog-github-issues", Object.assign({}, props)),
169
181
  play: async ({ canvasElement, args }) => {
@@ -178,6 +190,8 @@ export const Empty = {
178
190
  issues: [],
179
191
  loading: false,
180
192
  error: null,
193
+ heading: 'Community feedback',
194
+ subtitle: 'Upvote issues you care about',
181
195
  },
182
196
  render: props => h("feedlog-github-issues", Object.assign({}, props)),
183
197
  play: async ({ canvasElement, args }) => {
@@ -148,7 +148,7 @@ export class FeedlogGithubIssuesClient {
148
148
  if (this.isDisconnected || currentRequestId !== this.fetchRequestId) {
149
149
  return;
150
150
  }
151
- const errorMsg = err instanceof Error ? err.message : 'Failed to fetch issues';
151
+ const errorMsg = err instanceof Error ? err.message : "Couldn't load updates";
152
152
  this.error = errorMsg;
153
153
  this.issues = [];
154
154
  this.feedlogError.emit({
@@ -213,7 +213,7 @@ export class FeedlogGithubIssuesClient {
213
213
  }
214
214
  }
215
215
  render() {
216
- return (h("feedlog-github-issues", { key: '5d5bbd34f21c89b18ecb78f2411cfb825ff78d12', issues: this.issues, maxWidth: this.maxWidth, theme: this.theme, heading: this.heading, subtitle: this.subtitle, getIssueUrl: this.getIssueUrl, loading: this.loading, error: this.error, hasMore: this.hasMore, isLoadingMore: this.isLoadingMore, onFeedlogUpvote: this.handleUpvote, onFeedlogLoadMore: async () => this.loadMore() }));
216
+ return (h("feedlog-github-issues", { key: '4bc46e4f2622d4c2c5080835ae436ae9fc37c991', issues: this.issues, 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() }));
217
217
  }
218
218
  static get is() { return "feedlog-github-issues-client"; }
219
219
  static get encapsulation() { return "shadow"; }
@@ -398,6 +398,44 @@ export class FeedlogGithubIssuesClient {
398
398
  "reflect": false,
399
399
  "attribute": "subtitle"
400
400
  },
401
+ "emptyStateTitle": {
402
+ "type": "string",
403
+ "mutable": false,
404
+ "complexType": {
405
+ "original": "string",
406
+ "resolved": "string | undefined",
407
+ "references": {}
408
+ },
409
+ "required": false,
410
+ "optional": true,
411
+ "docs": {
412
+ "tags": [],
413
+ "text": "Empty state title (e.g. \"No updates yet\")"
414
+ },
415
+ "getter": false,
416
+ "setter": false,
417
+ "reflect": false,
418
+ "attribute": "empty-state-title"
419
+ },
420
+ "emptyStateMessage": {
421
+ "type": "string",
422
+ "mutable": false,
423
+ "complexType": {
424
+ "original": "string",
425
+ "resolved": "string | undefined",
426
+ "references": {}
427
+ },
428
+ "required": false,
429
+ "optional": true,
430
+ "docs": {
431
+ "tags": [],
432
+ "text": "Empty state message (e.g. \"Check back later for new updates.\")"
433
+ },
434
+ "getter": false,
435
+ "setter": false,
436
+ "reflect": false,
437
+ "attribute": "empty-state-message"
438
+ },
401
439
  "getIssueUrl": {
402
440
  "type": "unknown",
403
441
  "mutable": false,
@@ -20,7 +20,7 @@ export class FeedlogIssuesList {
20
20
  };
21
21
  }
22
22
  render() {
23
- return (h(Host, { key: '118e81e7928ecdc097c2a29a2a8f5a7cbf9c321f', class: this.theme === 'dark' ? 'dark' : '' }, h("div", { key: 'ae6d2cdb78e153640b080fd6c634d7ce00a2c082', class: "issues-list" }, this.issues.length === 0 ? (h("div", { class: "empty-state" }, h("p", null, "No issues found"))) : (this.issues.map(issue => {
23
+ return (h(Host, { key: '005de8cf99383128f6973be57d84499c8ca9afd3', class: this.theme === 'dark' ? 'dark' : '' }, h("div", { key: '60edc37014f6703b9400dc8bf06726c9a8428a3b', class: "issues-list" }, this.issues.length === 0 ? (h("div", { class: "empty-state" }, h("p", null, "No issues found"))) : (this.issues.map(issue => {
24
24
  var _a, _b;
25
25
  return (h("feedlog-issue", { key: issue.id, issue: issue, issueUrl: (_b = (_a = this.getIssueUrl) === null || _a === void 0 ? void 0 : _a.call(this, issue)) !== null && _b !== void 0 ? _b : undefined, theme: this.theme, onFeedlogUpvote: (e) => this.handleUpvote(e) }));
26
26
  })))));
@@ -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-CyaPkQyN.js";import{d as a}from"./p-BBPFf6g7.js";function u(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 c extends Error{constructor(t,e,s){super(t),this.statusCode=e,this.originalError=s,this.name="FeedlogError",Object.setPrototypeOf(this,c.prototype)}}class d extends c{constructor(t){super(t),this.name="FeedlogValidationError",Object.setPrototypeOf(this,d.prototype)}}class l extends c{constructor(t,e,s){super(t,e,s),this.name="FeedlogNetworkError",Object.setPrototypeOf(this,l.prototype)}}class p extends c{constructor(t="Request timed out"){super(t),this.name="FeedlogTimeoutError",Object.setPrototypeOf(this,p.prototype)}}class f{constructor(t){if(this.config={credentials:"include",...t},this.apiKey=this.config.apiKey,!this.apiKey)throw new d("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 l("Failed to fetch issues: "+s.statusText,s.status);const i=await s.json();return this.validateIssuesResponse(i)}catch(t){if(t instanceof c)throw t;if(t instanceof TypeError&&t.message.includes("fetch"))throw new l("Network error: Unable to reach API",void 0,t);throw new c("Failed to fetch issues: "+(t instanceof Error?t.message:"Unknown error"),void 0,t)}}async toggleUpvote(t){if(!t||"string"!=typeof t)throw new d("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 l("Issue not found",404);if(401===s.status)throw new l("Unauthorized",401);if(403===s.status)throw new l("Forbidden: Domain not allowed for this repository",403);if(!s.ok)throw new l("Failed to toggle upvote: "+s.statusText,s.status);const i=await s.json();return this.validateUpvoteResponse(i)}catch(t){if(t instanceof c)throw t;if(t instanceof TypeError&&t.message.includes("fetch"))throw new l("Network error: Unable to reach API",void 0,t);throw new c("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 p(`Request timed out after ${this.timeout}ms`);throw t}}validateIssuesResponse(t){if(!t||"object"!=typeof t)throw new d("Invalid API response: expected object");const e=t;if(!Array.isArray(e.issues))throw new d("Invalid API response: issues must be an array");if(!e.pagination||"object"!=typeof e.pagination)throw new d("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 d("Invalid issue: expected object");const e=t;if("string"!=typeof e.id)throw new d("Invalid issue: id is required and must be a string");if(!["bug","enhancement"].includes(e.type+""))throw new d('Invalid issue: type must be "bug" or "enhancement"');if(!["open","in_progress","closed"].includes(e.status+""))throw new d('Invalid issue: status must be "open", "in_progress", or "closed"');if(!e.repository||"object"!=typeof e.repository)throw new d("Invalid issue: repository is required");const s=e.repository;if("string"!=typeof s.id)throw new d("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?u(o+""):null,n=e.body,h=null!=n&&""!==n?u(n+""):null,a=s.name,c=null!=a&&""!==a?a+"":null,l=s.description,p=null!=l&&""!==l?u(l+""):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:c,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 d("Invalid upvote response: expected object");const e=t;if("boolean"!=typeof e.upvoted)throw new d("Invalid upvote response: upvoted must be a boolean");if("number"!=typeof e.upvoteCount)throw new d("Invalid upvote response: upvoteCount must be a number");if("string"!=typeof e.anonymousUserId)throw new d("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 g=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 f(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:"Failed to fetch issues";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(){return o("feedlog-github-issues",{key:"5d5bbd34f21c89b18ecb78f2411cfb825ff78d12",issues:this.issues,maxWidth:this.maxWidth,theme:this.theme,heading:this.heading,subtitle:this.subtitle,getIssueUrl:this.getIssueUrl,loading:this.loading,error:this.error,hasMore:this.hasMore,isLoadingMore:this.isLoadingMore,onFeedlogUpvote:this.handleUpvote,onFeedlogLoadMore:async()=>this.loadMore()})}},[1,"feedlog-github-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],getIssueUrl:[16],issues:[32],loading:[32],error:[32],cursor:[32],hasMore:[32],isLoadingMore:[32]}]);function w(){"undefined"!=typeof customElements&&["feedlog-github-issues-client","feedlog-badge","feedlog-button","feedlog-github-issues","feedlog-issue"].forEach((e=>{switch(e){case"feedlog-github-issues-client":customElements.get(t(e))||customElements.define(t(e),g);break;case"feedlog-badge":customElements.get(t(e))||r();break;case"feedlog-button":customElements.get(t(e))||n();break;case"feedlog-github-issues":customElements.get(t(e))||h();break;case"feedlog-issue":customElements.get(t(e))||a()}}))}w();const b=g,m=w;export{b as FeedlogGithubIssuesClient,m 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-cag4iyHV.js";import{d as a}from"./p-BBPFf6g7.js";function u(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 c extends Error{constructor(t,e,s){super(t),this.statusCode=e,this.originalError=s,this.name="FeedlogError",Object.setPrototypeOf(this,c.prototype)}}class l extends c{constructor(t){super(t),this.name="FeedlogValidationError",Object.setPrototypeOf(this,l.prototype)}}class d extends c{constructor(t,e,s){super(t,e,s),this.name="FeedlogNetworkError",Object.setPrototypeOf(this,d.prototype)}}class p extends c{constructor(t="Request timed out"){super(t),this.name="FeedlogTimeoutError",Object.setPrototypeOf(this,p.prototype)}}class f{constructor(t){if(this.config={credentials:"include",...t},this.apiKey=this.config.apiKey,!this.apiKey)throw new l("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 d("Failed to fetch issues: "+s.statusText,s.status);const i=await s.json();return this.validateIssuesResponse(i)}catch(t){if(t instanceof c)throw t;if(t instanceof TypeError&&t.message.includes("fetch"))throw new d("Network error: Unable to reach API",void 0,t);throw new c("Failed to fetch issues: "+(t instanceof Error?t.message:"Unknown error"),void 0,t)}}async toggleUpvote(t){if(!t||"string"!=typeof t)throw new l("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 d("Issue not found",404);if(401===s.status)throw new d("Unauthorized",401);if(403===s.status)throw new d("Forbidden: Domain not allowed for this repository",403);if(!s.ok)throw new d("Failed to toggle upvote: "+s.statusText,s.status);const i=await s.json();return this.validateUpvoteResponse(i)}catch(t){if(t instanceof c)throw t;if(t instanceof TypeError&&t.message.includes("fetch"))throw new d("Network error: Unable to reach API",void 0,t);throw new c("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 p(`Request timed out after ${this.timeout}ms`);throw t}}validateIssuesResponse(t){if(!t||"object"!=typeof t)throw new l("Invalid API response: expected object");const e=t;if(!Array.isArray(e.issues))throw new l("Invalid API response: issues must be an array");if(!e.pagination||"object"!=typeof e.pagination)throw new l("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 l("Invalid issue: expected object");const e=t;if("string"!=typeof e.id)throw new l("Invalid issue: id is required and must be a string");if(!["bug","enhancement"].includes(e.type+""))throw new l('Invalid issue: type must be "bug" or "enhancement"');if(!["open","in_progress","closed"].includes(e.status+""))throw new l('Invalid issue: status must be "open", "in_progress", or "closed"');if(!e.repository||"object"!=typeof e.repository)throw new l("Invalid issue: repository is required");const s=e.repository;if("string"!=typeof s.id)throw new l("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?u(o+""):null,n=e.body,h=null!=n&&""!==n?u(n+""):null,a=s.name,c=null!=a&&""!==a?a+"":null,d=s.description,p=null!=d&&""!==d?u(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:c,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 l("Invalid upvote response: expected object");const e=t;if("boolean"!=typeof e.upvoted)throw new l("Invalid upvote response: upvoted must be a boolean");if("number"!=typeof e.upvoteCount)throw new l("Invalid upvote response: upvoteCount must be a number");if("string"!=typeof e.anonymousUserId)throw new l("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 g=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 f(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(){return o("feedlog-github-issues",{key:"4bc46e4f2622d4c2c5080835ae436ae9fc37c991",issues:this.issues,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()})}},[1,"feedlog-github-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-github-issues-client","feedlog-badge","feedlog-button","feedlog-github-issues","feedlog-issue"].forEach((e=>{switch(e){case"feedlog-github-issues-client":customElements.get(t(e))||customElements.define(t(e),g);break;case"feedlog-badge":customElements.get(t(e))||r();break;case"feedlog-button":customElements.get(t(e))||n();break;case"feedlog-github-issues":customElements.get(t(e))||h();break;case"feedlog-issue":customElements.get(t(e))||a()}}))}w();const m=g,b=w;export{m as FeedlogGithubIssuesClient,b as defineCustomElement}
@@ -1 +1 @@
1
- import{F as o,d as s}from"./p-CyaPkQyN.js";const a=o,p=s;export{a as FeedlogGithubIssues,p as defineCustomElement}
1
+ import{F as o,d as s}from"./p-cag4iyHV.js";const a=o,p=s;export{a as FeedlogGithubIssues,p as defineCustomElement}
@@ -1 +1 @@
1
- import{t as e,p as s,H as t,c as o,h as i,a as d}from"./index.js";import{d as l}from"./p-Chc3XZ5Y.js";import{d as r}from"./p-BBPFf6g7.js";const a=s(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.feedlogUpvote=o(this,"feedlogUpvote"),this.issues=[],this.theme="light",this.handleUpvote=e=>{e.stopPropagation(),this.feedlogUpvote.emit(e.detail)}}render(){return i(d,{key:"118e81e7928ecdc097c2a29a2a8f5a7cbf9c321f",class:"dark"===this.theme?"dark":""},i("div",{key:"ae6d2cdb78e153640b080fd6c634d7ce00a2c082",class:"issues-list"},0===this.issues.length?i("div",{class:"empty-state"},i("p",null,"No issues found")):this.issues.map((e=>{var s,t;return i("feedlog-issue",{key:e.id,issue:e,issueUrl:null!==(t=null===(s=this.getIssueUrl)||void 0===s?void 0:s.call(this,e))&&void 0!==t?t:void 0,theme:this.theme,onFeedlogUpvote:e=>this.handleUpvote(e)})}))))}static get style(){return":host{display:block;--feedlog-muted-foreground:#64748b}:host(.dark){--feedlog-muted-foreground:oklch(0.72 0.02 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}"}},[1,"feedlog-issues-list",{issues:[16],theme:[1],getIssueUrl:[16]}]);function c(){"undefined"!=typeof customElements&&["feedlog-issues-list","feedlog-badge","feedlog-issue"].forEach((s=>{switch(s){case"feedlog-issues-list":customElements.get(e(s))||customElements.define(e(s),a);break;case"feedlog-badge":customElements.get(e(s))||l();break;case"feedlog-issue":customElements.get(e(s))||r()}}))}c();const u=a,n=c;export{u as FeedlogIssuesList,n as defineCustomElement}
1
+ import{t as e,p as s,H as t,c as o,h as i,a as d}from"./index.js";import{d as l}from"./p-Chc3XZ5Y.js";import{d as r}from"./p-BBPFf6g7.js";const u=s(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.feedlogUpvote=o(this,"feedlogUpvote"),this.issues=[],this.theme="light",this.handleUpvote=e=>{e.stopPropagation(),this.feedlogUpvote.emit(e.detail)}}render(){return i(d,{key:"005de8cf99383128f6973be57d84499c8ca9afd3",class:"dark"===this.theme?"dark":""},i("div",{key:"60edc37014f6703b9400dc8bf06726c9a8428a3b",class:"issues-list"},0===this.issues.length?i("div",{class:"empty-state"},i("p",null,"No issues found")):this.issues.map((e=>{var s,t;return i("feedlog-issue",{key:e.id,issue:e,issueUrl:null!==(t=null===(s=this.getIssueUrl)||void 0===s?void 0:s.call(this,e))&&void 0!==t?t:void 0,theme:this.theme,onFeedlogUpvote:e=>this.handleUpvote(e)})}))))}static get style(){return":host{display:block;--feedlog-muted-foreground:#64748b}:host(.dark){--feedlog-muted-foreground:oklch(0.72 0.02 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}"}},[1,"feedlog-issues-list",{issues:[16],theme:[1],getIssueUrl:[16]}]);function a(){"undefined"!=typeof customElements&&["feedlog-issues-list","feedlog-badge","feedlog-issue"].forEach((s=>{switch(s){case"feedlog-issues-list":customElements.get(e(s))||customElements.define(e(s),u);break;case"feedlog-badge":customElements.get(e(s))||l();break;case"feedlog-issue":customElements.get(e(s))||r()}}))}a();const c=u,n=a;export{c as FeedlogIssuesList,n as defineCustomElement}
@@ -0,0 +1 @@
1
+ import{t as e,p as t,H as o,c as s,h as i,a as l}from"./index.js";import{d as r}from"./p-Chc3XZ5Y.js";import{d as a}from"./p-DMdb-G26.js";import{d}from"./p-BBPFf6g7.js";const n=t(class extends o{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.feedlogUpvote=s(this,"feedlogUpvote"),this.feedlogLoadMore=s(this,"feedlogLoadMore"),this.issues=[],this.maxWidth="42rem",this.theme="light",this.loading=!1,this.error=null,this.hasMore=!1,this.isLoadingMore=!1,this.currentTheme="light",this.handleUpvote=e=>{e.stopPropagation(),this.feedlogUpvote.emit(e.detail)},this.handleLoadMore=()=>{this.feedlogLoadMore.emit()}}componentWillLoad(){this.currentTheme=this.theme}renderEmptyStateIllustration(){return i("svg",{class:"empty-state-illustration",xmlns:"http://www.w3.org/2000/svg",width:"120",height:"96",viewBox:"0 0 120 96",fill:"none","aria-hidden":"true"},i("path",{d:"M20 36h80v44c0 4.4-3.6 8-8 8H28c-4.4 0-8-3.6-8-8V36z",fill:"var(--feedlog-empty-illustration-bg)",stroke:"var(--feedlog-empty-illustration-stroke)","stroke-width":"1.5","stroke-linejoin":"round"}),i("path",{d:"M20 36l20-24h40l20 24",fill:"none",stroke:"var(--feedlog-empty-illustration-stroke)","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),i("path",{d:"M44 52h32M44 60h24M44 68h28",stroke:"var(--feedlog-empty-illustration-muted)","stroke-width":"1.25","stroke-linecap":"round"}))}renderErrorIcon(){return i("svg",{class:"error-icon",xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},i("circle",{cx:"12",cy:"12",r:"10"}),i("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),i("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"}))}renderIssuesList(){var e,t;return i("div",{class:"issues-list"},0===this.issues.length?i("div",{class:"empty-state"},i("div",{class:"empty-state-content"},this.renderEmptyStateIllustration(),i("h2",{class:"empty-state-title"},null!==(e=this.emptyStateTitle)&&void 0!==e?e:"No updates yet"),i("p",{class:"empty-state-message"},null!==(t=this.emptyStateMessage)&&void 0!==t?t:"Check back later for new updates."))):this.issues.map((e=>{var t,o;return i("feedlog-issue",{key:e.id,issue:e,issueUrl:null!==(o=null===(t=this.getIssueUrl)||void 0===t?void 0:t.call(this,e))&&void 0!==o?o:void 0,theme:this.currentTheme,onFeedlogUpvote:e=>this.handleUpvote(e)})})))}render(){return i(l,{key:"fbd1890061b47db8b850a8d993e2ac5432c4b3f6",class:"dark"===this.currentTheme?"dark":""},i("div",{key:"5ce9267da314ebb69ed8ee00f28015fdad73ab8a",class:"github-issues-container",style:{maxWidth:this.maxWidth}},(this.heading||this.subtitle)&&i("header",{key:"461c707df1e5dc7eaab15462de975fafdce872df",class:"issues-header"},i("div",{key:"e6972c2f0cfe5630cc73fb41a2103c9b0118179c",class:"header-content"},this.heading&&i("h1",{key:"d74e89c1ad981da6c4287e5b75256bfb831f1172",class:"issues-title"},this.heading),this.subtitle&&i("p",{key:"c820d8e3beaa57c0c193ceaace1d13e94a2a6290",class:"issues-subtitle"},this.subtitle))),this.loading&&i("div",{key:"959be24cb77b257fba5197302448f78af553817e",class:"loading-state",role:"status","aria-label":"Loading issues"},i("div",{key:"e69594f18e3268208634a3ad82cb2ae0bc552c11",class:"loading-skeletons"},[1,2,3].map((e=>i("div",{key:e,class:"skeleton-card"},i("div",{class:"skeleton-content"},i("div",{class:"skeleton-header"},i("div",{class:"skeleton-badge"}),i("div",{class:"skeleton-timestamp"})),i("div",{class:"skeleton-main"},i("div",{class:"skeleton-title"}),i("div",{class:"skeleton-body"},i("div",{class:"skeleton-line"}),i("div",{class:"skeleton-line short"})),i("div",{class:"skeleton-repo"})),i("div",{class:"skeleton-footer"},i("div",{class:"skeleton-upvote"})))))))),this.error&&i("div",{key:"93e82b0beca0b96c23803b1abfc3d50fe099fa6a",class:"error-state",role:"alert"},i("div",{key:"9276d85925d02bd4c81d5ee44a5d6a8af986c4c9",class:"error-state-content"},this.renderErrorIcon(),i("h2",{key:"6f5762740f908712a46cddeafae675294d3bcc40",class:"error-state-title"},"Something went wrong"),i("p",{key:"f1587bd9a2abe250aa730d64498a5105a412d657",class:"error-state-message"},this.error))),!this.loading&&!this.error&&i("div",{key:"22c68553352358a9a408ea763af1e63c9c84eabd"},this.renderIssuesList(),this.hasMore&&i("div",{key:"231ec6f4680b4b114ba72c657f9801d84951a6d6",class:"load-more-container"},i("feedlog-button",{key:"18fa475708fe233f3f9d0ec85bf0f8daea9a4a0a",onFeedlogClick:this.handleLoadMore,disabled:this.isLoadingMore,variant:"outline"},this.isLoadingMore?"Loading...":"Load More Issues")))))}static get style(){return":host{display:block;font-family:ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;--feedlog-background:#ffffff;--feedlog-foreground:oklch(0.145 0 0);--feedlog-card:#ffffff;--feedlog-card-foreground:oklch(0.145 0 0);--feedlog-muted:#ececf0;--feedlog-muted-foreground:#717182;--feedlog-border:rgba(0, 0, 0, 0.1);--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-padding:2rem;--feedlog-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.08);--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-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-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.3);--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.02 260)}.github-issues-container{min-height:100vh;background-color:var(--feedlog-background);padding:var(--feedlog-padding);margin:0 auto}.issues-header{margin-bottom:1.5rem;display:flex;align-items:flex-start;justify-content:space-between}.header-content{flex:1}.issues-title{color:var(--feedlog-foreground);margin:0 0 0.25rem 0;font-size:1.5rem;font-weight:500;line-height:1.5}.issues-subtitle{color:var(--feedlog-muted-foreground);font-size:0.875rem;margin:0}.loading-state{padding:0}.loading-skeletons{display:flex;flex-direction:column;gap:var(--feedlog-gap)}.skeleton-card{background-color:var(--feedlog-card);border:1px solid var(--feedlog-border);border-radius:var(--feedlog-radius);box-shadow:var(--feedlog-shadow);position:relative;overflow:hidden}.skeleton-card::before{content:'';position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--feedlog-muted)}.skeleton-content{padding:1.25rem;padding-left:calc(1.25rem + 3px);display:flex;flex-direction:column;gap:0.875rem}.skeleton-header{display:flex;align-items:center;justify-content:space-between;gap:0.75rem}.skeleton-badge{width:4.5rem;height:1.25rem;border-radius:0.375rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite}.skeleton-timestamp{width:3rem;height:0.75rem;border-radius:0.25rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite 0.2s}.skeleton-main{display:flex;flex-direction:column;gap:0.5rem}.skeleton-title{height:0.9375rem;border-radius:0.25rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite 0.1s;width:85%}.skeleton-body{display:flex;flex-direction:column;gap:0.375rem}.skeleton-line{height:0.8125rem;border-radius:0.25rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite 0.15s;width:100%}.skeleton-line.short{width:70%}.skeleton-repo{width:6rem;height:0.75rem;border-radius:0.25rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite 0.25s}.skeleton-footer{display:flex;justify-content:flex-end}.skeleton-upvote{width:2.5rem;height:2rem;border-radius:0.5rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite 0.3s}@keyframes skeleton-pulse{0%,100%{opacity:1}50%{opacity:0.5}}.error-state{display:flex;align-items:center;justify-content:center;padding:3rem 2rem;min-height:12rem}.error-state-content{display:flex;flex-direction:column;align-items:center;text-align:center;max-width:20rem;padding:2rem}.error-icon{color:var(--feedlog-muted-foreground);opacity:0.8;margin-bottom:1rem}.error-state-title{margin:0 0 0.5rem 0;font-size:1.125rem;font-weight:600;color:var(--feedlog-foreground);line-height:1.4}.error-state-message{margin:0 0 1.25rem 0;font-size:0.875rem;color:var(--feedlog-muted-foreground);line-height:1.5}.issues-list{display:flex;flex-direction:column;gap:var(--feedlog-gap)}.empty-state{display:flex;align-items:center;justify-content:center;padding:4rem 2rem;min-height:16rem}.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}.load-more-container{display:flex;justify-content:center;padding:2rem 0;gap:1rem}"}},[1,"feedlog-github-issues",{issues:[16],maxWidth:[1,"max-width"],theme:[1025],heading:[1],subtitle:[1],emptyStateTitle:[1,"empty-state-title"],emptyStateMessage:[1,"empty-state-message"],loading:[4],error:[1],hasMore:[4,"has-more"],isLoadingMore:[4,"is-loading-more"],getIssueUrl:[16],currentTheme:[32]}]);function c(){"undefined"!=typeof customElements&&["feedlog-github-issues","feedlog-badge","feedlog-button","feedlog-issue"].forEach((t=>{switch(t){case"feedlog-github-issues":customElements.get(e(t))||customElements.define(e(t),n);break;case"feedlog-badge":customElements.get(e(t))||r();break;case"feedlog-button":customElements.get(e(t))||a();break;case"feedlog-issue":customElements.get(e(t))||d()}}))}c();export{n as F,c as d}
@@ -486,7 +486,7 @@ const FeedlogGithubIssuesClient = class {
486
486
  if (this.isDisconnected || currentRequestId !== this.fetchRequestId) {
487
487
  return;
488
488
  }
489
- const errorMsg = err instanceof Error ? err.message : 'Failed to fetch issues';
489
+ const errorMsg = err instanceof Error ? err.message : "Couldn't load updates";
490
490
  this.error = errorMsg;
491
491
  this.issues = [];
492
492
  this.feedlogError.emit({
@@ -551,7 +551,7 @@ const FeedlogGithubIssuesClient = class {
551
551
  }
552
552
  }
553
553
  render() {
554
- return (h("feedlog-github-issues", { key: '5d5bbd34f21c89b18ecb78f2411cfb825ff78d12', issues: this.issues, maxWidth: this.maxWidth, theme: this.theme, heading: this.heading, subtitle: this.subtitle, getIssueUrl: this.getIssueUrl, loading: this.loading, error: this.error, hasMore: this.hasMore, isLoadingMore: this.isLoadingMore, onFeedlogUpvote: this.handleUpvote, onFeedlogLoadMore: async () => this.loadMore() }));
554
+ return (h("feedlog-github-issues", { key: '4bc46e4f2622d4c2c5080835ae436ae9fc37c991', issues: this.issues, 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() }));
555
555
  }
556
556
  };
557
557
 
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host } from './index-rs_66Oq4.js';
2
2
 
3
- const feedlogGithubIssuesCss = () => `:host{display:block;font-family:ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;--feedlog-background:#ffffff;--feedlog-foreground:oklch(0.145 0 0);--feedlog-card:#ffffff;--feedlog-card-foreground:oklch(0.145 0 0);--feedlog-muted:#ececf0;--feedlog-muted-foreground:#717182;--feedlog-border:rgba(0, 0, 0, 0.1);--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-padding:2rem}: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)}.github-issues-container{min-height:100vh;background-color:var(--feedlog-background);padding:var(--feedlog-padding);margin:0 auto}.issues-header{margin-bottom:1.5rem;display:flex;align-items:flex-start;justify-content:space-between}.header-content{flex:1}.issues-title{color:var(--feedlog-foreground);margin:0 0 0.25rem 0;font-size:1.5rem;font-weight:500;line-height:1.5}.issues-subtitle{color:var(--feedlog-muted-foreground);font-size:0.875rem;margin:0}.loading-state,.error-state{padding:2rem;text-align:center;color:var(--feedlog-muted-foreground)}.error-state{color:var(--feedlog-destructive)}.issues-list{display:flex;flex-direction:column;gap:var(--feedlog-gap)}.empty-state{text-align:center;padding:3rem 1.5rem;color:var(--feedlog-muted-foreground);font-size:0.875rem}.load-more-container{display:flex;justify-content:center;padding:2rem 0;gap:1rem}`;
3
+ const feedlogGithubIssuesCss = () => `:host{display:block;font-family:ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;--feedlog-background:#ffffff;--feedlog-foreground:oklch(0.145 0 0);--feedlog-card:#ffffff;--feedlog-card-foreground:oklch(0.145 0 0);--feedlog-muted:#ececf0;--feedlog-muted-foreground:#717182;--feedlog-border:rgba(0, 0, 0, 0.1);--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-padding:2rem;--feedlog-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.08);--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-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-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.3);--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.02 260)}.github-issues-container{min-height:100vh;background-color:var(--feedlog-background);padding:var(--feedlog-padding);margin:0 auto}.issues-header{margin-bottom:1.5rem;display:flex;align-items:flex-start;justify-content:space-between}.header-content{flex:1}.issues-title{color:var(--feedlog-foreground);margin:0 0 0.25rem 0;font-size:1.5rem;font-weight:500;line-height:1.5}.issues-subtitle{color:var(--feedlog-muted-foreground);font-size:0.875rem;margin:0}.loading-state{padding:0}.loading-skeletons{display:flex;flex-direction:column;gap:var(--feedlog-gap)}.skeleton-card{background-color:var(--feedlog-card);border:1px solid var(--feedlog-border);border-radius:var(--feedlog-radius);box-shadow:var(--feedlog-shadow);position:relative;overflow:hidden}.skeleton-card::before{content:'';position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--feedlog-muted)}.skeleton-content{padding:1.25rem;padding-left:calc(1.25rem + 3px);display:flex;flex-direction:column;gap:0.875rem}.skeleton-header{display:flex;align-items:center;justify-content:space-between;gap:0.75rem}.skeleton-badge{width:4.5rem;height:1.25rem;border-radius:0.375rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite}.skeleton-timestamp{width:3rem;height:0.75rem;border-radius:0.25rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite 0.2s}.skeleton-main{display:flex;flex-direction:column;gap:0.5rem}.skeleton-title{height:0.9375rem;border-radius:0.25rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite 0.1s;width:85%}.skeleton-body{display:flex;flex-direction:column;gap:0.375rem}.skeleton-line{height:0.8125rem;border-radius:0.25rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite 0.15s;width:100%}.skeleton-line.short{width:70%}.skeleton-repo{width:6rem;height:0.75rem;border-radius:0.25rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite 0.25s}.skeleton-footer{display:flex;justify-content:flex-end}.skeleton-upvote{width:2.5rem;height:2rem;border-radius:0.5rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite 0.3s}@keyframes skeleton-pulse{0%,100%{opacity:1}50%{opacity:0.5}}.error-state{display:flex;align-items:center;justify-content:center;padding:3rem 2rem;min-height:12rem}.error-state-content{display:flex;flex-direction:column;align-items:center;text-align:center;max-width:20rem;padding:2rem}.error-icon{color:var(--feedlog-muted-foreground);opacity:0.8;margin-bottom:1rem}.error-state-title{margin:0 0 0.5rem 0;font-size:1.125rem;font-weight:600;color:var(--feedlog-foreground);line-height:1.4}.error-state-message{margin:0 0 1.25rem 0;font-size:0.875rem;color:var(--feedlog-muted-foreground);line-height:1.5}.issues-list{display:flex;flex-direction:column;gap:var(--feedlog-gap)}.empty-state{display:flex;align-items:center;justify-content:center;padding:4rem 2rem;min-height:16rem}.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}.load-more-container{display:flex;justify-content:center;padding:2rem 0;gap:1rem}`;
4
4
 
5
5
  const FeedlogGithubIssues = class {
6
6
  constructor(hostRef) {
@@ -50,8 +50,15 @@ const FeedlogGithubIssues = class {
50
50
  componentWillLoad() {
51
51
  this.currentTheme = this.theme;
52
52
  }
53
+ renderEmptyStateIllustration() {
54
+ return (h("svg", { class: "empty-state-illustration", xmlns: "http://www.w3.org/2000/svg", width: "120", height: "96", viewBox: "0 0 120 96", fill: "none", "aria-hidden": "true" }, h("path", { d: "M20 36h80v44c0 4.4-3.6 8-8 8H28c-4.4 0-8-3.6-8-8V36z", fill: "var(--feedlog-empty-illustration-bg)", stroke: "var(--feedlog-empty-illustration-stroke)", "stroke-width": "1.5", "stroke-linejoin": "round" }), h("path", { d: "M20 36l20-24h40l20 24", fill: "none", stroke: "var(--feedlog-empty-illustration-stroke)", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M44 52h32M44 60h24M44 68h28", stroke: "var(--feedlog-empty-illustration-muted)", "stroke-width": "1.25", "stroke-linecap": "round" })));
55
+ }
56
+ renderErrorIcon() {
57
+ return (h("svg", { class: "error-icon", xmlns: "http://www.w3.org/2000/svg", width: "48", height: "48", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("circle", { cx: "12", cy: "12", r: "10" }), h("line", { x1: "12", y1: "8", x2: "12", y2: "12" }), h("line", { x1: "12", y1: "16", x2: "12.01", y2: "16" })));
58
+ }
53
59
  renderIssuesList() {
54
- return (h("div", { class: "issues-list" }, this.issues.length === 0 ? (h("div", { class: "empty-state" }, h("p", null, "No issues found"))) : (this.issues.map(issue => {
60
+ var _a, _b;
61
+ return (h("div", { class: "issues-list" }, this.issues.length === 0 ? (h("div", { class: "empty-state" }, h("div", { class: "empty-state-content" }, this.renderEmptyStateIllustration(), h("h2", { class: "empty-state-title" }, (_a = this.emptyStateTitle) !== null && _a !== void 0 ? _a : 'No updates yet'), h("p", { class: "empty-state-message" }, (_b = this.emptyStateMessage) !== null && _b !== void 0 ? _b : 'Check back later for new updates.')))) : (this.issues.map(issue => {
55
62
  var _a, _b;
56
63
  return (h("feedlog-issue", { key: issue.id, issue: issue, issueUrl: (_b = (_a = this.getIssueUrl) === null || _a === void 0 ? void 0 : _a.call(this, issue)) !== null && _b !== void 0 ? _b : undefined, theme: this.currentTheme, onFeedlogUpvote: (e) => this.handleUpvote(e) }));
57
64
  }))));
@@ -60,7 +67,7 @@ const FeedlogGithubIssues = class {
60
67
  const containerStyle = {
61
68
  maxWidth: this.maxWidth,
62
69
  };
63
- return (h(Host, { key: '8d371971cf80542020ff10d09e49b1e86cbd1170', class: this.currentTheme === 'dark' ? 'dark' : '' }, h("div", { key: '6a46103b04afbd473ca02a5f16125192a00f2e9b', class: "github-issues-container", style: containerStyle }, (this.heading || this.subtitle) && (h("header", { key: '55b481d2ea993566769670aeef1959aa76cc422e', class: "issues-header" }, h("div", { key: 'c80a94733595b2fc74f9e670b8ebe92498e762f5', class: "header-content" }, this.heading && h("h1", { key: '16cb4c7cf71d1d91b52dede91f900a79f9a66458', class: "issues-title" }, this.heading), this.subtitle && h("p", { key: 'ee0d7a228dc935b2fa88a03133e79888a60853df', class: "issues-subtitle" }, this.subtitle)))), this.loading && (h("div", { key: '3830120b4883517f73133bb3b51f26a3cd2c0503', class: "loading-state" }, h("p", { key: '13a5c0d3f466092c77b3cc6b8d3af448c44b4f48' }, "Loading issues..."))), this.error && (h("div", { key: '84b1c7407a0b3c858598663feb8d4a782ec1bff2', class: "error-state" }, h("p", { key: 'd846f63028dc9134a28270853d1af08cf3b75ef5' }, "Error: ", this.error))), !this.loading && !this.error && (h("div", { key: 'e9676a45008da5976db58180d72275e3080a51a1' }, this.renderIssuesList(), this.hasMore && (h("div", { key: '85ef1768fbcc1636bbeeaa2a74afaa552455d05e', class: "load-more-container" }, h("feedlog-button", { key: 'd408617ab69f6d70acbb9dfc360d3a09c79279b1', onFeedlogClick: this.handleLoadMore, disabled: this.isLoadingMore, variant: "outline" }, this.isLoadingMore ? 'Loading...' : 'Load More Issues'))))))));
70
+ return (h(Host, { key: 'fbd1890061b47db8b850a8d993e2ac5432c4b3f6', class: this.currentTheme === 'dark' ? 'dark' : '' }, h("div", { key: '5ce9267da314ebb69ed8ee00f28015fdad73ab8a', class: "github-issues-container", style: containerStyle }, (this.heading || this.subtitle) && (h("header", { key: '461c707df1e5dc7eaab15462de975fafdce872df', class: "issues-header" }, h("div", { key: 'e6972c2f0cfe5630cc73fb41a2103c9b0118179c', class: "header-content" }, this.heading && h("h1", { key: 'd74e89c1ad981da6c4287e5b75256bfb831f1172', class: "issues-title" }, this.heading), this.subtitle && h("p", { key: 'c820d8e3beaa57c0c193ceaace1d13e94a2a6290', class: "issues-subtitle" }, this.subtitle)))), this.loading && (h("div", { key: '959be24cb77b257fba5197302448f78af553817e', class: "loading-state", role: "status", "aria-label": "Loading issues" }, h("div", { key: 'e69594f18e3268208634a3ad82cb2ae0bc552c11', class: "loading-skeletons" }, [1, 2, 3].map(i => (h("div", { key: i, class: "skeleton-card" }, h("div", { class: "skeleton-content" }, h("div", { class: "skeleton-header" }, h("div", { class: "skeleton-badge" }), h("div", { class: "skeleton-timestamp" })), h("div", { class: "skeleton-main" }, h("div", { class: "skeleton-title" }), h("div", { class: "skeleton-body" }, h("div", { class: "skeleton-line" }), h("div", { class: "skeleton-line short" })), h("div", { class: "skeleton-repo" })), h("div", { class: "skeleton-footer" }, h("div", { class: "skeleton-upvote" }))))))))), this.error && (h("div", { key: '93e82b0beca0b96c23803b1abfc3d50fe099fa6a', class: "error-state", role: "alert" }, h("div", { key: '9276d85925d02bd4c81d5ee44a5d6a8af986c4c9', class: "error-state-content" }, this.renderErrorIcon(), h("h2", { key: '6f5762740f908712a46cddeafae675294d3bcc40', class: "error-state-title" }, "Something went wrong"), h("p", { key: 'f1587bd9a2abe250aa730d64498a5105a412d657', class: "error-state-message" }, this.error)))), !this.loading && !this.error && (h("div", { key: '22c68553352358a9a408ea763af1e63c9c84eabd' }, this.renderIssuesList(), this.hasMore && (h("div", { key: '231ec6f4680b4b114ba72c657f9801d84951a6d6', class: "load-more-container" }, h("feedlog-button", { key: '18fa475708fe233f3f9d0ec85bf0f8daea9a4a0a', onFeedlogClick: this.handleLoadMore, disabled: this.isLoadingMore, variant: "outline" }, this.isLoadingMore ? 'Loading...' : 'Load More Issues'))))))));
64
71
  }
65
72
  };
66
73
  FeedlogGithubIssues.style = feedlogGithubIssuesCss();
@@ -20,7 +20,7 @@ const FeedlogIssuesList = class {
20
20
  };
21
21
  }
22
22
  render() {
23
- return (h(Host, { key: '118e81e7928ecdc097c2a29a2a8f5a7cbf9c321f', class: this.theme === 'dark' ? 'dark' : '' }, h("div", { key: 'ae6d2cdb78e153640b080fd6c634d7ce00a2c082', class: "issues-list" }, this.issues.length === 0 ? (h("div", { class: "empty-state" }, h("p", null, "No issues found"))) : (this.issues.map(issue => {
23
+ return (h(Host, { key: '005de8cf99383128f6973be57d84499c8ca9afd3', class: this.theme === 'dark' ? 'dark' : '' }, h("div", { key: '60edc37014f6703b9400dc8bf06726c9a8428a3b', class: "issues-list" }, this.issues.length === 0 ? (h("div", { class: "empty-state" }, h("p", null, "No issues found"))) : (this.issues.map(issue => {
24
24
  var _a, _b;
25
25
  return (h("feedlog-issue", { key: issue.id, issue: issue, issueUrl: (_b = (_a = this.getIssueUrl) === null || _a === void 0 ? void 0 : _a.call(this, issue)) !== null && _b !== void 0 ? _b : undefined, theme: this.theme, onFeedlogUpvote: (e) => this.handleUpvote(e) }));
26
26
  })))));
@@ -16,5 +16,5 @@ var patchBrowser = () => {
16
16
 
17
17
  patchBrowser().then(async (options) => {
18
18
  await globalScripts();
19
- return bootstrapLazy([["feedlog-issues-list",[[1,"feedlog-issues-list",{"issues":[16],"theme":[1],"getIssueUrl":[16]}]]],["feedlog-card",[[257,"feedlog-card"]]],["feedlog-badge",[[257,"feedlog-badge",{"variant":[1]}]]],["feedlog-button_2",[[257,"feedlog-button",{"variant":[1],"size":[1],"disabled":[4],"type":[1]}],[257,"feedlog-issue",{"issue":[16],"issueUrl":[1,"issue-url"],"theme":[1]}]]],["feedlog-github-issues",[[1,"feedlog-github-issues",{"issues":[16],"maxWidth":[1,"max-width"],"theme":[1025],"heading":[1],"subtitle":[1],"loading":[4],"error":[1],"hasMore":[4,"has-more"],"isLoadingMore":[4,"is-loading-more"],"getIssueUrl":[16],"currentTheme":[32]}]]],["feedlog-github-issues-client",[[1,"feedlog-github-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],"getIssueUrl":[16],"issues":[32],"loading":[32],"error":[32],"cursor":[32],"hasMore":[32],"isLoadingMore":[32]}]]]], options);
19
+ return bootstrapLazy([["feedlog-issues-list",[[1,"feedlog-issues-list",{"issues":[16],"theme":[1],"getIssueUrl":[16]}]]],["feedlog-card",[[257,"feedlog-card"]]],["feedlog-badge",[[257,"feedlog-badge",{"variant":[1]}]]],["feedlog-button_2",[[257,"feedlog-button",{"variant":[1],"size":[1],"disabled":[4],"type":[1]}],[257,"feedlog-issue",{"issue":[16],"issueUrl":[1,"issue-url"],"theme":[1]}]]],["feedlog-github-issues",[[1,"feedlog-github-issues",{"issues":[16],"maxWidth":[1,"max-width"],"theme":[1025],"heading":[1],"subtitle":[1],"emptyStateTitle":[1,"empty-state-title"],"emptyStateMessage":[1,"empty-state-message"],"loading":[4],"error":[1],"hasMore":[4,"has-more"],"isLoadingMore":[4,"is-loading-more"],"getIssueUrl":[16],"currentTheme":[32]}]]],["feedlog-github-issues-client",[[1,"feedlog-github-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]}]]]], options);
20
20
  });
@@ -4,7 +4,7 @@ export { s as setNonce } from './index-rs_66Oq4.js';
4
4
  const defineCustomElements = async (win, options) => {
5
5
  if (typeof window === 'undefined') return undefined;
6
6
  await globalScripts();
7
- return bootstrapLazy([["feedlog-issues-list",[[1,"feedlog-issues-list",{"issues":[16],"theme":[1],"getIssueUrl":[16]}]]],["feedlog-card",[[257,"feedlog-card"]]],["feedlog-badge",[[257,"feedlog-badge",{"variant":[1]}]]],["feedlog-button_2",[[257,"feedlog-button",{"variant":[1],"size":[1],"disabled":[4],"type":[1]}],[257,"feedlog-issue",{"issue":[16],"issueUrl":[1,"issue-url"],"theme":[1]}]]],["feedlog-github-issues",[[1,"feedlog-github-issues",{"issues":[16],"maxWidth":[1,"max-width"],"theme":[1025],"heading":[1],"subtitle":[1],"loading":[4],"error":[1],"hasMore":[4,"has-more"],"isLoadingMore":[4,"is-loading-more"],"getIssueUrl":[16],"currentTheme":[32]}]]],["feedlog-github-issues-client",[[1,"feedlog-github-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],"getIssueUrl":[16],"issues":[32],"loading":[32],"error":[32],"cursor":[32],"hasMore":[32],"isLoadingMore":[32]}]]]], options);
7
+ return bootstrapLazy([["feedlog-issues-list",[[1,"feedlog-issues-list",{"issues":[16],"theme":[1],"getIssueUrl":[16]}]]],["feedlog-card",[[257,"feedlog-card"]]],["feedlog-badge",[[257,"feedlog-badge",{"variant":[1]}]]],["feedlog-button_2",[[257,"feedlog-button",{"variant":[1],"size":[1],"disabled":[4],"type":[1]}],[257,"feedlog-issue",{"issue":[16],"issueUrl":[1,"issue-url"],"theme":[1]}]]],["feedlog-github-issues",[[1,"feedlog-github-issues",{"issues":[16],"maxWidth":[1,"max-width"],"theme":[1025],"heading":[1],"subtitle":[1],"emptyStateTitle":[1,"empty-state-title"],"emptyStateMessage":[1,"empty-state-message"],"loading":[4],"error":[1],"hasMore":[4,"has-more"],"isLoadingMore":[4,"is-loading-more"],"getIssueUrl":[16],"currentTheme":[32]}]]],["feedlog-github-issues-client",[[1,"feedlog-github-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]}]]]], options);
8
8
  };
9
9
 
10
10
  export { defineCustomElements };
@@ -1 +1 @@
1
- import{p as e,g as i,b as t}from"./p-rs_66Oq4.js";export{s as setNonce}from"./p-rs_66Oq4.js";(()=>{const s=import.meta.url,i={};return""!==s&&(i.resourcesUrl=new URL(".",s).href),e(i)})().then((async e=>(await i(),t([["p-5688651c",[[1,"feedlog-issues-list",{issues:[16],theme:[1],getIssueUrl:[16]}]]],["p-4e90285c",[[257,"feedlog-card"]]],["p-da51c7fd",[[257,"feedlog-badge",{variant:[1]}]]],["p-dad7b157",[[257,"feedlog-button",{variant:[1],size:[1],disabled:[4],type:[1]}],[257,"feedlog-issue",{issue:[16],issueUrl:[1,"issue-url"],theme:[1]}]]],["p-3154bc80",[[1,"feedlog-github-issues",{issues:[16],maxWidth:[1,"max-width"],theme:[1025],heading:[1],subtitle:[1],loading:[4],error:[1],hasMore:[4,"has-more"],isLoadingMore:[4,"is-loading-more"],getIssueUrl:[16],currentTheme:[32]}]]],["p-70bf31c4",[[1,"feedlog-github-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],getIssueUrl:[16],issues:[32],loading:[32],error:[32],cursor:[32],hasMore:[32],isLoadingMore:[32]}]]]],e))));
1
+ import{p as e,g as t,b as a}from"./p-rs_66Oq4.js";export{s as setNonce}from"./p-rs_66Oq4.js";(()=>{const s=import.meta.url,t={};return""!==s&&(t.resourcesUrl=new URL(".",s).href),e(t)})().then((async e=>(await t(),a([["p-13773ed6",[[1,"feedlog-issues-list",{issues:[16],theme:[1],getIssueUrl:[16]}]]],["p-4e90285c",[[257,"feedlog-card"]]],["p-da51c7fd",[[257,"feedlog-badge",{variant:[1]}]]],["p-dad7b157",[[257,"feedlog-button",{variant:[1],size:[1],disabled:[4],type:[1]}],[257,"feedlog-issue",{issue:[16],issueUrl:[1,"issue-url"],theme:[1]}]]],["p-e5ba7dd7",[[1,"feedlog-github-issues",{issues:[16],maxWidth:[1,"max-width"],theme:[1025],heading:[1],subtitle:[1],emptyStateTitle:[1,"empty-state-title"],emptyStateMessage:[1,"empty-state-message"],loading:[4],error:[1],hasMore:[4,"has-more"],isLoadingMore:[4,"is-loading-more"],getIssueUrl:[16],currentTheme:[32]}]]],["p-9b515728",[[1,"feedlog-github-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]}]]]],e))));
@@ -0,0 +1 @@
1
+ import{r as s,c as e,h as t,H as i}from"./p-rs_66Oq4.js";const o=class{constructor(t){s(this,t),this.feedlogUpvote=e(this,"feedlogUpvote"),this.issues=[],this.theme="light",this.handleUpvote=s=>{s.stopPropagation(),this.feedlogUpvote.emit(s.detail)}}render(){return t(i,{key:"005de8cf99383128f6973be57d84499c8ca9afd3",class:"dark"===this.theme?"dark":""},t("div",{key:"60edc37014f6703b9400dc8bf06726c9a8428a3b",class:"issues-list"},0===this.issues.length?t("div",{class:"empty-state"},t("p",null,"No issues found")):this.issues.map((s=>{var e,i;return t("feedlog-issue",{key:s.id,issue:s,issueUrl:null!==(i=null===(e=this.getIssueUrl)||void 0===e?void 0:e.call(this,s))&&void 0!==i?i:void 0,theme:this.theme,onFeedlogUpvote:s=>this.handleUpvote(s)})}))))}};o.style=":host{display:block;--feedlog-muted-foreground:#64748b}:host(.dark){--feedlog-muted-foreground:oklch(0.72 0.02 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}";export{o as feedlog_issues_list}
@@ -1 +1 @@
1
- import{r as t,c as s,h as e}from"./p-rs_66Oq4.js";function i(t){if("string"!=typeof t)return"";let s=t.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"");return s=s.replace(/\s*on\w+\s*=\s*["'][^"']*["']/gi,""),s=s.replace(/\s*on\w+\s*=\s*[^\s>]*/gi,""),s=s.replace(/<iframe\b[^<]*(?:(?!<\/iframe>)<[^<]*)*<\/iframe>/gi,""),s=s.replace(/<style\b[^<]*(?:(?!<\/style>)<[^<]*)*<\/style>/gi,""),s=s.replace(/<(embed|object)\b[^<]*>/gi,""),s=s.replace(/javascript:/gi,""),s=s.replace(/data:(?!image\/(?:png|jpg|jpeg|gif|webp);)/gi,""),s}class o extends Error{constructor(t,s,e){super(t),this.statusCode=s,this.originalError=e,this.name="FeedlogError",Object.setPrototypeOf(this,o.prototype)}}class r extends o{constructor(t){super(t),this.name="FeedlogValidationError",Object.setPrototypeOf(this,r.prototype)}}class n extends o{constructor(t,s,e){super(t,s,e),this.name="FeedlogNetworkError",Object.setPrototypeOf(this,n.prototype)}}class h extends o{constructor(t="Request timed out"){super(t),this.name="FeedlogTimeoutError",Object.setPrototypeOf(this,h.prototype)}}class a{constructor(t){if(this.config={credentials:"include",...t},this.apiKey=this.config.apiKey,!this.apiKey)throw new r("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 s=this.buildIssuesUrl(t),e=await this.fetchWithTimeout(s,{method:"GET",headers:this.getAuthHeaders(),credentials:this.config.credentials||"include"});if(!e.ok)throw new n(`Failed to fetch issues: ${e.statusText}`,e.status);const i=await e.json();return this.validateIssuesResponse(i)}catch(t){if(t instanceof o)throw t;if(t instanceof TypeError&&t.message.includes("fetch"))throw new n("Network error: Unable to reach API",void 0,t);throw new o(`Failed to fetch issues: ${t instanceof Error?t.message:"Unknown error"}`,void 0,t)}}async toggleUpvote(t){if(!t||"string"!=typeof t)throw new r("Issue ID is required");try{const s=`${this.endpoint}/api/issues/${encodeURIComponent(t)}/upvote`,e=await this.fetchWithTimeout(s,{method:"POST",headers:this.getAuthHeaders(),credentials:this.config.credentials||"include",body:JSON.stringify({})});if(404===e.status)throw new n("Issue not found",404);if(401===e.status)throw new n("Unauthorized",401);if(403===e.status)throw new n("Forbidden: Domain not allowed for this repository",403);if(!e.ok)throw new n(`Failed to toggle upvote: ${e.statusText}`,e.status);const i=await e.json();return this.validateUpvoteResponse(i)}catch(t){if(t instanceof o)throw t;if(t instanceof TypeError&&t.message.includes("fetch"))throw new n("Network error: Unable to reach API",void 0,t);throw new o(`Failed to toggle upvote: ${t instanceof Error?t.message:"Unknown error"}`,void 0,t)}}buildIssuesUrl(t){const s=new URL(`${this.endpoint}/api/issues`);if(t.repositoryIds){const e=Array.isArray(t.repositoryIds)?t.repositoryIds:[t.repositoryIds];for(const t of e)s.searchParams.append("repositoryIds",t)}return t.type&&s.searchParams.set("type",t.type),t.sortBy&&s.searchParams.set("sortBy",t.sortBy),t.cursor&&s.searchParams.set("cursor",t.cursor),void 0!==t.limit&&s.searchParams.set("limit",t.limit.toString()),s.toString()}getAuthHeaders(){const t={"Content-Type":"application/json"};return this.apiKey&&(t["x-api-key"]=this.apiKey),t}async fetchWithTimeout(t,s){const e=new AbortController,i=setTimeout((()=>e.abort()),this.timeout);try{const o=await fetch(t,{...s,signal:e.signal});return clearTimeout(i),o}catch(t){if(clearTimeout(i),t instanceof Error&&"AbortError"===t.name)throw new h(`Request timed out after ${this.timeout}ms`);throw t}}validateIssuesResponse(t){if(!t||"object"!=typeof t)throw new r("Invalid API response: expected object");const s=t;if(!Array.isArray(s.issues))throw new r("Invalid API response: issues must be an array");if(!s.pagination||"object"!=typeof s.pagination)throw new r("Invalid API response: pagination is required");return{issues:s.issues.map((t=>this.validateIssue(t))),pagination:{cursor:s.pagination.cursor,hasMore:Boolean(s.pagination.hasMore)}}}validateIssue(t){if(!t||"object"!=typeof t)throw new r("Invalid issue: expected object");const s=t;if("string"!=typeof s.id)throw new r("Invalid issue: id is required and must be a string");if(!["bug","enhancement"].includes(String(s.type)))throw new r('Invalid issue: type must be "bug" or "enhancement"');if(!["open","in_progress","closed"].includes(String(s.status)))throw new r('Invalid issue: status must be "open", "in_progress", or "closed"');if(!s.repository||"object"!=typeof s.repository)throw new r("Invalid issue: repository is required");const e=s.repository;if("string"!=typeof e.id)throw new r("Invalid issue: repository must have id");const o=null!==s.githubIssueLink&&"string"==typeof s.githubIssueLink?String(s.githubIssueLink):null,n=s.title,h=null!=n&&""!==n?i(String(n)):null,a=s.body,u=null!=a&&""!==a?i(String(a)):null,c=e.name,l=null!=c&&""!==c?String(c):null,d=e.description,p=null!=d&&""!==d?i(String(d)):null;return{id:String(s.id),githubIssueLink:o,type:s.type||"bug",status:s.status||"open",pinnedAt:s.pinnedAt?String(s.pinnedAt):null,revision:Number(s.revision)||1,title:h,body:u,repository:{id:String(e.id),name:l,description:p},updatedAt:String(s.updatedAt)||(new Date).toISOString(),createdAt:String(s.createdAt)||(new Date).toISOString(),upvoteCount:Number(s.upvoteCount)||0,hasUpvoted:Boolean(s.hasUpvoted)}}validateUpvoteResponse(t){if(!t||"object"!=typeof t)throw new r("Invalid upvote response: expected object");const s=t;if("boolean"!=typeof s.upvoted)throw new r("Invalid upvote response: upvoted must be a boolean");if("number"!=typeof s.upvoteCount)throw new r("Invalid upvote response: upvoteCount must be a number");if("string"!=typeof s.anonymousUserId)throw new r("Invalid upvote response: anonymousUserId must be a string");return{upvoted:s.upvoted,upvoteCount:s.upvoteCount,anonymousUserId:s.anonymousUserId}}getEndpoint(){return this.endpoint}getTimeout(){return this.timeout}}const u=class{constructor(e){t(this,e),this.feedlogUpvote=s(this,"feedlogUpvote"),this.feedlogError=s(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:s,currentUpvoted:e,currentCount:i}=t.detail,o=(this.upvoteRequestIds.get(s)||0)+1;this.upvoteRequestIds.set(s,o),this.issues=this.issues.map((t=>t.id===s?Object.assign(Object.assign({},t),{hasUpvoted:!e,upvoteCount:e?i-1:i+1}):t));try{const t=await this.sdk.toggleUpvote(s);if(this.isDisconnected||this.upvoteRequestIds.get(s)!==o)return;this.issues=this.issues.map((e=>e.id===s?Object.assign(Object.assign({},e),{hasUpvoted:t.upvoted,upvoteCount:t.upvoteCount}):e)),this.feedlogUpvote.emit({issueId:s,upvoted:t.upvoted,upvoteCount:t.upvoteCount})}catch(t){if(this.isDisconnected||this.upvoteRequestIds.get(s)!==o)return;this.issues=this.issues.map((t=>t.id===s?Object.assign(Object.assign({},t),{hasUpvoted:e,upvoteCount:i}):t));const r=t instanceof Error?t.message:"Failed to toggle upvote";this.feedlogError.emit({error:r})}}}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 new Error("API key is required for the Feedlog SDK");this.sdk=new a(Object.assign({apiKey:this.apiKey},this.endpoint&&{endpoint:this.endpoint})),this.error=null}catch(t){const s=t instanceof Error?t.message:"Failed to initialize SDK";this.error=s,this.feedlogError.emit({error:s})}}async fetchIssues(){if(!this.sdk)return;const t=this.fetchRequestId;try{this.loading=!0,this.error=null;const s={};this.type&&(s.type=this.type),this.sortBy&&(s.sortBy=this.sortBy),this.limit&&(s.limit=this.limit),this.cursor&&(s.cursor=this.cursor);const e=await this.sdk.fetchIssues(s);if(this.isDisconnected||t!==this.fetchRequestId)return;this.issues=e.issues,this.cursor=e.pagination.cursor,this.hasMore=e.pagination.hasMore}catch(s){if(this.isDisconnected||t!==this.fetchRequestId)return;const e=s instanceof Error?s.message:"Failed to fetch issues";this.error=e,this.issues=[],this.feedlogError.emit({error:e,code:null==s?void 0:s.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 s={};this.type&&(s.type=this.type),this.sortBy&&(s.sortBy=this.sortBy),this.limit&&(s.limit=this.limit),this.cursor&&(s.cursor=this.cursor);const e=await this.sdk.fetchIssues(s);if(this.isDisconnected||t!==this.fetchRequestId)return;this.issues=[...this.issues,...e.issues],this.cursor=e.pagination.cursor,this.hasMore=e.pagination.hasMore}catch(s){if(this.isDisconnected||t!==this.fetchRequestId)return;const e=s instanceof Error?s.message:"Failed to load more issues";this.feedlogError.emit({error:e,code:null==s?void 0:s.statusCode})}finally{this.isDisconnected||t!==this.fetchRequestId||(this.isLoadingMore=!1)}}render(){return e("feedlog-github-issues",{key:"5d5bbd34f21c89b18ecb78f2411cfb825ff78d12",issues:this.issues,maxWidth:this.maxWidth,theme:this.theme,heading:this.heading,subtitle:this.subtitle,getIssueUrl:this.getIssueUrl,loading:this.loading,error:this.error,hasMore:this.hasMore,isLoadingMore:this.isLoadingMore,onFeedlogUpvote:this.handleUpvote,onFeedlogLoadMore:async()=>this.loadMore()})}};export{u as feedlog_github_issues_client}
1
+ import{r as t,c as s,h as e}from"./p-rs_66Oq4.js";function i(t){if("string"!=typeof t)return"";let s=t.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"");return s=s.replace(/\s*on\w+\s*=\s*["'][^"']*["']/gi,""),s=s.replace(/\s*on\w+\s*=\s*[^\s>]*/gi,""),s=s.replace(/<iframe\b[^<]*(?:(?!<\/iframe>)<[^<]*)*<\/iframe>/gi,""),s=s.replace(/<style\b[^<]*(?:(?!<\/style>)<[^<]*)*<\/style>/gi,""),s=s.replace(/<(embed|object)\b[^<]*>/gi,""),s=s.replace(/javascript:/gi,""),s=s.replace(/data:(?!image\/(?:png|jpg|jpeg|gif|webp);)/gi,""),s}class o extends Error{constructor(t,s,e){super(t),this.statusCode=s,this.originalError=e,this.name="FeedlogError",Object.setPrototypeOf(this,o.prototype)}}class r extends o{constructor(t){super(t),this.name="FeedlogValidationError",Object.setPrototypeOf(this,r.prototype)}}class n extends o{constructor(t,s,e){super(t,s,e),this.name="FeedlogNetworkError",Object.setPrototypeOf(this,n.prototype)}}class h extends o{constructor(t="Request timed out"){super(t),this.name="FeedlogTimeoutError",Object.setPrototypeOf(this,h.prototype)}}class a{constructor(t){if(this.config={credentials:"include",...t},this.apiKey=this.config.apiKey,!this.apiKey)throw new r("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 s=this.buildIssuesUrl(t),e=await this.fetchWithTimeout(s,{method:"GET",headers:this.getAuthHeaders(),credentials:this.config.credentials||"include"});if(!e.ok)throw new n(`Failed to fetch issues: ${e.statusText}`,e.status);const i=await e.json();return this.validateIssuesResponse(i)}catch(t){if(t instanceof o)throw t;if(t instanceof TypeError&&t.message.includes("fetch"))throw new n("Network error: Unable to reach API",void 0,t);throw new o(`Failed to fetch issues: ${t instanceof Error?t.message:"Unknown error"}`,void 0,t)}}async toggleUpvote(t){if(!t||"string"!=typeof t)throw new r("Issue ID is required");try{const s=`${this.endpoint}/api/issues/${encodeURIComponent(t)}/upvote`,e=await this.fetchWithTimeout(s,{method:"POST",headers:this.getAuthHeaders(),credentials:this.config.credentials||"include",body:JSON.stringify({})});if(404===e.status)throw new n("Issue not found",404);if(401===e.status)throw new n("Unauthorized",401);if(403===e.status)throw new n("Forbidden: Domain not allowed for this repository",403);if(!e.ok)throw new n(`Failed to toggle upvote: ${e.statusText}`,e.status);const i=await e.json();return this.validateUpvoteResponse(i)}catch(t){if(t instanceof o)throw t;if(t instanceof TypeError&&t.message.includes("fetch"))throw new n("Network error: Unable to reach API",void 0,t);throw new o(`Failed to toggle upvote: ${t instanceof Error?t.message:"Unknown error"}`,void 0,t)}}buildIssuesUrl(t){const s=new URL(`${this.endpoint}/api/issues`);if(t.repositoryIds){const e=Array.isArray(t.repositoryIds)?t.repositoryIds:[t.repositoryIds];for(const t of e)s.searchParams.append("repositoryIds",t)}return t.type&&s.searchParams.set("type",t.type),t.sortBy&&s.searchParams.set("sortBy",t.sortBy),t.cursor&&s.searchParams.set("cursor",t.cursor),void 0!==t.limit&&s.searchParams.set("limit",t.limit.toString()),s.toString()}getAuthHeaders(){const t={"Content-Type":"application/json"};return this.apiKey&&(t["x-api-key"]=this.apiKey),t}async fetchWithTimeout(t,s){const e=new AbortController,i=setTimeout((()=>e.abort()),this.timeout);try{const o=await fetch(t,{...s,signal:e.signal});return clearTimeout(i),o}catch(t){if(clearTimeout(i),t instanceof Error&&"AbortError"===t.name)throw new h(`Request timed out after ${this.timeout}ms`);throw t}}validateIssuesResponse(t){if(!t||"object"!=typeof t)throw new r("Invalid API response: expected object");const s=t;if(!Array.isArray(s.issues))throw new r("Invalid API response: issues must be an array");if(!s.pagination||"object"!=typeof s.pagination)throw new r("Invalid API response: pagination is required");return{issues:s.issues.map((t=>this.validateIssue(t))),pagination:{cursor:s.pagination.cursor,hasMore:Boolean(s.pagination.hasMore)}}}validateIssue(t){if(!t||"object"!=typeof t)throw new r("Invalid issue: expected object");const s=t;if("string"!=typeof s.id)throw new r("Invalid issue: id is required and must be a string");if(!["bug","enhancement"].includes(String(s.type)))throw new r('Invalid issue: type must be "bug" or "enhancement"');if(!["open","in_progress","closed"].includes(String(s.status)))throw new r('Invalid issue: status must be "open", "in_progress", or "closed"');if(!s.repository||"object"!=typeof s.repository)throw new r("Invalid issue: repository is required");const e=s.repository;if("string"!=typeof e.id)throw new r("Invalid issue: repository must have id");const o=null!==s.githubIssueLink&&"string"==typeof s.githubIssueLink?String(s.githubIssueLink):null,n=s.title,h=null!=n&&""!==n?i(String(n)):null,a=s.body,u=null!=a&&""!==a?i(String(a)):null,c=e.name,l=null!=c&&""!==c?String(c):null,d=e.description,p=null!=d&&""!==d?i(String(d)):null;return{id:String(s.id),githubIssueLink:o,type:s.type||"bug",status:s.status||"open",pinnedAt:s.pinnedAt?String(s.pinnedAt):null,revision:Number(s.revision)||1,title:h,body:u,repository:{id:String(e.id),name:l,description:p},updatedAt:String(s.updatedAt)||(new Date).toISOString(),createdAt:String(s.createdAt)||(new Date).toISOString(),upvoteCount:Number(s.upvoteCount)||0,hasUpvoted:Boolean(s.hasUpvoted)}}validateUpvoteResponse(t){if(!t||"object"!=typeof t)throw new r("Invalid upvote response: expected object");const s=t;if("boolean"!=typeof s.upvoted)throw new r("Invalid upvote response: upvoted must be a boolean");if("number"!=typeof s.upvoteCount)throw new r("Invalid upvote response: upvoteCount must be a number");if("string"!=typeof s.anonymousUserId)throw new r("Invalid upvote response: anonymousUserId must be a string");return{upvoted:s.upvoted,upvoteCount:s.upvoteCount,anonymousUserId:s.anonymousUserId}}getEndpoint(){return this.endpoint}getTimeout(){return this.timeout}}const u=class{constructor(e){t(this,e),this.feedlogUpvote=s(this,"feedlogUpvote"),this.feedlogError=s(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:s,currentUpvoted:e,currentCount:i}=t.detail,o=(this.upvoteRequestIds.get(s)||0)+1;this.upvoteRequestIds.set(s,o),this.issues=this.issues.map((t=>t.id===s?Object.assign(Object.assign({},t),{hasUpvoted:!e,upvoteCount:e?i-1:i+1}):t));try{const t=await this.sdk.toggleUpvote(s);if(this.isDisconnected||this.upvoteRequestIds.get(s)!==o)return;this.issues=this.issues.map((e=>e.id===s?Object.assign(Object.assign({},e),{hasUpvoted:t.upvoted,upvoteCount:t.upvoteCount}):e)),this.feedlogUpvote.emit({issueId:s,upvoted:t.upvoted,upvoteCount:t.upvoteCount})}catch(t){if(this.isDisconnected||this.upvoteRequestIds.get(s)!==o)return;this.issues=this.issues.map((t=>t.id===s?Object.assign(Object.assign({},t),{hasUpvoted:e,upvoteCount:i}):t));const r=t instanceof Error?t.message:"Failed to toggle upvote";this.feedlogError.emit({error:r})}}}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 new Error("API key is required for the Feedlog SDK");this.sdk=new a(Object.assign({apiKey:this.apiKey},this.endpoint&&{endpoint:this.endpoint})),this.error=null}catch(t){const s=t instanceof Error?t.message:"Failed to initialize SDK";this.error=s,this.feedlogError.emit({error:s})}}async fetchIssues(){if(!this.sdk)return;const t=this.fetchRequestId;try{this.loading=!0,this.error=null;const s={};this.type&&(s.type=this.type),this.sortBy&&(s.sortBy=this.sortBy),this.limit&&(s.limit=this.limit),this.cursor&&(s.cursor=this.cursor);const e=await this.sdk.fetchIssues(s);if(this.isDisconnected||t!==this.fetchRequestId)return;this.issues=e.issues,this.cursor=e.pagination.cursor,this.hasMore=e.pagination.hasMore}catch(s){if(this.isDisconnected||t!==this.fetchRequestId)return;const e=s instanceof Error?s.message:"Couldn't load updates";this.error=e,this.issues=[],this.feedlogError.emit({error:e,code:null==s?void 0:s.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 s={};this.type&&(s.type=this.type),this.sortBy&&(s.sortBy=this.sortBy),this.limit&&(s.limit=this.limit),this.cursor&&(s.cursor=this.cursor);const e=await this.sdk.fetchIssues(s);if(this.isDisconnected||t!==this.fetchRequestId)return;this.issues=[...this.issues,...e.issues],this.cursor=e.pagination.cursor,this.hasMore=e.pagination.hasMore}catch(s){if(this.isDisconnected||t!==this.fetchRequestId)return;const e=s instanceof Error?s.message:"Failed to load more issues";this.feedlogError.emit({error:e,code:null==s?void 0:s.statusCode})}finally{this.isDisconnected||t!==this.fetchRequestId||(this.isLoadingMore=!1)}}render(){return e("feedlog-github-issues",{key:"4bc46e4f2622d4c2c5080835ae436ae9fc37c991",issues:this.issues,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()})}};export{u as feedlog_github_issues_client}
@@ -0,0 +1 @@
1
+ import{r as e,c as t,h as o,H as s}from"./p-rs_66Oq4.js";const i=class{constructor(o){e(this,o),this.feedlogUpvote=t(this,"feedlogUpvote"),this.feedlogLoadMore=t(this,"feedlogLoadMore"),this.issues=[],this.maxWidth="42rem",this.theme="light",this.loading=!1,this.error=null,this.hasMore=!1,this.isLoadingMore=!1,this.currentTheme="light",this.handleUpvote=e=>{e.stopPropagation(),this.feedlogUpvote.emit(e.detail)},this.handleLoadMore=()=>{this.feedlogLoadMore.emit()}}componentWillLoad(){this.currentTheme=this.theme}renderEmptyStateIllustration(){return o("svg",{class:"empty-state-illustration",xmlns:"http://www.w3.org/2000/svg",width:"120",height:"96",viewBox:"0 0 120 96",fill:"none","aria-hidden":"true"},o("path",{d:"M20 36h80v44c0 4.4-3.6 8-8 8H28c-4.4 0-8-3.6-8-8V36z",fill:"var(--feedlog-empty-illustration-bg)",stroke:"var(--feedlog-empty-illustration-stroke)","stroke-width":"1.5","stroke-linejoin":"round"}),o("path",{d:"M20 36l20-24h40l20 24",fill:"none",stroke:"var(--feedlog-empty-illustration-stroke)","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),o("path",{d:"M44 52h32M44 60h24M44 68h28",stroke:"var(--feedlog-empty-illustration-muted)","stroke-width":"1.25","stroke-linecap":"round"}))}renderErrorIcon(){return o("svg",{class:"error-icon",xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},o("circle",{cx:"12",cy:"12",r:"10"}),o("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),o("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"}))}renderIssuesList(){var e,t;return o("div",{class:"issues-list"},0===this.issues.length?o("div",{class:"empty-state"},o("div",{class:"empty-state-content"},this.renderEmptyStateIllustration(),o("h2",{class:"empty-state-title"},null!==(e=this.emptyStateTitle)&&void 0!==e?e:"No updates yet"),o("p",{class:"empty-state-message"},null!==(t=this.emptyStateMessage)&&void 0!==t?t:"Check back later for new updates."))):this.issues.map((e=>{var t,s;return o("feedlog-issue",{key:e.id,issue:e,issueUrl:null!==(s=null===(t=this.getIssueUrl)||void 0===t?void 0:t.call(this,e))&&void 0!==s?s:void 0,theme:this.currentTheme,onFeedlogUpvote:e=>this.handleUpvote(e)})})))}render(){return o(s,{key:"fbd1890061b47db8b850a8d993e2ac5432c4b3f6",class:"dark"===this.currentTheme?"dark":""},o("div",{key:"5ce9267da314ebb69ed8ee00f28015fdad73ab8a",class:"github-issues-container",style:{maxWidth:this.maxWidth}},(this.heading||this.subtitle)&&o("header",{key:"461c707df1e5dc7eaab15462de975fafdce872df",class:"issues-header"},o("div",{key:"e6972c2f0cfe5630cc73fb41a2103c9b0118179c",class:"header-content"},this.heading&&o("h1",{key:"d74e89c1ad981da6c4287e5b75256bfb831f1172",class:"issues-title"},this.heading),this.subtitle&&o("p",{key:"c820d8e3beaa57c0c193ceaace1d13e94a2a6290",class:"issues-subtitle"},this.subtitle))),this.loading&&o("div",{key:"959be24cb77b257fba5197302448f78af553817e",class:"loading-state",role:"status","aria-label":"Loading issues"},o("div",{key:"e69594f18e3268208634a3ad82cb2ae0bc552c11",class:"loading-skeletons"},[1,2,3].map((e=>o("div",{key:e,class:"skeleton-card"},o("div",{class:"skeleton-content"},o("div",{class:"skeleton-header"},o("div",{class:"skeleton-badge"}),o("div",{class:"skeleton-timestamp"})),o("div",{class:"skeleton-main"},o("div",{class:"skeleton-title"}),o("div",{class:"skeleton-body"},o("div",{class:"skeleton-line"}),o("div",{class:"skeleton-line short"})),o("div",{class:"skeleton-repo"})),o("div",{class:"skeleton-footer"},o("div",{class:"skeleton-upvote"})))))))),this.error&&o("div",{key:"93e82b0beca0b96c23803b1abfc3d50fe099fa6a",class:"error-state",role:"alert"},o("div",{key:"9276d85925d02bd4c81d5ee44a5d6a8af986c4c9",class:"error-state-content"},this.renderErrorIcon(),o("h2",{key:"6f5762740f908712a46cddeafae675294d3bcc40",class:"error-state-title"},"Something went wrong"),o("p",{key:"f1587bd9a2abe250aa730d64498a5105a412d657",class:"error-state-message"},this.error))),!this.loading&&!this.error&&o("div",{key:"22c68553352358a9a408ea763af1e63c9c84eabd"},this.renderIssuesList(),this.hasMore&&o("div",{key:"231ec6f4680b4b114ba72c657f9801d84951a6d6",class:"load-more-container"},o("feedlog-button",{key:"18fa475708fe233f3f9d0ec85bf0f8daea9a4a0a",onFeedlogClick:this.handleLoadMore,disabled:this.isLoadingMore,variant:"outline"},this.isLoadingMore?"Loading...":"Load More Issues")))))}};i.style=":host{display:block;font-family:ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;--feedlog-background:#ffffff;--feedlog-foreground:oklch(0.145 0 0);--feedlog-card:#ffffff;--feedlog-card-foreground:oklch(0.145 0 0);--feedlog-muted:#ececf0;--feedlog-muted-foreground:#717182;--feedlog-border:rgba(0, 0, 0, 0.1);--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-padding:2rem;--feedlog-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.08);--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-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-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.3);--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.02 260)}.github-issues-container{min-height:100vh;background-color:var(--feedlog-background);padding:var(--feedlog-padding);margin:0 auto}.issues-header{margin-bottom:1.5rem;display:flex;align-items:flex-start;justify-content:space-between}.header-content{flex:1}.issues-title{color:var(--feedlog-foreground);margin:0 0 0.25rem 0;font-size:1.5rem;font-weight:500;line-height:1.5}.issues-subtitle{color:var(--feedlog-muted-foreground);font-size:0.875rem;margin:0}.loading-state{padding:0}.loading-skeletons{display:flex;flex-direction:column;gap:var(--feedlog-gap)}.skeleton-card{background-color:var(--feedlog-card);border:1px solid var(--feedlog-border);border-radius:var(--feedlog-radius);box-shadow:var(--feedlog-shadow);position:relative;overflow:hidden}.skeleton-card::before{content:'';position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--feedlog-muted)}.skeleton-content{padding:1.25rem;padding-left:calc(1.25rem + 3px);display:flex;flex-direction:column;gap:0.875rem}.skeleton-header{display:flex;align-items:center;justify-content:space-between;gap:0.75rem}.skeleton-badge{width:4.5rem;height:1.25rem;border-radius:0.375rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite}.skeleton-timestamp{width:3rem;height:0.75rem;border-radius:0.25rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite 0.2s}.skeleton-main{display:flex;flex-direction:column;gap:0.5rem}.skeleton-title{height:0.9375rem;border-radius:0.25rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite 0.1s;width:85%}.skeleton-body{display:flex;flex-direction:column;gap:0.375rem}.skeleton-line{height:0.8125rem;border-radius:0.25rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite 0.15s;width:100%}.skeleton-line.short{width:70%}.skeleton-repo{width:6rem;height:0.75rem;border-radius:0.25rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite 0.25s}.skeleton-footer{display:flex;justify-content:flex-end}.skeleton-upvote{width:2.5rem;height:2rem;border-radius:0.5rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite 0.3s}@keyframes skeleton-pulse{0%,100%{opacity:1}50%{opacity:0.5}}.error-state{display:flex;align-items:center;justify-content:center;padding:3rem 2rem;min-height:12rem}.error-state-content{display:flex;flex-direction:column;align-items:center;text-align:center;max-width:20rem;padding:2rem}.error-icon{color:var(--feedlog-muted-foreground);opacity:0.8;margin-bottom:1rem}.error-state-title{margin:0 0 0.5rem 0;font-size:1.125rem;font-weight:600;color:var(--feedlog-foreground);line-height:1.4}.error-state-message{margin:0 0 1.25rem 0;font-size:0.875rem;color:var(--feedlog-muted-foreground);line-height:1.5}.issues-list{display:flex;flex-direction:column;gap:var(--feedlog-gap)}.empty-state{display:flex;align-items:center;justify-content:center;padding:4rem 2rem;min-height:16rem}.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}.load-more-container{display:flex;justify-content:center;padding:2rem 0;gap:1rem}";export{i as feedlog_github_issues}
@@ -27,6 +27,14 @@ export declare class FeedlogGithubIssues {
27
27
  * Custom subtitle for the issues section
28
28
  */
29
29
  subtitle?: string;
30
+ /**
31
+ * Empty state title. Defaults to "No updates yet".
32
+ */
33
+ emptyStateTitle?: string;
34
+ /**
35
+ * Empty state message. Defaults to "Check back later for new updates.".
36
+ */
37
+ emptyStateMessage?: string;
30
38
  /**
31
39
  * Loading state - shows loading indicator when true
32
40
  */
@@ -67,6 +75,8 @@ export declare class FeedlogGithubIssues {
67
75
  componentWillLoad(): void;
68
76
  private handleUpvote;
69
77
  private handleLoadMore;
78
+ private renderEmptyStateIllustration;
79
+ private renderErrorIcon;
70
80
  private renderIssuesList;
71
81
  render(): any;
72
82
  }
@@ -44,6 +44,14 @@ export declare class FeedlogGithubIssuesClient {
44
44
  * Custom subtitle for the issues section
45
45
  */
46
46
  subtitle?: string;
47
+ /**
48
+ * Empty state title (e.g. "No updates yet")
49
+ */
50
+ emptyStateTitle?: string;
51
+ /**
52
+ * Empty state message (e.g. "Check back later for new updates.")
53
+ */
54
+ emptyStateMessage?: string;
47
55
  /**
48
56
  * Optional callback to resolve GitHub issue URL when githubIssueLink is not available.
49
57
  * Required because repository.owner was removed from the API for privacy.
@@ -57,6 +57,14 @@ export namespace Components {
57
57
  * Includes full list rendering, loading/error states, and pagination support.
58
58
  */
59
59
  interface FeedlogGithubIssues {
60
+ /**
61
+ * Empty state message. Defaults to "Check back later for new updates.".
62
+ */
63
+ "emptyStateMessage"?: string;
64
+ /**
65
+ * Empty state title. Defaults to "No updates yet".
66
+ */
67
+ "emptyStateTitle"?: string;
60
68
  /**
61
69
  * Error message - shows error state when set
62
70
  * @default null
@@ -115,6 +123,14 @@ export namespace Components {
115
123
  * API key for Feedlog authentication (required) The API key determines which repositories' issues are fetched
116
124
  */
117
125
  "apiKey": string;
126
+ /**
127
+ * Empty state message (e.g. "Check back later for new updates.")
128
+ */
129
+ "emptyStateMessage"?: string;
130
+ /**
131
+ * Empty state title (e.g. "No updates yet")
132
+ */
133
+ "emptyStateTitle"?: string;
118
134
  /**
119
135
  * Custom API endpoint
120
136
  */
@@ -420,6 +436,14 @@ declare namespace LocalJSX {
420
436
  * Includes full list rendering, loading/error states, and pagination support.
421
437
  */
422
438
  interface FeedlogGithubIssues {
439
+ /**
440
+ * Empty state message. Defaults to "Check back later for new updates.".
441
+ */
442
+ "emptyStateMessage"?: string;
443
+ /**
444
+ * Empty state title. Defaults to "No updates yet".
445
+ */
446
+ "emptyStateTitle"?: string;
423
447
  /**
424
448
  * Error message - shows error state when set
425
449
  * @default null
@@ -490,6 +514,14 @@ declare namespace LocalJSX {
490
514
  * API key for Feedlog authentication (required) The API key determines which repositories' issues are fetched
491
515
  */
492
516
  "apiKey": string;
517
+ /**
518
+ * Empty state message (e.g. "Check back later for new updates.")
519
+ */
520
+ "emptyStateMessage"?: string;
521
+ /**
522
+ * Empty state title (e.g. "No updates yet")
523
+ */
524
+ "emptyStateTitle"?: string;
493
525
  /**
494
526
  * Custom API endpoint
495
527
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedlog-ai/webcomponents",
3
- "version": "0.0.21",
3
+ "version": "0.0.22",
4
4
  "description": "Stencil web components for Feedlog Toolkit - Data visualization components",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.js",
@@ -59,7 +59,7 @@
59
59
  "clean": "rm -rf dist loader"
60
60
  },
61
61
  "dependencies": {
62
- "@feedlog-ai/core": "^0.0.21",
62
+ "@feedlog-ai/core": "^0.0.22",
63
63
  "dompurify": "^3.3.1",
64
64
  "marked": "^17.0.2"
65
65
  },
@@ -1 +0,0 @@
1
- import{t as e,p as o,H as s,c as t,h as d,a}from"./index.js";import{d as i}from"./p-Chc3XZ5Y.js";import{d as l}from"./p-DMdb-G26.js";import{d as r}from"./p-BBPFf6g7.js";const f=o(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.feedlogUpvote=t(this,"feedlogUpvote"),this.feedlogLoadMore=t(this,"feedlogLoadMore"),this.issues=[],this.maxWidth="42rem",this.theme="light",this.loading=!1,this.error=null,this.hasMore=!1,this.isLoadingMore=!1,this.currentTheme="light",this.handleUpvote=e=>{e.stopPropagation(),this.feedlogUpvote.emit(e.detail)},this.handleLoadMore=()=>{this.feedlogLoadMore.emit()}}componentWillLoad(){this.currentTheme=this.theme}renderIssuesList(){return d("div",{class:"issues-list"},0===this.issues.length?d("div",{class:"empty-state"},d("p",null,"No issues found")):this.issues.map((e=>{var o,s;return d("feedlog-issue",{key:e.id,issue:e,issueUrl:null!==(s=null===(o=this.getIssueUrl)||void 0===o?void 0:o.call(this,e))&&void 0!==s?s:void 0,theme:this.currentTheme,onFeedlogUpvote:e=>this.handleUpvote(e)})})))}render(){return d(a,{key:"8d371971cf80542020ff10d09e49b1e86cbd1170",class:"dark"===this.currentTheme?"dark":""},d("div",{key:"6a46103b04afbd473ca02a5f16125192a00f2e9b",class:"github-issues-container",style:{maxWidth:this.maxWidth}},(this.heading||this.subtitle)&&d("header",{key:"55b481d2ea993566769670aeef1959aa76cc422e",class:"issues-header"},d("div",{key:"c80a94733595b2fc74f9e670b8ebe92498e762f5",class:"header-content"},this.heading&&d("h1",{key:"16cb4c7cf71d1d91b52dede91f900a79f9a66458",class:"issues-title"},this.heading),this.subtitle&&d("p",{key:"ee0d7a228dc935b2fa88a03133e79888a60853df",class:"issues-subtitle"},this.subtitle))),this.loading&&d("div",{key:"3830120b4883517f73133bb3b51f26a3cd2c0503",class:"loading-state"},d("p",{key:"13a5c0d3f466092c77b3cc6b8d3af448c44b4f48"},"Loading issues...")),this.error&&d("div",{key:"84b1c7407a0b3c858598663feb8d4a782ec1bff2",class:"error-state"},d("p",{key:"d846f63028dc9134a28270853d1af08cf3b75ef5"},"Error: ",this.error)),!this.loading&&!this.error&&d("div",{key:"e9676a45008da5976db58180d72275e3080a51a1"},this.renderIssuesList(),this.hasMore&&d("div",{key:"85ef1768fbcc1636bbeeaa2a74afaa552455d05e",class:"load-more-container"},d("feedlog-button",{key:"d408617ab69f6d70acbb9dfc360d3a09c79279b1",onFeedlogClick:this.handleLoadMore,disabled:this.isLoadingMore,variant:"outline"},this.isLoadingMore?"Loading...":"Load More Issues")))))}static get style(){return":host{display:block;font-family:ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;--feedlog-background:#ffffff;--feedlog-foreground:oklch(0.145 0 0);--feedlog-card:#ffffff;--feedlog-card-foreground:oklch(0.145 0 0);--feedlog-muted:#ececf0;--feedlog-muted-foreground:#717182;--feedlog-border:rgba(0, 0, 0, 0.1);--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-padding:2rem}: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)}.github-issues-container{min-height:100vh;background-color:var(--feedlog-background);padding:var(--feedlog-padding);margin:0 auto}.issues-header{margin-bottom:1.5rem;display:flex;align-items:flex-start;justify-content:space-between}.header-content{flex:1}.issues-title{color:var(--feedlog-foreground);margin:0 0 0.25rem 0;font-size:1.5rem;font-weight:500;line-height:1.5}.issues-subtitle{color:var(--feedlog-muted-foreground);font-size:0.875rem;margin:0}.loading-state,.error-state{padding:2rem;text-align:center;color:var(--feedlog-muted-foreground)}.error-state{color:var(--feedlog-destructive)}.issues-list{display:flex;flex-direction:column;gap:var(--feedlog-gap)}.empty-state{text-align:center;padding:3rem 1.5rem;color:var(--feedlog-muted-foreground);font-size:0.875rem}.load-more-container{display:flex;justify-content:center;padding:2rem 0;gap:1rem}"}},[1,"feedlog-github-issues",{issues:[16],maxWidth:[1,"max-width"],theme:[1025],heading:[1],subtitle:[1],loading:[4],error:[1],hasMore:[4,"has-more"],isLoadingMore:[4,"is-loading-more"],getIssueUrl:[16],currentTheme:[32]}]);function c(){"undefined"!=typeof customElements&&["feedlog-github-issues","feedlog-badge","feedlog-button","feedlog-issue"].forEach((o=>{switch(o){case"feedlog-github-issues":customElements.get(e(o))||customElements.define(e(o),f);break;case"feedlog-badge":customElements.get(e(o))||i();break;case"feedlog-button":customElements.get(e(o))||l();break;case"feedlog-issue":customElements.get(e(o))||r()}}))}c();export{f as F,c as d}
@@ -1 +0,0 @@
1
- import{r as e,c as o,h as s,H as d}from"./p-rs_66Oq4.js";const t=class{constructor(s){e(this,s),this.feedlogUpvote=o(this,"feedlogUpvote"),this.feedlogLoadMore=o(this,"feedlogLoadMore"),this.issues=[],this.maxWidth="42rem",this.theme="light",this.loading=!1,this.error=null,this.hasMore=!1,this.isLoadingMore=!1,this.currentTheme="light",this.handleUpvote=e=>{e.stopPropagation(),this.feedlogUpvote.emit(e.detail)},this.handleLoadMore=()=>{this.feedlogLoadMore.emit()}}componentWillLoad(){this.currentTheme=this.theme}renderIssuesList(){return s("div",{class:"issues-list"},0===this.issues.length?s("div",{class:"empty-state"},s("p",null,"No issues found")):this.issues.map((e=>{var o,d;return s("feedlog-issue",{key:e.id,issue:e,issueUrl:null!==(d=null===(o=this.getIssueUrl)||void 0===o?void 0:o.call(this,e))&&void 0!==d?d:void 0,theme:this.currentTheme,onFeedlogUpvote:e=>this.handleUpvote(e)})})))}render(){return s(d,{key:"8d371971cf80542020ff10d09e49b1e86cbd1170",class:"dark"===this.currentTheme?"dark":""},s("div",{key:"6a46103b04afbd473ca02a5f16125192a00f2e9b",class:"github-issues-container",style:{maxWidth:this.maxWidth}},(this.heading||this.subtitle)&&s("header",{key:"55b481d2ea993566769670aeef1959aa76cc422e",class:"issues-header"},s("div",{key:"c80a94733595b2fc74f9e670b8ebe92498e762f5",class:"header-content"},this.heading&&s("h1",{key:"16cb4c7cf71d1d91b52dede91f900a79f9a66458",class:"issues-title"},this.heading),this.subtitle&&s("p",{key:"ee0d7a228dc935b2fa88a03133e79888a60853df",class:"issues-subtitle"},this.subtitle))),this.loading&&s("div",{key:"3830120b4883517f73133bb3b51f26a3cd2c0503",class:"loading-state"},s("p",{key:"13a5c0d3f466092c77b3cc6b8d3af448c44b4f48"},"Loading issues...")),this.error&&s("div",{key:"84b1c7407a0b3c858598663feb8d4a782ec1bff2",class:"error-state"},s("p",{key:"d846f63028dc9134a28270853d1af08cf3b75ef5"},"Error: ",this.error)),!this.loading&&!this.error&&s("div",{key:"e9676a45008da5976db58180d72275e3080a51a1"},this.renderIssuesList(),this.hasMore&&s("div",{key:"85ef1768fbcc1636bbeeaa2a74afaa552455d05e",class:"load-more-container"},s("feedlog-button",{key:"d408617ab69f6d70acbb9dfc360d3a09c79279b1",onFeedlogClick:this.handleLoadMore,disabled:this.isLoadingMore,variant:"outline"},this.isLoadingMore?"Loading...":"Load More Issues")))))}};t.style=":host{display:block;font-family:ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;--feedlog-background:#ffffff;--feedlog-foreground:oklch(0.145 0 0);--feedlog-card:#ffffff;--feedlog-card-foreground:oklch(0.145 0 0);--feedlog-muted:#ececf0;--feedlog-muted-foreground:#717182;--feedlog-border:rgba(0, 0, 0, 0.1);--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-padding:2rem}: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)}.github-issues-container{min-height:100vh;background-color:var(--feedlog-background);padding:var(--feedlog-padding);margin:0 auto}.issues-header{margin-bottom:1.5rem;display:flex;align-items:flex-start;justify-content:space-between}.header-content{flex:1}.issues-title{color:var(--feedlog-foreground);margin:0 0 0.25rem 0;font-size:1.5rem;font-weight:500;line-height:1.5}.issues-subtitle{color:var(--feedlog-muted-foreground);font-size:0.875rem;margin:0}.loading-state,.error-state{padding:2rem;text-align:center;color:var(--feedlog-muted-foreground)}.error-state{color:var(--feedlog-destructive)}.issues-list{display:flex;flex-direction:column;gap:var(--feedlog-gap)}.empty-state{text-align:center;padding:3rem 1.5rem;color:var(--feedlog-muted-foreground);font-size:0.875rem}.load-more-container{display:flex;justify-content:center;padding:2rem 0;gap:1rem}";export{t as feedlog_github_issues}
@@ -1 +0,0 @@
1
- import{r as e,c as s,h as t,H as i}from"./p-rs_66Oq4.js";const o=class{constructor(t){e(this,t),this.feedlogUpvote=s(this,"feedlogUpvote"),this.issues=[],this.theme="light",this.handleUpvote=e=>{e.stopPropagation(),this.feedlogUpvote.emit(e.detail)}}render(){return t(i,{key:"118e81e7928ecdc097c2a29a2a8f5a7cbf9c321f",class:"dark"===this.theme?"dark":""},t("div",{key:"ae6d2cdb78e153640b080fd6c634d7ce00a2c082",class:"issues-list"},0===this.issues.length?t("div",{class:"empty-state"},t("p",null,"No issues found")):this.issues.map((e=>{var s,i;return t("feedlog-issue",{key:e.id,issue:e,issueUrl:null!==(i=null===(s=this.getIssueUrl)||void 0===s?void 0:s.call(this,e))&&void 0!==i?i:void 0,theme:this.theme,onFeedlogUpvote:e=>this.handleUpvote(e)})}))))}};o.style=":host{display:block;--feedlog-muted-foreground:#64748b}:host(.dark){--feedlog-muted-foreground:oklch(0.72 0.02 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}";export{o as feedlog_issues_list}