@feedlog-ai/react 0.0.35 → 0.0.37
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 +13 -68
- package/dist/components/domain/issue-list.d.ts +8 -0
- package/dist/components/domain/issue-list.d.ts.map +1 -0
- package/dist/components/domain/issue-list.js +16 -0
- package/dist/components/domain/issue-list.js.map +1 -0
- package/dist/components/domain/issue.d.ts +10 -0
- package/dist/components/domain/issue.d.ts.map +1 -0
- package/dist/components/domain/issue.js +16 -0
- package/dist/components/domain/issue.js.map +1 -0
- package/dist/components/stencil-generated/components.d.ts +59 -0
- package/dist/components/stencil-generated/components.d.ts.map +1 -0
- package/dist/components/stencil-generated/components.js +73 -0
- package/dist/components/stencil-generated/components.js.map +1 -0
- package/dist/components/ui/badge.d.ts +10 -0
- package/dist/components/ui/badge.d.ts.map +1 -0
- package/dist/components/ui/badge.js +21 -0
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/button.d.ts +11 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/button.js +32 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/card.d.ts +9 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/card.js +17 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/index.d.ts +1 -77
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -200
- package/dist/index.js.map +1 -1
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +6 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/next.d.ts +0 -1
- package/dist/next.d.ts.map +1 -1
- package/dist/next.js +2 -3
- package/dist/next.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ npm install @feedlog-ai/react
|
|
|
19
19
|
|
|
20
20
|
## Components
|
|
21
21
|
|
|
22
|
-
###
|
|
22
|
+
### FeedlogIssuesClient
|
|
23
23
|
|
|
24
24
|
The main component for displaying GitHub issues with built-in SDK integration.
|
|
25
25
|
|
|
@@ -31,24 +31,22 @@ The main component for displaying GitHub issues with built-in SDK integration.
|
|
|
31
31
|
- `endpoint?`: Custom API endpoint
|
|
32
32
|
- `maxWidth?`: Container max width (default: `'42rem'`)
|
|
33
33
|
- `theme?`: Theme variant - `'light'` or `'dark'` (default: `'light'`)
|
|
34
|
-
- `showThemeToggle?`: Show theme toggle button (default: `true`)
|
|
35
34
|
|
|
36
35
|
**Events:**
|
|
37
36
|
|
|
38
37
|
- `onFeedlogUpvote`: Called when an issue is upvoted
|
|
39
|
-
- `onFeedlogThemeChange`: Called when theme changes
|
|
40
38
|
- `onFeedlogError`: Called on errors
|
|
41
39
|
|
|
42
40
|
## Usage
|
|
43
41
|
|
|
44
42
|
```tsx
|
|
45
43
|
import React from 'react';
|
|
46
|
-
import {
|
|
44
|
+
import { FeedlogIssuesClient } from '@feedlog-ai/react';
|
|
47
45
|
|
|
48
46
|
function App() {
|
|
49
47
|
return (
|
|
50
48
|
<div>
|
|
51
|
-
<
|
|
49
|
+
<FeedlogIssuesClient
|
|
52
50
|
apiKey="your-api-key"
|
|
53
51
|
type="bug"
|
|
54
52
|
limit={10}
|
|
@@ -58,9 +56,6 @@ function App() {
|
|
|
58
56
|
console.log('Issue upvoted:', event.detail);
|
|
59
57
|
// event.detail contains: { issueId, upvoted, upvoteCount }
|
|
60
58
|
}}
|
|
61
|
-
onFeedlogThemeChange={event => {
|
|
62
|
-
console.log('Theme changed to:', event.detail); // 'light' or 'dark'
|
|
63
|
-
}}
|
|
64
59
|
onFeedlogError={event => {
|
|
65
60
|
console.error('Error occurred:', event.detail);
|
|
66
61
|
// event.detail contains: { error, code? }
|
|
@@ -92,7 +87,7 @@ const nextConfig = {
|
|
|
92
87
|
export default withFeedlogSSR(nextConfig);
|
|
93
88
|
```
|
|
94
89
|
|
|
95
|
-
Then
|
|
90
|
+
Then import components from `@feedlog-ai/react` as usual.
|
|
96
91
|
|
|
97
92
|
### Vite / Remix
|
|
98
93
|
|
|
@@ -163,50 +158,15 @@ The compiler-based SSR (used by Vite, Remix, and Next.js with `feedlogSSR` / `wi
|
|
|
163
158
|
|
|
164
159
|
This is a [documented limitation](https://stenciljs.com/docs/server-side-rendering) of Stencil's compiler approach ("Static props only").
|
|
165
160
|
|
|
166
|
-
###
|
|
167
|
-
|
|
168
|
-
If you need the issues list fully server-rendered (no flash of empty content), create a custom wrapper that fetches issues on the server and passes the data to `FeedlogIssues`.
|
|
169
|
-
|
|
170
|
-
<details>
|
|
171
|
-
<summary>LLM instructions: Build an SSR-compatible issues component</summary>
|
|
172
|
-
|
|
173
|
-
Copy the following into your LLM to generate a custom SSR-compatible issues component:
|
|
174
|
-
|
|
175
|
-
---
|
|
176
|
-
|
|
177
|
-
**Context:** The `@stencil/ssr` compiler cannot resolve dynamic props at build time. For full SSR of the issues list, fetch data on the server and pass it to `FeedlogIssues`. Use `FeedlogSDK` from `@feedlog-ai/core` or direct `fetch()` to the Feedlog API.
|
|
161
|
+
### Build Your Own Feedlog (Full SSR)
|
|
178
162
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
- **Next.js App Router:** Create an async Server Component that calls `new FeedlogSDK({ apiKey }).fetchIssues()`, then renders `<FeedlogIssues issues={issues} ... />`. Import `FeedlogIssues` from `@feedlog-ai/react`.
|
|
182
|
-
- **Next.js Pages Router:** Use `getServerSideProps` or `getStaticProps` to fetch issues, pass to the page, and render `<FeedlogIssues issues={issues} />`.
|
|
183
|
-
- **Vite / Remix:** Fetch in the route loader, pass data to the page component, and render `FeedlogIssues` with the fetched `issues` array.
|
|
184
|
-
|
|
185
|
-
**Important:** The wrapper must run on the server so props are resolved at request time. Import from `@feedlog-ai/react` (not `@feedlog-ai/react/ssr-components` or `@feedlog-ai/react/next` for the issues components).
|
|
186
|
-
|
|
187
|
-
**Example (Next.js App Router):**
|
|
188
|
-
|
|
189
|
-
```tsx
|
|
190
|
-
// app/issues/page.tsx
|
|
191
|
-
import { FeedlogIssues } from '@feedlog-ai/react';
|
|
192
|
-
import { FeedlogSDK } from '@feedlog-ai/core';
|
|
193
|
-
|
|
194
|
-
export default async function IssuesPage() {
|
|
195
|
-
const sdk = new FeedlogSDK({ apiKey: process.env.FEEDLOG_API_KEY! });
|
|
196
|
-
const { issues } = await sdk.fetchIssues({ limit: 10 });
|
|
197
|
-
return <FeedlogIssues issues={issues} theme="light" />;
|
|
198
|
-
}
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
---
|
|
202
|
-
|
|
203
|
-
</details>
|
|
163
|
+
For full SSR of the issues list (no flash of empty content), build a custom wrapper that fetches on the server and passes data to `FeedlogIssues`. See [Build Your Own Feedlog](../../docs/BUILD_YOUR_OWN_FEEDLOG.md) for copy-paste instructions for AI assistants and code generators.
|
|
204
164
|
|
|
205
165
|
### Event Handling
|
|
206
166
|
|
|
207
167
|
```tsx
|
|
208
168
|
import React, { useCallback } from 'react';
|
|
209
|
-
import {
|
|
169
|
+
import { FeedlogIssuesClient } from '@feedlog-ai/react';
|
|
210
170
|
|
|
211
171
|
function IssuesComponent() {
|
|
212
172
|
const handleUpvote = useCallback((event: CustomEvent) => {
|
|
@@ -215,11 +175,6 @@ function IssuesComponent() {
|
|
|
215
175
|
console.log(`New upvote count: ${upvoteCount}`);
|
|
216
176
|
}, []);
|
|
217
177
|
|
|
218
|
-
const handleThemeChange = useCallback((event: CustomEvent<'light' | 'dark'>) => {
|
|
219
|
-
console.log(`Theme changed to: ${event.detail}`);
|
|
220
|
-
// Update your app's theme state here
|
|
221
|
-
}, []);
|
|
222
|
-
|
|
223
178
|
const handleError = useCallback((event: CustomEvent) => {
|
|
224
179
|
const { error, code } = event.detail;
|
|
225
180
|
console.error(`Feedlog error (${code}):`, error);
|
|
@@ -227,10 +182,9 @@ function IssuesComponent() {
|
|
|
227
182
|
}, []);
|
|
228
183
|
|
|
229
184
|
return (
|
|
230
|
-
<
|
|
185
|
+
<FeedlogIssuesClient
|
|
231
186
|
apiKey="your-api-key"
|
|
232
187
|
onFeedlogUpvote={handleUpvote}
|
|
233
|
-
onFeedlogThemeChange={handleThemeChange}
|
|
234
188
|
onFeedlogError={handleError}
|
|
235
189
|
/>
|
|
236
190
|
);
|
|
@@ -241,16 +195,12 @@ function IssuesComponent() {
|
|
|
241
195
|
|
|
242
196
|
```tsx
|
|
243
197
|
import React, { useState, useCallback } from 'react';
|
|
244
|
-
import {
|
|
198
|
+
import { FeedlogIssuesClient } from '@feedlog-ai/react';
|
|
245
199
|
|
|
246
200
|
function IssuesWithState() {
|
|
247
201
|
const [theme, setTheme] = useState<'light' | 'dark'>('light');
|
|
248
202
|
const [error, setError] = useState<string | null>(null);
|
|
249
203
|
|
|
250
|
-
const handleThemeChange = useCallback((event: CustomEvent<'light' | 'dark'>) => {
|
|
251
|
-
setTheme(event.detail);
|
|
252
|
-
}, []);
|
|
253
|
-
|
|
254
204
|
const handleError = useCallback((event: CustomEvent) => {
|
|
255
205
|
setError(event.detail.error);
|
|
256
206
|
// Clear error after 5 seconds
|
|
@@ -261,12 +211,7 @@ function IssuesWithState() {
|
|
|
261
211
|
<div>
|
|
262
212
|
{error && <div className="error-banner">Error: {error}</div>}
|
|
263
213
|
|
|
264
|
-
<
|
|
265
|
-
apiKey="your-api-key"
|
|
266
|
-
theme={theme}
|
|
267
|
-
onFeedlogThemeChange={handleThemeChange}
|
|
268
|
-
onFeedlogError={handleError}
|
|
269
|
-
/>
|
|
214
|
+
<FeedlogIssuesClient apiKey="your-api-key" theme={theme} onFeedlogError={handleError} />
|
|
270
215
|
</div>
|
|
271
216
|
);
|
|
272
217
|
}
|
|
@@ -281,12 +226,12 @@ import {
|
|
|
281
226
|
FeedlogBadge,
|
|
282
227
|
FeedlogButton,
|
|
283
228
|
FeedlogCard,
|
|
284
|
-
|
|
229
|
+
FeedlogIssues,
|
|
285
230
|
FeedlogIssuesList
|
|
286
231
|
} from '@feedlog-ai/react';
|
|
287
232
|
|
|
288
233
|
// Badge component
|
|
289
|
-
<FeedlogBadge variant="
|
|
234
|
+
<FeedlogBadge variant="enhancement">New</FeedlogBadge>
|
|
290
235
|
|
|
291
236
|
// Button component
|
|
292
237
|
<FeedlogButton variant="primary" size="lg" onFeedlogClick={handleClick}>
|
|
@@ -306,7 +251,7 @@ All components are fully typed. Import types from the core package if needed:
|
|
|
306
251
|
|
|
307
252
|
```tsx
|
|
308
253
|
import { FeedlogIssue } from '@feedlog-ai/core';
|
|
309
|
-
import {
|
|
254
|
+
import { FeedlogIssuesClient } from '@feedlog-ai/react';
|
|
310
255
|
|
|
311
256
|
// Type-safe event handling
|
|
312
257
|
const handleUpvote = (
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const IssueList: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
3
|
+
declare const IssueListHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const IssueListTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLHeadingElement>>;
|
|
5
|
+
declare const IssueListContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const IssueListEmpty: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export { IssueList, IssueListHeader, IssueListTitle, IssueListContent, IssueListEmpty };
|
|
8
|
+
//# sourceMappingURL=issue-list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"issue-list.d.ts","sourceRoot":"","sources":["../../../src/components/domain/issue-list.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,QAAA,MAAM,SAAS,6GAQd,CAAA;AAGD,QAAA,MAAM,eAAe,6GAIpB,CAAA;AAGD,QAAA,MAAM,cAAc,qHAInB,CAAA;AAGD,QAAA,MAAM,gBAAgB,6GAIrB,CAAA;AAGD,QAAA,MAAM,cAAc,6GAInB,CAAA;AAGD,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,cAAc,EAAE,gBAAgB,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../../lib/utils";
|
|
4
|
+
const IssueListContext = React.createContext({});
|
|
5
|
+
const IssueList = React.forwardRef(({ className, children, ...props }, ref) => (_jsx(IssueListContext.Provider, { value: {}, children: _jsx("div", { ref: ref, className: cn("flex flex-col space-y-4", className), ...props, children: children }) })));
|
|
6
|
+
IssueList.displayName = "IssueList";
|
|
7
|
+
const IssueListHeader = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("flex items-center justify-between pb-4 border-b", className), ...props })));
|
|
8
|
+
IssueListHeader.displayName = "IssueListHeader";
|
|
9
|
+
const IssueListTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx("h2", { ref: ref, className: cn("text-lg font-semibold tracking-tight", className), ...props })));
|
|
10
|
+
IssueListTitle.displayName = "IssueListTitle";
|
|
11
|
+
const IssueListContent = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("flex flex-col space-y-2", className), ...props })));
|
|
12
|
+
IssueListContent.displayName = "IssueListContent";
|
|
13
|
+
const IssueListEmpty = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("flex flex-col items-center justify-center p-8 text-center text-muted-foreground", className), ...props })));
|
|
14
|
+
IssueListEmpty.displayName = "IssueListEmpty";
|
|
15
|
+
export { IssueList, IssueListHeader, IssueListTitle, IssueListContent, IssueListEmpty };
|
|
16
|
+
//# sourceMappingURL=issue-list.js.map
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MAAM,gBAAgB,GAAG,KAAK,CAAC,UAAU,CACvC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,cAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,yBAAyB,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CAClF,CACF,CAAA;AACD,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAA;AAEjD,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CACrC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,cAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,iFAAiF,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CAC1I,CACF,CAAA;AACD,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAA;AAE7C,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,cAAc,EAAE,gBAAgB,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface IssueProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
title: string;
|
|
4
|
+
status?: "open" | "closed" | "in-progress" | "resolved";
|
|
5
|
+
author?: string;
|
|
6
|
+
date?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const Issue: React.ForwardRefExoticComponent<IssueProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
export { Issue };
|
|
10
|
+
//# sourceMappingURL=issue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"issue.d.ts","sourceRoot":"","sources":["../../../src/components/domain/issue.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,MAAM,WAAW,UAAW,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACtE,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,aAAa,GAAG,UAAU,CAAA;IACvD,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AASD,QAAA,MAAM,KAAK,mFAgCV,CAAA;AAGD,OAAO,EAAE,KAAK,EAAE,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../../lib/utils";
|
|
4
|
+
import { Badge } from "../ui/badge";
|
|
5
|
+
const statusVariantMap = {
|
|
6
|
+
open: "default",
|
|
7
|
+
closed: "secondary",
|
|
8
|
+
"in-progress": "outline",
|
|
9
|
+
resolved: "default",
|
|
10
|
+
};
|
|
11
|
+
const Issue = React.forwardRef(({ className, title, status = "open", author, date, children, ...props }, ref) => {
|
|
12
|
+
return (_jsxs("div", { ref: ref, className: cn("flex flex-col gap-2 rounded-lg border bg-card p-4 text-card-foreground shadow-sm transition-colors hover:bg-muted/50", className), ...props, children: [_jsxs("div", { className: "flex items-start justify-between gap-4", children: [_jsxs("div", { className: "space-y-1", children: [_jsx("h4", { className: "font-medium leading-none tracking-tight", children: title }), (author || date) && (_jsxs("p", { className: "text-sm text-muted-foreground", children: [author && _jsx("span", { children: author }), author && date && _jsx("span", { className: "mx-2", children: "\u2022" }), date && _jsx("span", { children: date })] }))] }), status && (_jsx(Badge, { variant: statusVariantMap[status] || "default", children: status }))] }), children && _jsx("div", { className: "mt-2 text-sm text-muted-foreground", children: children })] }));
|
|
13
|
+
});
|
|
14
|
+
Issue.displayName = "Issue";
|
|
15
|
+
export { Issue };
|
|
16
|
+
//# sourceMappingURL=issue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"issue.js","sourceRoot":"","sources":["../../../src/components/domain/issue.tsx"],"names":[],"mappings":";AA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 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was automatically generated by the Stencil React Output Target.
|
|
3
|
+
* Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
|
|
4
|
+
*/
|
|
5
|
+
import { type FeedlogButtonCustomEvent, type FeedlogIssueCustomEvent, type FeedlogIssuesClientCustomEvent, type FeedlogIssuesCustomEvent, type FeedlogIssuesListCustomEvent } from "@feedlog-ai/webcomponents";
|
|
6
|
+
import { FeedlogBadge as FeedlogBadgeElement } from "@feedlog-ai/webcomponents/dist/components/feedlog-badge.js";
|
|
7
|
+
import { FeedlogButton as FeedlogButtonElement } from "@feedlog-ai/webcomponents/dist/components/feedlog-button.js";
|
|
8
|
+
import { FeedlogCard as FeedlogCardElement } from "@feedlog-ai/webcomponents/dist/components/feedlog-card.js";
|
|
9
|
+
import { FeedlogIssue as FeedlogIssueElement } from "@feedlog-ai/webcomponents/dist/components/feedlog-issue.js";
|
|
10
|
+
import { FeedlogIssuesClient as FeedlogIssuesClientElement } from "@feedlog-ai/webcomponents/dist/components/feedlog-issues-client.js";
|
|
11
|
+
import { FeedlogIssuesList as FeedlogIssuesListElement } from "@feedlog-ai/webcomponents/dist/components/feedlog-issues-list.js";
|
|
12
|
+
import { FeedlogIssues as FeedlogIssuesElement } from "@feedlog-ai/webcomponents/dist/components/feedlog-issues.js";
|
|
13
|
+
import type { EventName, StencilReactComponent } from '@stencil/react-output-target/runtime';
|
|
14
|
+
export type FeedlogBadgeEvents = NonNullable<unknown>;
|
|
15
|
+
export declare const FeedlogBadge: StencilReactComponent<FeedlogBadgeElement, FeedlogBadgeEvents>;
|
|
16
|
+
export type FeedlogButtonEvents = {
|
|
17
|
+
onFeedlogClick: EventName<FeedlogButtonCustomEvent<MouseEvent>>;
|
|
18
|
+
};
|
|
19
|
+
export declare const FeedlogButton: StencilReactComponent<FeedlogButtonElement, FeedlogButtonEvents>;
|
|
20
|
+
export type FeedlogCardEvents = NonNullable<unknown>;
|
|
21
|
+
export declare const FeedlogCard: StencilReactComponent<FeedlogCardElement, FeedlogCardEvents>;
|
|
22
|
+
export type FeedlogIssueEvents = {
|
|
23
|
+
onFeedlogUpvote: EventName<FeedlogIssueCustomEvent<{
|
|
24
|
+
issueId: string;
|
|
25
|
+
currentUpvoted: boolean;
|
|
26
|
+
currentCount: number;
|
|
27
|
+
}>>;
|
|
28
|
+
};
|
|
29
|
+
export declare const FeedlogIssue: StencilReactComponent<FeedlogIssueElement, FeedlogIssueEvents>;
|
|
30
|
+
export type FeedlogIssuesEvents = {
|
|
31
|
+
onFeedlogUpvote: EventName<FeedlogIssuesCustomEvent<{
|
|
32
|
+
issueId: string;
|
|
33
|
+
currentUpvoted: boolean;
|
|
34
|
+
currentCount: number;
|
|
35
|
+
}>>;
|
|
36
|
+
onFeedlogLoadMore: EventName<FeedlogIssuesCustomEvent<void>>;
|
|
37
|
+
};
|
|
38
|
+
export declare const FeedlogIssues: StencilReactComponent<FeedlogIssuesElement, FeedlogIssuesEvents>;
|
|
39
|
+
export type FeedlogIssuesClientEvents = {
|
|
40
|
+
onFeedlogUpvote: EventName<FeedlogIssuesClientCustomEvent<{
|
|
41
|
+
issueId: string;
|
|
42
|
+
upvoted: boolean;
|
|
43
|
+
upvoteCount: number;
|
|
44
|
+
}>>;
|
|
45
|
+
onFeedlogError: EventName<FeedlogIssuesClientCustomEvent<{
|
|
46
|
+
error: string;
|
|
47
|
+
code?: number;
|
|
48
|
+
}>>;
|
|
49
|
+
};
|
|
50
|
+
export declare const FeedlogIssuesClient: StencilReactComponent<FeedlogIssuesClientElement, FeedlogIssuesClientEvents>;
|
|
51
|
+
export type FeedlogIssuesListEvents = {
|
|
52
|
+
onFeedlogUpvote: EventName<FeedlogIssuesListCustomEvent<{
|
|
53
|
+
issueId: string;
|
|
54
|
+
currentUpvoted: boolean;
|
|
55
|
+
currentCount: number;
|
|
56
|
+
}>>;
|
|
57
|
+
};
|
|
58
|
+
export declare const FeedlogIssuesList: StencilReactComponent<FeedlogIssuesListElement, FeedlogIssuesListEvents>;
|
|
59
|
+
//# sourceMappingURL=components.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/components/stencil-generated/components.ts"],"names":[],"mappings":"AAEA;;;GAGG;AAIH,OAAO,EAAE,KAAK,wBAAwB,EAAE,KAAK,uBAAuB,EAAE,KAAK,8BAA8B,EAAE,KAAK,wBAAwB,EAAE,KAAK,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AAC/M,OAAO,EAAE,YAAY,IAAI,mBAAmB,EAA6C,MAAM,4DAA4D,CAAC;AAC5J,OAAO,EAAE,aAAa,IAAI,oBAAoB,EAA8C,MAAM,6DAA6D,CAAC;AAChK,OAAO,EAAE,WAAW,IAAI,kBAAkB,EAA4C,MAAM,2DAA2D,CAAC;AACxJ,OAAO,EAAE,YAAY,IAAI,mBAAmB,EAA6C,MAAM,4DAA4D,CAAC;AAC5J,OAAO,EAAE,mBAAmB,IAAI,0BAA0B,EAAoD,MAAM,oEAAoE,CAAC;AACzL,OAAO,EAAE,iBAAiB,IAAI,wBAAwB,EAAkD,MAAM,kEAAkE,CAAC;AACjL,OAAO,EAAE,aAAa,IAAI,oBAAoB,EAA8C,MAAM,6DAA6D,CAAC;AAChK,OAAO,KAAK,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAI7F,MAAM,MAAM,kBAAkB,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;AAEtD,eAAO,MAAM,YAAY,EAAE,qBAAqB,CAAC,mBAAmB,EAAE,kBAAkB,CAOtF,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG;IAAE,cAAc,EAAE,SAAS,CAAC,wBAAwB,CAAC,UAAU,CAAC,CAAC,CAAA;CAAE,CAAC;AAEtG,eAAO,MAAM,aAAa,EAAE,qBAAqB,CAAC,oBAAoB,EAAE,mBAAmB,CAOzF,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAA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AS,CAAC,4BAA4B,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,cAAc,EAAE,OAAO,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;KAAE,CAAC,CAAC,CAAA;CAAE,CAAC;AAExK,eAAO,MAAM,iBAAiB,EAAE,qBAAqB,CAAC,wBAAwB,EAAE,uBAAuB,CAOrG,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { FeedlogBadge as FeedlogBadgeElement, defineCustomElement as defineFeedlogBadge } from "@feedlog-ai/webcomponents/dist/components/feedlog-badge.js";
|
|
3
|
+
import { FeedlogButton as FeedlogButtonElement, defineCustomElement as defineFeedlogButton } from "@feedlog-ai/webcomponents/dist/components/feedlog-button.js";
|
|
4
|
+
import { FeedlogCard as FeedlogCardElement, defineCustomElement as defineFeedlogCard } from "@feedlog-ai/webcomponents/dist/components/feedlog-card.js";
|
|
5
|
+
import { FeedlogIssue as FeedlogIssueElement, defineCustomElement as defineFeedlogIssue } from "@feedlog-ai/webcomponents/dist/components/feedlog-issue.js";
|
|
6
|
+
import { FeedlogIssuesClient as FeedlogIssuesClientElement, defineCustomElement as defineFeedlogIssuesClient } from "@feedlog-ai/webcomponents/dist/components/feedlog-issues-client.js";
|
|
7
|
+
import { FeedlogIssuesList as FeedlogIssuesListElement, defineCustomElement as defineFeedlogIssuesList } from "@feedlog-ai/webcomponents/dist/components/feedlog-issues-list.js";
|
|
8
|
+
import { FeedlogIssues as FeedlogIssuesElement, defineCustomElement as defineFeedlogIssues } from "@feedlog-ai/webcomponents/dist/components/feedlog-issues.js";
|
|
9
|
+
import { createComponent } from '@stencil/react-output-target/runtime';
|
|
10
|
+
import React from 'react';
|
|
11
|
+
export const FeedlogBadge = /*@__PURE__*/ createComponent({
|
|
12
|
+
tagName: 'feedlog-badge',
|
|
13
|
+
elementClass: FeedlogBadgeElement,
|
|
14
|
+
// @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
|
|
15
|
+
react: React,
|
|
16
|
+
events: {},
|
|
17
|
+
defineCustomElement: defineFeedlogBadge
|
|
18
|
+
});
|
|
19
|
+
export const FeedlogButton = /*@__PURE__*/ createComponent({
|
|
20
|
+
tagName: 'feedlog-button',
|
|
21
|
+
elementClass: FeedlogButtonElement,
|
|
22
|
+
// @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
|
|
23
|
+
react: React,
|
|
24
|
+
events: { onFeedlogClick: 'feedlogClick' },
|
|
25
|
+
defineCustomElement: defineFeedlogButton
|
|
26
|
+
});
|
|
27
|
+
export const FeedlogCard = /*@__PURE__*/ createComponent({
|
|
28
|
+
tagName: 'feedlog-card',
|
|
29
|
+
elementClass: FeedlogCardElement,
|
|
30
|
+
// @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
|
|
31
|
+
react: React,
|
|
32
|
+
events: {},
|
|
33
|
+
defineCustomElement: defineFeedlogCard
|
|
34
|
+
});
|
|
35
|
+
export const FeedlogIssue = /*@__PURE__*/ createComponent({
|
|
36
|
+
tagName: 'feedlog-issue',
|
|
37
|
+
elementClass: FeedlogIssueElement,
|
|
38
|
+
// @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
|
|
39
|
+
react: React,
|
|
40
|
+
events: { onFeedlogUpvote: 'feedlogUpvote' },
|
|
41
|
+
defineCustomElement: defineFeedlogIssue
|
|
42
|
+
});
|
|
43
|
+
export const FeedlogIssues = /*@__PURE__*/ createComponent({
|
|
44
|
+
tagName: 'feedlog-issues',
|
|
45
|
+
elementClass: FeedlogIssuesElement,
|
|
46
|
+
// @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
|
|
47
|
+
react: React,
|
|
48
|
+
events: {
|
|
49
|
+
onFeedlogUpvote: 'feedlogUpvote',
|
|
50
|
+
onFeedlogLoadMore: 'feedlogLoadMore'
|
|
51
|
+
},
|
|
52
|
+
defineCustomElement: defineFeedlogIssues
|
|
53
|
+
});
|
|
54
|
+
export const FeedlogIssuesClient = /*@__PURE__*/ createComponent({
|
|
55
|
+
tagName: 'feedlog-issues-client',
|
|
56
|
+
elementClass: FeedlogIssuesClientElement,
|
|
57
|
+
// @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
|
|
58
|
+
react: React,
|
|
59
|
+
events: {
|
|
60
|
+
onFeedlogUpvote: 'feedlogUpvote',
|
|
61
|
+
onFeedlogError: 'feedlogError'
|
|
62
|
+
},
|
|
63
|
+
defineCustomElement: defineFeedlogIssuesClient
|
|
64
|
+
});
|
|
65
|
+
export const FeedlogIssuesList = /*@__PURE__*/ createComponent({
|
|
66
|
+
tagName: 'feedlog-issues-list',
|
|
67
|
+
elementClass: FeedlogIssuesListElement,
|
|
68
|
+
// @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
|
|
69
|
+
react: React,
|
|
70
|
+
events: { onFeedlogUpvote: 'feedlogUpvote' },
|
|
71
|
+
defineCustomElement: defineFeedlogIssuesList
|
|
72
|
+
});
|
|
73
|
+
//# sourceMappingURL=components.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components.js","sourceRoot":"","sources":["../../../src/components/stencil-generated/components.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAUb,OAAO,EAAE,YAAY,IAAI,mBAAmB,EAAE,mBAAmB,IAAI,kBAAkB,EAAE,MAAM,4DAA4D,CAAC;AAC5J,OAAO,EAAE,aAAa,IAAI,oBAAoB,EAAE,mBAAmB,IAAI,mBAAmB,EAAE,MAAM,6DAA6D,CAAC;AAChK,OAAO,EAAE,WAAW,IAAI,kBAAkB,EAAE,mBAAmB,IAAI,iBAAiB,EAAE,MAAM,2DAA2D,CAAC;AACxJ,OAAO,EAAE,YAAY,IAAI,mBAAmB,EAAE,mBAAmB,IAAI,kBAAkB,EAAE,MAAM,4DAA4D,CAAC;AAC5J,OAAO,EAAE,mBAAmB,IAAI,0BAA0B,EAAE,mBAAmB,IAAI,yBAAyB,EAAE,MAAM,oEA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C1C,CAAC,CAAC;AAOH,MAAM,CAAC,MAAM,aAAa,GAAqE,aAAa,CAAC,eAAe,CAA4C;IACpK,OAAO,EAAE,gBAAgB;IACzB,YAAY,EAAE,oBAAoB;IAClC,0GAA0G;IAC1G,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE;QACJ,eAAe,EAAE,eAAe;QAChC,iBAAiB,EAAE,iBAAiB;KAChB;IACxB,mBAAmB,EAAE,mBAAmB;CAC3C,CAAC,CAAC;AAOH,MAAM,CAAC,MAAM,mBAAmB,GAAiF,aAAa,CAAC,eAAe,CAAwD;IAClM,OAAO,EAAE,uBAAuB;IAChC,YAAY,EAAE,0BAA0B;IACxC,0GAA0G;IAC1G,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE;QACJ,eAAe,EAAE,eAAe;QAChC,cAAc,EAAE,cAAc;KACJ;IAC9B,mBAAmB,EAAE,yBAAyB;CACjD,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,iBAAiB,GAA6E,aAAa,CAAC,eAAe,CAAoD;IACxL,OAAO,EAAE,qBAAqB;IAC9B,YAAY,EAAE,wBAAwB;IACtC,0GAA0G;IAC1G,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE,EAAE,eAAe,EAAE,eAAe,EAA6B;IACvE,mBAAmB,EAAE,uBAAuB;CAC/C,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const badgeVariants: (props?: {
|
|
4
|
+
variant?: "default" | "secondary" | "destructive" | "outline";
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) => string;
|
|
6
|
+
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
7
|
+
}
|
|
8
|
+
declare function Badge({ className, variant, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { Badge, badgeVariants };
|
|
10
|
+
//# sourceMappingURL=badge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/components/ui/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAGjE,QAAA,MAAM,aAAa;;iEAkBlB,CAAA;AAED,MAAM,WAAW,UACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAC1C,YAAY,CAAC,OAAO,aAAa,CAAC;CAAG;AAEzC,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,2CAI1D;AAED,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { cn } from "../../lib/utils";
|
|
4
|
+
const badgeVariants = cva("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", {
|
|
5
|
+
variants: {
|
|
6
|
+
variant: {
|
|
7
|
+
default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
|
|
8
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
9
|
+
destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
|
|
10
|
+
outline: "text-foreground",
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
defaultVariants: {
|
|
14
|
+
variant: "default",
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
function Badge({ className, variant, ...props }) {
|
|
18
|
+
return (_jsx("div", { className: cn(badgeVariants({ variant }), className), ...props }));
|
|
19
|
+
}
|
|
20
|
+
export { Badge, badgeVariants };
|
|
21
|
+
//# sourceMappingURL=badge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.js","sourceRoot":"","sources":["../../../src/components/ui/badge.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAA;AAEpC,MAAM,aAAa,GAAG,GAAG,CACvB,wKAAwK,EACxK;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EACL,2EAA2E;YAC7E,SAAS,EACP,iFAAiF;YACnF,WAAW,EACT,uFAAuF;YACzF,OAAO,EAAE,iBAAiB;SAC3B;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;KACnB;CACF,CACF,CAAA;AAMD,SAAS,KAAK,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,KAAK,EAAc;IACzD,OAAO,CACL,cAAK,SAAS,EAAE,EAAE,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CACzE,CAAA;AACH,CAAC;AAED,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const buttonVariants: (props?: {
|
|
4
|
+
variant?: "default" | "link" | "secondary" | "destructive" | "outline" | "ghost";
|
|
5
|
+
size?: "default" | "sm" | "lg" | "icon";
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) => string;
|
|
7
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
|
+
}
|
|
9
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
export { Button, buttonVariants };
|
|
11
|
+
//# sourceMappingURL=button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAGjE,QAAA,MAAM,cAAc;;;iEA2BnB,CAAA;AAED,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACnD,YAAY,CAAC,OAAO,cAAc,CAAC;CAAG;AAE1C,QAAA,MAAM,MAAM,uFAUX,CAAA;AAGD,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
import { cn } from "../../lib/utils";
|
|
5
|
+
const buttonVariants = cva("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", {
|
|
6
|
+
variants: {
|
|
7
|
+
variant: {
|
|
8
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
9
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
10
|
+
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
11
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
12
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
13
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
14
|
+
},
|
|
15
|
+
size: {
|
|
16
|
+
default: "h-10 px-4 py-2",
|
|
17
|
+
sm: "h-9 rounded-md px-3",
|
|
18
|
+
lg: "h-11 rounded-md px-8",
|
|
19
|
+
icon: "h-10 w-10",
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: {
|
|
23
|
+
variant: "default",
|
|
24
|
+
size: "default",
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
const Button = React.forwardRef(({ className, variant, size, ...props }, ref) => {
|
|
28
|
+
return (_jsx("button", { className: cn(buttonVariants({ variant, size, className })), ref: ref, ...props }));
|
|
29
|
+
});
|
|
30
|
+
Button.displayName = "Button";
|
|
31
|
+
export { Button, buttonVariants };
|
|
32
|
+
//# sourceMappingURL=button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../../src/components/ui/button.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAA;AAEpC,MAAM,cAAc,GAAG,GAAG,CACxB,wRAAwR,EACxR;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,wDAAwD;YACjE,WAAW,EACT,oEAAoE;YACtE,OAAO,EACL,gFAAgF;YAClF,SAAS,EACP,8DAA8D;YAChE,KAAK,EAAE,8CAA8C;YACrD,IAAI,EAAE,iDAAiD;SACxD;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,gBAAgB;YACzB,EAAE,EAAE,qBAAqB;YACzB,EAAE,EAAE,sBAAsB;YAC1B,IAAI,EAAE,WAAW;SAClB;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,SAAS;KAChB;CACF,CACF,CAAA;AAMD,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAC7B,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAC9C,OAAO,CACL,iBACE,SAAS,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,EAC3D,GAAG,EAAE,GAAG,KACJ,KAAK,GACT,CACH,CAAA;AACH,CAAC,CACF,CAAA;AACD,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAA;AAE7B,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
3
|
+
declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
5
|
+
declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
6
|
+
declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };
|
|
9
|
+
//# sourceMappingURL=card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../src/components/ui/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,QAAA,MAAM,IAAI,6GAQT,CAAA;AAGD,QAAA,MAAM,UAAU,6GAIf,CAAA;AAGD,QAAA,MAAM,SAAS,uHAId,CAAA;AAGD,QAAA,MAAM,eAAe,yHAIpB,CAAA;AAGD,QAAA,MAAM,WAAW,6GAIhB,CAAA;AAGD,QAAA,MAAM,UAAU,6GAIf,CAAA;AAGD,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../../lib/utils";
|
|
4
|
+
const Card = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("rounded-lg border bg-card text-card-foreground shadow-sm", className), ...props })));
|
|
5
|
+
Card.displayName = "Card";
|
|
6
|
+
const CardHeader = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("flex flex-col space-y-1.5 p-6", className), ...props })));
|
|
7
|
+
CardHeader.displayName = "CardHeader";
|
|
8
|
+
const CardTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx("h3", { ref: ref, className: cn("font-semibold leading-none tracking-tight", className), ...props })));
|
|
9
|
+
CardTitle.displayName = "CardTitle";
|
|
10
|
+
const CardDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx("p", { ref: ref, className: cn("text-sm text-muted-foreground", className), ...props })));
|
|
11
|
+
CardDescription.displayName = "CardDescription";
|
|
12
|
+
const CardContent = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("p-6 pt-0", className), ...props })));
|
|
13
|
+
CardContent.displayName = "CardContent";
|
|
14
|
+
const CardFooter = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("flex items-center p-6 pt-0", className), ...props })));
|
|
15
|
+
CardFooter.displayName = "CardFooter";
|
|
16
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };
|
|
17
|
+
//# sourceMappingURL=card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.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AA;AACD,eAAe,CAAC,WAAW,GAAG,iBAAiB,CAAA;AAE/C,MAAM,WAAW,GAAG,KAAK,CAAC,UAAU,CAClC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,cAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CACnE,CACF,CAAA;AACD,WAAW,CAAC,WAAW,GAAG,aAAa,CAAA;AAEvC,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CACjC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,cAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,4BAA4B,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CACrF,CACF,CAAA;AACD,UAAU,CAAC,WAAW,GAAG,YAAY,CAAA;AAErC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,WAAW,EAAE,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,82 +5,6 @@
|
|
|
5
5
|
* Components properly handle complex props (objects/arrays) by setting them
|
|
6
6
|
* as DOM properties rather than HTML attributes.
|
|
7
7
|
*/
|
|
8
|
-
import React from 'react';
|
|
9
|
-
import type { FeedlogIssue as FeedlogIssueType } from '@feedlog-ai/core';
|
|
10
|
-
import '@feedlog-ai/webcomponents/components/feedlog-issues-client';
|
|
11
|
-
import '@feedlog-ai/webcomponents/components/feedlog-issues';
|
|
12
|
-
import '@feedlog-ai/webcomponents/components/feedlog-issue';
|
|
13
|
-
import '@feedlog-ai/webcomponents/components/feedlog-issues-list';
|
|
14
|
-
import '@feedlog-ai/webcomponents/components/feedlog-badge';
|
|
15
|
-
import '@feedlog-ai/webcomponents/components/feedlog-button';
|
|
16
|
-
import '@feedlog-ai/webcomponents/components/feedlog-card';
|
|
17
8
|
export type { FeedlogIssue } from '@feedlog-ai/core';
|
|
18
|
-
export
|
|
19
|
-
variant?: string;
|
|
20
|
-
} & React.RefAttributes<HTMLElement>>;
|
|
21
|
-
export declare const FeedlogButton: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & {
|
|
22
|
-
size?: string;
|
|
23
|
-
variant?: string;
|
|
24
|
-
disabled?: boolean;
|
|
25
|
-
type?: string;
|
|
26
|
-
onFeedlogClick?: (event: CustomEvent<MouseEvent>) => void;
|
|
27
|
-
} & React.RefAttributes<HTMLElement>>;
|
|
28
|
-
export declare const FeedlogCard: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
|
|
29
|
-
export interface FeedlogIssuesProps extends React.HTMLAttributes<HTMLElement> {
|
|
30
|
-
issues?: FeedlogIssueType[];
|
|
31
|
-
maxWidth?: string;
|
|
32
|
-
theme?: 'light' | 'dark';
|
|
33
|
-
heading?: string;
|
|
34
|
-
subtitle?: string;
|
|
35
|
-
loading?: boolean;
|
|
36
|
-
error?: string | null;
|
|
37
|
-
hasMore?: boolean;
|
|
38
|
-
isLoadingMore?: boolean;
|
|
39
|
-
onFeedlogUpvote?: (event: CustomEvent<{
|
|
40
|
-
issueId: string;
|
|
41
|
-
currentUpvoted: boolean;
|
|
42
|
-
currentCount: number;
|
|
43
|
-
}>) => void;
|
|
44
|
-
onFeedlogLoadMore?: (event: CustomEvent<void>) => void;
|
|
45
|
-
}
|
|
46
|
-
export declare const FeedlogIssues: React.ForwardRefExoticComponent<FeedlogIssuesProps & React.RefAttributes<HTMLElement>>;
|
|
47
|
-
export interface FeedlogIssuesClientProps extends React.HTMLAttributes<HTMLElement> {
|
|
48
|
-
apiKey: string;
|
|
49
|
-
endpoint?: string;
|
|
50
|
-
type?: 'bug' | 'enhancement';
|
|
51
|
-
limit?: number;
|
|
52
|
-
maxWidth?: string;
|
|
53
|
-
theme?: 'light' | 'dark';
|
|
54
|
-
heading?: string;
|
|
55
|
-
subtitle?: string;
|
|
56
|
-
onFeedlogUpvote?: (event: CustomEvent<{
|
|
57
|
-
issueId: string;
|
|
58
|
-
upvoted: boolean;
|
|
59
|
-
upvoteCount: number;
|
|
60
|
-
}>) => void;
|
|
61
|
-
onFeedlogError?: (event: CustomEvent<{
|
|
62
|
-
error: string;
|
|
63
|
-
code?: number;
|
|
64
|
-
}>) => void;
|
|
65
|
-
}
|
|
66
|
-
export declare const FeedlogIssuesClient: React.ForwardRefExoticComponent<FeedlogIssuesClientProps & React.RefAttributes<HTMLElement>>;
|
|
67
|
-
export interface FeedlogIssuesListProps extends React.HTMLAttributes<HTMLElement> {
|
|
68
|
-
issues?: FeedlogIssueType[];
|
|
69
|
-
onFeedlogUpvote?: (event: CustomEvent<{
|
|
70
|
-
issueId: string;
|
|
71
|
-
currentUpvoted: boolean;
|
|
72
|
-
currentCount: number;
|
|
73
|
-
}>) => void;
|
|
74
|
-
}
|
|
75
|
-
export declare const FeedlogIssuesList: React.ForwardRefExoticComponent<FeedlogIssuesListProps & React.RefAttributes<HTMLElement>>;
|
|
76
|
-
export interface FeedlogIssueProps extends React.HTMLAttributes<HTMLElement> {
|
|
77
|
-
issue: FeedlogIssueType;
|
|
78
|
-
theme?: 'light' | 'dark';
|
|
79
|
-
onFeedlogUpvote?: (event: CustomEvent<{
|
|
80
|
-
issueId: string;
|
|
81
|
-
currentUpvoted: boolean;
|
|
82
|
-
currentCount: number;
|
|
83
|
-
}>) => void;
|
|
84
|
-
}
|
|
85
|
-
export declare const FeedlogIssueComponent: React.ForwardRefExoticComponent<FeedlogIssueProps & React.RefAttributes<HTMLElement>>;
|
|
9
|
+
export * from './components/stencil-generated/components';
|
|
86
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD,cAAc,2CAA2C,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -5,204 +5,5 @@
|
|
|
5
5
|
* Components properly handle complex props (objects/arrays) by setting them
|
|
6
6
|
* as DOM properties rather than HTML attributes.
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
// Import custom element components - each import auto-registers the component
|
|
10
|
-
// and its dependencies. This uses the dist-custom-elements output which works
|
|
11
|
-
// correctly with modern bundlers (Vite, webpack, etc.), unlike the lazy-loading
|
|
12
|
-
// defineCustomElements() approach that causes 404s in production builds.
|
|
13
|
-
import '@feedlog-ai/webcomponents/components/feedlog-issues-client';
|
|
14
|
-
import '@feedlog-ai/webcomponents/components/feedlog-issues';
|
|
15
|
-
import '@feedlog-ai/webcomponents/components/feedlog-issue';
|
|
16
|
-
import '@feedlog-ai/webcomponents/components/feedlog-issues-list';
|
|
17
|
-
import '@feedlog-ai/webcomponents/components/feedlog-badge';
|
|
18
|
-
import '@feedlog-ai/webcomponents/components/feedlog-button';
|
|
19
|
-
import '@feedlog-ai/webcomponents/components/feedlog-card';
|
|
20
|
-
/**
|
|
21
|
-
* Helper to merge refs
|
|
22
|
-
*/
|
|
23
|
-
function mergeRefs(...refs) {
|
|
24
|
-
return (value) => {
|
|
25
|
-
refs.forEach(ref => {
|
|
26
|
-
if (typeof ref === 'function') {
|
|
27
|
-
ref(value);
|
|
28
|
-
}
|
|
29
|
-
else if (ref && typeof ref === 'object') {
|
|
30
|
-
ref.current = value;
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Converts camelCase prop names to kebab-case for custom element HTML attributes.
|
|
37
|
-
* Stencil SSR outputs kebab-case attributes; React uses camelCase. This ensures
|
|
38
|
-
* server and client output match for hydration.
|
|
39
|
-
*/
|
|
40
|
-
function toKebabCase(str) {
|
|
41
|
-
return str.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Converts primitive props to kebab-case attribute names for custom elements.
|
|
45
|
-
* Preserves ref, style, className, children, and suppressHydrationWarning as-is.
|
|
46
|
-
*/
|
|
47
|
-
function primitivePropsToAttributes(props) {
|
|
48
|
-
const passthrough = new Set([
|
|
49
|
-
'ref',
|
|
50
|
-
'style',
|
|
51
|
-
'className',
|
|
52
|
-
'children',
|
|
53
|
-
'suppressHydrationWarning',
|
|
54
|
-
]);
|
|
55
|
-
const result = {};
|
|
56
|
-
for (const [key, value] of Object.entries(props)) {
|
|
57
|
-
if (value === undefined)
|
|
58
|
-
continue;
|
|
59
|
-
const attrName = passthrough.has(key) ? key : toKebabCase(key);
|
|
60
|
-
result[attrName] = value;
|
|
61
|
-
}
|
|
62
|
-
return result;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Helper to separate primitive props (strings, booleans, numbers) from complex props.
|
|
66
|
-
* Primitive props can be passed as HTML attributes, complex props must be set as DOM properties.
|
|
67
|
-
*/
|
|
68
|
-
function separateProps(props) {
|
|
69
|
-
const primitiveProps = {};
|
|
70
|
-
const complexProps = {};
|
|
71
|
-
const eventProps = {};
|
|
72
|
-
Object.entries(props).forEach(([key, value]) => {
|
|
73
|
-
if (key === 'children' ||
|
|
74
|
-
key === 'ref' ||
|
|
75
|
-
key === 'style' ||
|
|
76
|
-
key === 'className' ||
|
|
77
|
-
key === 'suppressHydrationWarning') {
|
|
78
|
-
primitiveProps[key] = value;
|
|
79
|
-
}
|
|
80
|
-
else if (key.startsWith('on') && key[2] === key[2].toUpperCase()) {
|
|
81
|
-
// Event handlers
|
|
82
|
-
eventProps[key] = value;
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
const type = typeof value;
|
|
86
|
-
if (type === 'string' || type === 'boolean' || type === 'number' || value === undefined) {
|
|
87
|
-
primitiveProps[key] = value;
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
90
|
-
// Objects, arrays, functions
|
|
91
|
-
complexProps[key] = value;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
return { primitiveProps, complexProps, eventProps };
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Hook to sync complex props and events to a web component element
|
|
99
|
-
*/
|
|
100
|
-
function useWebComponentProps(elementRef, complexProps, eventProps) {
|
|
101
|
-
// Track registered event listeners for cleanup
|
|
102
|
-
const eventListenersRef = useRef(new Map());
|
|
103
|
-
useEffect(() => {
|
|
104
|
-
const element = elementRef.current;
|
|
105
|
-
if (!element)
|
|
106
|
-
return;
|
|
107
|
-
// Set complex props as DOM properties
|
|
108
|
-
Object.entries(complexProps).forEach(([key, value]) => {
|
|
109
|
-
element[key] = value;
|
|
110
|
-
});
|
|
111
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
112
|
-
}, [complexProps]);
|
|
113
|
-
useEffect(() => {
|
|
114
|
-
const element = elementRef.current;
|
|
115
|
-
if (!element)
|
|
116
|
-
return;
|
|
117
|
-
const currentListeners = eventListenersRef.current;
|
|
118
|
-
// Remove old listeners
|
|
119
|
-
currentListeners.forEach((listener, eventName) => {
|
|
120
|
-
element.removeEventListener(eventName, listener);
|
|
121
|
-
});
|
|
122
|
-
currentListeners.clear();
|
|
123
|
-
// Add new listeners
|
|
124
|
-
Object.entries(eventProps).forEach(([key, handler]) => {
|
|
125
|
-
if (typeof handler === 'function') {
|
|
126
|
-
// Convert onFeedlogUpvote -> feedlogUpvote
|
|
127
|
-
const eventName = key.substring(2);
|
|
128
|
-
const eventNameLc = eventName[0].toLowerCase() + eventName.substring(1);
|
|
129
|
-
const listener = handler;
|
|
130
|
-
element.addEventListener(eventNameLc, listener);
|
|
131
|
-
currentListeners.set(eventNameLc, listener);
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
return () => {
|
|
135
|
-
currentListeners.forEach((listener, eventName) => {
|
|
136
|
-
element.removeEventListener(eventName, listener);
|
|
137
|
-
});
|
|
138
|
-
currentListeners.clear();
|
|
139
|
-
};
|
|
140
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
141
|
-
}, [eventProps]);
|
|
142
|
-
}
|
|
143
|
-
// Simple React wrappers for web components that only have primitive props
|
|
144
|
-
export const FeedlogBadge = React.forwardRef(({ children, ...props }, ref) => React.createElement('feedlog-badge', { ...props, ref }, children));
|
|
145
|
-
FeedlogBadge.displayName = 'FeedlogBadge';
|
|
146
|
-
export const FeedlogButton = React.forwardRef(({ children, onFeedlogClick, ...props }, ref) => {
|
|
147
|
-
const internalRef = useRef(null);
|
|
148
|
-
useEffect(() => {
|
|
149
|
-
const element = internalRef.current;
|
|
150
|
-
if (!element || !onFeedlogClick)
|
|
151
|
-
return;
|
|
152
|
-
const handler = onFeedlogClick;
|
|
153
|
-
element.addEventListener('feedlogClick', handler);
|
|
154
|
-
return () => element.removeEventListener('feedlogClick', handler);
|
|
155
|
-
}, [onFeedlogClick]);
|
|
156
|
-
return React.createElement('feedlog-button', { ...props, ref: mergeRefs(ref, internalRef) }, children);
|
|
157
|
-
});
|
|
158
|
-
FeedlogButton.displayName = 'FeedlogButton';
|
|
159
|
-
export const FeedlogCard = React.forwardRef(({ children, ...props }, ref) => React.createElement('feedlog-card', { ...props, ref }, children));
|
|
160
|
-
FeedlogCard.displayName = 'FeedlogCard';
|
|
161
|
-
export const FeedlogIssues = React.forwardRef(({ children, ...props }, ref) => {
|
|
162
|
-
const internalRef = useRef(null);
|
|
163
|
-
const { primitiveProps, complexProps, eventProps } = separateProps(props);
|
|
164
|
-
useWebComponentProps(internalRef, complexProps, eventProps);
|
|
165
|
-
return React.createElement('feedlog-issues', {
|
|
166
|
-
...primitivePropsToAttributes(primitiveProps),
|
|
167
|
-
ref: mergeRefs(ref, internalRef),
|
|
168
|
-
suppressHydrationWarning: true,
|
|
169
|
-
}, children);
|
|
170
|
-
});
|
|
171
|
-
FeedlogIssues.displayName = 'FeedlogIssues';
|
|
172
|
-
export const FeedlogIssuesClient = React.forwardRef(({ children, ...props }, ref) => {
|
|
173
|
-
const internalRef = useRef(null);
|
|
174
|
-
const { primitiveProps, complexProps, eventProps } = separateProps(props);
|
|
175
|
-
useWebComponentProps(internalRef, complexProps, eventProps);
|
|
176
|
-
return React.createElement('feedlog-issues-client', {
|
|
177
|
-
...primitivePropsToAttributes(primitiveProps),
|
|
178
|
-
ref: mergeRefs(ref, internalRef),
|
|
179
|
-
suppressHydrationWarning: true,
|
|
180
|
-
}, children);
|
|
181
|
-
});
|
|
182
|
-
FeedlogIssuesClient.displayName = 'FeedlogIssuesClient';
|
|
183
|
-
export const FeedlogIssuesList = React.forwardRef(({ children, ...props }, ref) => {
|
|
184
|
-
const internalRef = useRef(null);
|
|
185
|
-
const { primitiveProps, complexProps, eventProps } = separateProps(props);
|
|
186
|
-
useWebComponentProps(internalRef, complexProps, eventProps);
|
|
187
|
-
return React.createElement('feedlog-issues-list', {
|
|
188
|
-
...primitivePropsToAttributes(primitiveProps),
|
|
189
|
-
ref: mergeRefs(ref, internalRef),
|
|
190
|
-
suppressHydrationWarning: true,
|
|
191
|
-
}, children);
|
|
192
|
-
});
|
|
193
|
-
FeedlogIssuesList.displayName = 'FeedlogIssuesList';
|
|
194
|
-
export const FeedlogIssueComponent = React.forwardRef(({ children, ...props }, ref) => {
|
|
195
|
-
const internalRef = useRef(null);
|
|
196
|
-
const { primitiveProps, complexProps, eventProps } = separateProps(props);
|
|
197
|
-
useWebComponentProps(internalRef, complexProps, eventProps);
|
|
198
|
-
return React.createElement('feedlog-issue', {
|
|
199
|
-
...primitivePropsToAttributes(primitiveProps),
|
|
200
|
-
ref: mergeRefs(ref, internalRef),
|
|
201
|
-
suppressHydrationWarning: true,
|
|
202
|
-
}, children);
|
|
203
|
-
});
|
|
204
|
-
FeedlogIssueComponent.displayName = 'FeedlogIssue';
|
|
205
|
-
// Custom elements are auto-defined via the import of '@feedlog-ai/webcomponents/custom-elements' above.
|
|
206
|
-
// No need for defineCustomElements() - the dist-custom-elements bundle handles registration
|
|
207
|
-
// automatically when imported, and works correctly with modern bundlers like Vite.
|
|
8
|
+
export * from './components/stencil-generated/components';
|
|
208
9
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,cAAc,2CAA2C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAA;AAG5C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAmB,MAAM,MAAM,CAAA;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAExC,MAAM,UAAU,EAAE,CAAC,GAAG,MAAoB;IACxC,OAAO,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAA;AAC9B,CAAC"}
|
package/dist/next.d.ts
CHANGED
package/dist/next.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"next.d.ts","sourceRoot":"","sources":["../src/next.ts"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"next.d.ts","sourceRoot":"","sources":["../src/next.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,GAAI,YAAY,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,8BAMlD,CAAC"}
|
package/dist/next.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import stencilSSR from '@stencil/ssr/next';
|
|
2
|
-
export * from './server.js';
|
|
3
2
|
export const withFeedlogSSR = (nextConfig) => stencilSSR({
|
|
4
|
-
module: import('
|
|
5
|
-
from: '@feedlog-ai/react
|
|
3
|
+
module: import('@feedlog-ai/react/ssr-components'),
|
|
4
|
+
from: '@feedlog-ai/react',
|
|
6
5
|
hydrateModule: import('@feedlog-ai/webcomponents/hydrate'),
|
|
7
6
|
serializeShadowRoot: { default: 'declarative-shadow-dom' },
|
|
8
7
|
})(nextConfig);
|
package/dist/next.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"next.js","sourceRoot":"","sources":["../src/next.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,mBAAmB,CAAC;AAE3C,
|
|
1
|
+
{"version":3,"file":"next.js","sourceRoot":"","sources":["../src/next.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,mBAAmB,CAAC;AAE3C,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,UAAmC,EAAE,EAAE,CACpE,UAAU,CAAC;IACT,MAAM,EAAE,MAAM,CAAC,kCAAkC,CAAC;IAClD,IAAI,EAAE,mBAAmB;IACzB,aAAa,EAAE,MAAM,CAAC,mCAAmC,CAAC;IAC1D,mBAAmB,EAAE,EAAE,OAAO,EAAE,wBAAwB,EAAE;CAC3D,CAAC,CAAC,UAAU,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feedlog-ai/react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.37",
|
|
4
4
|
"description": "React bindings for Feedlog Toolkit Web Components",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"react-dom": ">=17.0.0"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@feedlog-ai/webcomponents": "^0.0.
|
|
51
|
+
"@feedlog-ai/webcomponents": "^0.0.37"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@jest/test-sequencer": "^29.7.0",
|