@feedlog-ai/webcomponents 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/feedlog-badge_3.cjs.entry.js +1 -1
- package/dist/cjs/feedlog-github-issues-client.cjs.entry.js +6 -11
- package/dist/cjs/feedlog-github-issues.cjs.entry.js +1 -19
- package/dist/cjs/feedlog-toolkit.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/feedlog-badge/feedlog-badge.stories.js +1 -2
- package/dist/collection/components/feedlog-button/feedlog-button.stories.js +1 -2
- package/dist/collection/components/feedlog-card/feedlog-card.stories.js +1 -2
- package/dist/collection/components/feedlog-github-issues/feedlog-github-issues.js +38 -52
- package/dist/collection/components/feedlog-github-issues/feedlog-github-issues.stories.js +1 -2
- package/dist/collection/components/feedlog-github-issues-client/feedlog-github-issues-client.js +27 -32
- package/dist/collection/components/feedlog-issues-list/feedlog-issues-list.js +1 -1
- package/dist/components/feedlog-github-issues-client.js +1 -1
- package/dist/components/feedlog-github-issues.js +1 -1
- package/dist/components/feedlog-issues-list.js +1 -1
- package/dist/components/{p-DMcNh5Ys.js → p-BVUX_uVS.js} +1 -1
- package/dist/components/p-Dhl83qnK.js +1 -0
- package/dist/esm/feedlog-badge_3.entry.js +1 -1
- package/dist/esm/feedlog-github-issues-client.entry.js +6 -11
- package/dist/esm/feedlog-github-issues.entry.js +1 -19
- package/dist/esm/feedlog-toolkit.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/feedlog-toolkit/feedlog-toolkit.esm.js +1 -1
- package/dist/feedlog-toolkit/{p-2f7954f7.entry.js → p-125595a1.entry.js} +1 -1
- package/dist/feedlog-toolkit/p-5fc3d243.entry.js +1 -0
- package/dist/feedlog-toolkit/p-ee48d93a.entry.js +1 -0
- package/dist/types/components/feedlog-badge/feedlog-badge.stories.d.ts +2 -3
- package/dist/types/components/feedlog-button/feedlog-button.stories.d.ts +2 -3
- package/dist/types/components/feedlog-card/feedlog-card.stories.d.ts +2 -3
- package/dist/types/components/feedlog-github-issues/feedlog-github-issues.d.ts +8 -9
- package/dist/types/components/feedlog-github-issues/feedlog-github-issues.stories.d.ts +2 -3
- package/dist/types/components/feedlog-github-issues-client/feedlog-github-issues-client.d.ts +6 -7
- package/dist/types/components.d.ts +24 -22
- package/package.json +3 -3
- package/dist/components/p-CPOiBAxu.js +0 -1
- package/dist/feedlog-toolkit/p-a01a3115.entry.js +0 -1
- package/dist/feedlog-toolkit/p-b3d26272.entry.js +0 -1
|
@@ -85,7 +85,7 @@ const FeedlogIssuesList = class {
|
|
|
85
85
|
};
|
|
86
86
|
}
|
|
87
87
|
render() {
|
|
88
|
-
return (index.h(index.Host, { key: '
|
|
88
|
+
return (index.h(index.Host, { key: '81b2b973309388f09d20629da416b92545567618', class: this.theme === 'dark' ? 'dark' : '' }, index.h("div", { key: 'ed22c88736ee13621f39b3095f71c361b0d04b44', class: "issues-list" }, this.issues.length === 0 ? (index.h("div", { class: "empty-state" }, index.h("p", null, "No issues found"))) : (this.issues.map(issue => (index.h("div", { key: issue.id, class: "issue-card" }, index.h("div", { class: "issue-content" }, index.h("div", { class: "issue-header" }, index.h("div", { class: "issue-type-badge" }, issue.type === 'bug' ? (index.h("feedlog-badge", { variant: "destructive" }, "Bug")) : (index.h("feedlog-badge", { variant: "enhancement" }, "Enhancement"))), issue.pinnedAt && (index.h("div", { class: "pinned-indicator", title: "Pinned issue" }, "\uD83D\uDCCC"))), index.h("div", { class: "issue-main" }, index.h("div", { class: "issue-details" }, index.h("h3", { class: "issue-title" }, issue.title), index.h("p", { class: "issue-body" }, issue.body), index.h("div", { class: "issue-repository" }, index.h("span", { class: "repo-name" }, issue.repository.owner, "/", issue.repository.name))), index.h("button", { class: `upvote-button ${issue.hasUpvoted ? 'upvoted' : ''}`, onClick: (e) => this.handleUpvote(e, issue), title: issue.hasUpvoted ? 'Remove upvote' : 'Upvote this issue' }, issue.hasUpvoted ? index.h(HeartFilledIcon, null) : index.h(HeartOutlineIcon, null), index.h("span", { class: "upvote-count" }, issue.upvoteCount))), index.h("div", { class: "issue-footer" }, index.h("span", { class: "issue-date", title: `Updated: ${issue.updatedAt}` }, "Updated ", this.formatDate(issue.updatedAt)), index.h("span", { class: "issue-date", title: `Created: ${issue.createdAt}` }, "Created ", this.formatDate(issue.createdAt)))))))))));
|
|
89
89
|
}
|
|
90
90
|
/**
|
|
91
91
|
* Format an ISO date string to a relative time string
|
|
@@ -80,12 +80,15 @@ class FeedlogTimeoutError extends FeedlogError {
|
|
|
80
80
|
* Provides methods to interact with the Feedlog API
|
|
81
81
|
*/
|
|
82
82
|
class FeedlogSDK {
|
|
83
|
-
constructor(config
|
|
83
|
+
constructor(config) {
|
|
84
84
|
this.config = {
|
|
85
85
|
credentials: 'include',
|
|
86
86
|
...config,
|
|
87
87
|
};
|
|
88
88
|
this.apiKey = this.config.apiKey;
|
|
89
|
+
if (!this.apiKey) {
|
|
90
|
+
throw new FeedlogValidationError('apiKey is required in FeedlogSDKConfig');
|
|
91
|
+
}
|
|
89
92
|
this.endpoint = this.config.endpoint || 'https://api.feedlog.app';
|
|
90
93
|
this.timeout = this.config.timeout || 30000;
|
|
91
94
|
// Ensure endpoint doesn't have trailing slash
|
|
@@ -133,6 +136,7 @@ class FeedlogSDK {
|
|
|
133
136
|
method: 'POST',
|
|
134
137
|
headers: this.getAuthHeaders(),
|
|
135
138
|
credentials: this.config.credentials || 'include',
|
|
139
|
+
body: JSON.stringify({}),
|
|
136
140
|
});
|
|
137
141
|
if (response.status === 404) {
|
|
138
142
|
throw new FeedlogNetworkError('Issue not found', 404);
|
|
@@ -334,7 +338,6 @@ const FeedlogGithubIssuesClient = class {
|
|
|
334
338
|
constructor(hostRef) {
|
|
335
339
|
index.registerInstance(this, hostRef);
|
|
336
340
|
this.feedlogUpvote = index.createEvent(this, "feedlogUpvote");
|
|
337
|
-
this.feedlogThemeChange = index.createEvent(this, "feedlogThemeChange");
|
|
338
341
|
this.feedlogError = index.createEvent(this, "feedlogError");
|
|
339
342
|
/**
|
|
340
343
|
* Maximum width of the container
|
|
@@ -344,10 +347,6 @@ const FeedlogGithubIssuesClient = class {
|
|
|
344
347
|
* Theme variant: 'light' or 'dark'
|
|
345
348
|
*/
|
|
346
349
|
this.theme = 'light';
|
|
347
|
-
/**
|
|
348
|
-
* Whether to show the theme toggle button
|
|
349
|
-
*/
|
|
350
|
-
this.showThemeToggle = true;
|
|
351
350
|
this.issues = [];
|
|
352
351
|
this.loading = true;
|
|
353
352
|
this.error = null;
|
|
@@ -382,10 +381,6 @@ const FeedlogGithubIssuesClient = class {
|
|
|
382
381
|
this.feedlogError.emit({ error: errorMsg });
|
|
383
382
|
}
|
|
384
383
|
};
|
|
385
|
-
this.handleThemeChange = (event) => {
|
|
386
|
-
this.theme = event.detail;
|
|
387
|
-
this.feedlogThemeChange.emit(event.detail);
|
|
388
|
-
};
|
|
389
384
|
}
|
|
390
385
|
componentWillLoad() {
|
|
391
386
|
this.previousType = this.type;
|
|
@@ -490,7 +485,7 @@ const FeedlogGithubIssuesClient = class {
|
|
|
490
485
|
}
|
|
491
486
|
}
|
|
492
487
|
render() {
|
|
493
|
-
return (index.h("feedlog-github-issues", { key: '
|
|
488
|
+
return (index.h("feedlog-github-issues", { key: '39ee74bee86db7ff47d921cd771e5ce7c7468bb5', issues: this.issues, maxWidth: this.maxWidth, theme: this.theme, heading: this.heading, subtitle: this.subtitle, loading: this.loading, error: this.error, hasMore: this.hasMore, isLoadingMore: this.isLoadingMore, onFeedlogUpvote: this.handleUpvote, onFeedlogLoadMore: async () => this.loadMore() }));
|
|
494
489
|
}
|
|
495
490
|
};
|
|
496
491
|
|
|
@@ -4,19 +4,10 @@ var index = require('./index-5lluu_3h.js');
|
|
|
4
4
|
|
|
5
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-muted-foreground:#717182;--feedlog-destructive:#d4183d;--feedlog-padding:2rem}:host(.dark){--feedlog-background:oklch(0.145 0 0);--feedlog-foreground:oklch(0.985 0 0);--feedlog-muted-foreground:oklch(0.708 0 0);--feedlog-destructive:oklch(0.637 0.237 25.331)}.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)}.load-more-container{display:flex;justify-content:center;padding:2rem 0;gap:1rem}`;
|
|
6
6
|
|
|
7
|
-
/**
|
|
8
|
-
* Sun icon SVG component
|
|
9
|
-
*/
|
|
10
|
-
const SunIcon = () => (index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, index.h("circle", { cx: "12", cy: "12", r: "4" }), index.h("path", { d: "M12 2v2" }), index.h("path", { d: "M12 20v2" }), index.h("path", { d: "m4.93 4.93 1.41 1.41" }), index.h("path", { d: "m17.66 17.66 1.41 1.41" }), index.h("path", { d: "M2 12h2" }), index.h("path", { d: "M20 12h2" }), index.h("path", { d: "m6.34 17.66-1.41 1.41" }), index.h("path", { d: "m19.07 4.93-1.41 1.41" })));
|
|
11
|
-
/**
|
|
12
|
-
* Moon icon SVG component
|
|
13
|
-
*/
|
|
14
|
-
const MoonIcon = () => (index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, index.h("path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z" })));
|
|
15
7
|
const FeedlogGithubIssues = class {
|
|
16
8
|
constructor(hostRef) {
|
|
17
9
|
index.registerInstance(this, hostRef);
|
|
18
10
|
this.feedlogUpvote = index.createEvent(this, "feedlogUpvote");
|
|
19
|
-
this.feedlogThemeChange = index.createEvent(this, "feedlogThemeChange");
|
|
20
11
|
this.feedlogLoadMore = index.createEvent(this, "feedlogLoadMore");
|
|
21
12
|
/**
|
|
22
13
|
* Array of issues to display
|
|
@@ -38,10 +29,6 @@ const FeedlogGithubIssues = class {
|
|
|
38
29
|
* Error message - shows error state when set
|
|
39
30
|
*/
|
|
40
31
|
this.error = null;
|
|
41
|
-
/**
|
|
42
|
-
* Whether to show the theme toggle button
|
|
43
|
-
*/
|
|
44
|
-
this.showThemeToggle = true;
|
|
45
32
|
/**
|
|
46
33
|
* Whether there are more issues to load
|
|
47
34
|
*/
|
|
@@ -57,11 +44,6 @@ const FeedlogGithubIssues = class {
|
|
|
57
44
|
this.handleUpvote = (event) => {
|
|
58
45
|
this.feedlogUpvote.emit(event.detail);
|
|
59
46
|
};
|
|
60
|
-
this.toggleTheme = () => {
|
|
61
|
-
this.currentTheme = this.currentTheme === 'dark' ? 'light' : 'dark';
|
|
62
|
-
this.theme = this.currentTheme;
|
|
63
|
-
this.feedlogThemeChange.emit(this.currentTheme);
|
|
64
|
-
};
|
|
65
47
|
this.handleLoadMore = () => {
|
|
66
48
|
this.feedlogLoadMore.emit();
|
|
67
49
|
};
|
|
@@ -73,7 +55,7 @@ const FeedlogGithubIssues = class {
|
|
|
73
55
|
const containerStyle = {
|
|
74
56
|
maxWidth: this.maxWidth,
|
|
75
57
|
};
|
|
76
|
-
return (index.h(index.Host, { key: '
|
|
58
|
+
return (index.h(index.Host, { key: '473e30453d8b3a719bd977a361b7f669fdd88e48', class: this.currentTheme === 'dark' ? 'dark' : '' }, index.h("div", { key: 'ab91126edb301a1da6136f14441ec33833b6cd74', class: "github-issues-container", style: containerStyle }, (this.heading || this.subtitle) && (index.h("header", { key: '17494da495d2b2910e6f024f1c3971a945e0a1cc', class: "issues-header" }, index.h("div", { key: '95d5ac1c25ccfc864a863cafe1fa89d4ce04fce2', class: "header-content" }, this.heading && index.h("h1", { key: 'b37f9b9372e1b99da76c0fb9ee50d0a6cdbb0549', class: "issues-title" }, this.heading), this.subtitle && index.h("p", { key: '5edc92ca86f2dfd1afe640d77d65782e5ec27a8e', class: "issues-subtitle" }, this.subtitle)))), this.loading && (index.h("div", { key: 'f786656d24c8b88a57c7fa48f0d1877ac3565767', class: "loading-state" }, index.h("p", { key: 'fa97c2a05f52c2c1fbe0e907ac797cd6570d0a82' }, "Loading issues..."))), this.error && (index.h("div", { key: '798f3dc1ba004b2889aee6490b74240900ba3812', class: "error-state" }, index.h("p", { key: '03b996ab514027fce2e88a93901f3fe17d8da3e1' }, "Error: ", this.error))), !this.loading && !this.error && (index.h("div", { key: '67501ae1866122df2db6f97752d632013dbcd8a1' }, index.h("feedlog-issues-list", { key: 'c668c631f6ba6008df0a411bda7824bcce7318cd', issues: this.issues, theme: this.currentTheme, onFeedlogUpvote: this.handleUpvote }), this.hasMore && (index.h("div", { key: '28e1ea0600436f3ca8bf12e57e9764bf8899fa53', class: "load-more-container" }, index.h("feedlog-button", { key: 'f19576026d152e1b7f7957c83ccfee3c44727dd0', onFeedlogClick: this.handleLoadMore, disabled: this.isLoadingMore, variant: "outline" }, this.isLoadingMore ? 'Loading...' : 'Load More Issues'))))))));
|
|
77
59
|
}
|
|
78
60
|
};
|
|
79
61
|
FeedlogGithubIssues.style = feedlogGithubIssuesCss();
|
|
@@ -18,7 +18,7 @@ var patchBrowser = () => {
|
|
|
18
18
|
|
|
19
19
|
patchBrowser().then(async (options) => {
|
|
20
20
|
await index.globalScripts();
|
|
21
|
-
return index.bootstrapLazy([["feedlog-card.cjs",[[257,"feedlog-card"]]],["feedlog-badge_3.cjs",[[1,"feedlog-issues-list",{"issues":[16],"theme":[1]}],[257,"feedlog-button",{"variant":[1],"size":[1],"disabled":[4],"type":[1]}],[257,"feedlog-badge",{"variant":[1]}]]],["feedlog-github-issues.cjs",[[1,"feedlog-github-issues",{"issues":[16],"maxWidth":[1,"max-width"],"theme":[1025],"
|
|
21
|
+
return index.bootstrapLazy([["feedlog-card.cjs",[[257,"feedlog-card"]]],["feedlog-badge_3.cjs",[[1,"feedlog-issues-list",{"issues":[16],"theme":[1]}],[257,"feedlog-button",{"variant":[1],"size":[1],"disabled":[4],"type":[1]}],[257,"feedlog-badge",{"variant":[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"],"currentTheme":[32]}]]],["feedlog-github-issues-client.cjs",[[1,"feedlog-github-issues-client",{"apiKey":[1,"api-key"],"type":[1],"limit":[2],"endpoint":[1],"maxWidth":[1,"max-width"],"theme":[1],"heading":[1],"subtitle":[1],"issues":[32],"loading":[32],"error":[32],"cursor":[32],"hasMore":[32],"isLoadingMore":[32]}]]]], options);
|
|
22
22
|
});
|
|
23
23
|
|
|
24
24
|
exports.setNonce = index.setNonce;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -5,7 +5,7 @@ var index = require('./index-5lluu_3h.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-card.cjs",[[257,"feedlog-card"]]],["feedlog-badge_3.cjs",[[1,"feedlog-issues-list",{"issues":[16],"theme":[1]}],[257,"feedlog-button",{"variant":[1],"size":[1],"disabled":[4],"type":[1]}],[257,"feedlog-badge",{"variant":[1]}]]],["feedlog-github-issues.cjs",[[1,"feedlog-github-issues",{"issues":[16],"maxWidth":[1,"max-width"],"theme":[1025],"
|
|
8
|
+
return index.bootstrapLazy([["feedlog-card.cjs",[[257,"feedlog-card"]]],["feedlog-badge_3.cjs",[[1,"feedlog-issues-list",{"issues":[16],"theme":[1]}],[257,"feedlog-button",{"variant":[1],"size":[1],"disabled":[4],"type":[1]}],[257,"feedlog-badge",{"variant":[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"],"currentTheme":[32]}]]],["feedlog-github-issues-client.cjs",[[1,"feedlog-github-issues-client",{"apiKey":[1,"api-key"],"type":[1],"limit":[2],"endpoint":[1],"maxWidth":[1,"max-width"],"theme":[1],"heading":[1],"subtitle":[1],"issues":[32],"loading":[32],"error":[32],"cursor":[32],"hasMore":[32],"isLoadingMore":[32]}]]]], options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
exports.setNonce = index.setNonce;
|
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
|
-
/**
|
|
3
|
-
* Sun icon SVG component
|
|
4
|
-
*/
|
|
5
|
-
const SunIcon = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("circle", { cx: "12", cy: "12", r: "4" }), h("path", { d: "M12 2v2" }), h("path", { d: "M12 20v2" }), h("path", { d: "m4.93 4.93 1.41 1.41" }), h("path", { d: "m17.66 17.66 1.41 1.41" }), h("path", { d: "M2 12h2" }), h("path", { d: "M20 12h2" }), h("path", { d: "m6.34 17.66-1.41 1.41" }), h("path", { d: "m19.07 4.93-1.41 1.41" })));
|
|
6
|
-
/**
|
|
7
|
-
* Moon icon SVG component
|
|
8
|
-
*/
|
|
9
|
-
const MoonIcon = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z" })));
|
|
10
2
|
/**
|
|
11
3
|
* Feedlog GitHub Issues Component
|
|
12
4
|
*
|
|
@@ -35,10 +27,6 @@ export class FeedlogGithubIssues {
|
|
|
35
27
|
* Error message - shows error state when set
|
|
36
28
|
*/
|
|
37
29
|
this.error = null;
|
|
38
|
-
/**
|
|
39
|
-
* Whether to show the theme toggle button
|
|
40
|
-
*/
|
|
41
|
-
this.showThemeToggle = true;
|
|
42
30
|
/**
|
|
43
31
|
* Whether there are more issues to load
|
|
44
32
|
*/
|
|
@@ -54,11 +42,6 @@ export class FeedlogGithubIssues {
|
|
|
54
42
|
this.handleUpvote = (event) => {
|
|
55
43
|
this.feedlogUpvote.emit(event.detail);
|
|
56
44
|
};
|
|
57
|
-
this.toggleTheme = () => {
|
|
58
|
-
this.currentTheme = this.currentTheme === 'dark' ? 'light' : 'dark';
|
|
59
|
-
this.theme = this.currentTheme;
|
|
60
|
-
this.feedlogThemeChange.emit(this.currentTheme);
|
|
61
|
-
};
|
|
62
45
|
this.handleLoadMore = () => {
|
|
63
46
|
this.feedlogLoadMore.emit();
|
|
64
47
|
};
|
|
@@ -70,7 +53,7 @@ export class FeedlogGithubIssues {
|
|
|
70
53
|
const containerStyle = {
|
|
71
54
|
maxWidth: this.maxWidth,
|
|
72
55
|
};
|
|
73
|
-
return (h(Host, { key: '
|
|
56
|
+
return (h(Host, { key: '473e30453d8b3a719bd977a361b7f669fdd88e48', class: this.currentTheme === 'dark' ? 'dark' : '' }, h("div", { key: 'ab91126edb301a1da6136f14441ec33833b6cd74', class: "github-issues-container", style: containerStyle }, (this.heading || this.subtitle) && (h("header", { key: '17494da495d2b2910e6f024f1c3971a945e0a1cc', class: "issues-header" }, h("div", { key: '95d5ac1c25ccfc864a863cafe1fa89d4ce04fce2', class: "header-content" }, this.heading && h("h1", { key: 'b37f9b9372e1b99da76c0fb9ee50d0a6cdbb0549', class: "issues-title" }, this.heading), this.subtitle && h("p", { key: '5edc92ca86f2dfd1afe640d77d65782e5ec27a8e', class: "issues-subtitle" }, this.subtitle)))), this.loading && (h("div", { key: 'f786656d24c8b88a57c7fa48f0d1877ac3565767', class: "loading-state" }, h("p", { key: 'fa97c2a05f52c2c1fbe0e907ac797cd6570d0a82' }, "Loading issues..."))), this.error && (h("div", { key: '798f3dc1ba004b2889aee6490b74240900ba3812', class: "error-state" }, h("p", { key: '03b996ab514027fce2e88a93901f3fe17d8da3e1' }, "Error: ", this.error))), !this.loading && !this.error && (h("div", { key: '67501ae1866122df2db6f97752d632013dbcd8a1' }, h("feedlog-issues-list", { key: 'c668c631f6ba6008df0a411bda7824bcce7318cd', issues: this.issues, theme: this.currentTheme, onFeedlogUpvote: this.handleUpvote }), this.hasMore && (h("div", { key: '28e1ea0600436f3ca8bf12e57e9764bf8899fa53', class: "load-more-container" }, h("feedlog-button", { key: 'f19576026d152e1b7f7957c83ccfee3c44727dd0', onFeedlogClick: this.handleLoadMore, disabled: this.isLoadingMore, variant: "outline" }, this.isLoadingMore ? 'Loading...' : 'Load More Issues'))))))));
|
|
74
57
|
}
|
|
75
58
|
static get is() { return "feedlog-github-issues"; }
|
|
76
59
|
static get encapsulation() { return "shadow"; }
|
|
@@ -150,47 +133,45 @@ export class FeedlogGithubIssues {
|
|
|
150
133
|
"attribute": "theme",
|
|
151
134
|
"defaultValue": "'light'"
|
|
152
135
|
},
|
|
153
|
-
"
|
|
154
|
-
"type": "
|
|
136
|
+
"heading": {
|
|
137
|
+
"type": "string",
|
|
155
138
|
"mutable": false,
|
|
156
139
|
"complexType": {
|
|
157
|
-
"original": "
|
|
158
|
-
"resolved": "
|
|
140
|
+
"original": "string",
|
|
141
|
+
"resolved": "string | undefined",
|
|
159
142
|
"references": {}
|
|
160
143
|
},
|
|
161
144
|
"required": false,
|
|
162
|
-
"optional":
|
|
145
|
+
"optional": true,
|
|
163
146
|
"docs": {
|
|
164
147
|
"tags": [],
|
|
165
|
-
"text": "
|
|
148
|
+
"text": "Custom heading for the issues section"
|
|
166
149
|
},
|
|
167
150
|
"getter": false,
|
|
168
151
|
"setter": false,
|
|
169
152
|
"reflect": false,
|
|
170
|
-
"attribute": "
|
|
171
|
-
"defaultValue": "false"
|
|
153
|
+
"attribute": "heading"
|
|
172
154
|
},
|
|
173
|
-
"
|
|
155
|
+
"subtitle": {
|
|
174
156
|
"type": "string",
|
|
175
157
|
"mutable": false,
|
|
176
158
|
"complexType": {
|
|
177
|
-
"original": "string
|
|
178
|
-
"resolved": "
|
|
159
|
+
"original": "string",
|
|
160
|
+
"resolved": "string | undefined",
|
|
179
161
|
"references": {}
|
|
180
162
|
},
|
|
181
163
|
"required": false,
|
|
182
|
-
"optional":
|
|
164
|
+
"optional": true,
|
|
183
165
|
"docs": {
|
|
184
166
|
"tags": [],
|
|
185
|
-
"text": "
|
|
167
|
+
"text": "Custom subtitle for the issues section"
|
|
186
168
|
},
|
|
187
169
|
"getter": false,
|
|
188
170
|
"setter": false,
|
|
189
171
|
"reflect": false,
|
|
190
|
-
"attribute": "
|
|
191
|
-
"defaultValue": "null"
|
|
172
|
+
"attribute": "subtitle"
|
|
192
173
|
},
|
|
193
|
-
"
|
|
174
|
+
"loading": {
|
|
194
175
|
"type": "boolean",
|
|
195
176
|
"mutable": false,
|
|
196
177
|
"complexType": {
|
|
@@ -202,13 +183,33 @@ export class FeedlogGithubIssues {
|
|
|
202
183
|
"optional": false,
|
|
203
184
|
"docs": {
|
|
204
185
|
"tags": [],
|
|
205
|
-
"text": "
|
|
186
|
+
"text": "Loading state - shows loading indicator when true"
|
|
206
187
|
},
|
|
207
188
|
"getter": false,
|
|
208
189
|
"setter": false,
|
|
209
190
|
"reflect": false,
|
|
210
|
-
"attribute": "
|
|
211
|
-
"defaultValue": "
|
|
191
|
+
"attribute": "loading",
|
|
192
|
+
"defaultValue": "false"
|
|
193
|
+
},
|
|
194
|
+
"error": {
|
|
195
|
+
"type": "string",
|
|
196
|
+
"mutable": false,
|
|
197
|
+
"complexType": {
|
|
198
|
+
"original": "string | null",
|
|
199
|
+
"resolved": "null | string",
|
|
200
|
+
"references": {}
|
|
201
|
+
},
|
|
202
|
+
"required": false,
|
|
203
|
+
"optional": false,
|
|
204
|
+
"docs": {
|
|
205
|
+
"tags": [],
|
|
206
|
+
"text": "Error message - shows error state when set"
|
|
207
|
+
},
|
|
208
|
+
"getter": false,
|
|
209
|
+
"setter": false,
|
|
210
|
+
"reflect": false,
|
|
211
|
+
"attribute": "error",
|
|
212
|
+
"defaultValue": "null"
|
|
212
213
|
},
|
|
213
214
|
"hasMore": {
|
|
214
215
|
"type": "boolean",
|
|
@@ -273,21 +274,6 @@ export class FeedlogGithubIssues {
|
|
|
273
274
|
"resolved": "{ issueId: string; currentUpvoted: boolean; currentCount: number; }",
|
|
274
275
|
"references": {}
|
|
275
276
|
}
|
|
276
|
-
}, {
|
|
277
|
-
"method": "feedlogThemeChange",
|
|
278
|
-
"name": "feedlogThemeChange",
|
|
279
|
-
"bubbles": true,
|
|
280
|
-
"cancelable": true,
|
|
281
|
-
"composed": true,
|
|
282
|
-
"docs": {
|
|
283
|
-
"tags": [],
|
|
284
|
-
"text": "Event emitted when theme changes"
|
|
285
|
-
},
|
|
286
|
-
"complexType": {
|
|
287
|
-
"original": "'light' | 'dark'",
|
|
288
|
-
"resolved": "\"dark\" | \"light\"",
|
|
289
|
-
"references": {}
|
|
290
|
-
}
|
|
291
277
|
}, {
|
|
292
278
|
"method": "feedlogLoadMore",
|
|
293
279
|
"name": "feedlogLoadMore",
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
-
import { FeedlogGithubIssues } from "./feedlog-github-issues";
|
|
3
2
|
const sampleIssues = [
|
|
4
3
|
{
|
|
5
4
|
id: 'issue-1',
|
|
@@ -94,7 +93,7 @@ const sampleIssues = [
|
|
|
94
93
|
];
|
|
95
94
|
const meta = {
|
|
96
95
|
title: 'Components/GitHub Issues',
|
|
97
|
-
component:
|
|
96
|
+
component: 'feedlog-github-issues',
|
|
98
97
|
parameters: {
|
|
99
98
|
layout: 'padded',
|
|
100
99
|
},
|
package/dist/collection/components/feedlog-github-issues-client/feedlog-github-issues-client.js
CHANGED
|
@@ -16,10 +16,6 @@ export class FeedlogGithubIssuesClient {
|
|
|
16
16
|
* Theme variant: 'light' or 'dark'
|
|
17
17
|
*/
|
|
18
18
|
this.theme = 'light';
|
|
19
|
-
/**
|
|
20
|
-
* Whether to show the theme toggle button
|
|
21
|
-
*/
|
|
22
|
-
this.showThemeToggle = true;
|
|
23
19
|
this.issues = [];
|
|
24
20
|
this.loading = true;
|
|
25
21
|
this.error = null;
|
|
@@ -54,10 +50,6 @@ export class FeedlogGithubIssuesClient {
|
|
|
54
50
|
this.feedlogError.emit({ error: errorMsg });
|
|
55
51
|
}
|
|
56
52
|
};
|
|
57
|
-
this.handleThemeChange = (event) => {
|
|
58
|
-
this.theme = event.detail;
|
|
59
|
-
this.feedlogThemeChange.emit(event.detail);
|
|
60
|
-
};
|
|
61
53
|
}
|
|
62
54
|
componentWillLoad() {
|
|
63
55
|
this.previousType = this.type;
|
|
@@ -162,7 +154,7 @@ export class FeedlogGithubIssuesClient {
|
|
|
162
154
|
}
|
|
163
155
|
}
|
|
164
156
|
render() {
|
|
165
|
-
return (h("feedlog-github-issues", { key: '
|
|
157
|
+
return (h("feedlog-github-issues", { key: '39ee74bee86db7ff47d921cd771e5ce7c7468bb5', issues: this.issues, maxWidth: this.maxWidth, theme: this.theme, heading: this.heading, subtitle: this.subtitle, loading: this.loading, error: this.error, hasMore: this.hasMore, isLoadingMore: this.isLoadingMore, onFeedlogUpvote: this.handleUpvote, onFeedlogLoadMore: async () => this.loadMore() }));
|
|
166
158
|
}
|
|
167
159
|
static get is() { return "feedlog-github-issues-client"; }
|
|
168
160
|
static get encapsulation() { return "shadow"; }
|
|
@@ -284,25 +276,43 @@ export class FeedlogGithubIssuesClient {
|
|
|
284
276
|
"attribute": "theme",
|
|
285
277
|
"defaultValue": "'light'"
|
|
286
278
|
},
|
|
287
|
-
"
|
|
288
|
-
"type": "
|
|
279
|
+
"heading": {
|
|
280
|
+
"type": "string",
|
|
289
281
|
"mutable": false,
|
|
290
282
|
"complexType": {
|
|
291
|
-
"original": "
|
|
292
|
-
"resolved": "
|
|
283
|
+
"original": "string",
|
|
284
|
+
"resolved": "string | undefined",
|
|
293
285
|
"references": {}
|
|
294
286
|
},
|
|
295
287
|
"required": false,
|
|
296
|
-
"optional":
|
|
288
|
+
"optional": true,
|
|
289
|
+
"docs": {
|
|
290
|
+
"tags": [],
|
|
291
|
+
"text": "Custom heading for the issues section"
|
|
292
|
+
},
|
|
293
|
+
"getter": false,
|
|
294
|
+
"setter": false,
|
|
295
|
+
"reflect": false,
|
|
296
|
+
"attribute": "heading"
|
|
297
|
+
},
|
|
298
|
+
"subtitle": {
|
|
299
|
+
"type": "string",
|
|
300
|
+
"mutable": false,
|
|
301
|
+
"complexType": {
|
|
302
|
+
"original": "string",
|
|
303
|
+
"resolved": "string | undefined",
|
|
304
|
+
"references": {}
|
|
305
|
+
},
|
|
306
|
+
"required": false,
|
|
307
|
+
"optional": true,
|
|
297
308
|
"docs": {
|
|
298
309
|
"tags": [],
|
|
299
|
-
"text": "
|
|
310
|
+
"text": "Custom subtitle for the issues section"
|
|
300
311
|
},
|
|
301
312
|
"getter": false,
|
|
302
313
|
"setter": false,
|
|
303
314
|
"reflect": false,
|
|
304
|
-
"attribute": "
|
|
305
|
-
"defaultValue": "true"
|
|
315
|
+
"attribute": "subtitle"
|
|
306
316
|
}
|
|
307
317
|
};
|
|
308
318
|
}
|
|
@@ -332,21 +342,6 @@ export class FeedlogGithubIssuesClient {
|
|
|
332
342
|
"resolved": "{ issueId: string; upvoted: boolean; upvoteCount: number; }",
|
|
333
343
|
"references": {}
|
|
334
344
|
}
|
|
335
|
-
}, {
|
|
336
|
-
"method": "feedlogThemeChange",
|
|
337
|
-
"name": "feedlogThemeChange",
|
|
338
|
-
"bubbles": true,
|
|
339
|
-
"cancelable": true,
|
|
340
|
-
"composed": true,
|
|
341
|
-
"docs": {
|
|
342
|
-
"tags": [],
|
|
343
|
-
"text": "Event emitted when theme changes"
|
|
344
|
-
},
|
|
345
|
-
"complexType": {
|
|
346
|
-
"original": "'light' | 'dark'",
|
|
347
|
-
"resolved": "\"dark\" | \"light\"",
|
|
348
|
-
"references": {}
|
|
349
|
-
}
|
|
350
345
|
}, {
|
|
351
346
|
"method": "feedlogError",
|
|
352
347
|
"name": "feedlogError",
|
|
@@ -32,7 +32,7 @@ export class FeedlogIssuesList {
|
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
34
|
render() {
|
|
35
|
-
return (h(Host, { key: '
|
|
35
|
+
return (h(Host, { key: '81b2b973309388f09d20629da416b92545567618', class: this.theme === 'dark' ? 'dark' : '' }, h("div", { key: 'ed22c88736ee13621f39b3095f71c361b0d04b44', class: "issues-list" }, this.issues.length === 0 ? (h("div", { class: "empty-state" }, h("p", null, "No issues found"))) : (this.issues.map(issue => (h("div", { key: issue.id, class: "issue-card" }, h("div", { class: "issue-content" }, h("div", { class: "issue-header" }, h("div", { class: "issue-type-badge" }, issue.type === 'bug' ? (h("feedlog-badge", { variant: "destructive" }, "Bug")) : (h("feedlog-badge", { variant: "enhancement" }, "Enhancement"))), issue.pinnedAt && (h("div", { class: "pinned-indicator", title: "Pinned issue" }, "\uD83D\uDCCC"))), h("div", { class: "issue-main" }, h("div", { class: "issue-details" }, h("h3", { class: "issue-title" }, issue.title), h("p", { class: "issue-body" }, issue.body), h("div", { class: "issue-repository" }, h("span", { class: "repo-name" }, issue.repository.owner, "/", issue.repository.name))), h("button", { class: `upvote-button ${issue.hasUpvoted ? 'upvoted' : ''}`, onClick: (e) => this.handleUpvote(e, issue), title: issue.hasUpvoted ? 'Remove upvote' : 'Upvote this issue' }, issue.hasUpvoted ? h(HeartFilledIcon, null) : h(HeartOutlineIcon, null), h("span", { class: "upvote-count" }, issue.upvoteCount))), h("div", { class: "issue-footer" }, h("span", { class: "issue-date", title: `Updated: ${issue.updatedAt}` }, "Updated ", this.formatDate(issue.updatedAt)), h("span", { class: "issue-date", title: `Created: ${issue.createdAt}` }, "Created ", this.formatDate(issue.createdAt)))))))))));
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
38
|
* Format an ISO date string to a relative time string
|
|
@@ -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-CHtSMTyP.js";import{d as n}from"./p-DMdb-G26.js";import{d as h}from"./p-CPOiBAxu.js";import{d as a}from"./p-DMcNh5Ys.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={}){this.config={credentials:"include",...t},this.apiKey=this.config.apiKey,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"});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.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("string"!=typeof e.title)throw new d("Invalid issue: title 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","closed"].includes(e.status+""))throw new d('Invalid issue: status must be "open" 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||"string"!=typeof s.name||"string"!=typeof s.owner)throw new d("Invalid issue: repository must have id, name, and owner");const i=u(e.title+""),o=u((e.body||"")+"");return{id:e.id+"",type:e.type||"bug",status:e.status||"open",pinnedAt:e.pinnedAt?e.pinnedAt+"":null,revision:Number(e.revision)||1,title:i,body:o,repository:{id:s.id+"",name:s.name+"",owner:s.owner+""},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.feedlogThemeChange=i(this,"feedlogThemeChange"),this.feedlogError=i(this,"feedlogError"),this.maxWidth="42rem",this.theme="light",this.showThemeToggle=!0,this.issues=[],this.loading=!0,this.error=null,this.cursor=null,this.hasMore=!1,this.isLoadingMore=!1,this.sdk=null,this.handleUpvote=async t=>{if(!this.sdk)return;const{issueId:e,currentUpvoted:s,currentCount:i}=t.detail;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);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){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"})}},this.handleThemeChange=t=>{this.theme=t.detail,this.feedlogThemeChange.emit(t.detail)}}componentWillLoad(){this.previousType=this.type,this.previousLimit=this.limit,this.initializeSDK(),this.fetchIssues()}componentDidUpdate(){(this.previousType!==this.type||this.previousLimit!==this.limit)&&(this.cursor=null,this.hasMore=!1,this.issues=[],this.fetchIssues(),this.previousType=this.type,this.previousLimit=this.limit)}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)try{this.loading=!0,this.error=null;const t={};this.type&&(t.type=this.type),this.limit&&(t.limit=this.limit),this.cursor&&(t.cursor=this.cursor);const e=await this.sdk.fetchIssues(t);this.issues=e.issues,this.cursor=e.pagination.cursor,this.hasMore=e.pagination.hasMore}catch(t){const e=t instanceof Error?t.message:"Failed to fetch issues";this.error=e,this.issues=[],this.feedlogError.emit({error:e,code:null==t?void 0:t.statusCode})}finally{this.loading=!1,this.isLoadingMore=!1}}async loadMore(){if(this.sdk&&this.hasMore&&!this.isLoadingMore&&!this.loading){this.isLoadingMore=!0;try{const t={};this.type&&(t.type=this.type),this.limit&&(t.limit=this.limit),this.cursor&&(t.cursor=this.cursor);const e=await this.sdk.fetchIssues(t);this.issues=[...this.issues,...e.issues],this.cursor=e.pagination.cursor,this.hasMore=e.pagination.hasMore}catch(t){this.feedlogError.emit({error:t instanceof Error?t.message:"Failed to load more issues",code:null==t?void 0:t.statusCode})}finally{this.isLoadingMore=!1}}}render(){return o("feedlog-github-issues",{key:"2c35408db4c6f52927112f8b07c03883238d5e8d",issues:this.issues,maxWidth:this.maxWidth,theme:this.theme,showThemeToggle:this.showThemeToggle,loading:this.loading,error:this.error,hasMore:this.hasMore,isLoadingMore:this.isLoadingMore,onFeedlogUpvote:this.handleUpvote,onFeedlogThemeChange:this.handleThemeChange,onFeedlogLoadMore:async()=>this.loadMore()})}},[1,"feedlog-github-issues-client",{apiKey:[1,"api-key"],type:[1],limit:[2],endpoint:[1],maxWidth:[1,"max-width"],theme:[1],showThemeToggle:[4,"show-theme-toggle"],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-issues-list"].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-issues-list":customElements.get(t(e))||a()}}))}w();const m=g,b=w;export{m as FeedlogGithubIssuesClient,b 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-CHtSMTyP.js";import{d as n}from"./p-DMdb-G26.js";import{d as h}from"./p-Dhl83qnK.js";import{d as a}from"./p-BVUX_uVS.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.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("string"!=typeof e.title)throw new d("Invalid issue: title 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","closed"].includes(e.status+""))throw new d('Invalid issue: status must be "open" 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||"string"!=typeof s.name||"string"!=typeof s.owner)throw new d("Invalid issue: repository must have id, name, and owner");const i=u(e.title+""),o=u((e.body||"")+"");return{id:e.id+"",type:e.type||"bug",status:e.status||"open",pinnedAt:e.pinnedAt?e.pinnedAt+"":null,revision:Number(e.revision)||1,title:i,body:o,repository:{id:s.id+"",name:s.name+"",owner:s.owner+""},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 w=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.handleUpvote=async t=>{if(!this.sdk)return;const{issueId:e,currentUpvoted:s,currentCount:i}=t.detail;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);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){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.initializeSDK(),this.fetchIssues()}componentDidUpdate(){(this.previousType!==this.type||this.previousLimit!==this.limit)&&(this.cursor=null,this.hasMore=!1,this.issues=[],this.fetchIssues(),this.previousType=this.type,this.previousLimit=this.limit)}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)try{this.loading=!0,this.error=null;const t={};this.type&&(t.type=this.type),this.limit&&(t.limit=this.limit),this.cursor&&(t.cursor=this.cursor);const e=await this.sdk.fetchIssues(t);this.issues=e.issues,this.cursor=e.pagination.cursor,this.hasMore=e.pagination.hasMore}catch(t){const e=t instanceof Error?t.message:"Failed to fetch issues";this.error=e,this.issues=[],this.feedlogError.emit({error:e,code:null==t?void 0:t.statusCode})}finally{this.loading=!1,this.isLoadingMore=!1}}async loadMore(){if(this.sdk&&this.hasMore&&!this.isLoadingMore&&!this.loading){this.isLoadingMore=!0;try{const t={};this.type&&(t.type=this.type),this.limit&&(t.limit=this.limit),this.cursor&&(t.cursor=this.cursor);const e=await this.sdk.fetchIssues(t);this.issues=[...this.issues,...e.issues],this.cursor=e.pagination.cursor,this.hasMore=e.pagination.hasMore}catch(t){this.feedlogError.emit({error:t instanceof Error?t.message:"Failed to load more issues",code:null==t?void 0:t.statusCode})}finally{this.isLoadingMore=!1}}}render(){return o("feedlog-github-issues",{key:"39ee74bee86db7ff47d921cd771e5ce7c7468bb5",issues:this.issues,maxWidth:this.maxWidth,theme:this.theme,heading:this.heading,subtitle:this.subtitle,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],endpoint:[1],maxWidth:[1,"max-width"],theme:[1],heading:[1],subtitle:[1],issues:[32],loading:[32],error:[32],cursor:[32],hasMore:[32],isLoadingMore:[32]}]);function g(){"undefined"!=typeof customElements&&["feedlog-github-issues-client","feedlog-badge","feedlog-button","feedlog-github-issues","feedlog-issues-list"].forEach((e=>{switch(e){case"feedlog-github-issues-client":customElements.get(t(e))||customElements.define(t(e),w);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-issues-list":customElements.get(t(e))||a()}}))}g();const b=w,m=g;export{b as FeedlogGithubIssuesClient,m as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{F as o,d as s}from"./p-
|
|
1
|
+
import{F as o,d as s}from"./p-Dhl83qnK.js";const p=o,r=s;export{p as FeedlogGithubIssues,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{F as
|
|
1
|
+
import{F as o,d as s}from"./p-BVUX_uVS.js";const p=o,r=s;export{p as FeedlogIssuesList,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as o,H as r,c as t,h as s,a as d}from"./index.js";import{d as l}from"./p-CHtSMTyP.js";const a=()=>s("svg",{class:"upvote-icon filled",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"},s("path",{d:"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"})),i=()=>s("svg",{class:"upvote-icon outline",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},s("path",{d:"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"})),n=o(class extends r{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.feedlogUpvote=t(this,"feedlogUpvote"),this.issues=[],this.theme="light",this.handleUpvote=(e,o)=>{e.stopPropagation(),this.feedlogUpvote.emit({issueId:o.id,currentUpvoted:o.hasUpvoted,currentCount:o.upvoteCount})}}render(){return s(d,{key:"
|
|
1
|
+
import{t as e,p as o,H as r,c as t,h as s,a as d}from"./index.js";import{d as l}from"./p-CHtSMTyP.js";const a=()=>s("svg",{class:"upvote-icon filled",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"},s("path",{d:"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"})),i=()=>s("svg",{class:"upvote-icon outline",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},s("path",{d:"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"})),n=o(class extends r{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.feedlogUpvote=t(this,"feedlogUpvote"),this.issues=[],this.theme="light",this.handleUpvote=(e,o)=>{e.stopPropagation(),this.feedlogUpvote.emit({issueId:o.id,currentUpvoted:o.hasUpvoted,currentCount:o.upvoteCount})}}render(){return s(d,{key:"81b2b973309388f09d20629da416b92545567618",class:"dark"===this.theme?"dark":""},s("div",{key:"ed22c88736ee13621f39b3095f71c361b0d04b44",class:"issues-list"},0===this.issues.length?s("div",{class:"empty-state"},s("p",null,"No issues found")):this.issues.map((e=>s("div",{key:e.id,class:"issue-card"},s("div",{class:"issue-content"},s("div",{class:"issue-header"},s("div",{class:"issue-type-badge"},"bug"===e.type?s("feedlog-badge",{variant:"destructive"},"Bug"):s("feedlog-badge",{variant:"enhancement"},"Enhancement")),e.pinnedAt&&s("div",{class:"pinned-indicator",title:"Pinned issue"},"📌")),s("div",{class:"issue-main"},s("div",{class:"issue-details"},s("h3",{class:"issue-title"},e.title),s("p",{class:"issue-body"},e.body),s("div",{class:"issue-repository"},s("span",{class:"repo-name"},e.repository.owner,"/",e.repository.name))),s("button",{class:"upvote-button "+(e.hasUpvoted?"upvoted":""),onClick:o=>this.handleUpvote(o,e),title:e.hasUpvoted?"Remove upvote":"Upvote this issue"},s(e.hasUpvoted?a:i,null),s("span",{class:"upvote-count"},e.upvoteCount))),s("div",{class:"issue-footer"},s("span",{class:"issue-date",title:`Updated: ${e.updatedAt}`},"Updated ",this.formatDate(e.updatedAt)),s("span",{class:"issue-date",title:`Created: ${e.createdAt}`},"Created ",this.formatDate(e.createdAt)))))))))}formatDate(e){try{const o=new Date(e),r=new Date,t=Math.floor((r.getTime()-o.getTime())/1e3);return t<60?"just now":t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:t<604800?`${Math.floor(t/86400)}d ago`:t<2592e3?`${Math.floor(t/604800)}w ago`:o.toLocaleDateString()}catch(e){return"unknown date"}}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}:host(.dark){--feedlog-background:oklch(0.145 0 0);--feedlog-foreground:oklch(0.985 0 0);--feedlog-card:oklch(0.145 0 0);--feedlog-card-foreground:oklch(0.985 0 0);--feedlog-muted:oklch(0.269 0 0);--feedlog-muted-foreground:oklch(0.708 0 0);--feedlog-border:oklch(0.269 0 0);--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)}.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}.issue-card{background-color:var(--feedlog-card);border:1px solid var(--feedlog-border);border-radius:var(--feedlog-radius);box-shadow:0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);transition:box-shadow 0.15s ease;position:relative}.issue-card:hover{box-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)}.issue-content{padding:1.5rem;display:flex;flex-direction:column;gap:1rem}.issue-header{display:flex;align-items:center;gap:0.5rem;justify-content:space-between}.issue-type-badge{width:fit-content}.pinned-indicator{font-size:1rem;opacity:0.7}.issue-main{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}.issue-details{flex:1;min-width:0}.issue-title{color:var(--feedlog-card-foreground);font-size:0.875rem;font-weight:600;margin:0 0 0.375rem 0;line-height:1.4;word-break:break-word}.issue-body{color:var(--feedlog-muted-foreground);font-size:0.75rem;line-height:1.625;margin:0 0 0.75rem 0;word-break:break-word;white-space:pre-wrap}.issue-repository{display:flex;align-items:center;gap:0.5rem;font-size:0.75rem;color:var(--feedlog-muted-foreground);margin-bottom:0.5rem}.repo-name{font-weight:500}.github-number{color:var(--feedlog-blue-600);font-weight:600}:host(.dark) .github-number{color:var(--feedlog-blue-400)}.upvote-button{display:flex;flex-direction:column;align-items:center;gap:0.125rem;padding:0.5rem 0.75rem;border-radius:0.5rem;background-color:var(--feedlog-muted);border:1px solid transparent;cursor:pointer;transition:all 0.15s ease;flex-shrink:0;font-size:0.75rem;font-weight:600}.upvote-button:hover{background-color:var(--feedlog-blue-100);border-color:var(--feedlog-blue-400)}.upvote-button.upvoted{background-color:var(--feedlog-red-100);border-color:var(--feedlog-red-400)}.upvote-button.upvoted:hover{background-color:var(--feedlog-red-100);border-color:var(--feedlog-red-600)}:host(.dark) .upvote-button:hover{background-color:var(--feedlog-blue-900-30);border-color:var(--feedlog-blue-600)}:host(.dark) .upvote-button.upvoted{background-color:var(--feedlog-red-900-30);border-color:var(--feedlog-red-600)}.upvote-icon{width:1rem;height:1rem;stroke-width:2}.upvote-icon.filled{color:var(--feedlog-red-600)}.upvote-icon.outline{color:var(--feedlog-blue-600)}:host(.dark) .upvote-icon.outline{color:var(--feedlog-blue-400)}.upvote-count{font-size:0.75rem;font-weight:600;color:var(--feedlog-card-foreground)}.issue-footer{display:flex;flex-direction:column;gap:0.25rem;font-size:0.75rem}.issue-date{color:var(--feedlog-muted-foreground);cursor:help}"}},[1,"feedlog-issues-list",{issues:[16],theme:[1]}]);function u(){"undefined"!=typeof customElements&&["feedlog-issues-list","feedlog-badge"].forEach((o=>{switch(o){case"feedlog-issues-list":customElements.get(e(o))||customElements.define(e(o),n);break;case"feedlog-badge":customElements.get(e(o))||l()}}))}u();export{n as F,u as d}
|