@feedlog-ai/webcomponents 0.0.20 → 0.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -5
- package/dist/cjs/feedlog-badge.cjs.entry.js +3 -3
- package/dist/cjs/feedlog-button_2.cjs.entry.js +1547 -8
- package/dist/cjs/feedlog-card.cjs.entry.js +1 -1
- package/dist/cjs/feedlog-github-issues-client.cjs.entry.js +24 -18
- package/dist/cjs/feedlog-github-issues.cjs.entry.js +14 -4
- package/dist/cjs/feedlog-issues-list.cjs.entry.js +8 -37
- package/dist/cjs/feedlog-toolkit.cjs.js +2 -2
- package/dist/cjs/{index-5lluu_3h.js → index-DnsqTPII.js} +0 -37
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/components/feedlog-badge/feedlog-badge.css +15 -3
- package/dist/collection/components/feedlog-badge/feedlog-badge.js +3 -3
- package/dist/collection/components/feedlog-github-issues/feedlog-github-issues.css +202 -13
- package/dist/collection/components/feedlog-github-issues/feedlog-github-issues.js +73 -2
- package/dist/collection/components/feedlog-github-issues/feedlog-github-issues.stories.js +56 -6
- package/dist/collection/components/feedlog-github-issues-client/feedlog-github-issues-client.js +63 -2
- package/dist/collection/components/feedlog-issue/feedlog-issue.css +196 -46
- package/dist/collection/components/feedlog-issue/feedlog-issue.js +71 -6
- package/dist/collection/components/feedlog-issue/feedlog-issue.stories.js +115 -3
- package/dist/collection/components/feedlog-issues-list/feedlog-issues-list.css +3 -209
- package/dist/collection/components/feedlog-issues-list/feedlog-issues-list.js +29 -35
- package/dist/collection/utils/markdown.js +48 -0
- package/dist/components/feedlog-badge.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-issue.js +1 -1
- package/dist/components/feedlog-issues-list.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/p-BBPFf6g7.js +3 -0
- package/dist/components/p-Chc3XZ5Y.js +1 -0
- package/dist/components/p-cag4iyHV.js +1 -0
- package/dist/esm/feedlog-badge.entry.js +3 -3
- package/dist/esm/feedlog-button_2.entry.js +1547 -8
- package/dist/esm/feedlog-card.entry.js +1 -1
- package/dist/esm/feedlog-github-issues-client.entry.js +24 -18
- package/dist/esm/feedlog-github-issues.entry.js +14 -4
- package/dist/esm/feedlog-issues-list.entry.js +8 -37
- package/dist/esm/feedlog-toolkit.js +3 -3
- package/dist/esm/{index-CkB6Yzeb.js → index-rs_66Oq4.js} +0 -37
- package/dist/esm/loader.js +3 -3
- package/dist/feedlog-toolkit/feedlog-toolkit.esm.js +1 -1
- package/dist/feedlog-toolkit/p-13773ed6.entry.js +1 -0
- package/dist/feedlog-toolkit/{p-cdb2b098.entry.js → p-4e90285c.entry.js} +1 -1
- package/dist/feedlog-toolkit/p-9b515728.entry.js +1 -0
- package/dist/feedlog-toolkit/p-da51c7fd.entry.js +1 -0
- package/dist/feedlog-toolkit/p-dad7b157.entry.js +3 -0
- package/dist/feedlog-toolkit/p-e5ba7dd7.entry.js +1 -0
- package/dist/feedlog-toolkit/p-rs_66Oq4.js +2 -0
- package/dist/types/components/feedlog-badge/feedlog-badge.d.ts +1 -1
- package/dist/types/components/feedlog-github-issues/feedlog-github-issues.d.ts +16 -1
- package/dist/types/components/feedlog-github-issues/feedlog-github-issues.stories.d.ts +1 -0
- package/dist/types/components/feedlog-github-issues-client/feedlog-github-issues-client.d.ts +14 -1
- package/dist/types/components/feedlog-issue/feedlog-issue.d.ts +19 -2
- package/dist/types/components/feedlog-issue/feedlog-issue.stories.d.ts +10 -0
- package/dist/types/components/feedlog-issues-list/feedlog-issues-list.d.ts +5 -5
- package/dist/types/components.d.ts +68 -4
- package/dist/types/utils/markdown.d.ts +5 -0
- package/package.json +4 -2
- package/dist/components/p-Bu_AsIay.js +0 -1
- package/dist/components/p-CHtSMTyP.js +0 -1
- package/dist/components/p-Cp7B8xwh.js +0 -1
- package/dist/feedlog-toolkit/p-2401f510.entry.js +0 -1
- package/dist/feedlog-toolkit/p-5df44120.entry.js +0 -1
- package/dist/feedlog-toolkit/p-95fea2f4.entry.js +0 -1
- package/dist/feedlog-toolkit/p-CkB6Yzeb.js +0 -2
- package/dist/feedlog-toolkit/p-b4b631f3.entry.js +0 -1
- package/dist/feedlog-toolkit/p-c19a4d1b.entry.js +0 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
:host {
|
|
2
2
|
display: block;
|
|
3
|
-
font-family:
|
|
4
|
-
|
|
3
|
+
font-family:
|
|
4
|
+
ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
|
|
5
|
+
|
|
5
6
|
/* Light theme defaults */
|
|
6
7
|
--feedlog-background: #ffffff;
|
|
7
8
|
--feedlog-foreground: oklch(0.145 0 0);
|
|
@@ -21,25 +22,34 @@
|
|
|
21
22
|
--feedlog-radius: 0.625rem;
|
|
22
23
|
--feedlog-gap: 0.5rem;
|
|
23
24
|
--feedlog-padding: 2rem;
|
|
25
|
+
--feedlog-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.08);
|
|
26
|
+
--feedlog-empty-illustration-bg: oklch(0.96 0.01 260);
|
|
27
|
+
--feedlog-empty-illustration-stroke: oklch(0.75 0.02 260);
|
|
28
|
+
--feedlog-empty-illustration-muted: oklch(0.82 0.01 260);
|
|
24
29
|
}
|
|
25
30
|
|
|
26
31
|
:host(.dark) {
|
|
27
32
|
/* Dark theme values */
|
|
28
|
-
--feedlog-background: oklch(0.
|
|
33
|
+
--feedlog-background: oklch(0.18 0.01 260);
|
|
29
34
|
--feedlog-foreground: oklch(0.985 0 0);
|
|
30
|
-
--feedlog-card: oklch(0.
|
|
35
|
+
--feedlog-card: oklch(0.24 0.01 260);
|
|
31
36
|
--feedlog-card-foreground: oklch(0.985 0 0);
|
|
32
|
-
--feedlog-muted: oklch(0.
|
|
33
|
-
--feedlog-muted-foreground: oklch(0.
|
|
34
|
-
--feedlog-border: oklch(0.
|
|
37
|
+
--feedlog-muted: oklch(0.32 0.01 260);
|
|
38
|
+
--feedlog-muted-foreground: oklch(0.72 0.02 260);
|
|
39
|
+
--feedlog-border: oklch(0.34 0.01 260);
|
|
35
40
|
--feedlog-accent-color: #3b82f6;
|
|
36
41
|
--feedlog-destructive: oklch(0.396 0.141 25.723);
|
|
37
42
|
--feedlog-blue-400: oklch(0.707 0.165 254.624);
|
|
38
43
|
--feedlog-blue-600: oklch(0.546 0.245 262.881);
|
|
39
44
|
--feedlog-blue-900-30: color-mix(in oklab, oklch(0.379 0.146 265.522) 30%, transparent);
|
|
40
45
|
--feedlog-red-900-30: color-mix(in oklab, oklch(0.396 0.141 25.723) 30%, transparent);
|
|
46
|
+
--feedlog-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
|
|
47
|
+
--feedlog-empty-illustration-bg: oklch(0.28 0.02 260);
|
|
48
|
+
--feedlog-empty-illustration-stroke: oklch(0.45 0.02 260);
|
|
49
|
+
--feedlog-empty-illustration-muted: oklch(0.38 0.02 260);
|
|
41
50
|
}
|
|
42
51
|
|
|
52
|
+
|
|
43
53
|
.github-issues-container {
|
|
44
54
|
min-height: 100vh;
|
|
45
55
|
background-color: var(--feedlog-background);
|
|
@@ -72,15 +82,165 @@
|
|
|
72
82
|
margin: 0;
|
|
73
83
|
}
|
|
74
84
|
|
|
75
|
-
.loading-state
|
|
85
|
+
.loading-state {
|
|
86
|
+
padding: 0;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.loading-skeletons {
|
|
90
|
+
display: flex;
|
|
91
|
+
flex-direction: column;
|
|
92
|
+
gap: var(--feedlog-gap);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.skeleton-card {
|
|
96
|
+
background-color: var(--feedlog-card);
|
|
97
|
+
border: 1px solid var(--feedlog-border);
|
|
98
|
+
border-radius: var(--feedlog-radius);
|
|
99
|
+
box-shadow: var(--feedlog-shadow);
|
|
100
|
+
position: relative;
|
|
101
|
+
overflow: hidden;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.skeleton-card::before {
|
|
105
|
+
content: '';
|
|
106
|
+
position: absolute;
|
|
107
|
+
left: 0;
|
|
108
|
+
top: 0;
|
|
109
|
+
bottom: 0;
|
|
110
|
+
width: 3px;
|
|
111
|
+
background: var(--feedlog-muted);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.skeleton-content {
|
|
115
|
+
padding: 1.25rem;
|
|
116
|
+
padding-left: calc(1.25rem + 3px);
|
|
117
|
+
display: flex;
|
|
118
|
+
flex-direction: column;
|
|
119
|
+
gap: 0.875rem;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.skeleton-header {
|
|
123
|
+
display: flex;
|
|
124
|
+
align-items: center;
|
|
125
|
+
justify-content: space-between;
|
|
126
|
+
gap: 0.75rem;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.skeleton-badge {
|
|
130
|
+
width: 4.5rem;
|
|
131
|
+
height: 1.25rem;
|
|
132
|
+
border-radius: 0.375rem;
|
|
133
|
+
background-color: var(--feedlog-muted);
|
|
134
|
+
animation: skeleton-pulse 1.5s ease-in-out infinite;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.skeleton-timestamp {
|
|
138
|
+
width: 3rem;
|
|
139
|
+
height: 0.75rem;
|
|
140
|
+
border-radius: 0.25rem;
|
|
141
|
+
background-color: var(--feedlog-muted);
|
|
142
|
+
animation: skeleton-pulse 1.5s ease-in-out infinite 0.2s;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.skeleton-main {
|
|
146
|
+
display: flex;
|
|
147
|
+
flex-direction: column;
|
|
148
|
+
gap: 0.5rem;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.skeleton-title {
|
|
152
|
+
height: 0.9375rem;
|
|
153
|
+
border-radius: 0.25rem;
|
|
154
|
+
background-color: var(--feedlog-muted);
|
|
155
|
+
animation: skeleton-pulse 1.5s ease-in-out infinite 0.1s;
|
|
156
|
+
width: 85%;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.skeleton-body {
|
|
160
|
+
display: flex;
|
|
161
|
+
flex-direction: column;
|
|
162
|
+
gap: 0.375rem;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.skeleton-line {
|
|
166
|
+
height: 0.8125rem;
|
|
167
|
+
border-radius: 0.25rem;
|
|
168
|
+
background-color: var(--feedlog-muted);
|
|
169
|
+
animation: skeleton-pulse 1.5s ease-in-out infinite 0.15s;
|
|
170
|
+
width: 100%;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.skeleton-line.short {
|
|
174
|
+
width: 70%;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.skeleton-repo {
|
|
178
|
+
width: 6rem;
|
|
179
|
+
height: 0.75rem;
|
|
180
|
+
border-radius: 0.25rem;
|
|
181
|
+
background-color: var(--feedlog-muted);
|
|
182
|
+
animation: skeleton-pulse 1.5s ease-in-out infinite 0.25s;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.skeleton-footer {
|
|
186
|
+
display: flex;
|
|
187
|
+
justify-content: flex-end;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.skeleton-upvote {
|
|
191
|
+
width: 2.5rem;
|
|
192
|
+
height: 2rem;
|
|
193
|
+
border-radius: 0.5rem;
|
|
194
|
+
background-color: var(--feedlog-muted);
|
|
195
|
+
animation: skeleton-pulse 1.5s ease-in-out infinite 0.3s;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
@keyframes skeleton-pulse {
|
|
199
|
+
0%,
|
|
200
|
+
100% {
|
|
201
|
+
opacity: 1;
|
|
202
|
+
}
|
|
203
|
+
50% {
|
|
204
|
+
opacity: 0.5;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
76
208
|
.error-state {
|
|
77
|
-
|
|
209
|
+
display: flex;
|
|
210
|
+
align-items: center;
|
|
211
|
+
justify-content: center;
|
|
212
|
+
padding: 3rem 2rem;
|
|
213
|
+
min-height: 12rem;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.error-state-content {
|
|
217
|
+
display: flex;
|
|
218
|
+
flex-direction: column;
|
|
219
|
+
align-items: center;
|
|
78
220
|
text-align: center;
|
|
221
|
+
max-width: 20rem;
|
|
222
|
+
padding: 2rem;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.error-icon {
|
|
79
226
|
color: var(--feedlog-muted-foreground);
|
|
227
|
+
opacity: 0.8;
|
|
228
|
+
margin-bottom: 1rem;
|
|
80
229
|
}
|
|
81
230
|
|
|
82
|
-
.error-state {
|
|
83
|
-
|
|
231
|
+
.error-state-title {
|
|
232
|
+
margin: 0 0 0.5rem 0;
|
|
233
|
+
font-size: 1.125rem;
|
|
234
|
+
font-weight: 600;
|
|
235
|
+
color: var(--feedlog-foreground);
|
|
236
|
+
line-height: 1.4;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.error-state-message {
|
|
240
|
+
margin: 0 0 1.25rem 0;
|
|
241
|
+
font-size: 0.875rem;
|
|
242
|
+
color: var(--feedlog-muted-foreground);
|
|
243
|
+
line-height: 1.5;
|
|
84
244
|
}
|
|
85
245
|
|
|
86
246
|
.issues-list {
|
|
@@ -90,10 +250,39 @@
|
|
|
90
250
|
}
|
|
91
251
|
|
|
92
252
|
.empty-state {
|
|
253
|
+
display: flex;
|
|
254
|
+
align-items: center;
|
|
255
|
+
justify-content: center;
|
|
256
|
+
padding: 4rem 2rem;
|
|
257
|
+
min-height: 16rem;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.empty-state-content {
|
|
261
|
+
display: flex;
|
|
262
|
+
flex-direction: column;
|
|
263
|
+
align-items: center;
|
|
93
264
|
text-align: center;
|
|
94
|
-
|
|
95
|
-
|
|
265
|
+
max-width: 20rem;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.empty-state-illustration {
|
|
269
|
+
margin-bottom: 1.5rem;
|
|
270
|
+
opacity: 0.9;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.empty-state-title {
|
|
274
|
+
margin: 0 0 0.5rem 0;
|
|
275
|
+
font-size: 1.125rem;
|
|
276
|
+
font-weight: 600;
|
|
277
|
+
color: var(--feedlog-foreground);
|
|
278
|
+
line-height: 1.4;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.empty-state-message {
|
|
282
|
+
margin: 0;
|
|
96
283
|
font-size: 0.875rem;
|
|
284
|
+
color: var(--feedlog-muted-foreground);
|
|
285
|
+
line-height: 1.5;
|
|
97
286
|
}
|
|
98
287
|
|
|
99
288
|
.load-more-container {
|
|
@@ -50,14 +50,24 @@ export class FeedlogGithubIssues {
|
|
|
50
50
|
componentWillLoad() {
|
|
51
51
|
this.currentTheme = this.theme;
|
|
52
52
|
}
|
|
53
|
+
renderEmptyStateIllustration() {
|
|
54
|
+
return (h("svg", { class: "empty-state-illustration", xmlns: "http://www.w3.org/2000/svg", width: "120", height: "96", viewBox: "0 0 120 96", fill: "none", "aria-hidden": "true" }, h("path", { d: "M20 36h80v44c0 4.4-3.6 8-8 8H28c-4.4 0-8-3.6-8-8V36z", fill: "var(--feedlog-empty-illustration-bg)", stroke: "var(--feedlog-empty-illustration-stroke)", "stroke-width": "1.5", "stroke-linejoin": "round" }), h("path", { d: "M20 36l20-24h40l20 24", fill: "none", stroke: "var(--feedlog-empty-illustration-stroke)", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M44 52h32M44 60h24M44 68h28", stroke: "var(--feedlog-empty-illustration-muted)", "stroke-width": "1.25", "stroke-linecap": "round" })));
|
|
55
|
+
}
|
|
56
|
+
renderErrorIcon() {
|
|
57
|
+
return (h("svg", { class: "error-icon", xmlns: "http://www.w3.org/2000/svg", width: "48", height: "48", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("circle", { cx: "12", cy: "12", r: "10" }), h("line", { x1: "12", y1: "8", x2: "12", y2: "12" }), h("line", { x1: "12", y1: "16", x2: "12.01", y2: "16" })));
|
|
58
|
+
}
|
|
53
59
|
renderIssuesList() {
|
|
54
|
-
|
|
60
|
+
var _a, _b;
|
|
61
|
+
return (h("div", { class: "issues-list" }, this.issues.length === 0 ? (h("div", { class: "empty-state" }, h("div", { class: "empty-state-content" }, this.renderEmptyStateIllustration(), h("h2", { class: "empty-state-title" }, (_a = this.emptyStateTitle) !== null && _a !== void 0 ? _a : 'No updates yet'), h("p", { class: "empty-state-message" }, (_b = this.emptyStateMessage) !== null && _b !== void 0 ? _b : 'Check back later for new updates.')))) : (this.issues.map(issue => {
|
|
62
|
+
var _a, _b;
|
|
63
|
+
return (h("feedlog-issue", { key: issue.id, issue: issue, issueUrl: (_b = (_a = this.getIssueUrl) === null || _a === void 0 ? void 0 : _a.call(this, issue)) !== null && _b !== void 0 ? _b : undefined, theme: this.currentTheme, onFeedlogUpvote: (e) => this.handleUpvote(e) }));
|
|
64
|
+
}))));
|
|
55
65
|
}
|
|
56
66
|
render() {
|
|
57
67
|
const containerStyle = {
|
|
58
68
|
maxWidth: this.maxWidth,
|
|
59
69
|
};
|
|
60
|
-
return (h(Host, { key: '
|
|
70
|
+
return (h(Host, { key: 'fbd1890061b47db8b850a8d993e2ac5432c4b3f6', class: this.currentTheme === 'dark' ? 'dark' : '' }, h("div", { key: '5ce9267da314ebb69ed8ee00f28015fdad73ab8a', class: "github-issues-container", style: containerStyle }, (this.heading || this.subtitle) && (h("header", { key: '461c707df1e5dc7eaab15462de975fafdce872df', class: "issues-header" }, h("div", { key: 'e6972c2f0cfe5630cc73fb41a2103c9b0118179c', class: "header-content" }, this.heading && h("h1", { key: 'd74e89c1ad981da6c4287e5b75256bfb831f1172', class: "issues-title" }, this.heading), this.subtitle && h("p", { key: 'c820d8e3beaa57c0c193ceaace1d13e94a2a6290', class: "issues-subtitle" }, this.subtitle)))), this.loading && (h("div", { key: '959be24cb77b257fba5197302448f78af553817e', class: "loading-state", role: "status", "aria-label": "Loading issues" }, h("div", { key: 'e69594f18e3268208634a3ad82cb2ae0bc552c11', class: "loading-skeletons" }, [1, 2, 3].map(i => (h("div", { key: i, class: "skeleton-card" }, h("div", { class: "skeleton-content" }, h("div", { class: "skeleton-header" }, h("div", { class: "skeleton-badge" }), h("div", { class: "skeleton-timestamp" })), h("div", { class: "skeleton-main" }, h("div", { class: "skeleton-title" }), h("div", { class: "skeleton-body" }, h("div", { class: "skeleton-line" }), h("div", { class: "skeleton-line short" })), h("div", { class: "skeleton-repo" })), h("div", { class: "skeleton-footer" }, h("div", { class: "skeleton-upvote" }))))))))), this.error && (h("div", { key: '93e82b0beca0b96c23803b1abfc3d50fe099fa6a', class: "error-state", role: "alert" }, h("div", { key: '9276d85925d02bd4c81d5ee44a5d6a8af986c4c9', class: "error-state-content" }, this.renderErrorIcon(), h("h2", { key: '6f5762740f908712a46cddeafae675294d3bcc40', class: "error-state-title" }, "Something went wrong"), h("p", { key: 'f1587bd9a2abe250aa730d64498a5105a412d657', class: "error-state-message" }, this.error)))), !this.loading && !this.error && (h("div", { key: '22c68553352358a9a408ea763af1e63c9c84eabd' }, this.renderIssuesList(), this.hasMore && (h("div", { key: '231ec6f4680b4b114ba72c657f9801d84951a6d6', class: "load-more-container" }, h("feedlog-button", { key: '18fa475708fe233f3f9d0ec85bf0f8daea9a4a0a', onFeedlogClick: this.handleLoadMore, disabled: this.isLoadingMore, variant: "outline" }, this.isLoadingMore ? 'Loading...' : 'Load More Issues'))))))));
|
|
61
71
|
}
|
|
62
72
|
static get is() { return "feedlog-github-issues"; }
|
|
63
73
|
static get encapsulation() { return "shadow"; }
|
|
@@ -175,6 +185,44 @@ export class FeedlogGithubIssues {
|
|
|
175
185
|
"reflect": false,
|
|
176
186
|
"attribute": "subtitle"
|
|
177
187
|
},
|
|
188
|
+
"emptyStateTitle": {
|
|
189
|
+
"type": "string",
|
|
190
|
+
"mutable": false,
|
|
191
|
+
"complexType": {
|
|
192
|
+
"original": "string",
|
|
193
|
+
"resolved": "string | undefined",
|
|
194
|
+
"references": {}
|
|
195
|
+
},
|
|
196
|
+
"required": false,
|
|
197
|
+
"optional": true,
|
|
198
|
+
"docs": {
|
|
199
|
+
"tags": [],
|
|
200
|
+
"text": "Empty state title. Defaults to \"No updates yet\"."
|
|
201
|
+
},
|
|
202
|
+
"getter": false,
|
|
203
|
+
"setter": false,
|
|
204
|
+
"reflect": false,
|
|
205
|
+
"attribute": "empty-state-title"
|
|
206
|
+
},
|
|
207
|
+
"emptyStateMessage": {
|
|
208
|
+
"type": "string",
|
|
209
|
+
"mutable": false,
|
|
210
|
+
"complexType": {
|
|
211
|
+
"original": "string",
|
|
212
|
+
"resolved": "string | undefined",
|
|
213
|
+
"references": {}
|
|
214
|
+
},
|
|
215
|
+
"required": false,
|
|
216
|
+
"optional": true,
|
|
217
|
+
"docs": {
|
|
218
|
+
"tags": [],
|
|
219
|
+
"text": "Empty state message. Defaults to \"Check back later for new updates.\"."
|
|
220
|
+
},
|
|
221
|
+
"getter": false,
|
|
222
|
+
"setter": false,
|
|
223
|
+
"reflect": false,
|
|
224
|
+
"attribute": "empty-state-message"
|
|
225
|
+
},
|
|
178
226
|
"loading": {
|
|
179
227
|
"type": "boolean",
|
|
180
228
|
"mutable": false,
|
|
@@ -254,6 +302,29 @@ export class FeedlogGithubIssues {
|
|
|
254
302
|
"reflect": false,
|
|
255
303
|
"attribute": "is-loading-more",
|
|
256
304
|
"defaultValue": "false"
|
|
305
|
+
},
|
|
306
|
+
"getIssueUrl": {
|
|
307
|
+
"type": "unknown",
|
|
308
|
+
"mutable": false,
|
|
309
|
+
"complexType": {
|
|
310
|
+
"original": "GetIssueUrlFn",
|
|
311
|
+
"resolved": "((issue: FeedlogIssue) => string | null | undefined) | undefined",
|
|
312
|
+
"references": {
|
|
313
|
+
"GetIssueUrlFn": {
|
|
314
|
+
"location": "import",
|
|
315
|
+
"path": "@feedlog-ai/core",
|
|
316
|
+
"id": "../core/dist/index.d.ts::GetIssueUrlFn"
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
},
|
|
320
|
+
"required": false,
|
|
321
|
+
"optional": true,
|
|
322
|
+
"docs": {
|
|
323
|
+
"tags": [],
|
|
324
|
+
"text": "Optional callback to resolve GitHub issue URL when githubIssueLink is not available.\nRequired because repository.owner was removed from the API for privacy."
|
|
325
|
+
},
|
|
326
|
+
"getter": false,
|
|
327
|
+
"setter": false
|
|
257
328
|
}
|
|
258
329
|
};
|
|
259
330
|
}
|
|
@@ -2,6 +2,7 @@ import { h } from "@stencil/core";
|
|
|
2
2
|
const sampleIssues = [
|
|
3
3
|
{
|
|
4
4
|
id: 'issue-1',
|
|
5
|
+
githubIssueLink: 'https://github.com/feedlog/feedlog-toolkit/issues/24',
|
|
5
6
|
title: 'Add dark mode support',
|
|
6
7
|
body: 'It would be great to have a dark mode option for the dashboard.',
|
|
7
8
|
type: 'enhancement',
|
|
@@ -11,7 +12,7 @@ const sampleIssues = [
|
|
|
11
12
|
repository: {
|
|
12
13
|
id: 'repo-1',
|
|
13
14
|
name: 'feedlog-toolkit',
|
|
14
|
-
|
|
15
|
+
description: 'Monorepo for Feedlog Toolkit',
|
|
15
16
|
},
|
|
16
17
|
updatedAt: new Date(Date.now() - 2 * 60 * 60 * 1000).toISOString(), // 2 hours ago
|
|
17
18
|
createdAt: new Date(Date.now() - 2 * 60 * 60 * 1000).toISOString(),
|
|
@@ -20,6 +21,7 @@ const sampleIssues = [
|
|
|
20
21
|
},
|
|
21
22
|
{
|
|
22
23
|
id: 'issue-2',
|
|
24
|
+
githubIssueLink: 'https://github.com/feedlog/feedlog-toolkit/issues/15',
|
|
23
25
|
title: 'Charts not rendering on mobile',
|
|
24
26
|
body: 'The chart components are not properly responsive on smaller screens.',
|
|
25
27
|
type: 'bug',
|
|
@@ -29,7 +31,7 @@ const sampleIssues = [
|
|
|
29
31
|
repository: {
|
|
30
32
|
id: 'repo-1',
|
|
31
33
|
name: 'feedlog-toolkit',
|
|
32
|
-
|
|
34
|
+
description: 'Monorepo for Feedlog Toolkit',
|
|
33
35
|
},
|
|
34
36
|
updatedAt: new Date(Date.now() - 5 * 60 * 60 * 1000).toISOString(), // 5 hours ago
|
|
35
37
|
createdAt: new Date(Date.now() - 5 * 60 * 60 * 1000).toISOString(),
|
|
@@ -38,6 +40,7 @@ const sampleIssues = [
|
|
|
38
40
|
},
|
|
39
41
|
{
|
|
40
42
|
id: 'issue-3',
|
|
43
|
+
githubIssueLink: 'https://github.com/feedlog/feedlog-toolkit/issues/8',
|
|
41
44
|
title: 'Export data to CSV',
|
|
42
45
|
body: 'Add functionality to export chart data as CSV files.',
|
|
43
46
|
type: 'enhancement',
|
|
@@ -47,7 +50,7 @@ const sampleIssues = [
|
|
|
47
50
|
repository: {
|
|
48
51
|
id: 'repo-1',
|
|
49
52
|
name: 'feedlog-toolkit',
|
|
50
|
-
|
|
53
|
+
description: 'Monorepo for Feedlog Toolkit',
|
|
51
54
|
},
|
|
52
55
|
updatedAt: new Date(Date.now() - 24 * 60 * 60 * 1000).toISOString(), // 1 day ago
|
|
53
56
|
createdAt: new Date(Date.now() - 24 * 60 * 60 * 1000).toISOString(),
|
|
@@ -56,6 +59,7 @@ const sampleIssues = [
|
|
|
56
59
|
},
|
|
57
60
|
{
|
|
58
61
|
id: 'issue-4',
|
|
62
|
+
githubIssueLink: 'https://github.com/feedlog/feedlog-toolkit/issues/12',
|
|
59
63
|
title: 'Memory leak in real-time updates',
|
|
60
64
|
body: 'When leaving the dashboard open for extended periods, memory usage increases significantly.',
|
|
61
65
|
type: 'bug',
|
|
@@ -65,7 +69,7 @@ const sampleIssues = [
|
|
|
65
69
|
repository: {
|
|
66
70
|
id: 'repo-1',
|
|
67
71
|
name: 'feedlog-toolkit',
|
|
68
|
-
|
|
72
|
+
description: 'Monorepo for Feedlog Toolkit',
|
|
69
73
|
},
|
|
70
74
|
updatedAt: new Date(Date.now() - 2 * 24 * 60 * 60 * 1000).toISOString(), // 2 days ago
|
|
71
75
|
createdAt: new Date(Date.now() - 2 * 24 * 60 * 60 * 1000).toISOString(),
|
|
@@ -74,6 +78,7 @@ const sampleIssues = [
|
|
|
74
78
|
},
|
|
75
79
|
{
|
|
76
80
|
id: 'issue-5',
|
|
81
|
+
githubIssueLink: null,
|
|
77
82
|
title: 'Custom color themes',
|
|
78
83
|
body: 'Allow users to customize the color palette for charts and UI elements.',
|
|
79
84
|
type: 'enhancement',
|
|
@@ -83,7 +88,7 @@ const sampleIssues = [
|
|
|
83
88
|
repository: {
|
|
84
89
|
id: 'repo-1',
|
|
85
90
|
name: 'feedlog-toolkit',
|
|
86
|
-
|
|
91
|
+
description: 'Monorepo for Feedlog Toolkit',
|
|
87
92
|
},
|
|
88
93
|
updatedAt: new Date(Date.now() - 7 * 24 * 60 * 60 * 1000).toISOString(), // 1 week ago
|
|
89
94
|
createdAt: new Date(Date.now() - 7 * 24 * 60 * 60 * 1000).toISOString(),
|
|
@@ -119,6 +124,14 @@ const meta = {
|
|
|
119
124
|
control: 'text',
|
|
120
125
|
description: 'Error message',
|
|
121
126
|
},
|
|
127
|
+
emptyStateTitle: {
|
|
128
|
+
control: 'text',
|
|
129
|
+
description: 'Empty state title',
|
|
130
|
+
},
|
|
131
|
+
emptyStateMessage: {
|
|
132
|
+
control: 'text',
|
|
133
|
+
description: 'Empty state message',
|
|
134
|
+
},
|
|
122
135
|
},
|
|
123
136
|
args: {
|
|
124
137
|
issues: sampleIssues,
|
|
@@ -145,6 +158,8 @@ export const Loading = {
|
|
|
145
158
|
args: {
|
|
146
159
|
issues: [],
|
|
147
160
|
loading: true,
|
|
161
|
+
heading: 'Community feedback',
|
|
162
|
+
subtitle: 'Upvote issues you care about',
|
|
148
163
|
},
|
|
149
164
|
render: props => h("feedlog-github-issues", Object.assign({}, props)),
|
|
150
165
|
play: async ({ canvasElement, args }) => {
|
|
@@ -158,7 +173,9 @@ export const Error = {
|
|
|
158
173
|
args: {
|
|
159
174
|
issues: [],
|
|
160
175
|
loading: false,
|
|
161
|
-
error: '
|
|
176
|
+
error: "Couldn't load updates",
|
|
177
|
+
heading: 'Community feedback',
|
|
178
|
+
subtitle: 'Upvote issues you care about',
|
|
162
179
|
},
|
|
163
180
|
render: props => h("feedlog-github-issues", Object.assign({}, props)),
|
|
164
181
|
play: async ({ canvasElement, args }) => {
|
|
@@ -173,6 +190,8 @@ export const Empty = {
|
|
|
173
190
|
issues: [],
|
|
174
191
|
loading: false,
|
|
175
192
|
error: null,
|
|
193
|
+
heading: 'Community feedback',
|
|
194
|
+
subtitle: 'Upvote issues you care about',
|
|
176
195
|
},
|
|
177
196
|
render: props => h("feedlog-github-issues", Object.assign({}, props)),
|
|
178
197
|
play: async ({ canvasElement, args }) => {
|
|
@@ -208,3 +227,34 @@ export const NarrowWidth = {
|
|
|
208
227
|
}
|
|
209
228
|
},
|
|
210
229
|
};
|
|
230
|
+
export const CustomCSSVars = {
|
|
231
|
+
args: {
|
|
232
|
+
issues: sampleIssues,
|
|
233
|
+
},
|
|
234
|
+
render: (props) => (h("feedlog-github-issues", Object.assign({}, props, { style: {
|
|
235
|
+
fontFamily: "'Georgia', 'Times New Roman', serif",
|
|
236
|
+
/* Card */
|
|
237
|
+
'--feedlog-card-padding': '1.5rem',
|
|
238
|
+
'--feedlog-card-accent-width': '5px',
|
|
239
|
+
'--feedlog-radius': '0.875rem',
|
|
240
|
+
'--feedlog-shadow': '0 2px 8px 0 rgba(0, 0, 0, 0.12), 0 1px 3px -1px rgba(0, 0, 0, 0.1)',
|
|
241
|
+
'--feedlog-shadow-hover': '0 8px 24px -4px rgba(0, 0, 0, 0.15), 0 4px 8px -2px rgba(0, 0, 0, 0.1)',
|
|
242
|
+
/* Typography */
|
|
243
|
+
'--feedlog-title-font-size': '1.0625rem',
|
|
244
|
+
'--feedlog-title-font-weight': '700',
|
|
245
|
+
'--feedlog-body-font-size': '0.875rem',
|
|
246
|
+
'--feedlog-body-line-height': '1.6',
|
|
247
|
+
'--feedlog-timestamp-font-size': '0.75rem',
|
|
248
|
+
/* Colors */
|
|
249
|
+
'--feedlog-accent-color': '#059669',
|
|
250
|
+
'--feedlog-muted': '#ecfdf5',
|
|
251
|
+
'--feedlog-muted-foreground': '#047857',
|
|
252
|
+
'--feedlog-border': 'rgba(5, 150, 105, 0.2)',
|
|
253
|
+
} }))),
|
|
254
|
+
play: async ({ canvasElement, args }) => {
|
|
255
|
+
const element = canvasElement.querySelector('feedlog-github-issues');
|
|
256
|
+
if (element && args.issues) {
|
|
257
|
+
element.issues = args.issues;
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
};
|
package/dist/collection/components/feedlog-github-issues-client/feedlog-github-issues-client.js
CHANGED
|
@@ -148,7 +148,7 @@ export class FeedlogGithubIssuesClient {
|
|
|
148
148
|
if (this.isDisconnected || currentRequestId !== this.fetchRequestId) {
|
|
149
149
|
return;
|
|
150
150
|
}
|
|
151
|
-
const errorMsg = err instanceof Error ? err.message : '
|
|
151
|
+
const errorMsg = err instanceof Error ? err.message : "Couldn't load updates";
|
|
152
152
|
this.error = errorMsg;
|
|
153
153
|
this.issues = [];
|
|
154
154
|
this.feedlogError.emit({
|
|
@@ -213,7 +213,7 @@ export class FeedlogGithubIssuesClient {
|
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
215
|
render() {
|
|
216
|
-
return (h("feedlog-github-issues", { key: '
|
|
216
|
+
return (h("feedlog-github-issues", { key: '4bc46e4f2622d4c2c5080835ae436ae9fc37c991', issues: this.issues, maxWidth: this.maxWidth, theme: this.theme, heading: this.heading, subtitle: this.subtitle, emptyStateTitle: this.emptyStateTitle, emptyStateMessage: this.emptyStateMessage, getIssueUrl: this.getIssueUrl, loading: this.loading, error: this.error, hasMore: this.hasMore, isLoadingMore: this.isLoadingMore, onFeedlogUpvote: this.handleUpvote, onFeedlogLoadMore: async () => this.loadMore() }));
|
|
217
217
|
}
|
|
218
218
|
static get is() { return "feedlog-github-issues-client"; }
|
|
219
219
|
static get encapsulation() { return "shadow"; }
|
|
@@ -397,6 +397,67 @@ export class FeedlogGithubIssuesClient {
|
|
|
397
397
|
"setter": false,
|
|
398
398
|
"reflect": false,
|
|
399
399
|
"attribute": "subtitle"
|
|
400
|
+
},
|
|
401
|
+
"emptyStateTitle": {
|
|
402
|
+
"type": "string",
|
|
403
|
+
"mutable": false,
|
|
404
|
+
"complexType": {
|
|
405
|
+
"original": "string",
|
|
406
|
+
"resolved": "string | undefined",
|
|
407
|
+
"references": {}
|
|
408
|
+
},
|
|
409
|
+
"required": false,
|
|
410
|
+
"optional": true,
|
|
411
|
+
"docs": {
|
|
412
|
+
"tags": [],
|
|
413
|
+
"text": "Empty state title (e.g. \"No updates yet\")"
|
|
414
|
+
},
|
|
415
|
+
"getter": false,
|
|
416
|
+
"setter": false,
|
|
417
|
+
"reflect": false,
|
|
418
|
+
"attribute": "empty-state-title"
|
|
419
|
+
},
|
|
420
|
+
"emptyStateMessage": {
|
|
421
|
+
"type": "string",
|
|
422
|
+
"mutable": false,
|
|
423
|
+
"complexType": {
|
|
424
|
+
"original": "string",
|
|
425
|
+
"resolved": "string | undefined",
|
|
426
|
+
"references": {}
|
|
427
|
+
},
|
|
428
|
+
"required": false,
|
|
429
|
+
"optional": true,
|
|
430
|
+
"docs": {
|
|
431
|
+
"tags": [],
|
|
432
|
+
"text": "Empty state message (e.g. \"Check back later for new updates.\")"
|
|
433
|
+
},
|
|
434
|
+
"getter": false,
|
|
435
|
+
"setter": false,
|
|
436
|
+
"reflect": false,
|
|
437
|
+
"attribute": "empty-state-message"
|
|
438
|
+
},
|
|
439
|
+
"getIssueUrl": {
|
|
440
|
+
"type": "unknown",
|
|
441
|
+
"mutable": false,
|
|
442
|
+
"complexType": {
|
|
443
|
+
"original": "GetIssueUrlFn",
|
|
444
|
+
"resolved": "((issue: FeedlogIssue) => string | null | undefined) | undefined",
|
|
445
|
+
"references": {
|
|
446
|
+
"GetIssueUrlFn": {
|
|
447
|
+
"location": "import",
|
|
448
|
+
"path": "@feedlog-ai/core",
|
|
449
|
+
"id": "../core/dist/index.d.ts::GetIssueUrlFn"
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
},
|
|
453
|
+
"required": false,
|
|
454
|
+
"optional": true,
|
|
455
|
+
"docs": {
|
|
456
|
+
"tags": [],
|
|
457
|
+
"text": "Optional callback to resolve GitHub issue URL when githubIssueLink is not available.\nRequired because repository.owner was removed from the API for privacy."
|
|
458
|
+
},
|
|
459
|
+
"getter": false,
|
|
460
|
+
"setter": false
|
|
400
461
|
}
|
|
401
462
|
};
|
|
402
463
|
}
|