@feedlog-ai/webcomponents 0.0.21 → 0.0.23

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 (48) hide show
  1. package/README.md +12 -12
  2. package/dist/cjs/{feedlog-button_2.cjs.entry.js → feedlog-button_3.cjs.entry.js} +32 -0
  3. package/dist/cjs/{feedlog-github-issues-client.cjs.entry.js → feedlog-issues-client.cjs.entry.js} +4 -4
  4. package/dist/cjs/feedlog-issues.cjs.entry.js +71 -0
  5. package/dist/cjs/feedlog-toolkit.cjs.js +1 -1
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/collection/collection-manifest.json +2 -2
  8. package/dist/collection/components/feedlog-issues/feedlog-issues.css +245 -0
  9. package/dist/collection/components/{feedlog-github-issues/feedlog-github-issues.js → feedlog-issues/feedlog-issues.js} +51 -12
  10. package/dist/collection/components/{feedlog-github-issues/feedlog-github-issues.stories.js → feedlog-issues/feedlog-issues.stories.js} +32 -18
  11. package/dist/collection/components/{feedlog-github-issues-client/feedlog-github-issues-client.js → feedlog-issues-client/feedlog-issues-client.js} +46 -8
  12. package/dist/collection/components/feedlog-issues-list/feedlog-issues-list.css +36 -0
  13. package/dist/collection/components/feedlog-issues-list/feedlog-issues-list.js +42 -1
  14. package/dist/collection/components/index.js +2 -2
  15. package/dist/components/{feedlog-github-issues.d.ts → feedlog-issues-client.d.ts} +4 -4
  16. package/dist/components/feedlog-issues-client.js +1 -0
  17. package/dist/components/feedlog-issues-list.js +1 -1
  18. package/dist/components/feedlog-issues.d.ts +11 -0
  19. package/dist/components/feedlog-issues.js +1 -0
  20. package/dist/components/p-BR3ookRG.js +1 -0
  21. package/dist/components/p-DJOCetIC.js +1 -0
  22. package/dist/esm/{feedlog-button_2.entry.js → feedlog-button_3.entry.js} +32 -1
  23. package/dist/esm/{feedlog-github-issues-client.entry.js → feedlog-issues-client.entry.js} +4 -4
  24. package/dist/esm/feedlog-issues.entry.js +69 -0
  25. package/dist/esm/feedlog-toolkit.js +1 -1
  26. package/dist/esm/loader.js +1 -1
  27. package/dist/feedlog-toolkit/feedlog-toolkit.esm.js +1 -1
  28. package/dist/feedlog-toolkit/p-4acededf.entry.js +1 -0
  29. package/dist/feedlog-toolkit/{p-70bf31c4.entry.js → p-6737a3f4.entry.js} +1 -1
  30. package/dist/feedlog-toolkit/{p-dad7b157.entry.js → p-f8e5e975.entry.js} +2 -2
  31. package/dist/types/components/{feedlog-github-issues/feedlog-github-issues.d.ts → feedlog-issues/feedlog-issues.d.ts} +13 -4
  32. package/dist/types/components/{feedlog-github-issues-client/feedlog-github-issues-client.d.ts → feedlog-issues-client/feedlog-issues-client.d.ts} +13 -5
  33. package/dist/types/components/feedlog-issues-list/feedlog-issues-list.d.ts +9 -0
  34. package/dist/types/components/index.d.ts +2 -2
  35. package/dist/types/components.d.ts +172 -124
  36. package/package.json +2 -2
  37. package/dist/cjs/feedlog-github-issues.cjs.entry.js +0 -70
  38. package/dist/cjs/feedlog-issues-list.cjs.entry.js +0 -33
  39. package/dist/collection/components/feedlog-github-issues/feedlog-github-issues.css +0 -104
  40. package/dist/components/feedlog-github-issues-client.d.ts +0 -11
  41. package/dist/components/feedlog-github-issues-client.js +0 -1
  42. package/dist/components/feedlog-github-issues.js +0 -1
  43. package/dist/components/p-CyaPkQyN.js +0 -1
  44. package/dist/esm/feedlog-github-issues.entry.js +0 -68
  45. package/dist/esm/feedlog-issues-list.entry.js +0 -31
  46. package/dist/feedlog-toolkit/p-3154bc80.entry.js +0 -1
  47. package/dist/feedlog-toolkit/p-5688651c.entry.js +0 -1
  48. /package/dist/types/components/{feedlog-github-issues/feedlog-github-issues.stories.d.ts → feedlog-issues/feedlog-issues.stories.d.ts} +0 -0
@@ -1,70 +0,0 @@
1
- 'use strict';
2
-
3
- var index = require('./index-DnsqTPII.js');
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}`;
6
-
7
- const FeedlogGithubIssues = class {
8
- constructor(hostRef) {
9
- index.registerInstance(this, hostRef);
10
- this.feedlogUpvote = index.createEvent(this, "feedlogUpvote");
11
- this.feedlogLoadMore = index.createEvent(this, "feedlogLoadMore");
12
- /**
13
- * Array of issues to display
14
- */
15
- this.issues = [];
16
- /**
17
- * Maximum width of the container
18
- */
19
- this.maxWidth = '42rem';
20
- /**
21
- * Theme variant: 'light' or 'dark'
22
- */
23
- this.theme = 'light';
24
- /**
25
- * Loading state - shows loading indicator when true
26
- */
27
- this.loading = false;
28
- /**
29
- * Error message - shows error state when set
30
- */
31
- this.error = null;
32
- /**
33
- * Whether there are more issues to load
34
- */
35
- this.hasMore = false;
36
- /**
37
- * Whether more issues are currently loading
38
- */
39
- this.isLoadingMore = false;
40
- /**
41
- * Internal state for theme
42
- */
43
- this.currentTheme = 'light';
44
- this.handleUpvote = (event) => {
45
- event.stopPropagation();
46
- this.feedlogUpvote.emit(event.detail);
47
- };
48
- this.handleLoadMore = () => {
49
- this.feedlogLoadMore.emit();
50
- };
51
- }
52
- componentWillLoad() {
53
- this.currentTheme = this.theme;
54
- }
55
- 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 => {
57
- var _a, _b;
58
- 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
- }))));
60
- }
61
- render() {
62
- const containerStyle = {
63
- maxWidth: this.maxWidth,
64
- };
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'))))))));
66
- }
67
- };
68
- FeedlogGithubIssues.style = feedlogGithubIssuesCss();
69
-
70
- exports.feedlog_github_issues = FeedlogGithubIssues;
@@ -1,33 +0,0 @@
1
- 'use strict';
2
-
3
- var index = require('./index-DnsqTPII.js');
4
-
5
- const feedlogIssuesListCss = () => `: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}`;
6
-
7
- const FeedlogIssuesList = class {
8
- constructor(hostRef) {
9
- index.registerInstance(this, hostRef);
10
- this.feedlogUpvote = index.createEvent(this, "feedlogUpvote");
11
- /**
12
- * Array of issues to display
13
- */
14
- this.issues = [];
15
- /**
16
- * Theme variant: 'light' or 'dark'
17
- */
18
- this.theme = 'light';
19
- this.handleUpvote = (event) => {
20
- event.stopPropagation();
21
- this.feedlogUpvote.emit(event.detail);
22
- };
23
- }
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 => {
26
- var _a, _b;
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
- })))));
29
- }
30
- };
31
- FeedlogIssuesList.style = feedlogIssuesListCss();
32
-
33
- exports.feedlog_issues_list = FeedlogIssuesList;
@@ -1,104 +0,0 @@
1
- :host {
2
- display: block;
3
- font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
4
-
5
- /* Light theme defaults */
6
- --feedlog-background: #ffffff;
7
- --feedlog-foreground: oklch(0.145 0 0);
8
- --feedlog-card: #ffffff;
9
- --feedlog-card-foreground: oklch(0.145 0 0);
10
- --feedlog-muted: #ececf0;
11
- --feedlog-muted-foreground: #717182;
12
- --feedlog-border: rgba(0, 0, 0, 0.1);
13
- --feedlog-accent-color: #2563eb;
14
- --feedlog-destructive: #d4183d;
15
- --feedlog-blue-400: oklch(0.707 0.165 254.624);
16
- --feedlog-blue-600: oklch(0.546 0.245 262.881);
17
- --feedlog-blue-100: oklch(0.932 0.032 255.585);
18
- --feedlog-red-100: #fce7f3;
19
- --feedlog-red-400: #f472b6;
20
- --feedlog-red-600: #db2777;
21
- --feedlog-radius: 0.625rem;
22
- --feedlog-gap: 0.5rem;
23
- --feedlog-padding: 2rem;
24
- }
25
-
26
- :host(.dark) {
27
- /* Dark theme values */
28
- --feedlog-background: oklch(0.18 0.01 260);
29
- --feedlog-foreground: oklch(0.985 0 0);
30
- --feedlog-card: oklch(0.24 0.01 260);
31
- --feedlog-card-foreground: oklch(0.985 0 0);
32
- --feedlog-muted: oklch(0.32 0.01 260);
33
- --feedlog-muted-foreground: oklch(0.72 0.02 260);
34
- --feedlog-border: oklch(0.34 0.01 260);
35
- --feedlog-accent-color: #3b82f6;
36
- --feedlog-destructive: oklch(0.396 0.141 25.723);
37
- --feedlog-blue-400: oklch(0.707 0.165 254.624);
38
- --feedlog-blue-600: oklch(0.546 0.245 262.881);
39
- --feedlog-blue-900-30: color-mix(in oklab, oklch(0.379 0.146 265.522) 30%, transparent);
40
- --feedlog-red-900-30: color-mix(in oklab, oklch(0.396 0.141 25.723) 30%, transparent);
41
- }
42
-
43
- .github-issues-container {
44
- min-height: 100vh;
45
- background-color: var(--feedlog-background);
46
- padding: var(--feedlog-padding);
47
- margin: 0 auto;
48
- }
49
-
50
- .issues-header {
51
- margin-bottom: 1.5rem;
52
- display: flex;
53
- align-items: flex-start;
54
- justify-content: space-between;
55
- }
56
-
57
- .header-content {
58
- flex: 1;
59
- }
60
-
61
- .issues-title {
62
- color: var(--feedlog-foreground);
63
- margin: 0 0 0.25rem 0;
64
- font-size: 1.5rem;
65
- font-weight: 500;
66
- line-height: 1.5;
67
- }
68
-
69
- .issues-subtitle {
70
- color: var(--feedlog-muted-foreground);
71
- font-size: 0.875rem;
72
- margin: 0;
73
- }
74
-
75
- .loading-state,
76
- .error-state {
77
- padding: 2rem;
78
- text-align: center;
79
- color: var(--feedlog-muted-foreground);
80
- }
81
-
82
- .error-state {
83
- color: var(--feedlog-destructive);
84
- }
85
-
86
- .issues-list {
87
- display: flex;
88
- flex-direction: column;
89
- gap: var(--feedlog-gap);
90
- }
91
-
92
- .empty-state {
93
- text-align: center;
94
- padding: 3rem 1.5rem;
95
- color: var(--feedlog-muted-foreground);
96
- font-size: 0.875rem;
97
- }
98
-
99
- .load-more-container {
100
- display: flex;
101
- justify-content: center;
102
- padding: 2rem 0;
103
- gap: 1rem;
104
- }
@@ -1,11 +0,0 @@
1
- import type { Components, JSX } from "../types/components";
2
-
3
- interface FeedlogGithubIssuesClient extends Components.FeedlogGithubIssuesClient, HTMLElement {}
4
- export const FeedlogGithubIssuesClient: {
5
- prototype: FeedlogGithubIssuesClient;
6
- new (): FeedlogGithubIssuesClient;
7
- };
8
- /**
9
- * Used to define this component and all nested components recursively.
10
- */
11
- export const defineCustomElement: () => void;
@@ -1 +0,0 @@
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 +0,0 @@
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 +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,68 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host } from './index-rs_66Oq4.js';
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}`;
4
-
5
- const FeedlogGithubIssues = class {
6
- constructor(hostRef) {
7
- registerInstance(this, hostRef);
8
- this.feedlogUpvote = createEvent(this, "feedlogUpvote");
9
- this.feedlogLoadMore = createEvent(this, "feedlogLoadMore");
10
- /**
11
- * Array of issues to display
12
- */
13
- this.issues = [];
14
- /**
15
- * Maximum width of the container
16
- */
17
- this.maxWidth = '42rem';
18
- /**
19
- * Theme variant: 'light' or 'dark'
20
- */
21
- this.theme = 'light';
22
- /**
23
- * Loading state - shows loading indicator when true
24
- */
25
- this.loading = false;
26
- /**
27
- * Error message - shows error state when set
28
- */
29
- this.error = null;
30
- /**
31
- * Whether there are more issues to load
32
- */
33
- this.hasMore = false;
34
- /**
35
- * Whether more issues are currently loading
36
- */
37
- this.isLoadingMore = false;
38
- /**
39
- * Internal state for theme
40
- */
41
- this.currentTheme = 'light';
42
- this.handleUpvote = (event) => {
43
- event.stopPropagation();
44
- this.feedlogUpvote.emit(event.detail);
45
- };
46
- this.handleLoadMore = () => {
47
- this.feedlogLoadMore.emit();
48
- };
49
- }
50
- componentWillLoad() {
51
- this.currentTheme = this.theme;
52
- }
53
- 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 => {
55
- var _a, _b;
56
- 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
- }))));
58
- }
59
- render() {
60
- const containerStyle = {
61
- maxWidth: this.maxWidth,
62
- };
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'))))))));
64
- }
65
- };
66
- FeedlogGithubIssues.style = feedlogGithubIssuesCss();
67
-
68
- export { FeedlogGithubIssues as feedlog_github_issues };
@@ -1,31 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host } from './index-rs_66Oq4.js';
2
-
3
- const feedlogIssuesListCss = () => `: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}`;
4
-
5
- const FeedlogIssuesList = class {
6
- constructor(hostRef) {
7
- registerInstance(this, hostRef);
8
- this.feedlogUpvote = createEvent(this, "feedlogUpvote");
9
- /**
10
- * Array of issues to display
11
- */
12
- this.issues = [];
13
- /**
14
- * Theme variant: 'light' or 'dark'
15
- */
16
- this.theme = 'light';
17
- this.handleUpvote = (event) => {
18
- event.stopPropagation();
19
- this.feedlogUpvote.emit(event.detail);
20
- };
21
- }
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 => {
24
- var _a, _b;
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
- })))));
27
- }
28
- };
29
- FeedlogIssuesList.style = feedlogIssuesListCss();
30
-
31
- export { FeedlogIssuesList as feedlog_issues_list };
@@ -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}