@mushi-mushi/web 1.28.0 → 1.30.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 +35 -6
- package/dist/chunks/display-capture-5ZJSTBUK.js +34 -0
- package/dist/chunks/display-capture-5ZJSTBUK.js.map +1 -0
- package/dist/chunks/screenshot-annotation-IG7C5B6Z.js +132 -0
- package/dist/chunks/screenshot-annotation-IG7C5B6Z.js.map +1 -0
- package/dist/headless.cjs +22 -12
- package/dist/headless.cjs.map +1 -1
- package/dist/headless.d.cts +3 -3
- package/dist/headless.d.ts +74 -4
- package/dist/headless.js +22 -12
- package/dist/headless.js.map +1 -1
- package/dist/i18n/index.cjs +84 -8
- package/dist/i18n/index.cjs.map +1 -1
- package/dist/i18n/index.d.cts +31 -0
- package/dist/i18n/index.d.ts +31 -0
- package/dist/i18n/index.js +84 -8
- package/dist/i18n/index.js.map +1 -1
- package/dist/index.cjs +2265 -3595
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +69 -8
- package/dist/index.d.ts +356 -11
- package/dist/index.js +1246 -2760
- package/dist/index.js.map +1 -1
- package/dist/mushi.loader.global.js +463 -2226
- package/dist/test-utils.cjs +173 -1
- package/dist/test-utils.cjs.map +1 -1
- package/dist/test-utils.js +173 -1
- package/dist/test-utils.js.map +1 -1
- package/dist/{timeline-BuqAn2FH.d.cts → timeline-B8nMyZyM.d.cts} +12 -2
- package/package.json +81 -33
- package/CODE_OF_CONDUCT.md +0 -51
- package/CONTRIBUTING.md +0 -226
- package/SECURITY.md +0 -359
- package/dist/mushi.loader.global.js.map +0 -1
- package/dist/timeline-BuqAn2FH.d.ts +0 -63
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { MushiConfig, MushiSDKInstance, MushiDiagnosticsResult, MushiReportCategory, MushiReporterReport, MushiReporterComment, MushiAssistantReply, MushiWidgetConfig, MushiLeaderboardEntry, MushiCrossAppReport, MushiTesterReputation, MushiApiCascadeConfig, MushiErrorFilter } from '@mushi-mushi/core';
|
|
2
2
|
export { MushiApiCascadeConfig, MushiConfig, MushiConsoleEntry, MushiDiagnosticsResult, MushiEnvironment, MushiEventHandler, MushiEventType, MushiNetworkEntry, MushiPerformanceMetrics, MushiReport, MushiReportCategory, MushiSDKInstance, MushiTimelineEntry, MushiTimelineKind, MushiUrlMatcher, MushiWidgetConfig } from '@mushi-mushi/core';
|
|
3
|
-
|
|
3
|
+
import { g as ScreenshotFailureReason } from './timeline-B8nMyZyM.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-B8nMyZyM.cjs';
|
|
4
5
|
export { MushiLocale, getAvailableLocales, getLocale } from './i18n/index.cjs';
|
|
5
6
|
|
|
6
7
|
declare class Mushi {
|
|
@@ -39,6 +40,8 @@ declare class Mushi {
|
|
|
39
40
|
*/
|
|
40
41
|
|
|
41
42
|
type WidgetStep = 'category' | 'intent' | 'details' | 'success' | 'reports' | 'report-detail' | 'leaderboard' | 'roadmap' | 'account' | 'cross-app-reports' | 'assistant';
|
|
43
|
+
/** Capture failure reasons plus 'permission' (a host screenshotProvider was denied). */
|
|
44
|
+
type ScreenshotErrorReason = ScreenshotFailureReason | 'permission';
|
|
42
45
|
interface WidgetRewardsState {
|
|
43
46
|
tier: {
|
|
44
47
|
slug: string;
|
|
@@ -92,7 +95,15 @@ interface WidgetCallbacks {
|
|
|
92
95
|
}): void | Promise<WidgetSubmitOutcome | void>;
|
|
93
96
|
onOpen(): void;
|
|
94
97
|
onClose(): void;
|
|
98
|
+
/** "Bug reports by Mushi" mark: impression once per widget instance, click per activation → loop_* events. */
|
|
99
|
+
onBrandFooterImpression?(): void;
|
|
100
|
+
onBrandFooterClick?(): void;
|
|
95
101
|
onScreenshotRequest(): void;
|
|
102
|
+
/**
|
|
103
|
+
* Present only when the browser supports getDisplayMedia. Must start the
|
|
104
|
+
* capture synchronously (the picker needs the click's user activation).
|
|
105
|
+
*/
|
|
106
|
+
onScreenshotShareTabRequest?(): void;
|
|
96
107
|
onScreenshotRemove?(): void;
|
|
97
108
|
/** Optional markup pass (highlight / blur / arrow) before submit. */
|
|
98
109
|
onScreenshotAnnotateRequest?(container: HTMLElement): void | Promise<void>;
|
|
@@ -163,6 +174,8 @@ declare class MushiWidget {
|
|
|
163
174
|
private screenshotAttached;
|
|
164
175
|
private screenshotCapturing;
|
|
165
176
|
private screenshotError;
|
|
177
|
+
/** Why the last capture failed; drives the actionable hint under the tools. */
|
|
178
|
+
private screenshotErrorReason;
|
|
166
179
|
private allowScreenshotRemove;
|
|
167
180
|
/**
|
|
168
181
|
* Whether the screenshot / element-select tools are actually usable
|
|
@@ -202,12 +215,27 @@ declare class MushiWidget {
|
|
|
202
215
|
private nudgeEl;
|
|
203
216
|
private nudgeTimer;
|
|
204
217
|
private sdkFreshness;
|
|
218
|
+
/** Brand-footer ref (SDK sets it once hashed) + once-per-instance impression latch. */
|
|
219
|
+
private brandRef;
|
|
220
|
+
private brandImpressionSent;
|
|
205
221
|
private reporterReports;
|
|
206
222
|
private featureBoard;
|
|
207
223
|
private reporterComments;
|
|
208
224
|
private selectedReportId;
|
|
209
|
-
|
|
225
|
+
/**
|
|
226
|
+
* One flag per surface. A single shared flag used to let a reply (or vote,
|
|
227
|
+
* or reopen) blank the thread it was posted from, and a failed reply
|
|
228
|
+
* replaced the conversation with its error.
|
|
229
|
+
*/
|
|
230
|
+
private listLoading;
|
|
231
|
+
private threadLoading;
|
|
232
|
+
private actionPending;
|
|
233
|
+
/** List / roadmap load error. */
|
|
210
234
|
private reporterError;
|
|
235
|
+
/** Thread (comments) load error — rendered with Try again. */
|
|
236
|
+
private threadError;
|
|
237
|
+
/** Reply / feedback / reopen / vote error — rendered beside the composer. */
|
|
238
|
+
private actionError;
|
|
211
239
|
private attachedLaunchers;
|
|
212
240
|
private smartHideCleanup;
|
|
213
241
|
private smartHideTimer;
|
|
@@ -215,12 +243,20 @@ declare class MushiWidget {
|
|
|
215
243
|
* ("REPORT · 14:23:07 JST") doesn't drift while the success step
|
|
216
244
|
* is on screen. */
|
|
217
245
|
private submittedAt;
|
|
218
|
-
/** Pending success-state
|
|
219
|
-
*
|
|
220
|
-
*
|
|
221
|
-
* root) for up to ~3.3s after destroy. */
|
|
246
|
+
/** Pending success-state timer. Tracked so destroy() can clear it —
|
|
247
|
+
* otherwise a host that unmounts mid-submit leaks this MushiWidget
|
|
248
|
+
* reference (and re-renders into a detached shadow root). */
|
|
222
249
|
private successTimer;
|
|
223
|
-
|
|
250
|
+
/**
|
|
251
|
+
* Set on pointerdown inside the panel. A background re-render (runtime
|
|
252
|
+
* config, rewards, inbox poll…) that lands between pointerdown and click
|
|
253
|
+
* replaces the button under the pointer, and the browser then drops the
|
|
254
|
+
* click — the first Submit "did nothing". render() defers while this is set
|
|
255
|
+
* (bounded, so a lost pointerup can't freeze the panel).
|
|
256
|
+
*/
|
|
257
|
+
private pointerDownAt;
|
|
258
|
+
private renderDeferred;
|
|
259
|
+
private readonly onPointerRelease;
|
|
224
260
|
private rewardsState;
|
|
225
261
|
private leaderboardEntries;
|
|
226
262
|
private leaderboardLoading;
|
|
@@ -335,7 +371,12 @@ declare class MushiWidget {
|
|
|
335
371
|
/** Surface a failed/cancelled element-selection attempt (mirrors setScreenshotError). */
|
|
336
372
|
setElementError(failed: boolean): void;
|
|
337
373
|
setScreenshotCapturing(capturing: boolean): void;
|
|
338
|
-
|
|
374
|
+
/**
|
|
375
|
+
* Flag (or clear) a failed capture. A call without a reason keeps the more
|
|
376
|
+
* specific one an earlier call recorded for the same attempt (the capture
|
|
377
|
+
* module reports 'taint'/'timeout' before the caller's generic failure).
|
|
378
|
+
*/
|
|
379
|
+
setScreenshotError(failed: boolean, reason?: ScreenshotErrorReason): void;
|
|
339
380
|
setElementCapturing(capturing: boolean): void;
|
|
340
381
|
/** Hide the widget panel (but keep the host element) during element selection
|
|
341
382
|
* so the user can click any element on the page without the panel
|
|
@@ -352,6 +393,7 @@ declare class MushiWidget {
|
|
|
352
393
|
deprecated: boolean;
|
|
353
394
|
message?: string | null;
|
|
354
395
|
}): void;
|
|
396
|
+
setBrandRef(ref: string | null): void;
|
|
355
397
|
setRewardsState(state: WidgetRewardsState | null): void;
|
|
356
398
|
setLeaderboard(entries: Array<{
|
|
357
399
|
display_name: string;
|
|
@@ -464,6 +506,12 @@ declare class MushiWidget {
|
|
|
464
506
|
/** Lift the panel above the software keyboard using visualViewport. */
|
|
465
507
|
private attachViewportHandlers;
|
|
466
508
|
private teardownViewportHandlers;
|
|
509
|
+
/**
|
|
510
|
+
* Copy mode for the details step. Feature mode covers both the ✨ shortcut
|
|
511
|
+
* and Other → "Feature request" intent (whose localized label is the first
|
|
512
|
+
* entry of step2.intents.other in every locale).
|
|
513
|
+
*/
|
|
514
|
+
private detailMode;
|
|
467
515
|
/**
|
|
468
516
|
* Minimum description length, lowered for CJK locales where each character
|
|
469
517
|
* carries more meaning. Used by both the view layer (via renderCtx) and the
|
|
@@ -483,12 +531,25 @@ declare class MushiWidget {
|
|
|
483
531
|
private unreadCount;
|
|
484
532
|
private loadFeatureBoard;
|
|
485
533
|
private voteFeatureBoard;
|
|
534
|
+
/**
|
|
535
|
+
* Run a thread action (reply / feedback / reopen) without leaving or
|
|
536
|
+
* blanking the thread: the conversation stays painted, the action button
|
|
537
|
+
* disables, and afterwards the status + comments refresh in place.
|
|
538
|
+
*/
|
|
539
|
+
private runThreadAction;
|
|
486
540
|
private submitReporterReopen;
|
|
487
541
|
/** Refresh My Reports data for unread badges without opening the inbox panel. */
|
|
488
542
|
refreshReporterInboxQuiet(): Promise<void>;
|
|
489
543
|
/** Patch the "Your reports (N new)" nav label in place, if it is rendered. */
|
|
490
544
|
private updateReportsBadgeText;
|
|
491
545
|
private loadReporterReports;
|
|
546
|
+
/** "Track this report" on the success step → that report's thread in My Reports. */
|
|
547
|
+
private openTrackedReport;
|
|
548
|
+
/**
|
|
549
|
+
* Open (or refresh) a thread. The header + summary paint immediately from
|
|
550
|
+
* the in-memory report; only the comment list shows a skeleton while it
|
|
551
|
+
* loads. `quiet` keeps the current comments on screen (post-action refresh).
|
|
552
|
+
*/
|
|
492
553
|
private loadReporterComments;
|
|
493
554
|
private submitReporterFeedback;
|
|
494
555
|
private submitReporterReply;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { MushiConfig, MushiSDKInstance, MushiDiagnosticsResult, MushiReportCategory, MushiReporterReport, MushiReporterComment, MushiAssistantReply, MushiWidgetConfig, MushiLeaderboardEntry, MushiCrossAppReport, MushiTesterReputation, MushiApiCascadeConfig, MushiErrorFilter } from '@mushi-mushi/core';
|
|
1
|
+
import { MushiConfig, MushiSDKInstance, MushiDiagnosticsResult, MushiPrivacyConfig, MushiReportCategory, MushiReporterReport, MushiReporterComment, MushiAssistantReply, MushiWidgetConfig, MushiLeaderboardEntry, MushiCrossAppReport, MushiTesterReputation, MushiConsoleEntry, MushiNetworkEntry, MushiUrlMatcher, MushiTracePropagationConfig, MushiPerformanceMetrics, MushiSelectedElement, MushiTimelineEntry, MushiApiCascadeConfig, MushiErrorFilter } from '@mushi-mushi/core';
|
|
2
2
|
export { MushiApiCascadeConfig, MushiConfig, MushiConsoleEntry, MushiDiagnosticsResult, MushiEnvironment, MushiEventHandler, MushiEventType, MushiNetworkEntry, MushiPerformanceMetrics, MushiReport, MushiReportCategory, MushiSDKInstance, MushiTimelineEntry, MushiTimelineKind, MushiUrlMatcher, MushiWidgetConfig } from '@mushi-mushi/core';
|
|
3
|
-
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-BuqAn2FH.js';
|
|
4
|
-
export { MushiLocale, getAvailableLocales, getLocale } from './i18n/index.js';
|
|
5
3
|
|
|
6
4
|
declare class Mushi {
|
|
7
5
|
private constructor();
|
|
@@ -11,6 +9,27 @@ declare class Mushi {
|
|
|
11
9
|
static diagnose(): Promise<MushiDiagnosticsResult>;
|
|
12
10
|
}
|
|
13
11
|
|
|
12
|
+
interface ScreenshotCapture {
|
|
13
|
+
take(): Promise<string | null>;
|
|
14
|
+
updateOptions(options: ScreenshotCaptureOptions): void;
|
|
15
|
+
}
|
|
16
|
+
interface ScreenshotCaptureOptions {
|
|
17
|
+
privacy?: MushiPrivacyConfig;
|
|
18
|
+
/** Callback invoked when capture fails (taint, security policy, etc.). */
|
|
19
|
+
onFailed?: (reason: ScreenshotFailureReason) => void;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Why a capture produced no image. Also the `detail.reason` of the
|
|
23
|
+
* `mushi:screenshot_failed` document event.
|
|
24
|
+
* - taint: cross-origin content made the canvas unreadable
|
|
25
|
+
* - timeout: the SVG never loaded or errored within 5 s
|
|
26
|
+
* - unsupported: no 2D canvas, or the engine rasterised nothing (WebKit)
|
|
27
|
+
* - csp: the host's Content-Security-Policy img-src blocks data: images
|
|
28
|
+
* - error: anything else
|
|
29
|
+
*/
|
|
30
|
+
type ScreenshotFailureReason = 'taint' | 'timeout' | 'unsupported' | 'csp' | 'error';
|
|
31
|
+
declare function createScreenshotCapture(options?: ScreenshotCaptureOptions): ScreenshotCapture;
|
|
32
|
+
|
|
14
33
|
/**
|
|
15
34
|
* FILE: packages/web/src/widget-helpers.ts
|
|
16
35
|
* PURPOSE: Stateless helpers, constants, and shared types for the bug-capture
|
|
@@ -39,6 +58,8 @@ declare class Mushi {
|
|
|
39
58
|
*/
|
|
40
59
|
|
|
41
60
|
type WidgetStep = 'category' | 'intent' | 'details' | 'success' | 'reports' | 'report-detail' | 'leaderboard' | 'roadmap' | 'account' | 'cross-app-reports' | 'assistant';
|
|
61
|
+
/** Capture failure reasons plus 'permission' (a host screenshotProvider was denied). */
|
|
62
|
+
type ScreenshotErrorReason = ScreenshotFailureReason | 'permission';
|
|
42
63
|
interface WidgetRewardsState {
|
|
43
64
|
tier: {
|
|
44
65
|
slug: string;
|
|
@@ -92,7 +113,15 @@ interface WidgetCallbacks {
|
|
|
92
113
|
}): void | Promise<WidgetSubmitOutcome | void>;
|
|
93
114
|
onOpen(): void;
|
|
94
115
|
onClose(): void;
|
|
116
|
+
/** "Bug reports by Mushi" mark: impression once per widget instance, click per activation → loop_* events. */
|
|
117
|
+
onBrandFooterImpression?(): void;
|
|
118
|
+
onBrandFooterClick?(): void;
|
|
95
119
|
onScreenshotRequest(): void;
|
|
120
|
+
/**
|
|
121
|
+
* Present only when the browser supports getDisplayMedia. Must start the
|
|
122
|
+
* capture synchronously (the picker needs the click's user activation).
|
|
123
|
+
*/
|
|
124
|
+
onScreenshotShareTabRequest?(): void;
|
|
96
125
|
onScreenshotRemove?(): void;
|
|
97
126
|
/** Optional markup pass (highlight / blur / arrow) before submit. */
|
|
98
127
|
onScreenshotAnnotateRequest?(container: HTMLElement): void | Promise<void>;
|
|
@@ -163,6 +192,8 @@ declare class MushiWidget {
|
|
|
163
192
|
private screenshotAttached;
|
|
164
193
|
private screenshotCapturing;
|
|
165
194
|
private screenshotError;
|
|
195
|
+
/** Why the last capture failed; drives the actionable hint under the tools. */
|
|
196
|
+
private screenshotErrorReason;
|
|
166
197
|
private allowScreenshotRemove;
|
|
167
198
|
/**
|
|
168
199
|
* Whether the screenshot / element-select tools are actually usable
|
|
@@ -202,12 +233,27 @@ declare class MushiWidget {
|
|
|
202
233
|
private nudgeEl;
|
|
203
234
|
private nudgeTimer;
|
|
204
235
|
private sdkFreshness;
|
|
236
|
+
/** Brand-footer ref (SDK sets it once hashed) + once-per-instance impression latch. */
|
|
237
|
+
private brandRef;
|
|
238
|
+
private brandImpressionSent;
|
|
205
239
|
private reporterReports;
|
|
206
240
|
private featureBoard;
|
|
207
241
|
private reporterComments;
|
|
208
242
|
private selectedReportId;
|
|
209
|
-
|
|
243
|
+
/**
|
|
244
|
+
* One flag per surface. A single shared flag used to let a reply (or vote,
|
|
245
|
+
* or reopen) blank the thread it was posted from, and a failed reply
|
|
246
|
+
* replaced the conversation with its error.
|
|
247
|
+
*/
|
|
248
|
+
private listLoading;
|
|
249
|
+
private threadLoading;
|
|
250
|
+
private actionPending;
|
|
251
|
+
/** List / roadmap load error. */
|
|
210
252
|
private reporterError;
|
|
253
|
+
/** Thread (comments) load error — rendered with Try again. */
|
|
254
|
+
private threadError;
|
|
255
|
+
/** Reply / feedback / reopen / vote error — rendered beside the composer. */
|
|
256
|
+
private actionError;
|
|
211
257
|
private attachedLaunchers;
|
|
212
258
|
private smartHideCleanup;
|
|
213
259
|
private smartHideTimer;
|
|
@@ -215,12 +261,20 @@ declare class MushiWidget {
|
|
|
215
261
|
* ("REPORT · 14:23:07 JST") doesn't drift while the success step
|
|
216
262
|
* is on screen. */
|
|
217
263
|
private submittedAt;
|
|
218
|
-
/** Pending success-state
|
|
219
|
-
*
|
|
220
|
-
*
|
|
221
|
-
* root) for up to ~3.3s after destroy. */
|
|
264
|
+
/** Pending success-state timer. Tracked so destroy() can clear it —
|
|
265
|
+
* otherwise a host that unmounts mid-submit leaks this MushiWidget
|
|
266
|
+
* reference (and re-renders into a detached shadow root). */
|
|
222
267
|
private successTimer;
|
|
223
|
-
|
|
268
|
+
/**
|
|
269
|
+
* Set on pointerdown inside the panel. A background re-render (runtime
|
|
270
|
+
* config, rewards, inbox poll…) that lands between pointerdown and click
|
|
271
|
+
* replaces the button under the pointer, and the browser then drops the
|
|
272
|
+
* click — the first Submit "did nothing". render() defers while this is set
|
|
273
|
+
* (bounded, so a lost pointerup can't freeze the panel).
|
|
274
|
+
*/
|
|
275
|
+
private pointerDownAt;
|
|
276
|
+
private renderDeferred;
|
|
277
|
+
private readonly onPointerRelease;
|
|
224
278
|
private rewardsState;
|
|
225
279
|
private leaderboardEntries;
|
|
226
280
|
private leaderboardLoading;
|
|
@@ -335,7 +389,12 @@ declare class MushiWidget {
|
|
|
335
389
|
/** Surface a failed/cancelled element-selection attempt (mirrors setScreenshotError). */
|
|
336
390
|
setElementError(failed: boolean): void;
|
|
337
391
|
setScreenshotCapturing(capturing: boolean): void;
|
|
338
|
-
|
|
392
|
+
/**
|
|
393
|
+
* Flag (or clear) a failed capture. A call without a reason keeps the more
|
|
394
|
+
* specific one an earlier call recorded for the same attempt (the capture
|
|
395
|
+
* module reports 'taint'/'timeout' before the caller's generic failure).
|
|
396
|
+
*/
|
|
397
|
+
setScreenshotError(failed: boolean, reason?: ScreenshotErrorReason): void;
|
|
339
398
|
setElementCapturing(capturing: boolean): void;
|
|
340
399
|
/** Hide the widget panel (but keep the host element) during element selection
|
|
341
400
|
* so the user can click any element on the page without the panel
|
|
@@ -352,6 +411,7 @@ declare class MushiWidget {
|
|
|
352
411
|
deprecated: boolean;
|
|
353
412
|
message?: string | null;
|
|
354
413
|
}): void;
|
|
414
|
+
setBrandRef(ref: string | null): void;
|
|
355
415
|
setRewardsState(state: WidgetRewardsState | null): void;
|
|
356
416
|
setLeaderboard(entries: Array<{
|
|
357
417
|
display_name: string;
|
|
@@ -464,6 +524,12 @@ declare class MushiWidget {
|
|
|
464
524
|
/** Lift the panel above the software keyboard using visualViewport. */
|
|
465
525
|
private attachViewportHandlers;
|
|
466
526
|
private teardownViewportHandlers;
|
|
527
|
+
/**
|
|
528
|
+
* Copy mode for the details step. Feature mode covers both the ✨ shortcut
|
|
529
|
+
* and Other → "Feature request" intent (whose localized label is the first
|
|
530
|
+
* entry of step2.intents.other in every locale).
|
|
531
|
+
*/
|
|
532
|
+
private detailMode;
|
|
467
533
|
/**
|
|
468
534
|
* Minimum description length, lowered for CJK locales where each character
|
|
469
535
|
* carries more meaning. Used by both the view layer (via renderCtx) and the
|
|
@@ -483,12 +549,25 @@ declare class MushiWidget {
|
|
|
483
549
|
private unreadCount;
|
|
484
550
|
private loadFeatureBoard;
|
|
485
551
|
private voteFeatureBoard;
|
|
552
|
+
/**
|
|
553
|
+
* Run a thread action (reply / feedback / reopen) without leaving or
|
|
554
|
+
* blanking the thread: the conversation stays painted, the action button
|
|
555
|
+
* disables, and afterwards the status + comments refresh in place.
|
|
556
|
+
*/
|
|
557
|
+
private runThreadAction;
|
|
486
558
|
private submitReporterReopen;
|
|
487
559
|
/** Refresh My Reports data for unread badges without opening the inbox panel. */
|
|
488
560
|
refreshReporterInboxQuiet(): Promise<void>;
|
|
489
561
|
/** Patch the "Your reports (N new)" nav label in place, if it is rendered. */
|
|
490
562
|
private updateReportsBadgeText;
|
|
491
563
|
private loadReporterReports;
|
|
564
|
+
/** "Track this report" on the success step → that report's thread in My Reports. */
|
|
565
|
+
private openTrackedReport;
|
|
566
|
+
/**
|
|
567
|
+
* Open (or refresh) a thread. The header + summary paint immediately from
|
|
568
|
+
* the in-memory report; only the comment list shows a skeleton while it
|
|
569
|
+
* loads. `quiet` keeps the current comments on screen (post-action refresh).
|
|
570
|
+
*/
|
|
492
571
|
private loadReporterComments;
|
|
493
572
|
private submitReporterFeedback;
|
|
494
573
|
private submitReporterReply;
|
|
@@ -518,6 +597,272 @@ declare class MushiWidget {
|
|
|
518
597
|
recorderOpenMyReports(): void;
|
|
519
598
|
}
|
|
520
599
|
|
|
600
|
+
interface ConsoleCapture {
|
|
601
|
+
getEntries(): MushiConsoleEntry[];
|
|
602
|
+
clear(): void;
|
|
603
|
+
destroy(): void;
|
|
604
|
+
}
|
|
605
|
+
declare function createConsoleCapture(): ConsoleCapture;
|
|
606
|
+
|
|
607
|
+
interface NetworkCapture {
|
|
608
|
+
getEntries(): MushiNetworkEntry[];
|
|
609
|
+
clear(): void;
|
|
610
|
+
updateOptions(options: NetworkCaptureOptions): void;
|
|
611
|
+
destroy(): void;
|
|
612
|
+
}
|
|
613
|
+
interface NetworkCaptureOptions {
|
|
614
|
+
apiEndpoint?: string;
|
|
615
|
+
ignoreUrls?: MushiUrlMatcher[];
|
|
616
|
+
tracePropagation?: MushiTracePropagationConfig;
|
|
617
|
+
sessionId?: string;
|
|
618
|
+
}
|
|
619
|
+
declare function createNetworkCapture(options?: NetworkCaptureOptions): NetworkCapture;
|
|
620
|
+
|
|
621
|
+
interface PerformanceCapture {
|
|
622
|
+
getMetrics(): MushiPerformanceMetrics;
|
|
623
|
+
destroy(): void;
|
|
624
|
+
}
|
|
625
|
+
declare function createPerformanceCapture(): PerformanceCapture;
|
|
626
|
+
|
|
627
|
+
interface ElementSelector {
|
|
628
|
+
activate(): Promise<MushiSelectedElement | null>;
|
|
629
|
+
deactivate(): void;
|
|
630
|
+
isActive(): boolean;
|
|
631
|
+
}
|
|
632
|
+
declare function createElementSelector(): ElementSelector;
|
|
633
|
+
|
|
634
|
+
interface TimelineCapture {
|
|
635
|
+
setScreen(screen: {
|
|
636
|
+
name: string;
|
|
637
|
+
route?: string;
|
|
638
|
+
feature?: string;
|
|
639
|
+
}): void;
|
|
640
|
+
getEntries(input?: {
|
|
641
|
+
consoleLogs?: MushiConsoleEntry[] | null;
|
|
642
|
+
networkLogs?: MushiNetworkEntry[] | null;
|
|
643
|
+
}): MushiTimelineEntry[];
|
|
644
|
+
clear(): void;
|
|
645
|
+
destroy(): void;
|
|
646
|
+
}
|
|
647
|
+
declare function createTimelineCapture(): TimelineCapture;
|
|
648
|
+
|
|
649
|
+
interface MushiLocale {
|
|
650
|
+
widget: {
|
|
651
|
+
trigger: string;
|
|
652
|
+
title: string;
|
|
653
|
+
close: string;
|
|
654
|
+
back: string;
|
|
655
|
+
submit: string;
|
|
656
|
+
submitting: string;
|
|
657
|
+
submitted: string;
|
|
658
|
+
error: string;
|
|
659
|
+
};
|
|
660
|
+
step1: {
|
|
661
|
+
heading: string;
|
|
662
|
+
/** Section label above the primary report categories. */
|
|
663
|
+
reportSectionLabel: string;
|
|
664
|
+
/** Collapsible overflow nav for inbox, assistant, community, etc. */
|
|
665
|
+
moreNavLabel: string;
|
|
666
|
+
moreNav: {
|
|
667
|
+
yourReports: string;
|
|
668
|
+
yourReportsDesc: string;
|
|
669
|
+
unreadNew: string;
|
|
670
|
+
communityIdeas: string;
|
|
671
|
+
communityIdeasDesc: string;
|
|
672
|
+
leaderboard: string;
|
|
673
|
+
joinCommunity: string;
|
|
674
|
+
myAccount: string;
|
|
675
|
+
};
|
|
676
|
+
categories: Record<MushiReportCategory, string>;
|
|
677
|
+
categoryDescriptions: Record<MushiReportCategory, string>;
|
|
678
|
+
/** Progressive-disclosure toggle under the primary category card. */
|
|
679
|
+
moreCategoriesLabel: string;
|
|
680
|
+
/** Hidden-category count on the toggle; `{n}` placeholder. */
|
|
681
|
+
moreCategoriesCount: string;
|
|
682
|
+
};
|
|
683
|
+
step2: {
|
|
684
|
+
heading: string;
|
|
685
|
+
intents: Record<MushiReportCategory, string[]>;
|
|
686
|
+
};
|
|
687
|
+
step3: {
|
|
688
|
+
heading: string;
|
|
689
|
+
descriptionPlaceholder: string;
|
|
690
|
+
/** Placeholder + starter chips when the reporter is suggesting a feature. */
|
|
691
|
+
featurePlaceholder: string;
|
|
692
|
+
featureExamples: string[];
|
|
693
|
+
/** Placeholder for the "Other" category (no starter chips). */
|
|
694
|
+
otherPlaceholder: string;
|
|
695
|
+
/** Footer shortcut hint; `{key}` is ⌘ on Apple platforms, Ctrl elsewhere. */
|
|
696
|
+
submitHint: string;
|
|
697
|
+
/** Counter text below the minimum length; `{n}` = characters still needed. */
|
|
698
|
+
charsNeeded: string;
|
|
699
|
+
screenshotButton: string;
|
|
700
|
+
screenshotAttached: string;
|
|
701
|
+
screenshotCapturing: string;
|
|
702
|
+
/** @deprecated The web widget now shows `screenshotRetry` + `screenshotErrors`; kept for type compatibility. */
|
|
703
|
+
screenshotFailed: string;
|
|
704
|
+
/** Screenshot button label after a failed capture. */
|
|
705
|
+
screenshotRetry: string;
|
|
706
|
+
/** Offered after a failed capture: user-consented tab share (getDisplayMedia). */
|
|
707
|
+
screenshotShareTab: string;
|
|
708
|
+
/** Why the last capture failed, shown under the attachment row. */
|
|
709
|
+
screenshotErrors: {
|
|
710
|
+
permission: string;
|
|
711
|
+
unsupported: string;
|
|
712
|
+
taint: string;
|
|
713
|
+
timeout: string;
|
|
714
|
+
csp: string;
|
|
715
|
+
error: string;
|
|
716
|
+
};
|
|
717
|
+
/** Alt text for the attached-screenshot preview image. */
|
|
718
|
+
screenshotPreviewAlt: string;
|
|
719
|
+
/** Default privacy caption shown beside the screenshot preview. */
|
|
720
|
+
screenshotSensitiveHint: string;
|
|
721
|
+
elementButton: string;
|
|
722
|
+
elementSelected: string;
|
|
723
|
+
elementCapturing: string;
|
|
724
|
+
elementFailed: string;
|
|
725
|
+
elementSelectorHint: string;
|
|
726
|
+
optional: string;
|
|
727
|
+
/** Inline validation: description is below the minimum length. */
|
|
728
|
+
tooShort: string;
|
|
729
|
+
/** Example starter chips rendered above the textarea to lower the barrier. */
|
|
730
|
+
examplePrompts: string[];
|
|
731
|
+
};
|
|
732
|
+
assistant: {
|
|
733
|
+
defaultLabel: string;
|
|
734
|
+
defaultGreeting: string;
|
|
735
|
+
inputPlaceholder: string;
|
|
736
|
+
sendAriaLabel: string;
|
|
737
|
+
hubDescription: string;
|
|
738
|
+
thinking: string;
|
|
739
|
+
/** Primary recovery CTA when Ask cannot resolve (clarify / error). */
|
|
740
|
+
fileReportCta: string;
|
|
741
|
+
/** Softer footer escape when the thread already has turns. */
|
|
742
|
+
stillStuckCta: string;
|
|
743
|
+
errors: {
|
|
744
|
+
noResponse: string;
|
|
745
|
+
generic: string;
|
|
746
|
+
};
|
|
747
|
+
};
|
|
748
|
+
flows: {
|
|
749
|
+
eyebrows: {
|
|
750
|
+
inbox: string;
|
|
751
|
+
roadmap: string;
|
|
752
|
+
community: string;
|
|
753
|
+
identity: string;
|
|
754
|
+
signIn: string;
|
|
755
|
+
allApps: string;
|
|
756
|
+
receipt: string;
|
|
757
|
+
thread: string;
|
|
758
|
+
};
|
|
759
|
+
reports: {
|
|
760
|
+
title: string;
|
|
761
|
+
loading: string;
|
|
762
|
+
empty: string;
|
|
763
|
+
leaderboardLink: string;
|
|
764
|
+
};
|
|
765
|
+
roadmap: {
|
|
766
|
+
title: string;
|
|
767
|
+
loading: string;
|
|
768
|
+
empty: string;
|
|
769
|
+
shipped: string;
|
|
770
|
+
vote: string;
|
|
771
|
+
voted: string;
|
|
772
|
+
voteCount: string;
|
|
773
|
+
untitled: string;
|
|
774
|
+
};
|
|
775
|
+
leaderboard: {
|
|
776
|
+
title: string;
|
|
777
|
+
loading: string;
|
|
778
|
+
empty: string;
|
|
779
|
+
signInPrompt: string;
|
|
780
|
+
myRank: string;
|
|
781
|
+
footer: string;
|
|
782
|
+
anon: string;
|
|
783
|
+
};
|
|
784
|
+
account: {
|
|
785
|
+
title: string;
|
|
786
|
+
checkEmailTitle: string;
|
|
787
|
+
joinTitle: string;
|
|
788
|
+
emailLabel: string;
|
|
789
|
+
emailPlaceholder: string;
|
|
790
|
+
signInPrompt: string;
|
|
791
|
+
magicLinkSent: string;
|
|
792
|
+
resendEmail: string;
|
|
793
|
+
sendLink: string;
|
|
794
|
+
sending: string;
|
|
795
|
+
crossAppReports: string;
|
|
796
|
+
viewLeaderboard: string;
|
|
797
|
+
signOut: string;
|
|
798
|
+
rankSummary: string;
|
|
799
|
+
};
|
|
800
|
+
crossApp: {
|
|
801
|
+
title: string;
|
|
802
|
+
loading: string;
|
|
803
|
+
empty: string;
|
|
804
|
+
unknownApp: string;
|
|
805
|
+
};
|
|
806
|
+
thread: {
|
|
807
|
+
title: string;
|
|
808
|
+
loading: string;
|
|
809
|
+
empty: string;
|
|
810
|
+
confirmFixed: string;
|
|
811
|
+
notFixed: string;
|
|
812
|
+
replyPlaceholder: string;
|
|
813
|
+
send: string;
|
|
814
|
+
/** Thread fetch failed or timed out; shown with a retry button. */
|
|
815
|
+
loadFailed: string;
|
|
816
|
+
retry: string;
|
|
817
|
+
};
|
|
818
|
+
success: {
|
|
819
|
+
/** Panel title once the report is accepted or delivering. */
|
|
820
|
+
title: string;
|
|
821
|
+
/** Closes the panel from the success step. */
|
|
822
|
+
done: string;
|
|
823
|
+
trackReport: string;
|
|
824
|
+
receipt: string;
|
|
825
|
+
delivering: string;
|
|
826
|
+
queuedOffline: string;
|
|
827
|
+
queuedHint: string;
|
|
828
|
+
rateLimited: string;
|
|
829
|
+
rateLimitedHint: string;
|
|
830
|
+
quotaBlocked: string;
|
|
831
|
+
quotaBlockedHint: string;
|
|
832
|
+
permanentFailed: string;
|
|
833
|
+
permanentFailedHint: string;
|
|
834
|
+
retrying: string;
|
|
835
|
+
retryingHint: string;
|
|
836
|
+
trackOnMushi: string;
|
|
837
|
+
slaDefault: string;
|
|
838
|
+
screenshotDropped: string;
|
|
839
|
+
};
|
|
840
|
+
featureRequest: {
|
|
841
|
+
label: string;
|
|
842
|
+
description: string;
|
|
843
|
+
};
|
|
844
|
+
/** Beta-mode strip on the category step. */
|
|
845
|
+
betaStrip: {
|
|
846
|
+
/** Default status line when the host sets no message; `{appName}` placeholder. */
|
|
847
|
+
defaultMessage: string;
|
|
848
|
+
/** Where reports land; `{email}` placeholder. */
|
|
849
|
+
contactHint: string;
|
|
850
|
+
/** aria-label for the strip. */
|
|
851
|
+
ariaLabel: string;
|
|
852
|
+
};
|
|
853
|
+
/** Collapsible changelog row (beta mode). */
|
|
854
|
+
changelog: {
|
|
855
|
+
/** `{version}` placeholder. */
|
|
856
|
+
whatsNew: string;
|
|
857
|
+
};
|
|
858
|
+
/** Link text of the "Bug reports by Mushi" mark (widget.brandFooter). No placeholders. */
|
|
859
|
+
poweredBy: string;
|
|
860
|
+
};
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
declare function getLocale(code?: string): MushiLocale;
|
|
864
|
+
declare function getAvailableLocales(): string[];
|
|
865
|
+
|
|
521
866
|
/**
|
|
522
867
|
* FILE: packages/web/src/build-widget-theme.ts
|
|
523
868
|
* PURPOSE: Resolve Shadow-DOM CSS variables from @mushi-mushi/core tokens.
|
|
@@ -690,4 +1035,4 @@ interface ProactiveTriggerCleanup {
|
|
|
690
1035
|
}
|
|
691
1036
|
declare function setupProactiveTriggers(callbacks: ProactiveTriggerCallbacks, config?: ProactiveTriggerConfig): ProactiveTriggerCleanup;
|
|
692
1037
|
|
|
693
|
-
export { Mushi, MushiWidget, type ProactiveConfig, type ProactiveManager, type ProactiveTriggerCallbacks, type ProactiveTriggerCleanup, type WidgetThemeVars, createProactiveManager, getWidgetPreviewTokens, getWidgetThemeVars, setupProactiveTriggers };
|
|
1038
|
+
export { type ConsoleCapture, type ElementSelector, Mushi, type MushiLocale, MushiWidget, type NetworkCapture, type PerformanceCapture, type ProactiveConfig, type ProactiveManager, type ProactiveTriggerCallbacks, type ProactiveTriggerCleanup, type ScreenshotCapture, type TimelineCapture, type WidgetThemeVars, createConsoleCapture, createElementSelector, createNetworkCapture, createPerformanceCapture, createProactiveManager, createScreenshotCapture, createTimelineCapture, getAvailableLocales, getLocale, getWidgetPreviewTokens, getWidgetThemeVars, setupProactiveTriggers };
|