@feedlog-ai/vue 0.0.45 → 0.0.47

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.
@@ -0,0 +1,52 @@
1
+ # Build with the top-level client (`@feedlog-ai/vue`)
2
+
3
+ Use **`FeedlogIssuesClient`** when you want Vue bindings and the component performs fetching internally.
4
+
5
+ ## When to use
6
+
7
+ - Vue 3 (or 2 with the patterns in the main README)
8
+ - You do not need the initial HTML to already contain the issues array from your server (for that, see [BUILD_FEEDLOG_COMPOSABLE.md](./BUILD_FEEDLOG_COMPOSABLE.md))
9
+
10
+ ## Install
11
+
12
+ ```bash
13
+ npm install @feedlog-ai/vue
14
+ ```
15
+
16
+ ## Minimal example (Vue 3, Composition API)
17
+
18
+ ```vue
19
+ <template>
20
+ <FeedlogIssuesClient
21
+ api-key="your-api-key"
22
+ type="bug"
23
+ :limit="10"
24
+ theme="light"
25
+ max-width="42rem"
26
+ @feedlog-upvote="handleUpvote"
27
+ @feedlog-error="handleError"
28
+ />
29
+ </template>
30
+
31
+ <script setup lang="ts">
32
+ import { FeedlogIssuesClient } from '@feedlog-ai/vue';
33
+
34
+ const handleUpvote = (event: CustomEvent) => {
35
+ console.log('Issue upvoted:', event.detail);
36
+ };
37
+
38
+ const handleError = (event: CustomEvent) => {
39
+ console.error('Error:', event.detail);
40
+ };
41
+ </script>
42
+ ```
43
+
44
+ ## SSR / Nuxt
45
+
46
+ Nuxt can server-render Stencil-based Vue components as Declarative Shadow DOM in many setups. See [README](./README.md#server-side-rendering-ssr).
47
+
48
+ ## See also
49
+
50
+ - [README](./README.md) — Options API, Vue 2, global registration
51
+ - [Build Your Own Feedlog hub](../../docs/BUILD_YOUR_OWN_FEEDLOG.md)
52
+ - [Customize Feedlog styling](../../docs/CUSTOMIZE_FEEDLOG_STYLING.md)
@@ -0,0 +1,65 @@
1
+ # Composable changelog (`@feedlog-ai/vue` + `@feedlog-ai/core`)
2
+
3
+ Fetch with **`FeedlogSDK`**, then bind the **`issues`** array to **`FeedlogIssues`** (or compose **`FeedlogIssuesList`** / **`FeedlogIssue`** for individual cards).
4
+
5
+ ## When to use
6
+
7
+ - You load data in **`async setup`**, route loaders, or server APIs and pass results into the template
8
+ - You want the same data flow as React’s composable pattern, using Vue bindings instead of raw custom elements
9
+
10
+ ## Install
11
+
12
+ ```bash
13
+ npm install @feedlog-ai/vue @feedlog-ai/core
14
+ ```
15
+
16
+ ## Client fetch (Vue 3)
17
+
18
+ ```vue
19
+ <template>
20
+ <FeedlogIssues
21
+ v-if="issues.length"
22
+ :issues="issues"
23
+ theme="light"
24
+ max-width="42rem"
25
+ @feedlog-upvote="onUpvote"
26
+ />
27
+ </template>
28
+
29
+ <script setup lang="ts">
30
+ import { ref, onMounted } from 'vue';
31
+ import { FeedlogIssues } from '@feedlog-ai/vue';
32
+ import { FeedlogSDK, type FeedlogIssue } from '@feedlog-ai/core';
33
+
34
+ const issues = ref<FeedlogIssue[]>([]);
35
+ const sdk = new FeedlogSDK({ apiKey: import.meta.env.VITE_FEEDLOG_API_KEY });
36
+
37
+ onMounted(async () => {
38
+ const res = await sdk.fetchIssues({ limit: 10 });
39
+ issues.value = res.issues;
40
+ });
41
+
42
+ async function onUpvote(event: CustomEvent<{ issueId: string }>) {
43
+ await sdk.toggleUpvote(event.detail.issueId);
44
+ const res = await sdk.fetchIssues({ limit: 10 });
45
+ issues.value = res.issues;
46
+ }
47
+ </script>
48
+ ```
49
+
50
+ ## Server-provided issues (sketch)
51
+
52
+ If your framework passes serialized issues from the server (e.g. Nuxt `useAsyncData`), initialize `issues` from that payload instead of `onMounted` fetch, and keep `onUpvote` to sync with the API.
53
+
54
+ ## Finer composition
55
+
56
+ - **`FeedlogIssuesList`** — list without outer section chrome
57
+ - **`FeedlogIssue`** — single issue card; pass `:issue="item"`
58
+
59
+ (Names match generated Vue exports; React uses `FeedlogIssueComponent` for the same element.)
60
+
61
+ ## See also
62
+
63
+ - [@feedlog-ai/core README](../core/README.md)
64
+ - [README](./README.md)
65
+ - [Build Your Own Feedlog hub](../../docs/BUILD_YOUR_OWN_FEEDLOG.md)
package/README.md CHANGED
@@ -307,6 +307,12 @@ If you're migrating from using web components directly:
307
307
  - Event names remain the same (kebab-case)
308
308
  - All props and events are properly typed
309
309
 
310
+ ## Build your own changelog
311
+
312
+ - [Build Your Own Feedlog (hub)](../../docs/BUILD_YOUR_OWN_FEEDLOG.md) — three tiers and AI copy-paste blocks
313
+ - [Top-level client](./BUILD_FEEDLOG_CLIENT.md) — `FeedlogIssuesClient`
314
+ - [Composable + your data](./BUILD_FEEDLOG_COMPOSABLE.md) — `FeedlogSDK` + `FeedlogIssues`
315
+
310
316
  ## License
311
317
 
312
318
  MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedlog-ai/vue",
3
- "version": "0.0.45",
3
+ "version": "0.0.47",
4
4
  "description": "Vue bindings for Feedlog Toolkit Web Components",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -13,7 +13,9 @@
13
13
  }
14
14
  },
15
15
  "files": [
16
- "dist"
16
+ "dist",
17
+ "BUILD_FEEDLOG_CLIENT.md",
18
+ "BUILD_FEEDLOG_COMPOSABLE.md"
17
19
  ],
18
20
  "sideEffects": false,
19
21
  "scripts": {
@@ -28,7 +30,7 @@
28
30
  "vue": ">=3.0.0 || >=2.6.0"
29
31
  },
30
32
  "dependencies": {
31
- "@feedlog-ai/webcomponents": "^0.0.45"
33
+ "@feedlog-ai/webcomponents": "^0.0.47"
32
34
  },
33
35
  "devDependencies": {
34
36
  "@jest/test-sequencer": "^29.7.0",