qapture2 0.2.2 → 0.2.4
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/bin/init.cjs +48 -12
- package/dist/{chunk-PBXQDL7C.cjs → chunk-DPJW626S.cjs} +391 -192
- package/dist/{chunk-L6VS36GE.js → chunk-RC7ZUQ5X.js} +391 -193
- package/dist/index.cjs +8 -4
- package/dist/index.d.cts +9 -3
- package/dist/index.d.ts +9 -3
- package/dist/index.js +1 -1
- package/dist/next.cjs +4 -4
- package/dist/next.js +1 -1
- package/dist/standalone.cjs +26 -21
- package/dist/standalone.js +25 -20
- package/package.json +9 -2
package/dist/index.cjs
CHANGED
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkDPJW626S_cjs = require('./chunk-DPJW626S.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "QaStudio", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkDPJW626S_cjs.Qapture; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "Qapture", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkDPJW626S_cjs.Qapture; }
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, "deleteQaDatabase", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return chunkDPJW626S_cjs.deleteQaDatabase; }
|
|
14
18
|
});
|
|
15
19
|
Object.defineProperty(exports, "initQaStudio", {
|
|
16
20
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkDPJW626S_cjs.initQaStudio; }
|
|
18
22
|
});
|
|
19
23
|
//# sourceMappingURL=index.cjs.map
|
|
20
24
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.cts
CHANGED
|
@@ -136,6 +136,12 @@ type ResolvedConfig = {
|
|
|
136
136
|
hotkey: string;
|
|
137
137
|
};
|
|
138
138
|
|
|
139
|
+
/**
|
|
140
|
+
* Full uninstall helper — wipes the entire DB for the given namespace.
|
|
141
|
+
* Call from the browser console: `import('qapture2').then(m => m.deleteQaDatabase('qapture'))`.
|
|
142
|
+
*/
|
|
143
|
+
declare function deleteQaDatabase(namespace: string): Promise<void>;
|
|
144
|
+
|
|
139
145
|
/**
|
|
140
146
|
* qapture — public API.
|
|
141
147
|
*
|
|
@@ -165,15 +171,15 @@ declare function initQaStudio(config?: QaConfig): {
|
|
|
165
171
|
* (destroy + remount if needed).
|
|
166
172
|
*
|
|
167
173
|
* Usage (Next.js App Router):
|
|
168
|
-
* import { Qapture } from '
|
|
174
|
+
* import { Qapture } from 'qapture2/next'; // adds 'use client' banner
|
|
169
175
|
* <Qapture config={qaConfig} />
|
|
170
176
|
*
|
|
171
177
|
* Usage (any React app):
|
|
172
|
-
* import { Qapture } from '
|
|
178
|
+
* import { Qapture } from 'qapture2';
|
|
173
179
|
* <Qapture config={qaConfig} />
|
|
174
180
|
*/
|
|
175
181
|
declare function Qapture({ config }: {
|
|
176
182
|
config?: QaConfig;
|
|
177
183
|
}): null;
|
|
178
184
|
|
|
179
|
-
export { type QaBilingual, type QaConfig, type QaCredential, type QaJourneyLane, type QaJourneyStep, type QaPreamble, type QaRisk, Qapture as QaStudio, type QaTheme, Qapture, type ResolvedConfig, initQaStudio };
|
|
185
|
+
export { type QaBilingual, type QaConfig, type QaCredential, type QaJourneyLane, type QaJourneyStep, type QaPreamble, type QaRisk, Qapture as QaStudio, type QaTheme, Qapture, type ResolvedConfig, deleteQaDatabase, initQaStudio };
|
package/dist/index.d.ts
CHANGED
|
@@ -136,6 +136,12 @@ type ResolvedConfig = {
|
|
|
136
136
|
hotkey: string;
|
|
137
137
|
};
|
|
138
138
|
|
|
139
|
+
/**
|
|
140
|
+
* Full uninstall helper — wipes the entire DB for the given namespace.
|
|
141
|
+
* Call from the browser console: `import('qapture2').then(m => m.deleteQaDatabase('qapture'))`.
|
|
142
|
+
*/
|
|
143
|
+
declare function deleteQaDatabase(namespace: string): Promise<void>;
|
|
144
|
+
|
|
139
145
|
/**
|
|
140
146
|
* qapture — public API.
|
|
141
147
|
*
|
|
@@ -165,15 +171,15 @@ declare function initQaStudio(config?: QaConfig): {
|
|
|
165
171
|
* (destroy + remount if needed).
|
|
166
172
|
*
|
|
167
173
|
* Usage (Next.js App Router):
|
|
168
|
-
* import { Qapture } from '
|
|
174
|
+
* import { Qapture } from 'qapture2/next'; // adds 'use client' banner
|
|
169
175
|
* <Qapture config={qaConfig} />
|
|
170
176
|
*
|
|
171
177
|
* Usage (any React app):
|
|
172
|
-
* import { Qapture } from '
|
|
178
|
+
* import { Qapture } from 'qapture2';
|
|
173
179
|
* <Qapture config={qaConfig} />
|
|
174
180
|
*/
|
|
175
181
|
declare function Qapture({ config }: {
|
|
176
182
|
config?: QaConfig;
|
|
177
183
|
}): null;
|
|
178
184
|
|
|
179
|
-
export { type QaBilingual, type QaConfig, type QaCredential, type QaJourneyLane, type QaJourneyStep, type QaPreamble, type QaRisk, Qapture as QaStudio, type QaTheme, Qapture, type ResolvedConfig, initQaStudio };
|
|
185
|
+
export { type QaBilingual, type QaConfig, type QaCredential, type QaJourneyLane, type QaJourneyStep, type QaPreamble, type QaRisk, Qapture as QaStudio, type QaTheme, Qapture, type ResolvedConfig, deleteQaDatabase, initQaStudio };
|
package/dist/index.js
CHANGED
package/dist/next.cjs
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var chunkDPJW626S_cjs = require('./chunk-DPJW626S.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "QaStudio", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunkDPJW626S_cjs.Qapture; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "Qapture", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkDPJW626S_cjs.Qapture; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "initQaStudio", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkDPJW626S_cjs.initQaStudio; }
|
|
19
19
|
});
|
|
20
20
|
//# sourceMappingURL=next.cjs.map
|
|
21
21
|
//# sourceMappingURL=next.cjs.map
|
package/dist/next.js
CHANGED
package/dist/standalone.cjs
CHANGED
|
@@ -1,39 +1,44 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkDPJW626S_cjs = require('./chunk-DPJW626S.cjs');
|
|
4
4
|
|
|
5
5
|
// src/standalone.ts
|
|
6
6
|
if (typeof window !== "undefined" && typeof customElements !== "undefined" && !customElements.get("qapture-widget")) {
|
|
7
7
|
import('./index.cjs').then(({ initQaStudio: init }) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
} catch {
|
|
17
|
-
}
|
|
18
|
-
const propCfg = this["config"];
|
|
19
|
-
if (propCfg && typeof propCfg === "object" && !Array.isArray(propCfg)) {
|
|
20
|
-
cfg = propCfg;
|
|
21
|
-
}
|
|
22
|
-
const instance = init(cfg);
|
|
23
|
-
this._destroy = instance.destroy;
|
|
8
|
+
class QaStudioWidget extends HTMLElement {
|
|
9
|
+
connectedCallback() {
|
|
10
|
+
if (this._destroy) return;
|
|
11
|
+
let cfg = {};
|
|
12
|
+
try {
|
|
13
|
+
const attr = this.getAttribute("config");
|
|
14
|
+
if (attr) cfg = JSON.parse(attr);
|
|
15
|
+
} catch {
|
|
24
16
|
}
|
|
25
|
-
|
|
26
|
-
|
|
17
|
+
const propCfg = this["config"];
|
|
18
|
+
if (propCfg && typeof propCfg === "object" && !Array.isArray(propCfg)) {
|
|
19
|
+
cfg = propCfg;
|
|
27
20
|
}
|
|
21
|
+
const instance = init(cfg);
|
|
22
|
+
this._destroy = instance.destroy;
|
|
28
23
|
}
|
|
29
|
-
|
|
24
|
+
disconnectedCallback() {
|
|
25
|
+
this._destroy?.();
|
|
26
|
+
this._destroy = void 0;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
customElements.define("qapture-widget", QaStudioWidget);
|
|
30
|
+
document.querySelectorAll("qapture-widget").forEach((el) => {
|
|
31
|
+
if (el instanceof QaStudioWidget && el.isConnected) {
|
|
32
|
+
el.connectedCallback();
|
|
33
|
+
}
|
|
34
|
+
});
|
|
30
35
|
}).catch(() => {
|
|
31
36
|
});
|
|
32
37
|
}
|
|
33
38
|
|
|
34
39
|
Object.defineProperty(exports, "initQaStudio", {
|
|
35
40
|
enumerable: true,
|
|
36
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkDPJW626S_cjs.initQaStudio; }
|
|
37
42
|
});
|
|
38
43
|
//# sourceMappingURL=standalone.cjs.map
|
|
39
44
|
//# sourceMappingURL=standalone.cjs.map
|
package/dist/standalone.js
CHANGED
|
@@ -1,30 +1,35 @@
|
|
|
1
|
-
export { initQaStudio } from './chunk-
|
|
1
|
+
export { initQaStudio } from './chunk-RC7ZUQ5X.js';
|
|
2
2
|
|
|
3
3
|
// src/standalone.ts
|
|
4
4
|
if (typeof window !== "undefined" && typeof customElements !== "undefined" && !customElements.get("qapture-widget")) {
|
|
5
5
|
import('./index.js').then(({ initQaStudio: init }) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
} catch {
|
|
15
|
-
}
|
|
16
|
-
const propCfg = this["config"];
|
|
17
|
-
if (propCfg && typeof propCfg === "object" && !Array.isArray(propCfg)) {
|
|
18
|
-
cfg = propCfg;
|
|
19
|
-
}
|
|
20
|
-
const instance = init(cfg);
|
|
21
|
-
this._destroy = instance.destroy;
|
|
6
|
+
class QaStudioWidget extends HTMLElement {
|
|
7
|
+
connectedCallback() {
|
|
8
|
+
if (this._destroy) return;
|
|
9
|
+
let cfg = {};
|
|
10
|
+
try {
|
|
11
|
+
const attr = this.getAttribute("config");
|
|
12
|
+
if (attr) cfg = JSON.parse(attr);
|
|
13
|
+
} catch {
|
|
22
14
|
}
|
|
23
|
-
|
|
24
|
-
|
|
15
|
+
const propCfg = this["config"];
|
|
16
|
+
if (propCfg && typeof propCfg === "object" && !Array.isArray(propCfg)) {
|
|
17
|
+
cfg = propCfg;
|
|
25
18
|
}
|
|
19
|
+
const instance = init(cfg);
|
|
20
|
+
this._destroy = instance.destroy;
|
|
26
21
|
}
|
|
27
|
-
|
|
22
|
+
disconnectedCallback() {
|
|
23
|
+
this._destroy?.();
|
|
24
|
+
this._destroy = void 0;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
customElements.define("qapture-widget", QaStudioWidget);
|
|
28
|
+
document.querySelectorAll("qapture-widget").forEach((el) => {
|
|
29
|
+
if (el instanceof QaStudioWidget && el.isConnected) {
|
|
30
|
+
el.connectedCallback();
|
|
31
|
+
}
|
|
32
|
+
});
|
|
28
33
|
}).catch(() => {
|
|
29
34
|
});
|
|
30
35
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qapture2",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
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",
|
|
@@ -78,10 +78,16 @@
|
|
|
78
78
|
"prepublishOnly": "npm run build",
|
|
79
79
|
"dev": "tsup --watch",
|
|
80
80
|
"typecheck": "tsc --noEmit",
|
|
81
|
+
"typecheck:bin": "tsc --noEmit -p tsconfig.bin.json",
|
|
81
82
|
"smoke": "node scripts/smoke.mjs",
|
|
82
83
|
"export-smoke": "esbuild src/lib/exportZip.ts --bundle --format=esm --platform=node --outfile=dist/_export-test.mjs --log-level=error && node scripts/export-smoke.mjs dist/_export-test.mjs",
|
|
84
|
+
"cli-smoke": "node scripts/cli-smoke.mjs",
|
|
85
|
+
"cli-detectors-smoke": "node scripts/cli-detectors-smoke.mjs",
|
|
86
|
+
"selector-smoke": "node scripts/selector-smoke.mjs",
|
|
87
|
+
"capture-timeout-smoke": "node scripts/capture-timeout-smoke.mjs",
|
|
88
|
+
"standalone-smoke": "node scripts/standalone-smoke.mjs",
|
|
83
89
|
"browser-test": "node scripts/browser-test.mjs",
|
|
84
|
-
"verify": "npm run typecheck && npm run build && npm run smoke && npm run export-smoke",
|
|
90
|
+
"verify": "npm run typecheck && npm run typecheck:bin && npm run build && npm run smoke && npm run export-smoke && npm run cli-smoke && npm run cli-detectors-smoke && npm run selector-smoke && npm run capture-timeout-smoke && npm run standalone-smoke",
|
|
85
91
|
"play": "npm --prefix playground run dev"
|
|
86
92
|
},
|
|
87
93
|
"engines": {
|
|
@@ -104,6 +110,7 @@
|
|
|
104
110
|
"jszip": "^3.10.1"
|
|
105
111
|
},
|
|
106
112
|
"devDependencies": {
|
|
113
|
+
"@types/node": "^20.19.43",
|
|
107
114
|
"@types/react": "^18.3.12",
|
|
108
115
|
"@types/react-dom": "^18.3.1",
|
|
109
116
|
"jsdom": "^29.1.1",
|