@qaiddev/quests-embed 1.7.0 → 1.9.0

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/types.d.ts CHANGED
@@ -278,6 +278,19 @@ export interface QuestsConfig {
278
278
  * `QaidQuests.supports.asyncMetadata` before passing one.
279
279
  */
280
280
  metadata?: Record<string, unknown> | Promise<Record<string, unknown> | undefined>;
281
+ /**
282
+ * The page the response is about, stored with it and checked against the
283
+ * project's Domain Restriction. Default: `window.location.href`. Set it
284
+ * when the quest runs somewhere other than that page — inside a native
285
+ * app's web view, the page is qaid's, but the response is about the app.
286
+ */
287
+ pageUrl?: string;
288
+ /**
289
+ * The visitor id sent with the response. Default: one kept in this
290
+ * browser's storage. A host that already has an id (a native app that sent
291
+ * the feedback the quest follows) passes it so both rows name one visitor.
292
+ */
293
+ visitorId?: string;
281
294
  /**
282
295
  * Called once when the quest is completed and the server accepted the
283
296
  * submit (right after the final "thank you" screen renders). Receives
@@ -336,6 +349,8 @@ export interface ResolvedQuestsConfig {
336
349
  theme: "light" | "dark" | "auto";
337
350
  unstyled: boolean;
338
351
  preset: "default" | "minimal" | "pill" | "dense";
352
+ /** The host's page URL; empty means this page's own, read when the response is created. */
353
+ pageUrl: string;
339
354
  }
340
355
  /** Initial payload sent to create the response */
341
356
  export interface CreateResponsePayload {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qaiddev/quests-embed",
3
- "version": "1.7.0",
3
+ "version": "1.9.0",
4
4
  "description": "Any Questions for your Users?",
5
5
  "type": "module",
6
6
  "main": "./dist/qaid-quests.umd.cjs",
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "scripts": {
31
31
  "dev": "vite build --watch",
32
- "build": "vite build && tsc -p tsconfig.build.json",
32
+ "build": "vite build && vite build --config vite.config.embed.ts && tsc -p tsconfig.build.json",
33
33
  "preview": "vite preview",
34
34
  "test": "vitest",
35
35
  "test:run": "vitest run",
@@ -38,13 +38,13 @@
38
38
  "prepublishOnly": "npm run test:run && npm run build"
39
39
  },
40
40
  "devDependencies": {
41
- "@vitest/coverage-v8": "^4.0.18",
41
+ "@vitest/coverage-v8": "^5.0.3",
42
42
  "axe-core": "^4.12.1",
43
43
  "happy-dom": "^20.5.1",
44
44
  "jsdom": "^29.1.1",
45
45
  "typescript": "^5.3.3",
46
46
  "vite": "^7.3.1",
47
- "vitest": "^4.0.18"
47
+ "vitest": "^5.0.3"
48
48
  },
49
49
  "keywords": [
50
50
  "quests",