qapture2 0.2.0 → 0.2.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/README.md +12 -12
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ A human tester walks your live web app, annotates elements or regions (auto-scre
|
|
|
7
7
|
No model is bundled. No API keys. No network calls. The widget is 100% client-side and keyless; notes live in the tester's browser (IndexedDB) until they export. The CLI scaffolder is deterministic and AI-free. **The AI is yours.**
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npm install
|
|
10
|
+
npm install qapture2
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
---
|
|
@@ -32,8 +32,8 @@ npm install qapture
|
|
|
32
32
|
### React (any)
|
|
33
33
|
|
|
34
34
|
```tsx
|
|
35
|
-
import { Qapture } from '
|
|
36
|
-
import type { QaConfig } from '
|
|
35
|
+
import { Qapture } from 'qapture2';
|
|
36
|
+
import type { QaConfig } from 'qapture2';
|
|
37
37
|
|
|
38
38
|
const config: QaConfig = {
|
|
39
39
|
namespace: 'my-app',
|
|
@@ -57,11 +57,11 @@ function App() {
|
|
|
57
57
|
|
|
58
58
|
### Next.js App Router
|
|
59
59
|
|
|
60
|
-
`
|
|
60
|
+
`qapture2/next` re-exports the same component but ships with a `'use client'` directive prepended to its bundle output — no extra wrapper file needed:
|
|
61
61
|
|
|
62
62
|
```tsx
|
|
63
63
|
// app/layout.tsx
|
|
64
|
-
import { Qapture } from '
|
|
64
|
+
import { Qapture } from 'qapture2/next';
|
|
65
65
|
import config from '../qa.config';
|
|
66
66
|
|
|
67
67
|
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
|
@@ -78,10 +78,10 @@ export default function RootLayout({ children }: { children: React.ReactNode })
|
|
|
78
78
|
|
|
79
79
|
### Standalone (non-React)
|
|
80
80
|
|
|
81
|
-
For apps without React — plain HTML, Vue, Svelte, Astro islands, etc. Use the imperative `initQaStudio()` from `
|
|
81
|
+
For apps without React — plain HTML, Vue, Svelte, Astro islands, etc. Use the imperative `initQaStudio()` from `qapture2/standalone`:
|
|
82
82
|
|
|
83
83
|
```js
|
|
84
|
-
import { initQaStudio } from '
|
|
84
|
+
import { initQaStudio } from 'qapture2/standalone';
|
|
85
85
|
|
|
86
86
|
const instance = initQaStudio({ namespace: 'my-app', brand: { label: 'My App' } });
|
|
87
87
|
|
|
@@ -295,8 +295,8 @@ The preamble degrades gracefully — sections with no data are marked `(not prov
|
|
|
295
295
|
The CLI scaffolds `qa.config`, the agent skill, and `AGENTS.md` into any repository. It is **deterministic, AI-free, and network-free** — no model call, no network request, no `require()`-ing of target project files.
|
|
296
296
|
|
|
297
297
|
```bash
|
|
298
|
-
npx
|
|
299
|
-
npx
|
|
298
|
+
npx qapture2 init [target-dir] [--force]
|
|
299
|
+
npx qapture2 version
|
|
300
300
|
```
|
|
301
301
|
|
|
302
302
|
`target-dir` defaults to the current directory. `--force` overwrites existing `qa.config.*` and `qa.preamble.md` (SKILL.md is always refreshed regardless).
|
|
@@ -343,7 +343,7 @@ The **hotkey** (default: `Shift+Alt+Q`) toggles the panel open/closed regardless
|
|
|
343
343
|
|
|
344
344
|
- **Peer dependencies:** React >= 18, ReactDOM >= 18.
|
|
345
345
|
- **SSR-safe:** `Qapture`, `initQaStudio()`, and `<qapture-widget>` all guard `typeof window` and return no-ops on the server. Nothing is rendered server-side.
|
|
346
|
-
- **Next.js App Router:** use `
|
|
346
|
+
- **Next.js App Router:** use `qapture2/next` (which has `'use client'` baked into its bundle output) rather than `qapture2` directly. This prevents the "attempted to call a Client Component from the Server" error.
|
|
347
347
|
- **Node >= 18** required for the CLI.
|
|
348
348
|
- Heavy dependencies (`jszip`, `html2canvas`) are loaded as **lazy code-split chunks** — they do not affect initial page load and are only fetched when the user triggers a capture or export action.
|
|
349
349
|
|
|
@@ -361,7 +361,7 @@ The **hotkey** (default: `Shift+Alt+Q`) toggles the panel open/closed regardless
|
|
|
361
361
|
|
|
362
362
|
- **html2canvas captures the visible light DOM only.** Content inside *other* custom elements that have their own shadow roots (not qapture's own) will not appear in screenshots. This is a limitation of html2canvas, not qapture.
|
|
363
363
|
- **`position: fixed` may shift on transformed ancestors.** If any ancestor of `document.body` has a CSS `transform`, `perspective`, or `will-change` property applied, `position: fixed` elements — including the QA panel — may be offset from their expected position. This is standard CSS containment behaviour.
|
|
364
|
-
- **Next.js App Router requires `
|
|
364
|
+
- **Next.js App Router requires `qapture2/next`.** Importing from `qapture2` in a Server Component context will produce a "use client" error. Use the `/next` entry point.
|
|
365
365
|
- **Config changes after mount are ignored.** `<Qapture>` mounts once on first render (`useEffect` with `[]` deps) and ignores subsequent prop changes. To apply a new config, destroy the instance and remount.
|
|
366
366
|
- **One instance per page.** Calling `initQaStudio()` or rendering `<Qapture>` multiple times without calling `destroy()` first will append multiple widget hosts to `<body>`.
|
|
367
367
|
|
|
@@ -381,7 +381,7 @@ See [SECURITY.md](./SECURITY.md) for the full security model and vulnerability r
|
|
|
381
381
|
## Uninstall
|
|
382
382
|
|
|
383
383
|
1. Remove `<Qapture />` (or `initQaStudio()` calls) from your codebase.
|
|
384
|
-
2. Uninstall the package: `npm uninstall
|
|
384
|
+
2. Uninstall the package: `npm uninstall qapture2`.
|
|
385
385
|
3. Optionally delete the IndexedDB left behind — open the browser console on your app's origin and run:
|
|
386
386
|
|
|
387
387
|
```js
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qapture2",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Drop-in, AI-aware in-browser QA capture widget. A tester annotates the live app (element/region + auto-screenshot + note), tracks a graded testing journey, and exports a ZIP your own coding agent reads. Ships zero AI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"./package.json": "./package.json"
|
|
56
56
|
},
|
|
57
57
|
"bin": {
|
|
58
|
-
"
|
|
58
|
+
"qapture2": "./dist/bin/init.cjs"
|
|
59
59
|
},
|
|
60
60
|
"repository": {
|
|
61
61
|
"type": "git",
|