@mushi-mushi/web 1.37.0 → 1.38.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/README.md +1 -1
- package/dist/chunks/chunk-ONXNS7MQ.js +35 -0
- package/dist/chunks/chunk-ONXNS7MQ.js.map +1 -0
- package/dist/chunks/screenshot-dom-K3N2HPNN.js +653 -0
- package/dist/chunks/screenshot-dom-K3N2HPNN.js.map +1 -0
- package/dist/headless.cjs +758 -273
- package/dist/headless.cjs.map +1 -1
- package/dist/headless.d.cts +1 -1
- package/dist/headless.d.ts +11 -1
- package/dist/headless.js +758 -273
- package/dist/headless.js.map +1 -1
- package/dist/i18n/index.cjs +5 -0
- package/dist/i18n/index.cjs.map +1 -1
- package/dist/i18n/index.d.cts +2 -0
- package/dist/i18n/index.d.ts +2 -0
- package/dist/i18n/index.js +5 -0
- package/dist/i18n/index.js.map +1 -1
- package/dist/index.cjs +844 -288
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -2
- package/dist/index.d.ts +22 -1
- package/dist/index.js +148 -292
- package/dist/index.js.map +1 -1
- package/dist/mushi.loader.global.js +30 -29
- package/dist/test-utils.cjs +595 -0
- package/dist/test-utils.cjs.map +1 -1
- package/dist/test-utils.js +595 -0
- package/dist/test-utils.js.map +1 -1
- package/dist/{timeline-B8nMyZyM.d.cts → timeline-DoBCj4dt.d.cts} +11 -1
- package/package.json +8 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MushiInitConfig, MushiSDKInstance, MushiDiagnosticsResult, MushiReportCategory, MushiReporterReport, MushiReporterComment, MushiReporterTimelineItem, MushiAssistantReply, MushiWidgetConfig, MushiLeaderboardEntry, MushiCrossAppReport, MushiTesterReputation, MushiReporterUpdates, MushiApiCascadeConfig, MushiErrorFilter } from '@mushi-mushi/core';
|
|
2
2
|
export { MushiApiCascadeConfig, MushiConfig, MushiConsoleEntry, MushiDiagnosticsResult, MushiEnvironment, MushiEventHandler, MushiEventType, MushiInitConfig, MushiNetworkEntry, MushiPerformanceMetrics, MushiReport, MushiReportCategory, MushiSDKInstance, MushiTimelineEntry, MushiTimelineKind, MushiUrlMatcher, MushiWidgetConfig } from '@mushi-mushi/core';
|
|
3
|
-
import { g as ScreenshotFailureReason } from './timeline-
|
|
4
|
-
export { C as ConsoleCapture, E as ElementSelector, N as NetworkCapture, P as PerformanceCapture, S as ScreenshotCapture, T as TimelineCapture, c as createConsoleCapture, a as createElementSelector, b as createNetworkCapture, d as createPerformanceCapture, e as createScreenshotCapture, f as createTimelineCapture } from './timeline-
|
|
3
|
+
import { g as ScreenshotFailureReason } from './timeline-DoBCj4dt.cjs';
|
|
4
|
+
export { C as ConsoleCapture, E as ElementSelector, N as NetworkCapture, P as PerformanceCapture, S as ScreenshotCapture, T as TimelineCapture, c as createConsoleCapture, a as createElementSelector, b as createNetworkCapture, d as createPerformanceCapture, e as createScreenshotCapture, f as createTimelineCapture } from './timeline-DoBCj4dt.cjs';
|
|
5
5
|
export { MushiLocale, getAvailableLocales, getLocale } from './i18n/index.cjs';
|
|
6
6
|
|
|
7
7
|
declare class Mushi {
|
|
@@ -99,6 +99,13 @@ interface WidgetCallbacks {
|
|
|
99
99
|
description: string;
|
|
100
100
|
intent?: string;
|
|
101
101
|
}): void | Promise<WidgetSubmitOutcome | void>;
|
|
102
|
+
/**
|
|
103
|
+
* Runs when the reporter presses Send, before `onSubmit`. Resolves `true`
|
|
104
|
+
* when it just attached a screenshot the reporter has not seen (the
|
|
105
|
+
* `on-report` capture): the widget then stays on the report step with the
|
|
106
|
+
* preview open and waits for a second Send, so no image leaves unseen.
|
|
107
|
+
*/
|
|
108
|
+
onBeforeSubmit?(): boolean | Promise<boolean>;
|
|
102
109
|
onOpen(): void;
|
|
103
110
|
onClose(): void;
|
|
104
111
|
/** "Bug reports by Mushi Mushi" mark: impression once per widget instance, click per activation → loop_* events. */
|
|
@@ -201,6 +208,8 @@ declare class MushiWidget {
|
|
|
201
208
|
/** The reporter asked for (or marked up) the screenshot — an auto-capture on open doesn't count as saying something. */
|
|
202
209
|
private screenshotByUser;
|
|
203
210
|
private previewOpen;
|
|
211
|
+
/** Send just captured the screenshot: it stays open for review until a second Send. */
|
|
212
|
+
private screenshotReview;
|
|
204
213
|
private allowScreenshotRemove;
|
|
205
214
|
/** Unusable tools are hidden — a button whose handler no-ops reads as a bug. */
|
|
206
215
|
private screenshotAvailable;
|
package/dist/index.d.ts
CHANGED
|
@@ -28,6 +28,10 @@ interface ScreenshotCaptureOptions {
|
|
|
28
28
|
* - error: anything else
|
|
29
29
|
*/
|
|
30
30
|
type ScreenshotFailureReason = 'taint' | 'timeout' | 'unsupported' | 'csp' | 'error';
|
|
31
|
+
/**
|
|
32
|
+
* The capture code lives in ./screenshot-dom and loads on the first
|
|
33
|
+
* screenshot, so a page that never takes one never downloads it.
|
|
34
|
+
*/
|
|
31
35
|
declare function createScreenshotCapture(options?: ScreenshotCaptureOptions): ScreenshotCapture;
|
|
32
36
|
|
|
33
37
|
/**
|
|
@@ -117,6 +121,13 @@ interface WidgetCallbacks {
|
|
|
117
121
|
description: string;
|
|
118
122
|
intent?: string;
|
|
119
123
|
}): void | Promise<WidgetSubmitOutcome | void>;
|
|
124
|
+
/**
|
|
125
|
+
* Runs when the reporter presses Send, before `onSubmit`. Resolves `true`
|
|
126
|
+
* when it just attached a screenshot the reporter has not seen (the
|
|
127
|
+
* `on-report` capture): the widget then stays on the report step with the
|
|
128
|
+
* preview open and waits for a second Send, so no image leaves unseen.
|
|
129
|
+
*/
|
|
130
|
+
onBeforeSubmit?(): boolean | Promise<boolean>;
|
|
120
131
|
onOpen(): void;
|
|
121
132
|
onClose(): void;
|
|
122
133
|
/** "Bug reports by Mushi Mushi" mark: impression once per widget instance, click per activation → loop_* events. */
|
|
@@ -219,6 +230,8 @@ declare class MushiWidget {
|
|
|
219
230
|
/** The reporter asked for (or marked up) the screenshot — an auto-capture on open doesn't count as saying something. */
|
|
220
231
|
private screenshotByUser;
|
|
221
232
|
private previewOpen;
|
|
233
|
+
/** Send just captured the screenshot: it stays open for review until a second Send. */
|
|
234
|
+
private screenshotReview;
|
|
222
235
|
private allowScreenshotRemove;
|
|
223
236
|
/** Unusable tools are hidden — a button whose handler no-ops reads as a bug. */
|
|
224
237
|
private screenshotAvailable;
|
|
@@ -648,7 +661,13 @@ interface ElementSelector {
|
|
|
648
661
|
deactivate(): void;
|
|
649
662
|
isActive(): boolean;
|
|
650
663
|
}
|
|
651
|
-
|
|
664
|
+
/**
|
|
665
|
+
* @param privateSelector CSS selector for areas whose text never leaves the
|
|
666
|
+
* page (the screenshot redaction list). An element inside one, or holding
|
|
667
|
+
* one, is reported without its text.
|
|
668
|
+
* @param scrubText Runs over the element text that is kept (the PII scrubber).
|
|
669
|
+
*/
|
|
670
|
+
declare function createElementSelector(privateSelector?: () => string, scrubText?: (text: string) => string): ElementSelector;
|
|
652
671
|
|
|
653
672
|
interface TimelineCapture {
|
|
654
673
|
setScreen(screen: {
|
|
@@ -742,6 +761,8 @@ interface MushiLocale {
|
|
|
742
761
|
notSentBlocked: string;
|
|
743
762
|
/** The SDK's own send limiter refused the report; the text is kept. */
|
|
744
763
|
notSentThrottled: string;
|
|
764
|
+
/** Shown after Send captured a screenshot the reporter hasn't seen yet: check it, then Send again. */
|
|
765
|
+
screenshotReview: string;
|
|
745
766
|
/** Why the last capture failed, shown under the attachment row. */
|
|
746
767
|
screenshotErrors: {
|
|
747
768
|
permission: string;
|