@qaiddev/thumbs-embed 1.10.1 → 1.12.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/a11y-dialog.d.ts +77 -0
- package/dist/a11y.d.ts +6 -65
- package/dist/annotate.d.ts +2 -0
- package/dist/chunks/annotate-DGyRcgPt.js +2 -0
- package/dist/chunks/annotate-DGyRcgPt.js.map +1 -0
- package/dist/chunks/core-BsR7oV99.js +26 -0
- package/dist/chunks/core-BsR7oV99.js.map +1 -0
- package/dist/chunks/dom-scpOS8nl.js +2 -0
- package/dist/chunks/{dom-DvdtcUS8.js.map → dom-scpOS8nl.js.map} +1 -1
- package/dist/chunks/modal-DYxcs1Gm.js +2 -0
- package/dist/chunks/modal-DYxcs1Gm.js.map +1 -0
- package/dist/chunks/recording-BUw5-5Rf.js +2 -0
- package/dist/chunks/recording-BUw5-5Rf.js.map +1 -0
- package/dist/chunks/screenshot-CNe1irEz.js +2 -0
- package/dist/chunks/{screenshot-DYOKg2bS.js.map → screenshot-CNe1irEz.js.map} +1 -1
- package/dist/chunks/screenshot-dom-ZYP2w2h0.js +2 -0
- package/dist/chunks/{screenshot-dom-CME7tYRE.js.map → screenshot-dom-ZYP2w2h0.js.map} +1 -1
- package/dist/chunks/send-C26DRoYc.js +2 -0
- package/dist/chunks/send-C26DRoYc.js.map +1 -0
- package/dist/chunks/targeting-CMUEe-7C.js +6 -0
- package/dist/chunks/targeting-CMUEe-7C.js.map +1 -0
- package/dist/chunks/video-BSP4s2te.js +2 -0
- package/dist/chunks/{video-Bd_29-rK.js.map → video-BSP4s2te.js.map} +1 -1
- package/dist/embed.d.ts +35 -34
- package/dist/index.js +1515 -1382
- package/dist/index.js.map +1 -1
- package/dist/loader.d.ts +6 -4
- package/dist/loader.js +1 -6
- package/dist/loader.js.map +1 -1
- package/dist/modal-positioning.d.ts +0 -27
- package/dist/modal.d.ts +2 -0
- package/dist/qaid.umd.cjs +14 -14
- package/dist/qaid.umd.cjs.map +1 -1
- package/dist/quest-config.d.ts +2 -0
- package/dist/quest-launcher.d.ts +1 -3
- package/dist/recording.d.ts +2 -0
- package/dist/send.d.ts +60 -0
- package/dist/targeting.d.ts +2 -0
- package/dist/tooltip-positioning.d.ts +31 -0
- package/package.json +1 -1
- package/dist/chunks/annotate-BTLeFQa0.js +0 -355
- package/dist/chunks/annotate-BTLeFQa0.js.map +0 -1
- package/dist/chunks/core-2nGsCcZq.js +0 -1319
- package/dist/chunks/core-2nGsCcZq.js.map +0 -1
- package/dist/chunks/dom-DvdtcUS8.js +0 -17
- package/dist/chunks/modal-zwBhxWO0.js +0 -219
- package/dist/chunks/modal-zwBhxWO0.js.map +0 -1
- package/dist/chunks/recording-DNngIGr2.js +0 -321
- package/dist/chunks/recording-DNngIGr2.js.map +0 -1
- package/dist/chunks/screenshot-DYOKg2bS.js +0 -33
- package/dist/chunks/screenshot-dom-CME7tYRE.js +0 -63
- package/dist/chunks/targeting-DaBmGVk5.js +0 -296
- package/dist/chunks/targeting-DaBmGVk5.js.map +0 -1
- package/dist/chunks/video-Bd_29-rK.js +0 -214
package/dist/embed.d.ts
CHANGED
|
@@ -16,9 +16,6 @@ export declare function randomId(): string;
|
|
|
16
16
|
* Get or create a visitor ID stored in localStorage
|
|
17
17
|
*/
|
|
18
18
|
export declare function getOrCreateVisitorId(): string;
|
|
19
|
-
/**
|
|
20
|
-
* QaidFeedback - Standalone feedback collection embed
|
|
21
|
-
*/
|
|
22
19
|
export declare class QaidFeedback {
|
|
23
20
|
private config;
|
|
24
21
|
private state;
|
|
@@ -37,7 +34,7 @@ export declare class QaidFeedback {
|
|
|
37
34
|
private consoleCapture;
|
|
38
35
|
private recording;
|
|
39
36
|
private targeting;
|
|
40
|
-
private
|
|
37
|
+
private clickPathPrewarmed;
|
|
41
38
|
private prewarmHandle;
|
|
42
39
|
private prewarmIsTimeout;
|
|
43
40
|
private videoPrewarmed;
|
|
@@ -49,14 +46,12 @@ export declare class QaidFeedback {
|
|
|
49
46
|
private buttonsContainer;
|
|
50
47
|
private isUserProvidedContainer;
|
|
51
48
|
private modal;
|
|
52
|
-
private modalPrewarmed;
|
|
53
49
|
private dismissBtn;
|
|
54
50
|
private cssVars;
|
|
55
51
|
private activeThumbBtn;
|
|
56
52
|
private keyboardActivation;
|
|
57
|
-
private
|
|
58
|
-
private
|
|
59
|
-
private dialogRestoreInert;
|
|
53
|
+
private dialogModule;
|
|
54
|
+
private dialogClose;
|
|
60
55
|
private readonly uid;
|
|
61
56
|
private boundKeyDown;
|
|
62
57
|
private boundResize;
|
|
@@ -73,15 +68,26 @@ export declare class QaidFeedback {
|
|
|
73
68
|
* while a dialog aria-hides the main button host.
|
|
74
69
|
*/
|
|
75
70
|
private announceMsg;
|
|
71
|
+
/** Load the dialog a11y helpers; every surface that opens a dialog awaits this first. */
|
|
72
|
+
private loadDialogA11y;
|
|
76
73
|
/**
|
|
77
74
|
* Turn a transient surface into an accessible modal dialog: save the
|
|
78
75
|
* invoking control, apply dialog semantics, trap focus, and inert the
|
|
79
|
-
* background. Paired with closeDialogA11y() on every close path.
|
|
76
|
+
* background. Paired with closeDialogA11y() on every close path. Callers
|
|
77
|
+
* reach it only after loadDialogA11y() has resolved.
|
|
80
78
|
*/
|
|
81
79
|
private openDialogA11y;
|
|
82
80
|
private closeDialogA11y;
|
|
83
81
|
private clearActiveThumb;
|
|
84
82
|
private init;
|
|
83
|
+
/**
|
|
84
|
+
* Warm everything a thumb click needs: the send flow, the dialog helpers,
|
|
85
|
+
* the message box, and targeting (unless it is skipped). Runs once, on the
|
|
86
|
+
* first of: pointer or focus entering the buttons, or the idle callback.
|
|
87
|
+
*/
|
|
88
|
+
private prewarmClickPath;
|
|
89
|
+
/** "annotate" mode and skipTargeting both go straight to the send flow. */
|
|
90
|
+
private skipsTargeting;
|
|
85
91
|
/**
|
|
86
92
|
* Best-effort preload of a lazily-split feature chunk so its first use is
|
|
87
93
|
* instant. Warming fetches + compiles (and defines) the module; the feature
|
|
@@ -121,6 +127,15 @@ export declare class QaidFeedback {
|
|
|
121
127
|
* clip-path / transform containing blocks in user containers.
|
|
122
128
|
*/
|
|
123
129
|
private ensureOverlayHost;
|
|
130
|
+
/** The styles of every feature chunk loaded so far, in load order. */
|
|
131
|
+
private featureStyles;
|
|
132
|
+
/**
|
|
133
|
+
* Add a feature chunk's styles to both shadow roots. The core stylesheet
|
|
134
|
+
* styles only the buttons; the message box, targeting, video and markup
|
|
135
|
+
* editor bring their own CSS with their chunk, so a page that never opens
|
|
136
|
+
* them never downloads it.
|
|
137
|
+
*/
|
|
138
|
+
private addFeatureStyles;
|
|
124
139
|
private tooltipElement;
|
|
125
140
|
private showTooltip;
|
|
126
141
|
private hideTooltip;
|
|
@@ -133,29 +148,19 @@ export declare class QaidFeedback {
|
|
|
133
148
|
* otherwise DOM is used on touch devices to avoid the getDisplayMedia prompt. */
|
|
134
149
|
private shouldCaptureViaDom;
|
|
135
150
|
/**
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
* enabled while the editor is open and restored on close.
|
|
151
|
+
* Run the send flow (send.ts, loaded on demand and pre-warmed before the
|
|
152
|
+
* click): screenshot, markup, POST, then a linked quest or the message box.
|
|
153
|
+
* If its chunk will not load, say so and reset rather than leave the
|
|
154
|
+
* visitor stuck mid-flow.
|
|
141
155
|
*/
|
|
142
|
-
private openAnnotationEditor;
|
|
143
156
|
private submitFeedback;
|
|
144
|
-
/** POST the feedback. Resolves to the new record's id, or null if it failed. */
|
|
145
|
-
private postFeedback;
|
|
146
|
-
/**
|
|
147
|
-
* Quest id linked to `type`, or "" when quest launching is disabled
|
|
148
|
-
* (no `base`) or this button has no quest configured.
|
|
149
|
-
*/
|
|
150
|
-
private questIdFor;
|
|
151
157
|
/**
|
|
152
|
-
* Launch the quest linked to `type
|
|
153
|
-
*
|
|
154
|
-
* configured or the widget failed to load (caller falls back to its
|
|
155
|
-
* normal UI). The created feedback record id is passed through so the
|
|
156
|
-
* quest response can be joined back to it server-side.
|
|
158
|
+
* Launch the quest linked to `type` through the send chunk. Resolves false
|
|
159
|
+
* when none is linked, or when the chunk or the quest will not load.
|
|
157
160
|
*/
|
|
158
161
|
private tryLaunchQuest;
|
|
162
|
+
/** Narrow view of the embed the send flow talks back through. */
|
|
163
|
+
private makeSendHost;
|
|
159
164
|
/**
|
|
160
165
|
* Reset the thumbs targeting/marker UI back to idle without opening or
|
|
161
166
|
* closing the message modal. Shared by closeModal() and the quest-launch
|
|
@@ -164,24 +169,20 @@ export declare class QaidFeedback {
|
|
|
164
169
|
private resetFeedbackUi;
|
|
165
170
|
/**
|
|
166
171
|
* Lazily load and instantiate the modal controller. The message modal lives
|
|
167
|
-
* in a separate chunk, fetched the first time it opens (and pre-warmed
|
|
168
|
-
* the
|
|
172
|
+
* in a separate chunk, fetched the first time it opens (and pre-warmed
|
|
173
|
+
* before the click — see prewarmClickPath).
|
|
169
174
|
*/
|
|
170
175
|
private ensureModal;
|
|
171
176
|
/** Narrow view of the embed the modal controller talks back through. */
|
|
172
177
|
private makeModalHost;
|
|
173
|
-
/** Warm the modal chunk while the user is targeting, so it opens instantly. */
|
|
174
|
-
private prewarmModal;
|
|
175
178
|
/**
|
|
176
179
|
* Lazily load and instantiate the targeting controller. The subsystem (with
|
|
177
180
|
* element-selector) lives in a separate chunk, fetched the first time the
|
|
178
|
-
* user targets — pre-warmed
|
|
181
|
+
* user targets — pre-warmed before the click (see prewarmClickPath).
|
|
179
182
|
*/
|
|
180
183
|
private ensureTargeting;
|
|
181
184
|
/** Narrow view of the embed the targeting controller talks back through. */
|
|
182
185
|
private makeTargetingHost;
|
|
183
|
-
/** Warm the targeting chunk on thumb-button hover, before the click. */
|
|
184
|
-
private prewarmTargeting;
|
|
185
186
|
/**
|
|
186
187
|
* Cheap synchronous capability check so the record button can render without
|
|
187
188
|
* pulling in the (lazily-loaded) video subsystem. Mirrors
|