@stephenov/feedbackwidget 0.3.5 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/auto.js CHANGED
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  "use strict";
2
3
  "use client";
3
4
  var __create = Object.create;
package/dist/auto.mjs CHANGED
@@ -1,7 +1,8 @@
1
+ 'use client';
1
2
  "use client";
2
3
  import {
3
4
  FeedbackWidget
4
- } from "./chunk-QQLLK6MC.mjs";
5
+ } from "./chunk-WCFS4MGE.mjs";
5
6
 
6
7
  // src/auto.tsx
7
8
  import { useEffect, useState } from "react";
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  // src/utils.ts
2
4
  function cn(...classes) {
3
5
  return classes.filter(Boolean).join(" ");
package/dist/cli.js CHANGED
@@ -194,49 +194,49 @@ function detectFramework() {
194
194
  const deps = { ...pkg.dependencies, ...pkg.devDependencies };
195
195
  if (deps.next && import_fs.default.existsSync(import_path.default.join(cwd, "app"))) {
196
196
  if (import_fs.default.existsSync(import_path.default.join(cwd, "app", "layout.tsx"))) {
197
- return { name: "Next.js (App Router)", file: "app/layout.tsx", note: "Add inside <body> before {children}" };
197
+ return { name: "Next.js (App Router)", file: "app/layout.tsx", note: "Inside <body>, before {children}" };
198
198
  }
199
199
  if (import_fs.default.existsSync(import_path.default.join(cwd, "app", "layout.js"))) {
200
- return { name: "Next.js (App Router)", file: "app/layout.js", note: "Add inside <body> before {children}" };
200
+ return { name: "Next.js (App Router)", file: "app/layout.js", note: "Inside <body>, before {children}" };
201
201
  }
202
202
  if (import_fs.default.existsSync(import_path.default.join(cwd, "src", "app", "layout.tsx"))) {
203
- return { name: "Next.js (App Router)", file: "src/app/layout.tsx", note: "Add inside <body> before {children}" };
203
+ return { name: "Next.js (App Router)", file: "src/app/layout.tsx", note: "Inside <body>, before {children}" };
204
204
  }
205
205
  }
206
206
  if (deps.next && import_fs.default.existsSync(import_path.default.join(cwd, "pages"))) {
207
207
  if (import_fs.default.existsSync(import_path.default.join(cwd, "pages", "_app.tsx"))) {
208
- return { name: "Next.js (Pages Router)", file: "pages/_app.tsx", note: "Add after <Component {...pageProps} />" };
208
+ return { name: "Next.js (Pages Router)", file: "pages/_app.tsx", note: "After <Component {...pageProps} />" };
209
209
  }
210
210
  if (import_fs.default.existsSync(import_path.default.join(cwd, "pages", "_app.js"))) {
211
- return { name: "Next.js (Pages Router)", file: "pages/_app.js", note: "Add after <Component {...pageProps} />" };
211
+ return { name: "Next.js (Pages Router)", file: "pages/_app.js", note: "After <Component {...pageProps} />" };
212
212
  }
213
213
  }
214
214
  if (deps.vite && (deps.react || deps["@vitejs/plugin-react"])) {
215
215
  if (import_fs.default.existsSync(import_path.default.join(cwd, "src", "App.tsx"))) {
216
- return { name: "Vite + React", file: "src/App.tsx", note: "Add at the end of your App component" };
216
+ return { name: "Vite + React", file: "src/App.tsx", note: "At end of App component" };
217
217
  }
218
218
  if (import_fs.default.existsSync(import_path.default.join(cwd, "src", "App.jsx"))) {
219
- return { name: "Vite + React", file: "src/App.jsx", note: "Add at the end of your App component" };
219
+ return { name: "Vite + React", file: "src/App.jsx", note: "At end of App component" };
220
220
  }
221
221
  }
222
222
  if (deps["react-scripts"]) {
223
223
  if (import_fs.default.existsSync(import_path.default.join(cwd, "src", "App.tsx"))) {
224
- return { name: "Create React App", file: "src/App.tsx", note: "Add at the end of your App component" };
224
+ return { name: "Create React App", file: "src/App.tsx", note: "At end of App component" };
225
225
  }
226
226
  if (import_fs.default.existsSync(import_path.default.join(cwd, "src", "App.js"))) {
227
- return { name: "Create React App", file: "src/App.js", note: "Add at the end of your App component" };
227
+ return { name: "Create React App", file: "src/App.js", note: "At end of App component" };
228
228
  }
229
229
  }
230
230
  if (deps.astro) {
231
- return { name: "Astro", file: "Create a React component", note: "Use client:load directive" };
231
+ return { name: "Astro", file: "A React component", note: "Use client:load directive" };
232
232
  }
233
233
  if (deps["@remix-run/react"]) {
234
234
  if (import_fs.default.existsSync(import_path.default.join(cwd, "app", "root.tsx"))) {
235
- return { name: "Remix", file: "app/root.tsx", note: "Add inside <body>" };
235
+ return { name: "Remix", file: "app/root.tsx", note: "Inside <body>" };
236
236
  }
237
237
  }
238
238
  if (deps.react) {
239
- return { name: "React", file: "Your main App component", note: "Add anywhere it renders on every page" };
239
+ return { name: "React", file: "Your App component", note: "Where it renders on every page" };
240
240
  }
241
241
  } catch {
242
242
  }
package/dist/cli.mjs CHANGED
@@ -171,49 +171,49 @@ function detectFramework() {
171
171
  const deps = { ...pkg.dependencies, ...pkg.devDependencies };
172
172
  if (deps.next && fs.existsSync(path.join(cwd, "app"))) {
173
173
  if (fs.existsSync(path.join(cwd, "app", "layout.tsx"))) {
174
- return { name: "Next.js (App Router)", file: "app/layout.tsx", note: "Add inside <body> before {children}" };
174
+ return { name: "Next.js (App Router)", file: "app/layout.tsx", note: "Inside <body>, before {children}" };
175
175
  }
176
176
  if (fs.existsSync(path.join(cwd, "app", "layout.js"))) {
177
- return { name: "Next.js (App Router)", file: "app/layout.js", note: "Add inside <body> before {children}" };
177
+ return { name: "Next.js (App Router)", file: "app/layout.js", note: "Inside <body>, before {children}" };
178
178
  }
179
179
  if (fs.existsSync(path.join(cwd, "src", "app", "layout.tsx"))) {
180
- return { name: "Next.js (App Router)", file: "src/app/layout.tsx", note: "Add inside <body> before {children}" };
180
+ return { name: "Next.js (App Router)", file: "src/app/layout.tsx", note: "Inside <body>, before {children}" };
181
181
  }
182
182
  }
183
183
  if (deps.next && fs.existsSync(path.join(cwd, "pages"))) {
184
184
  if (fs.existsSync(path.join(cwd, "pages", "_app.tsx"))) {
185
- return { name: "Next.js (Pages Router)", file: "pages/_app.tsx", note: "Add after <Component {...pageProps} />" };
185
+ return { name: "Next.js (Pages Router)", file: "pages/_app.tsx", note: "After <Component {...pageProps} />" };
186
186
  }
187
187
  if (fs.existsSync(path.join(cwd, "pages", "_app.js"))) {
188
- return { name: "Next.js (Pages Router)", file: "pages/_app.js", note: "Add after <Component {...pageProps} />" };
188
+ return { name: "Next.js (Pages Router)", file: "pages/_app.js", note: "After <Component {...pageProps} />" };
189
189
  }
190
190
  }
191
191
  if (deps.vite && (deps.react || deps["@vitejs/plugin-react"])) {
192
192
  if (fs.existsSync(path.join(cwd, "src", "App.tsx"))) {
193
- return { name: "Vite + React", file: "src/App.tsx", note: "Add at the end of your App component" };
193
+ return { name: "Vite + React", file: "src/App.tsx", note: "At end of App component" };
194
194
  }
195
195
  if (fs.existsSync(path.join(cwd, "src", "App.jsx"))) {
196
- return { name: "Vite + React", file: "src/App.jsx", note: "Add at the end of your App component" };
196
+ return { name: "Vite + React", file: "src/App.jsx", note: "At end of App component" };
197
197
  }
198
198
  }
199
199
  if (deps["react-scripts"]) {
200
200
  if (fs.existsSync(path.join(cwd, "src", "App.tsx"))) {
201
- return { name: "Create React App", file: "src/App.tsx", note: "Add at the end of your App component" };
201
+ return { name: "Create React App", file: "src/App.tsx", note: "At end of App component" };
202
202
  }
203
203
  if (fs.existsSync(path.join(cwd, "src", "App.js"))) {
204
- return { name: "Create React App", file: "src/App.js", note: "Add at the end of your App component" };
204
+ return { name: "Create React App", file: "src/App.js", note: "At end of App component" };
205
205
  }
206
206
  }
207
207
  if (deps.astro) {
208
- return { name: "Astro", file: "Create a React component", note: "Use client:load directive" };
208
+ return { name: "Astro", file: "A React component", note: "Use client:load directive" };
209
209
  }
210
210
  if (deps["@remix-run/react"]) {
211
211
  if (fs.existsSync(path.join(cwd, "app", "root.tsx"))) {
212
- return { name: "Remix", file: "app/root.tsx", note: "Add inside <body>" };
212
+ return { name: "Remix", file: "app/root.tsx", note: "Inside <body>" };
213
213
  }
214
214
  }
215
215
  if (deps.react) {
216
- return { name: "React", file: "Your main App component", note: "Add anywhere it renders on every page" };
216
+ return { name: "React", file: "Your App component", note: "Where it renders on every page" };
217
217
  }
218
218
  } catch {
219
219
  }
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  "use strict";
2
3
  var __create = Object.create;
3
4
  var __defProp = Object.defineProperty;
package/dist/index.mjs CHANGED
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  import {
2
3
  FeedbackApiClient,
3
4
  FeedbackPanel,
@@ -8,7 +9,7 @@ import {
8
9
  createApiClient,
9
10
  formatDuration,
10
11
  isVoiceSupported
11
- } from "./chunk-QQLLK6MC.mjs";
12
+ } from "./chunk-WCFS4MGE.mjs";
12
13
 
13
14
  // src/hooks/useFeedback.ts
14
15
  import { useState, useCallback, useMemo } from "react";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stephenov/feedbackwidget",
3
- "version": "0.3.5",
3
+ "version": "0.4.1",
4
4
  "description": "Voice-first feedback widget with AI analysis, GitHub, and Slack integration",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -25,8 +25,8 @@
25
25
  "dist"
26
26
  ],
27
27
  "scripts": {
28
- "build": "tsup src/index.ts src/auto.tsx src/cli.ts --format cjs,esm --dts --clean",
29
- "dev": "tsup src/index.ts src/auto.tsx src/cli.ts --format cjs,esm --dts --watch",
28
+ "build": "tsup",
29
+ "dev": "tsup --watch",
30
30
  "lint": "eslint src/",
31
31
  "clean": "rm -rf dist"
32
32
  },