@qaiddev/thumbs-embed 1.12.2 → 1.14.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.
Files changed (59) hide show
  1. package/README.md +74 -10
  2. package/dist/bootstrap.d.ts +29 -4
  3. package/dist/chunks/annotate-Dvrfeb8k.js +2 -0
  4. package/dist/chunks/annotate-Dvrfeb8k.js.map +1 -0
  5. package/dist/chunks/core-C36Mpll9.js +26 -0
  6. package/dist/chunks/core-C36Mpll9.js.map +1 -0
  7. package/dist/chunks/dom-kdwHduNo.js +2 -0
  8. package/dist/chunks/dom-kdwHduNo.js.map +1 -0
  9. package/dist/chunks/html2canvas.esm-Csbr1w14.js +6 -0
  10. package/dist/chunks/html2canvas.esm-Csbr1w14.js.map +1 -0
  11. package/dist/chunks/modal-CXZZ6LG0.js +2 -0
  12. package/dist/chunks/modal-CXZZ6LG0.js.map +1 -0
  13. package/dist/chunks/recording-D_iYhxpC.js +2 -0
  14. package/dist/chunks/recording-D_iYhxpC.js.map +1 -0
  15. package/dist/chunks/screenshot-dom-DO-0UlOz.js +2 -0
  16. package/dist/chunks/screenshot-dom-DO-0UlOz.js.map +1 -0
  17. package/dist/chunks/send-o4flR35U.js +2 -0
  18. package/dist/chunks/send-o4flR35U.js.map +1 -0
  19. package/dist/chunks/{targeting-CMUEe-7C.js → targeting-Jjo_Jyqy.js} +2 -6
  20. package/dist/chunks/{targeting-CMUEe-7C.js.map → targeting-Jjo_Jyqy.js.map} +1 -1
  21. package/dist/dom.d.ts +0 -2
  22. package/dist/embed-loader.d.ts +20 -0
  23. package/dist/embed.d.ts +4 -4
  24. package/dist/embed.js +1 -1
  25. package/dist/embed.js.map +1 -1
  26. package/dist/icons.d.ts +2 -0
  27. package/dist/index.js +6721 -1539
  28. package/dist/index.js.map +1 -1
  29. package/dist/integrity-probe.js +2 -0
  30. package/dist/loader.js +1 -1
  31. package/dist/loader.js.map +1 -1
  32. package/dist/modal.d.ts +7 -2
  33. package/dist/network-capture.d.ts +4 -0
  34. package/dist/origin-key.d.ts +7 -0
  35. package/dist/qaid.umd.cjs +17 -17
  36. package/dist/qaid.umd.cjs.map +1 -1
  37. package/dist/quest-config.d.ts +27 -2
  38. package/dist/quest-launcher.d.ts +12 -0
  39. package/dist/redact.d.ts +40 -0
  40. package/dist/screenshot-dom.d.ts +7 -5
  41. package/dist/send.d.ts +2 -2
  42. package/dist/svg-sanitize.d.ts +35 -0
  43. package/dist/trusted-types.d.ts +36 -0
  44. package/dist/types.d.ts +13 -0
  45. package/package.json +4 -2
  46. package/dist/chunks/annotate-DGyRcgPt.js +0 -2
  47. package/dist/chunks/annotate-DGyRcgPt.js.map +0 -1
  48. package/dist/chunks/core-BsR7oV99.js +0 -26
  49. package/dist/chunks/core-BsR7oV99.js.map +0 -1
  50. package/dist/chunks/dom-scpOS8nl.js +0 -2
  51. package/dist/chunks/dom-scpOS8nl.js.map +0 -1
  52. package/dist/chunks/modal-DYxcs1Gm.js +0 -2
  53. package/dist/chunks/modal-DYxcs1Gm.js.map +0 -1
  54. package/dist/chunks/recording-BUw5-5Rf.js +0 -2
  55. package/dist/chunks/recording-BUw5-5Rf.js.map +0 -1
  56. package/dist/chunks/screenshot-dom-ZYP2w2h0.js +0 -2
  57. package/dist/chunks/screenshot-dom-ZYP2w2h0.js.map +0 -1
  58. package/dist/chunks/send-C26DRoYc.js +0 -2
  59. package/dist/chunks/send-C26DRoYc.js.map +0 -1
@@ -0,0 +1,2 @@
1
+ /* thumbs-embed: import-map integrity probe. Never runs where the check works. */
2
+ export {};
package/dist/loader.js CHANGED
@@ -1,2 +1,2 @@
1
- import{b as o}from"./chunks/core-BsR7oV99.js";import{Q as a}from"./chunks/core-BsR7oV99.js";o();export{a as QaidFeedback};
1
+ import{d as o}from"./chunks/core-C36Mpll9.js";import{Q as r}from"./chunks/core-C36Mpll9.js";o(import.meta.url);export{r as QaidFeedback};
2
2
  //# sourceMappingURL=loader.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"loader.js","sources":["../src/loader.ts"],"sourcesContent":["/**\n * Minimal ESM loader entry for progressive delivery.\n *\n * ```html\n * <script type=\"module\" src=\"…/loader.js\" data-endpoint=\"/api/feedback\"></script>\n * ```\n *\n * Ships only the core (the buttons, their styles, the config parser). The\n * click path (send flow, message box, element targeting) loads as separate\n * chunks when the pointer or focus reaches the buttons, or on idle. Screenshot\n * capture, the annotation editor, and the video subsystem (including\n * redaction) load on demand the first time each is used — so a visitor who\n * only gives a thumbs-up never downloads them.\n *\n * The full programmatic API (createVideoRecorder, openAnnotationEditor, …)\n * lives on the package's main entry (`@qaiddev/thumbs-embed`).\n */\n\nimport { QaidFeedback } from \"./embed\";\nimport { autoInit } from \"./bootstrap\";\n\nexport { QaidFeedback };\nexport type { FeedbackConfig } from \"./types\";\n\nautoInit();\n"],"names":["autoInit"],"mappings":"4FAwBAA,EAAA"}
1
+ {"version":3,"file":"loader.js","sources":["../src/loader.ts"],"sourcesContent":["/**\n * Minimal ESM loader entry for progressive delivery.\n *\n * ```html\n * <script type=\"module\" src=\"…/loader.js\" data-endpoint=\"/api/feedback\"></script>\n * ```\n *\n * Ships only the core (the buttons, their styles, the config parser). The\n * click path (send flow, message box, element targeting) loads as separate\n * chunks when the pointer or focus reaches the buttons, or on idle. Screenshot\n * capture, the annotation editor, and the video subsystem (including\n * redaction) load on demand the first time each is used — so a visitor who\n * only gives a thumbs-up never downloads them.\n *\n * The full programmatic API (createVideoRecorder, openAnnotationEditor, …)\n * lives on the package's main entry (`@qaiddev/thumbs-embed`).\n */\n\nimport { QaidFeedback } from \"./embed\";\nimport { autoInit } from \"./bootstrap\";\n\nexport { QaidFeedback };\nexport type { FeedbackConfig } from \"./types\";\n\nautoInit(import.meta.url);\n"],"names":["autoInit"],"mappings":"4FAwBAA,EAAS,YAAY,GAAG"}
package/dist/modal.d.ts CHANGED
@@ -6,7 +6,12 @@
6
6
  * The controller owns the modal/backdrop DOM and the message PATCH flow, and
7
7
  * talks back to the embed through the narrow `ModalHost` interface.
8
8
  */
9
- import type { ResolvedFeedbackConfig, EmbedState, FeedbackData, SelectedBounds } from "./types";
9
+ import type { ResolvedFeedbackConfig, EmbedState, FeedbackData, SelectedBounds, FeedbackRecord } from "./types";
10
+ /**
11
+ * A PATCH body for `record`: `fields`, plus `editToken` when the server sent
12
+ * one with the create response. Older servers send none, and get none back.
13
+ */
14
+ export declare function patchBody(record: FeedbackRecord, fields: Record<string, unknown>): string;
10
15
  /** The slice of the embed the modal needs. */
11
16
  export interface ModalHost {
12
17
  readonly config: ResolvedFeedbackConfig;
@@ -22,7 +27,7 @@ export interface ModalHost {
22
27
  * creates it is still in flight, so every PATCH waits on this; null when
23
28
  * the POST failed.
24
29
  */
25
- whenFeedbackId(): Promise<number | null>;
30
+ whenFeedbackRecord(): Promise<FeedbackRecord | null>;
26
31
  ensureOverlayHost(): ShadowRoot;
27
32
  applyVars(el: HTMLElement): void;
28
33
  announceMsg(message: string, assertive?: boolean): void;
@@ -1,6 +1,10 @@
1
1
  /**
2
2
  * Network capture utilities
3
3
  * Intercepts fetch() and XMLHttpRequest to capture 4xx/5xx errors
4
+ *
5
+ * What is kept goes to qaid's server with a report, so (see redact.ts):
6
+ * request bodies are never captured, credential-like URL parameters are
7
+ * replaced, and a response body is dropped for 401/403 and sign-in-ish URLs.
4
8
  */
5
9
  import type { NetworkError } from "./types";
6
10
  export interface NetworkCapture {
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The property embed.js sets on the tag it injects, pointing back at the
3
+ * customer's own `<script src=".../embed.js">`. An expando, not an attribute:
4
+ * markup injected into the page can't forge it. Its own module so embed.js
5
+ * (ES5, tiny) can share it with the bootstrap without pulling the bootstrap in.
6
+ */
7
+ export declare var ORIGIN_KEY_NAME: string;