@feedlog-ai/webcomponents 0.0.3 → 0.0.5

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 (38) hide show
  1. package/README.md +246 -0
  2. package/dist/cjs/feedlog-badge_3.cjs.entry.js +1 -1
  3. package/dist/cjs/feedlog-github-issues-client.cjs.entry.js +18 -47
  4. package/dist/cjs/feedlog-github-issues.cjs.entry.js +1 -19
  5. package/dist/cjs/feedlog-toolkit.cjs.js +1 -1
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/collection/components/feedlog-badge/feedlog-badge.stories.js +1 -2
  8. package/dist/collection/components/feedlog-button/feedlog-button.stories.js +1 -2
  9. package/dist/collection/components/feedlog-card/feedlog-card.stories.js +1 -2
  10. package/dist/collection/components/feedlog-github-issues/feedlog-github-issues.js +38 -52
  11. package/dist/collection/components/feedlog-github-issues/feedlog-github-issues.stories.js +1 -2
  12. package/dist/collection/components/feedlog-github-issues-client/feedlog-github-issues-client.js +41 -74
  13. package/dist/collection/components/feedlog-issues-list/feedlog-issues-list.js +1 -1
  14. package/dist/components/feedlog-github-issues-client.js +1 -1
  15. package/dist/components/feedlog-github-issues.js +1 -1
  16. package/dist/components/feedlog-issues-list.js +1 -1
  17. package/dist/components/{p-DMcNh5Ys.js → p-BVUX_uVS.js} +1 -1
  18. package/dist/components/p-Dhl83qnK.js +1 -0
  19. package/dist/esm/feedlog-badge_3.entry.js +1 -1
  20. package/dist/esm/feedlog-github-issues-client.entry.js +18 -47
  21. package/dist/esm/feedlog-github-issues.entry.js +1 -19
  22. package/dist/esm/feedlog-toolkit.js +1 -1
  23. package/dist/esm/loader.js +1 -1
  24. package/dist/feedlog-toolkit/feedlog-toolkit.esm.js +1 -1
  25. package/dist/feedlog-toolkit/{p-2f7954f7.entry.js → p-125595a1.entry.js} +1 -1
  26. package/dist/feedlog-toolkit/p-352778fa.entry.js +1 -0
  27. package/dist/feedlog-toolkit/p-5fc3d243.entry.js +1 -0
  28. package/dist/types/components/feedlog-badge/feedlog-badge.stories.d.ts +2 -3
  29. package/dist/types/components/feedlog-button/feedlog-button.stories.d.ts +2 -3
  30. package/dist/types/components/feedlog-card/feedlog-card.stories.d.ts +2 -3
  31. package/dist/types/components/feedlog-github-issues/feedlog-github-issues.d.ts +8 -9
  32. package/dist/types/components/feedlog-github-issues/feedlog-github-issues.stories.d.ts +2 -3
  33. package/dist/types/components/feedlog-github-issues-client/feedlog-github-issues-client.d.ts +9 -12
  34. package/dist/types/components.d.ts +32 -30
  35. package/package.json +8 -5
  36. package/dist/components/p-CPOiBAxu.js +0 -1
  37. package/dist/feedlog-toolkit/p-399e0281.entry.js +0 -1
  38. package/dist/feedlog-toolkit/p-b3d26272.entry.js +0 -1
@@ -78,11 +78,15 @@ class FeedlogTimeoutError extends FeedlogError {
78
78
  * Provides methods to interact with the Feedlog API
79
79
  */
80
80
  class FeedlogSDK {
81
- constructor(config = {}) {
81
+ constructor(config) {
82
82
  this.config = {
83
83
  credentials: 'include',
84
84
  ...config,
85
85
  };
86
+ this.apiKey = this.config.apiKey;
87
+ if (!this.apiKey) {
88
+ throw new FeedlogValidationError('apiKey is required in FeedlogSDKConfig');
89
+ }
86
90
  this.endpoint = this.config.endpoint || 'https://api.feedlog.app';
87
91
  this.timeout = this.config.timeout || 30000;
88
92
  // Ensure endpoint doesn't have trailing slash
@@ -185,9 +189,13 @@ class FeedlogSDK {
185
189
  * Get request headers
186
190
  */
187
191
  getAuthHeaders() {
188
- return {
192
+ const headers = {
189
193
  'Content-Type': 'application/json',
190
194
  };
195
+ if (this.apiKey) {
196
+ headers['x-api-key'] = this.apiKey;
197
+ }
198
+ return headers;
191
199
  }
192
200
  /**
193
201
  * Fetch with timeout support using AbortController
@@ -327,7 +335,6 @@ const FeedlogGithubIssuesClient = class {
327
335
  constructor(hostRef) {
328
336
  registerInstance(this, hostRef);
329
337
  this.feedlogUpvote = createEvent(this, "feedlogUpvote");
330
- this.feedlogThemeChange = createEvent(this, "feedlogThemeChange");
331
338
  this.feedlogError = createEvent(this, "feedlogError");
332
339
  /**
333
340
  * Maximum width of the container
@@ -337,10 +344,6 @@ const FeedlogGithubIssuesClient = class {
337
344
  * Theme variant: 'light' or 'dark'
338
345
  */
339
346
  this.theme = 'light';
340
- /**
341
- * Whether to show the theme toggle button
342
- */
343
- this.showThemeToggle = true;
344
347
  this.issues = [];
345
348
  this.loading = true;
346
349
  this.error = null;
@@ -375,13 +378,8 @@ const FeedlogGithubIssuesClient = class {
375
378
  this.feedlogError.emit({ error: errorMsg });
376
379
  }
377
380
  };
378
- this.handleThemeChange = (event) => {
379
- this.theme = event.detail;
380
- this.feedlogThemeChange.emit(event.detail);
381
- };
382
381
  }
383
382
  componentWillLoad() {
384
- this.previousRepos = this.repos;
385
383
  this.previousType = this.type;
386
384
  this.previousLimit = this.limit;
387
385
  this.initializeSDK();
@@ -389,23 +387,24 @@ const FeedlogGithubIssuesClient = class {
389
387
  }
390
388
  componentDidUpdate() {
391
389
  // Re-fetch if any props changed
392
- const reposChanged = JSON.stringify(this.previousRepos) !== JSON.stringify(this.repos);
393
390
  const typeChanged = this.previousType !== this.type;
394
391
  const limitChanged = this.previousLimit !== this.limit;
395
- if (reposChanged || typeChanged || limitChanged) {
392
+ if (typeChanged || limitChanged) {
396
393
  // Reset pagination when filters change
397
394
  this.cursor = null;
398
395
  this.hasMore = false;
399
396
  this.issues = [];
400
397
  this.fetchIssues();
401
- this.previousRepos = this.repos;
402
398
  this.previousType = this.type;
403
399
  this.previousLimit = this.limit;
404
400
  }
405
401
  }
406
402
  initializeSDK() {
407
403
  try {
408
- this.sdk = new FeedlogSDK(Object.assign({}, (this.endpoint && { endpoint: this.endpoint })));
404
+ if (!this.apiKey) {
405
+ throw new Error('API key is required for the Feedlog SDK');
406
+ }
407
+ this.sdk = new FeedlogSDK(Object.assign({ apiKey: this.apiKey }, (this.endpoint && { endpoint: this.endpoint })));
409
408
  this.error = null;
410
409
  }
411
410
  catch (err) {
@@ -414,39 +413,14 @@ const FeedlogGithubIssuesClient = class {
414
413
  this.feedlogError.emit({ error: errorMsg });
415
414
  }
416
415
  }
417
- parseRepos() {
418
- if (!this.repos) {
419
- return [];
420
- }
421
- if (typeof this.repos === 'string') {
422
- try {
423
- const parsed = JSON.parse(this.repos);
424
- return Array.isArray(parsed) ? parsed : [this.repos];
425
- }
426
- catch (_a) {
427
- // If not valid JSON, treat as single repo ID
428
- return [this.repos];
429
- }
430
- }
431
- return Array.isArray(this.repos) ? this.repos : [];
432
- }
433
416
  async fetchIssues() {
434
417
  if (!this.sdk) {
435
418
  return;
436
419
  }
437
- const repos = this.parseRepos();
438
- if (repos.length === 0) {
439
- this.error = 'At least one repository is required';
440
- this.loading = false;
441
- this.feedlogError.emit({ error: 'At least one repository is required' });
442
- return;
443
- }
444
420
  try {
445
421
  this.loading = true;
446
422
  this.error = null;
447
- const params = {
448
- repositoryIds: repos,
449
- };
423
+ const params = {};
450
424
  if (this.type) {
451
425
  params.type = this.type;
452
426
  }
@@ -481,10 +455,7 @@ const FeedlogGithubIssuesClient = class {
481
455
  }
482
456
  this.isLoadingMore = true;
483
457
  try {
484
- const repos = this.parseRepos();
485
- const params = {
486
- repositoryIds: repos,
487
- };
458
+ const params = {};
488
459
  if (this.type) {
489
460
  params.type = this.type;
490
461
  }
@@ -511,7 +482,7 @@ const FeedlogGithubIssuesClient = class {
511
482
  }
512
483
  }
513
484
  render() {
514
- return (h("feedlog-github-issues", { key: '38b9e7ec8a5473acbab39df1d0476fcb357866bf', 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() }));
485
+ 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() }));
515
486
  }
516
487
  };
517
488
 
@@ -2,19 +2,10 @@ import { r as registerInstance, c as createEvent, h, H as Host } from './index-C
2
2
 
3
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-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}`;
4
4
 
5
- /**
6
- * Sun icon SVG component
7
- */
8
- 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" })));
9
- /**
10
- * Moon icon SVG component
11
- */
12
- 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" })));
13
5
  const FeedlogGithubIssues = class {
14
6
  constructor(hostRef) {
15
7
  registerInstance(this, hostRef);
16
8
  this.feedlogUpvote = createEvent(this, "feedlogUpvote");
17
- this.feedlogThemeChange = createEvent(this, "feedlogThemeChange");
18
9
  this.feedlogLoadMore = createEvent(this, "feedlogLoadMore");
19
10
  /**
20
11
  * Array of issues to display
@@ -36,10 +27,6 @@ const FeedlogGithubIssues = class {
36
27
  * Error message - shows error state when set
37
28
  */
38
29
  this.error = null;
39
- /**
40
- * Whether to show the theme toggle button
41
- */
42
- this.showThemeToggle = true;
43
30
  /**
44
31
  * Whether there are more issues to load
45
32
  */
@@ -55,11 +42,6 @@ const FeedlogGithubIssues = class {
55
42
  this.handleUpvote = (event) => {
56
43
  this.feedlogUpvote.emit(event.detail);
57
44
  };
58
- this.toggleTheme = () => {
59
- this.currentTheme = this.currentTheme === 'dark' ? 'light' : 'dark';
60
- this.theme = this.currentTheme;
61
- this.feedlogThemeChange.emit(this.currentTheme);
62
- };
63
45
  this.handleLoadMore = () => {
64
46
  this.feedlogLoadMore.emit();
65
47
  };
@@ -71,7 +53,7 @@ const FeedlogGithubIssues = class {
71
53
  const containerStyle = {
72
54
  maxWidth: this.maxWidth,
73
55
  };
74
- return (h(Host, { key: '8f238ab41f45799062270c84188596d770d6bde0', class: this.currentTheme === 'dark' ? 'dark' : '' }, h("div", { key: 'af0c2155ef3cdc12f228ec804ee906afd7d75477', class: "github-issues-container", style: containerStyle }, h("header", { key: 'ccf9a063df220f7a48e3600cb22df8203960a45b', class: "issues-header" }, h("div", { key: 'c261d6b0c8168a66faef9ec2fb381619f5175070', class: "header-content" }, h("h1", { key: '19203aa63dab0648b0a2865fe812233bfbbc225a', class: "issues-title" }, "GitHub Issues"), h("p", { key: 'e717a4e64cc747c81ad7a9e1cec234c247bfc329', class: "issues-subtitle" }, "Track bugs and enhancements for your project")), this.showThemeToggle && (h("feedlog-button", { key: '21057c7d384c53262e699e0384234077b0b36314', variant: "outline", size: "sm", onFeedlogClick: this.toggleTheme }, this.currentTheme === 'dark' ? h(SunIcon, null) : h(MoonIcon, null)))), this.loading && (h("div", { key: '2059c491247e0a48a81d802d9757d9fa97ac1a72', class: "loading-state" }, h("p", { key: '5654904e73b05bd5a05aa0243506e4bf074e5486' }, "Loading issues..."))), this.error && (h("div", { key: '7d2e09e0055e5d834aa870ed47bd4ebaba64dff1', class: "error-state" }, h("p", { key: 'd4cc2bb872c81234b4e81a4ec4ce21aff368ad74' }, "Error: ", this.error))), !this.loading && !this.error && (h("div", { key: 'e25eb90f7098416837a26a44e5811888530220a4' }, h("feedlog-issues-list", { key: 'a8e7ec5c5861cb31456738107b93f6e7adebbbe9', issues: this.issues, theme: this.currentTheme, onFeedlogUpvote: this.handleUpvote }), this.hasMore && (h("div", { key: '0d935e9247f44bff0700fce487d0bc4ccd104f2a', class: "load-more-container" }, h("feedlog-button", { key: '2858d701f5e3d219c39a6a28a7475c619464bc72', onFeedlogClick: this.handleLoadMore, disabled: this.isLoadingMore, variant: "outline" }, this.isLoadingMore ? 'Loading...' : 'Load More Issues'))))))));
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'))))))));
75
57
  }
76
58
  };
77
59
  FeedlogGithubIssues.style = feedlogGithubIssuesCss();
@@ -16,5 +16,5 @@ var patchBrowser = () => {
16
16
 
17
17
  patchBrowser().then(async (options) => {
18
18
  await globalScripts();
19
- return bootstrapLazy([["feedlog-card",[[257,"feedlog-card"]]],["feedlog-badge_3",[[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",[[1,"feedlog-github-issues",{"issues":[16],"maxWidth":[1,"max-width"],"theme":[1025],"loading":[4],"error":[1],"showThemeToggle":[4,"show-theme-toggle"],"hasMore":[4,"has-more"],"isLoadingMore":[4,"is-loading-more"],"currentTheme":[32]}]]],["feedlog-github-issues-client",[[1,"feedlog-github-issues-client",{"repos":[1],"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]}]]]], options);
19
+ return bootstrapLazy([["feedlog-card",[[257,"feedlog-card"]]],["feedlog-badge_3",[[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",[[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",[[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);
20
20
  });
@@ -4,7 +4,7 @@ export { s as setNonce } from './index-CkB6Yzeb.js';
4
4
  const defineCustomElements = async (win, options) => {
5
5
  if (typeof window === 'undefined') return undefined;
6
6
  await globalScripts();
7
- return bootstrapLazy([["feedlog-card",[[257,"feedlog-card"]]],["feedlog-badge_3",[[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",[[1,"feedlog-github-issues",{"issues":[16],"maxWidth":[1,"max-width"],"theme":[1025],"loading":[4],"error":[1],"showThemeToggle":[4,"show-theme-toggle"],"hasMore":[4,"has-more"],"isLoadingMore":[4,"is-loading-more"],"currentTheme":[32]}]]],["feedlog-github-issues-client",[[1,"feedlog-github-issues-client",{"repos":[1],"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]}]]]], options);
7
+ return bootstrapLazy([["feedlog-card",[[257,"feedlog-card"]]],["feedlog-badge_3",[[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",[[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",[[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);
8
8
  };
9
9
 
10
10
  export { defineCustomElements };
@@ -1 +1 @@
1
- import{p as e,g as o,b as i}from"./p-CkB6Yzeb.js";export{s as setNonce}from"./p-CkB6Yzeb.js";(()=>{const s=import.meta.url,o={};return""!==s&&(o.resourcesUrl=new URL(".",s).href),e(o)})().then((async e=>(await o(),i([["p-cdb2b098",[[257,"feedlog-card"]]],["p-2f7954f7",[[1,"feedlog-issues-list",{issues:[16],theme:[1]}],[257,"feedlog-button",{variant:[1],size:[1],disabled:[4],type:[1]}],[257,"feedlog-badge",{variant:[1]}]]],["p-b3d26272",[[1,"feedlog-github-issues",{issues:[16],maxWidth:[1,"max-width"],theme:[1025],loading:[4],error:[1],showThemeToggle:[4,"show-theme-toggle"],hasMore:[4,"has-more"],isLoadingMore:[4,"is-loading-more"],currentTheme:[32]}]]],["p-399e0281",[[1,"feedlog-github-issues-client",{repos:[1],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]}]]]],e))));
1
+ import{p as e,g as i,b as a}from"./p-CkB6Yzeb.js";export{s as setNonce}from"./p-CkB6Yzeb.js";(()=>{const s=import.meta.url,i={};return""!==s&&(i.resourcesUrl=new URL(".",s).href),e(i)})().then((async e=>(await i(),a([["p-cdb2b098",[[257,"feedlog-card"]]],["p-125595a1",[[1,"feedlog-issues-list",{issues:[16],theme:[1]}],[257,"feedlog-button",{variant:[1],size:[1],disabled:[4],type:[1]}],[257,"feedlog-badge",{variant:[1]}]]],["p-5fc3d243",[[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]}]]],["p-352778fa",[[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]}]]]],e))));
@@ -1 +1 @@
1
- import{r as e,h as o,c as r,H as d}from"./p-CkB6Yzeb.js";const t=class{constructor(o){e(this,o),this.variant="default"}render(){return o("span",{key:"482a74feb8d254a75383c30c7b39790edd04a05b",class:`badge badge-${this.variant}`},o("slot",{key:"8d2db3fe0c2bc58e17829db4de7d0233189bb101"}))}};t.style=":host{display:inline-block;--feedlog-badge-font-size:0.75rem;--feedlog-badge-font-weight:500;--feedlog-badge-padding-x:0.5rem;--feedlog-badge-padding-y:0.125rem;--feedlog-badge-border-radius:calc(0.625rem - 2px);--feedlog-blue-500:oklch(0.623 0.214 259.815);--feedlog-blue-600:oklch(0.546 0.245 262.881);--feedlog-blue-700:oklch(0.488 0.243 264.376);--feedlog-destructive:#d4183d;--feedlog-destructive-hover:#b91c1c}:host(.dark){--feedlog-blue-500:oklch(0.623 0.214 259.815);--feedlog-blue-600:oklch(0.546 0.245 262.881);--feedlog-destructive:oklch(0.396 0.141 25.723);--feedlog-destructive-hover:oklch(0.45 0.16 25.723)}.badge{display:inline-flex;align-items:center;justify-content:center;font-size:var(--feedlog-badge-font-size);font-weight:var(--feedlog-badge-font-weight);padding:var(--feedlog-badge-padding-y) var(--feedlog-badge-padding-x);border-radius:var(--feedlog-badge-border-radius);white-space:nowrap;transition:background-color 0.15s ease;font-family:inherit}.badge-default{background-color:var(--feedlog-blue-600);color:#ffffff}.badge-default:hover{background-color:var(--feedlog-blue-700)}:host(.dark) .badge-default{background-color:var(--feedlog-blue-500)}:host(.dark) .badge-default:hover{background-color:var(--feedlog-blue-600)}.badge-enhancement{background-color:var(--feedlog-blue-600);color:#ffffff}.badge-enhancement:hover{background-color:var(--feedlog-blue-700)}:host(.dark) .badge-enhancement{background-color:var(--feedlog-blue-500)}:host(.dark) .badge-enhancement:hover{background-color:var(--feedlog-blue-600)}.badge-destructive{background-color:var(--feedlog-destructive);color:#ffffff}.badge-destructive:hover{background-color:var(--feedlog-destructive-hover)}";const l=class{constructor(o){e(this,o),this.feedlogClick=r(this,"feedlogClick"),this.variant="default",this.size="default",this.disabled=!1,this.type="button",this.handleClick=e=>{this.disabled||this.feedlogClick.emit(e)}}render(){return o("button",{key:"6cdd8347def51592707b1fb9aab0dc565ca0f76f",type:this.type,class:`button button-${this.variant} ${"default"===this.size?"button-size-default":`button-size-${this.size}`}`,disabled:this.disabled,onClick:this.handleClick},o("slot",{key:"3f3845195fa4b8a551473ecf1d5702321a31763e"}))}};l.style=":host{display:inline-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-primary:#030213;--feedlog-primary-foreground:oklch(1 0 0);--feedlog-secondary:oklch(0.95 0.0058 264.53);--feedlog-secondary-foreground:#030213;--feedlog-muted:#ececf0;--feedlog-accent:#e9ebef;--feedlog-accent-foreground:#030213;--feedlog-border:rgba(0, 0, 0, 0.1);--feedlog-input:transparent;--feedlog-ring:oklch(0.708 0 0);--feedlog-destructive:#d4183d;--feedlog-radius:0.625rem}:host(.dark){--feedlog-background:oklch(0.145 0 0);--feedlog-foreground:oklch(0.985 0 0);--feedlog-primary:oklch(0.985 0 0);--feedlog-primary-foreground:oklch(0.205 0 0);--feedlog-secondary:oklch(0.269 0 0);--feedlog-secondary-foreground:oklch(0.985 0 0);--feedlog-muted:oklch(0.269 0 0);--feedlog-accent:oklch(0.269 0 0);--feedlog-accent-foreground:oklch(0.985 0 0);--feedlog-border:oklch(0.269 0 0);--feedlog-input:oklch(0.269 0 0);--feedlog-ring:oklch(0.439 0 0);--feedlog-destructive:oklch(0.396 0.141 25.723)}button{display:inline-flex;align-items:center;justify-content:center;gap:0.5rem;white-space:nowrap;font-size:0.875rem;font-weight:500;border-radius:calc(var(--feedlog-radius) - 2px);border:1px solid transparent;cursor:pointer;transition:all 0.15s ease;outline:none;font-family:inherit}button:disabled{opacity:0.5;cursor:not-allowed;pointer-events:none}button:focus-visible{border-color:var(--feedlog-ring);box-shadow:0 0 0 3px color-mix(in oklab, var(--feedlog-ring) 50%, transparent)}.button-default{background-color:var(--feedlog-primary);color:var(--feedlog-primary-foreground);border-color:transparent}.button-default:hover:not(:disabled){background-color:color-mix(in oklab, var(--feedlog-primary) 90%, transparent)}.button-outline{background-color:var(--feedlog-background);color:var(--feedlog-foreground);border-color:var(--feedlog-border)}.button-outline:hover:not(:disabled){background-color:var(--feedlog-accent);color:var(--feedlog-accent-foreground)}:host(.dark) .button-outline{background-color:transparent;border-color:var(--feedlog-input)}:host(.dark) .button-outline:hover:not(:disabled){background-color:color-mix(in oklab, var(--feedlog-accent) 50%, transparent)}.button-ghost{background-color:transparent;color:var(--feedlog-foreground);border-color:transparent}.button-ghost:hover:not(:disabled){background-color:var(--feedlog-accent);color:var(--feedlog-accent-foreground)}.button-destructive{background-color:var(--feedlog-destructive);color:#ffffff;border-color:transparent}.button-destructive:hover:not(:disabled){background-color:color-mix(in oklab, var(--feedlog-destructive) 90%, transparent)}:host(.dark) .button-destructive{background-color:color-mix(in oklab, var(--feedlog-destructive) 60%, transparent)}.button-size-sm{height:2rem;padding:0 0.75rem;font-size:0.75rem}.button-size-sm:has(svg:only-child){width:2rem;padding:0}.button-size-default{height:2.25rem;padding:0.5rem 1rem}.button-size-lg{height:2.5rem;padding:0.625rem 1.5rem;font-size:1rem}button svg{pointer-events:none;flex-shrink:0;width:1rem;height:1rem}";const a=()=>o("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"},o("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("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"},o("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"})),s=class{constructor(o){e(this,o),this.feedlogUpvote=r(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 o(d,{key:"5cef6f5476239d0f8096664c04690aa4c3383bd0",class:"dark"===this.theme?"dark":""},o("div",{key:"d72fffe457f0497dbbbe0c64dab3282f76a49217",class:"issues-list"},0===this.issues.length?o("div",{class:"empty-state"},o("p",null,"No issues found")):this.issues.map((e=>o("div",{key:e.id,class:"issue-card"},o("div",{class:"issue-content"},o("div",{class:"issue-header"},o("div",{class:"issue-type-badge"},"bug"===e.type?o("feedlog-badge",{variant:"destructive"},"Bug"):o("feedlog-badge",{variant:"enhancement"},"Enhancement")),e.pinnedAt&&o("div",{class:"pinned-indicator",title:"Pinned issue"},"📌")),o("div",{class:"issue-main"},o("div",{class:"issue-details"},o("h3",{class:"issue-title"},e.title),o("p",{class:"issue-body"},e.body),o("div",{class:"issue-repository"},o("span",{class:"repo-name"},e.repository.owner,"/",e.repository.name))),o("button",{class:"upvote-button "+(e.hasUpvoted?"upvoted":""),onClick:o=>this.handleUpvote(o,e),title:e.hasUpvoted?"Remove upvote":"Upvote this issue"},o(e.hasUpvoted?a:n,null),o("span",{class:"upvote-count"},e.upvoteCount))),o("div",{class:"issue-footer"},o("span",{class:"issue-date",title:`Updated: ${e.updatedAt}`},"Updated ",this.formatDate(e.updatedAt)),o("span",{class:"issue-date",title:`Created: ${e.createdAt}`},"Created ",this.formatDate(e.createdAt)))))))))}formatDate(e){try{const o=new Date(e),r=new Date,d=Math.floor((r.getTime()-o.getTime())/1e3);return d<60?"just now":d<3600?`${Math.floor(d/60)}m ago`:d<86400?`${Math.floor(d/3600)}h ago`:d<604800?`${Math.floor(d/86400)}d ago`:d<2592e3?`${Math.floor(d/604800)}w ago`:o.toLocaleDateString()}catch(e){return"unknown date"}}};s.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}: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}";export{t as feedlog_badge,l as feedlog_button,s as feedlog_issues_list}
1
+ import{r as e,h as o,c as r,H as d}from"./p-CkB6Yzeb.js";const t=class{constructor(o){e(this,o),this.variant="default"}render(){return o("span",{key:"482a74feb8d254a75383c30c7b39790edd04a05b",class:`badge badge-${this.variant}`},o("slot",{key:"8d2db3fe0c2bc58e17829db4de7d0233189bb101"}))}};t.style=":host{display:inline-block;--feedlog-badge-font-size:0.75rem;--feedlog-badge-font-weight:500;--feedlog-badge-padding-x:0.5rem;--feedlog-badge-padding-y:0.125rem;--feedlog-badge-border-radius:calc(0.625rem - 2px);--feedlog-blue-500:oklch(0.623 0.214 259.815);--feedlog-blue-600:oklch(0.546 0.245 262.881);--feedlog-blue-700:oklch(0.488 0.243 264.376);--feedlog-destructive:#d4183d;--feedlog-destructive-hover:#b91c1c}:host(.dark){--feedlog-blue-500:oklch(0.623 0.214 259.815);--feedlog-blue-600:oklch(0.546 0.245 262.881);--feedlog-destructive:oklch(0.396 0.141 25.723);--feedlog-destructive-hover:oklch(0.45 0.16 25.723)}.badge{display:inline-flex;align-items:center;justify-content:center;font-size:var(--feedlog-badge-font-size);font-weight:var(--feedlog-badge-font-weight);padding:var(--feedlog-badge-padding-y) var(--feedlog-badge-padding-x);border-radius:var(--feedlog-badge-border-radius);white-space:nowrap;transition:background-color 0.15s ease;font-family:inherit}.badge-default{background-color:var(--feedlog-blue-600);color:#ffffff}.badge-default:hover{background-color:var(--feedlog-blue-700)}:host(.dark) .badge-default{background-color:var(--feedlog-blue-500)}:host(.dark) .badge-default:hover{background-color:var(--feedlog-blue-600)}.badge-enhancement{background-color:var(--feedlog-blue-600);color:#ffffff}.badge-enhancement:hover{background-color:var(--feedlog-blue-700)}:host(.dark) .badge-enhancement{background-color:var(--feedlog-blue-500)}:host(.dark) .badge-enhancement:hover{background-color:var(--feedlog-blue-600)}.badge-destructive{background-color:var(--feedlog-destructive);color:#ffffff}.badge-destructive:hover{background-color:var(--feedlog-destructive-hover)}";const l=class{constructor(o){e(this,o),this.feedlogClick=r(this,"feedlogClick"),this.variant="default",this.size="default",this.disabled=!1,this.type="button",this.handleClick=e=>{this.disabled||this.feedlogClick.emit(e)}}render(){return o("button",{key:"6cdd8347def51592707b1fb9aab0dc565ca0f76f",type:this.type,class:`button button-${this.variant} ${"default"===this.size?"button-size-default":`button-size-${this.size}`}`,disabled:this.disabled,onClick:this.handleClick},o("slot",{key:"3f3845195fa4b8a551473ecf1d5702321a31763e"}))}};l.style=":host{display:inline-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-primary:#030213;--feedlog-primary-foreground:oklch(1 0 0);--feedlog-secondary:oklch(0.95 0.0058 264.53);--feedlog-secondary-foreground:#030213;--feedlog-muted:#ececf0;--feedlog-accent:#e9ebef;--feedlog-accent-foreground:#030213;--feedlog-border:rgba(0, 0, 0, 0.1);--feedlog-input:transparent;--feedlog-ring:oklch(0.708 0 0);--feedlog-destructive:#d4183d;--feedlog-radius:0.625rem}:host(.dark){--feedlog-background:oklch(0.145 0 0);--feedlog-foreground:oklch(0.985 0 0);--feedlog-primary:oklch(0.985 0 0);--feedlog-primary-foreground:oklch(0.205 0 0);--feedlog-secondary:oklch(0.269 0 0);--feedlog-secondary-foreground:oklch(0.985 0 0);--feedlog-muted:oklch(0.269 0 0);--feedlog-accent:oklch(0.269 0 0);--feedlog-accent-foreground:oklch(0.985 0 0);--feedlog-border:oklch(0.269 0 0);--feedlog-input:oklch(0.269 0 0);--feedlog-ring:oklch(0.439 0 0);--feedlog-destructive:oklch(0.396 0.141 25.723)}button{display:inline-flex;align-items:center;justify-content:center;gap:0.5rem;white-space:nowrap;font-size:0.875rem;font-weight:500;border-radius:calc(var(--feedlog-radius) - 2px);border:1px solid transparent;cursor:pointer;transition:all 0.15s ease;outline:none;font-family:inherit}button:disabled{opacity:0.5;cursor:not-allowed;pointer-events:none}button:focus-visible{border-color:var(--feedlog-ring);box-shadow:0 0 0 3px color-mix(in oklab, var(--feedlog-ring) 50%, transparent)}.button-default{background-color:var(--feedlog-primary);color:var(--feedlog-primary-foreground);border-color:transparent}.button-default:hover:not(:disabled){background-color:color-mix(in oklab, var(--feedlog-primary) 90%, transparent)}.button-outline{background-color:var(--feedlog-background);color:var(--feedlog-foreground);border-color:var(--feedlog-border)}.button-outline:hover:not(:disabled){background-color:var(--feedlog-accent);color:var(--feedlog-accent-foreground)}:host(.dark) .button-outline{background-color:transparent;border-color:var(--feedlog-input)}:host(.dark) .button-outline:hover:not(:disabled){background-color:color-mix(in oklab, var(--feedlog-accent) 50%, transparent)}.button-ghost{background-color:transparent;color:var(--feedlog-foreground);border-color:transparent}.button-ghost:hover:not(:disabled){background-color:var(--feedlog-accent);color:var(--feedlog-accent-foreground)}.button-destructive{background-color:var(--feedlog-destructive);color:#ffffff;border-color:transparent}.button-destructive:hover:not(:disabled){background-color:color-mix(in oklab, var(--feedlog-destructive) 90%, transparent)}:host(.dark) .button-destructive{background-color:color-mix(in oklab, var(--feedlog-destructive) 60%, transparent)}.button-size-sm{height:2rem;padding:0 0.75rem;font-size:0.75rem}.button-size-sm:has(svg:only-child){width:2rem;padding:0}.button-size-default{height:2.25rem;padding:0.5rem 1rem}.button-size-lg{height:2.5rem;padding:0.625rem 1.5rem;font-size:1rem}button svg{pointer-events:none;flex-shrink:0;width:1rem;height:1rem}";const a=()=>o("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"},o("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("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"},o("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"})),s=class{constructor(o){e(this,o),this.feedlogUpvote=r(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 o(d,{key:"81b2b973309388f09d20629da416b92545567618",class:"dark"===this.theme?"dark":""},o("div",{key:"ed22c88736ee13621f39b3095f71c361b0d04b44",class:"issues-list"},0===this.issues.length?o("div",{class:"empty-state"},o("p",null,"No issues found")):this.issues.map((e=>o("div",{key:e.id,class:"issue-card"},o("div",{class:"issue-content"},o("div",{class:"issue-header"},o("div",{class:"issue-type-badge"},"bug"===e.type?o("feedlog-badge",{variant:"destructive"},"Bug"):o("feedlog-badge",{variant:"enhancement"},"Enhancement")),e.pinnedAt&&o("div",{class:"pinned-indicator",title:"Pinned issue"},"📌")),o("div",{class:"issue-main"},o("div",{class:"issue-details"},o("h3",{class:"issue-title"},e.title),o("p",{class:"issue-body"},e.body),o("div",{class:"issue-repository"},o("span",{class:"repo-name"},e.repository.owner,"/",e.repository.name))),o("button",{class:"upvote-button "+(e.hasUpvoted?"upvoted":""),onClick:o=>this.handleUpvote(o,e),title:e.hasUpvoted?"Remove upvote":"Upvote this issue"},o(e.hasUpvoted?a:n,null),o("span",{class:"upvote-count"},e.upvoteCount))),o("div",{class:"issue-footer"},o("span",{class:"issue-date",title:`Updated: ${e.updatedAt}`},"Updated ",this.formatDate(e.updatedAt)),o("span",{class:"issue-date",title:`Created: ${e.createdAt}`},"Created ",this.formatDate(e.createdAt)))))))))}formatDate(e){try{const o=new Date(e),r=new Date,d=Math.floor((r.getTime()-o.getTime())/1e3);return d<60?"just now":d<3600?`${Math.floor(d/60)}m ago`:d<86400?`${Math.floor(d/3600)}h ago`:d<604800?`${Math.floor(d/86400)}d ago`:d<2592e3?`${Math.floor(d/604800)}w ago`:o.toLocaleDateString()}catch(e){return"unknown date"}}};s.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}: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}";export{t as feedlog_badge,l as feedlog_button,s as feedlog_issues_list}
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as s}from"./p-CkB6Yzeb.js";function i(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 o extends Error{constructor(t,e,s){super(t),this.statusCode=e,this.originalError=s,this.name="FeedlogError",Object.setPrototypeOf(this,o.prototype)}}class r extends o{constructor(t){super(t),this.name="FeedlogValidationError",Object.setPrototypeOf(this,r.prototype)}}class n extends o{constructor(t,e,s){super(t,e,s),this.name="FeedlogNetworkError",Object.setPrototypeOf(this,n.prototype)}}class h extends o{constructor(t="Request timed out"){super(t),this.name="FeedlogTimeoutError",Object.setPrototypeOf(this,h.prototype)}}class a{constructor(t){if(this.config={credentials:"include",...t},this.apiKey=this.config.apiKey,!this.apiKey)throw new r("apiKey is required in FeedlogSDKConfig");this.endpoint=this.config.endpoint||"https://api.feedlog.app",this.timeout=this.config.timeout||3e4,this.endpoint=this.endpoint.replace(/\/$/,"")}async fetchIssues(t={}){try{const e=this.buildIssuesUrl(t),s=await this.fetchWithTimeout(e,{method:"GET",headers:this.getAuthHeaders(),credentials:this.config.credentials||"include"});if(!s.ok)throw new n(`Failed to fetch issues: ${s.statusText}`,s.status);const i=await s.json();return this.validateIssuesResponse(i)}catch(t){if(t instanceof o)throw t;if(t instanceof TypeError&&t.message.includes("fetch"))throw new n("Network error: Unable to reach API",void 0,t);throw new o(`Failed to fetch issues: ${t instanceof Error?t.message:"Unknown error"}`,void 0,t)}}async toggleUpvote(t){if(!t||"string"!=typeof t)throw new r("Issue ID is required");try{const 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 n("Issue not found",404);if(401===s.status)throw new n("Unauthorized",401);if(403===s.status)throw new n("Forbidden: Domain not allowed for this repository",403);if(!s.ok)throw new n(`Failed to toggle upvote: ${s.statusText}`,s.status);const i=await s.json();return this.validateUpvoteResponse(i)}catch(t){if(t instanceof o)throw t;if(t instanceof TypeError&&t.message.includes("fetch"))throw new n("Network error: Unable to reach API",void 0,t);throw new o(`Failed to toggle upvote: ${t instanceof Error?t.message:"Unknown error"}`,void 0,t)}}buildIssuesUrl(t){const 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.toString()),e.toString()}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 h(`Request timed out after ${this.timeout}ms`);throw t}}validateIssuesResponse(t){if(!t||"object"!=typeof t)throw new r("Invalid API response: expected object");const e=t;if(!Array.isArray(e.issues))throw new r("Invalid API response: issues must be an array");if(!e.pagination||"object"!=typeof e.pagination)throw new r("Invalid API response: pagination is required");return{issues:e.issues.map((t=>this.validateIssue(t))),pagination:{cursor:e.pagination.cursor,hasMore:Boolean(e.pagination.hasMore)}}}validateIssue(t){if(!t||"object"!=typeof t)throw new r("Invalid issue: expected object");const e=t;if("string"!=typeof e.id)throw new r("Invalid issue: id is required and must be a string");if("string"!=typeof e.title)throw new r("Invalid issue: title is required and must be a string");if(!["bug","enhancement"].includes(String(e.type)))throw new r('Invalid issue: type must be "bug" or "enhancement"');if(!["open","closed"].includes(String(e.status)))throw new r('Invalid issue: status must be "open" or "closed"');if(!e.repository||"object"!=typeof e.repository)throw new r("Invalid issue: repository is required");const s=e.repository;if("string"!=typeof s.id||"string"!=typeof s.name||"string"!=typeof s.owner)throw new r("Invalid issue: repository must have id, name, and owner");const o=i(String(e.title)),n=i(String(e.body||""));return{id:String(e.id),type:e.type||"bug",status:e.status||"open",pinnedAt:e.pinnedAt?String(e.pinnedAt):null,revision:Number(e.revision)||1,title:o,body:n,repository:{id:String(s.id),name:String(s.name),owner:String(s.owner)},updatedAt:String(e.updatedAt)||(new Date).toISOString(),createdAt:String(e.createdAt)||(new Date).toISOString(),upvoteCount:Number(e.upvoteCount)||0,hasUpvoted:Boolean(e.hasUpvoted)}}validateUpvoteResponse(t){if(!t||"object"!=typeof t)throw new r("Invalid upvote response: expected object");const e=t;if("boolean"!=typeof e.upvoted)throw new r("Invalid upvote response: upvoted must be a boolean");if("number"!=typeof e.upvoteCount)throw new r("Invalid upvote response: upvoteCount must be a number");if("string"!=typeof e.anonymousUserId)throw new r("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 c=class{constructor(s){t(this,s),this.feedlogUpvote=e(this,"feedlogUpvote"),this.feedlogError=e(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));const o=t instanceof Error?t.message:"Failed to toggle upvote";this.feedlogError.emit({error:o})}}}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 new Error("API key is required for the Feedlog SDK");this.sdk=new a(Object.assign({apiKey:this.apiKey},this.endpoint&&{endpoint:this.endpoint})),this.error=null}catch(t){const 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){const e=t instanceof Error?t.message:"Failed to load more issues";this.feedlogError.emit({error:e,code:null==t?void 0:t.statusCode})}finally{this.isLoadingMore=!1}}}render(){return s("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()})}};export{c as feedlog_github_issues_client}
@@ -0,0 +1 @@
1
+ import{r as e,c as s,h as t,H as d}from"./p-CkB6Yzeb.js";const o=class{constructor(t){e(this,t),this.feedlogUpvote=s(this,"feedlogUpvote"),this.feedlogLoadMore=s(this,"feedlogLoadMore"),this.issues=[],this.maxWidth="42rem",this.theme="light",this.loading=!1,this.error=null,this.hasMore=!1,this.isLoadingMore=!1,this.currentTheme="light",this.handleUpvote=e=>{this.feedlogUpvote.emit(e.detail)},this.handleLoadMore=()=>{this.feedlogLoadMore.emit()}}componentWillLoad(){this.currentTheme=this.theme}render(){return t(d,{key:"473e30453d8b3a719bd977a361b7f669fdd88e48",class:"dark"===this.currentTheme?"dark":""},t("div",{key:"ab91126edb301a1da6136f14441ec33833b6cd74",class:"github-issues-container",style:{maxWidth:this.maxWidth}},(this.heading||this.subtitle)&&t("header",{key:"17494da495d2b2910e6f024f1c3971a945e0a1cc",class:"issues-header"},t("div",{key:"95d5ac1c25ccfc864a863cafe1fa89d4ce04fce2",class:"header-content"},this.heading&&t("h1",{key:"b37f9b9372e1b99da76c0fb9ee50d0a6cdbb0549",class:"issues-title"},this.heading),this.subtitle&&t("p",{key:"5edc92ca86f2dfd1afe640d77d65782e5ec27a8e",class:"issues-subtitle"},this.subtitle))),this.loading&&t("div",{key:"f786656d24c8b88a57c7fa48f0d1877ac3565767",class:"loading-state"},t("p",{key:"fa97c2a05f52c2c1fbe0e907ac797cd6570d0a82"},"Loading issues...")),this.error&&t("div",{key:"798f3dc1ba004b2889aee6490b74240900ba3812",class:"error-state"},t("p",{key:"03b996ab514027fce2e88a93901f3fe17d8da3e1"},"Error: ",this.error)),!this.loading&&!this.error&&t("div",{key:"67501ae1866122df2db6f97752d632013dbcd8a1"},t("feedlog-issues-list",{key:"c668c631f6ba6008df0a411bda7824bcce7318cd",issues:this.issues,theme:this.currentTheme,onFeedlogUpvote:this.handleUpvote}),this.hasMore&&t("div",{key:"28e1ea0600436f3ca8bf12e57e9764bf8899fa53",class:"load-more-container"},t("feedlog-button",{key:"f19576026d152e1b7f7957c83ccfee3c44727dd0",onFeedlogClick:this.handleLoadMore,disabled:this.isLoadingMore,variant:"outline"},this.isLoadingMore?"Loading...":"Load More Issues")))))}};o.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-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}";export{o as feedlog_github_issues}
@@ -1,8 +1,7 @@
1
1
  import type { Meta, StoryObj } from '@stencil/storybook-plugin';
2
- import { FeedlogBadge } from './feedlog-badge';
3
- declare const meta: Meta<FeedlogBadge>;
2
+ declare const meta: Meta;
4
3
  export default meta;
5
- type Story = StoryObj<FeedlogBadge>;
4
+ type Story = StoryObj;
6
5
  export declare const Default: Story;
7
6
  export declare const Destructive: Story;
8
7
  export declare const AllVariants: Story;
@@ -1,8 +1,7 @@
1
1
  import type { Meta, StoryObj } from '@stencil/storybook-plugin';
2
- import { FeedlogButton } from './feedlog-button';
3
- declare const meta: Meta<FeedlogButton>;
2
+ declare const meta: Meta;
4
3
  export default meta;
5
- type Story = StoryObj<FeedlogButton>;
4
+ type Story = StoryObj;
6
5
  export declare const Default: Story;
7
6
  export declare const Outline: Story;
8
7
  export declare const Ghost: Story;
@@ -1,8 +1,7 @@
1
1
  import type { Meta, StoryObj } from '@stencil/storybook-plugin';
2
- import { FeedlogCard } from './feedlog-card';
3
- declare const meta: Meta<FeedlogCard>;
2
+ declare const meta: Meta;
4
3
  export default meta;
5
- type Story = StoryObj<FeedlogCard>;
4
+ type Story = StoryObj;
6
5
  export declare const Default: Story;
7
6
  export declare const WithFooter: Story;
8
7
  export declare const HeaderOnly: Story;
@@ -19,6 +19,14 @@ export declare class FeedlogGithubIssues {
19
19
  * Theme variant: 'light' or 'dark'
20
20
  */
21
21
  theme: 'light' | 'dark';
22
+ /**
23
+ * Custom heading for the issues section
24
+ */
25
+ heading?: string;
26
+ /**
27
+ * Custom subtitle for the issues section
28
+ */
29
+ subtitle?: string;
22
30
  /**
23
31
  * Loading state - shows loading indicator when true
24
32
  */
@@ -27,10 +35,6 @@ export declare class FeedlogGithubIssues {
27
35
  * Error message - shows error state when set
28
36
  */
29
37
  error: string | null;
30
- /**
31
- * Whether to show the theme toggle button
32
- */
33
- showThemeToggle: boolean;
34
38
  /**
35
39
  * Whether there are more issues to load
36
40
  */
@@ -51,17 +55,12 @@ export declare class FeedlogGithubIssues {
51
55
  currentUpvoted: boolean;
52
56
  currentCount: number;
53
57
  }>;
54
- /**
55
- * Event emitted when theme changes
56
- */
57
- feedlogThemeChange: EventEmitter<'light' | 'dark'>;
58
58
  /**
59
59
  * Event emitted to load more issues
60
60
  */
61
61
  feedlogLoadMore: EventEmitter<void>;
62
62
  componentWillLoad(): void;
63
63
  private handleUpvote;
64
- private toggleTheme;
65
64
  private handleLoadMore;
66
65
  render(): any;
67
66
  }
@@ -1,8 +1,7 @@
1
1
  import type { Meta, StoryObj } from '@stencil/storybook-plugin';
2
- import { FeedlogGithubIssues } from './feedlog-github-issues';
3
- declare const meta: Meta<FeedlogGithubIssues>;
2
+ declare const meta: Meta;
4
3
  export default meta;
5
- type Story = StoryObj<FeedlogGithubIssues>;
4
+ type Story = StoryObj;
6
5
  export declare const Default: Story;
7
6
  export declare const Loading: Story;
8
7
  export declare const Error: Story;
@@ -8,10 +8,10 @@ import { FeedlogIssue } from '@feedlog-ai/core';
8
8
  */
9
9
  export declare class FeedlogGithubIssuesClient {
10
10
  /**
11
- * Array of repository public IDs or single ID
12
- * Format: repository public ID (not owner/repo)
11
+ * API key for Feedlog authentication (required)
12
+ * The API key determines which repositories' issues are fetched
13
13
  */
14
- repos?: string[] | string;
14
+ apiKey: string;
15
15
  /**
16
16
  * Filter issues by type: 'bug' or 'enhancement'
17
17
  */
@@ -33,9 +33,13 @@ export declare class FeedlogGithubIssuesClient {
33
33
  */
34
34
  theme: 'light' | 'dark';
35
35
  /**
36
- * Whether to show the theme toggle button
36
+ * Custom heading for the issues section
37
37
  */
38
- showThemeToggle: boolean;
38
+ heading?: string;
39
+ /**
40
+ * Custom subtitle for the issues section
41
+ */
42
+ subtitle?: string;
39
43
  /**
40
44
  * Event emitted when an issue is upvoted
41
45
  */
@@ -44,10 +48,6 @@ export declare class FeedlogGithubIssuesClient {
44
48
  upvoted: boolean;
45
49
  upvoteCount: number;
46
50
  }>;
47
- /**
48
- * Event emitted when theme changes
49
- */
50
- feedlogThemeChange: EventEmitter<'light' | 'dark'>;
51
51
  /**
52
52
  * Event emitted on error
53
53
  */
@@ -62,16 +62,13 @@ export declare class FeedlogGithubIssuesClient {
62
62
  hasMore: boolean;
63
63
  isLoadingMore: boolean;
64
64
  private sdk;
65
- private previousRepos?;
66
65
  private previousType?;
67
66
  private previousLimit?;
68
67
  componentWillLoad(): void;
69
68
  componentDidUpdate(): void;
70
69
  private initializeSDK;
71
- private parseRepos;
72
70
  private fetchIssues;
73
71
  private loadMore;
74
72
  private handleUpvote;
75
- private handleThemeChange;
76
73
  render(): any;
77
74
  }