@mushi-mushi/web 1.29.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 +1 -1
- 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 +1 -1
- package/dist/headless.d.ts +72 -2
- package/dist/headless.js +22 -12
- package/dist/headless.js.map +1 -1
- package/dist/i18n/index.cjs +80 -4
- package/dist/i18n/index.cjs.map +1 -1
- package/dist/i18n/index.d.cts +30 -0
- package/dist/i18n/index.d.ts +30 -0
- package/dist/i18n/index.js +80 -4
- package/dist/i18n/index.js.map +1 -1
- package/dist/index.cjs +2144 -3592
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +62 -8
- package/dist/index.d.ts +349 -11
- package/dist/index.js +1151 -2783
- package/dist/index.js.map +1 -1
- package/dist/mushi.loader.global.js +471 -2246
- 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 +10 -4
- 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;
|
|
@@ -96,6 +99,11 @@ interface WidgetCallbacks {
|
|
|
96
99
|
onBrandFooterImpression?(): void;
|
|
97
100
|
onBrandFooterClick?(): void;
|
|
98
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;
|
|
99
107
|
onScreenshotRemove?(): void;
|
|
100
108
|
/** Optional markup pass (highlight / blur / arrow) before submit. */
|
|
101
109
|
onScreenshotAnnotateRequest?(container: HTMLElement): void | Promise<void>;
|
|
@@ -166,6 +174,8 @@ declare class MushiWidget {
|
|
|
166
174
|
private screenshotAttached;
|
|
167
175
|
private screenshotCapturing;
|
|
168
176
|
private screenshotError;
|
|
177
|
+
/** Why the last capture failed; drives the actionable hint under the tools. */
|
|
178
|
+
private screenshotErrorReason;
|
|
169
179
|
private allowScreenshotRemove;
|
|
170
180
|
/**
|
|
171
181
|
* Whether the screenshot / element-select tools are actually usable
|
|
@@ -212,8 +222,20 @@ declare class MushiWidget {
|
|
|
212
222
|
private featureBoard;
|
|
213
223
|
private reporterComments;
|
|
214
224
|
private selectedReportId;
|
|
215
|
-
|
|
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. */
|
|
216
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;
|
|
217
239
|
private attachedLaunchers;
|
|
218
240
|
private smartHideCleanup;
|
|
219
241
|
private smartHideTimer;
|
|
@@ -221,12 +243,20 @@ declare class MushiWidget {
|
|
|
221
243
|
* ("REPORT · 14:23:07 JST") doesn't drift while the success step
|
|
222
244
|
* is on screen. */
|
|
223
245
|
private submittedAt;
|
|
224
|
-
/** Pending success-state
|
|
225
|
-
*
|
|
226
|
-
*
|
|
227
|
-
* 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). */
|
|
228
249
|
private successTimer;
|
|
229
|
-
|
|
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;
|
|
230
260
|
private rewardsState;
|
|
231
261
|
private leaderboardEntries;
|
|
232
262
|
private leaderboardLoading;
|
|
@@ -341,7 +371,12 @@ declare class MushiWidget {
|
|
|
341
371
|
/** Surface a failed/cancelled element-selection attempt (mirrors setScreenshotError). */
|
|
342
372
|
setElementError(failed: boolean): void;
|
|
343
373
|
setScreenshotCapturing(capturing: boolean): void;
|
|
344
|
-
|
|
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;
|
|
345
380
|
setElementCapturing(capturing: boolean): void;
|
|
346
381
|
/** Hide the widget panel (but keep the host element) during element selection
|
|
347
382
|
* so the user can click any element on the page without the panel
|
|
@@ -471,6 +506,12 @@ declare class MushiWidget {
|
|
|
471
506
|
/** Lift the panel above the software keyboard using visualViewport. */
|
|
472
507
|
private attachViewportHandlers;
|
|
473
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;
|
|
474
515
|
/**
|
|
475
516
|
* Minimum description length, lowered for CJK locales where each character
|
|
476
517
|
* carries more meaning. Used by both the view layer (via renderCtx) and the
|
|
@@ -490,12 +531,25 @@ declare class MushiWidget {
|
|
|
490
531
|
private unreadCount;
|
|
491
532
|
private loadFeatureBoard;
|
|
492
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;
|
|
493
540
|
private submitReporterReopen;
|
|
494
541
|
/** Refresh My Reports data for unread badges without opening the inbox panel. */
|
|
495
542
|
refreshReporterInboxQuiet(): Promise<void>;
|
|
496
543
|
/** Patch the "Your reports (N new)" nav label in place, if it is rendered. */
|
|
497
544
|
private updateReportsBadgeText;
|
|
498
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
|
+
*/
|
|
499
553
|
private loadReporterComments;
|
|
500
554
|
private submitReporterFeedback;
|
|
501
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;
|
|
@@ -96,6 +117,11 @@ interface WidgetCallbacks {
|
|
|
96
117
|
onBrandFooterImpression?(): void;
|
|
97
118
|
onBrandFooterClick?(): void;
|
|
98
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;
|
|
99
125
|
onScreenshotRemove?(): void;
|
|
100
126
|
/** Optional markup pass (highlight / blur / arrow) before submit. */
|
|
101
127
|
onScreenshotAnnotateRequest?(container: HTMLElement): void | Promise<void>;
|
|
@@ -166,6 +192,8 @@ declare class MushiWidget {
|
|
|
166
192
|
private screenshotAttached;
|
|
167
193
|
private screenshotCapturing;
|
|
168
194
|
private screenshotError;
|
|
195
|
+
/** Why the last capture failed; drives the actionable hint under the tools. */
|
|
196
|
+
private screenshotErrorReason;
|
|
169
197
|
private allowScreenshotRemove;
|
|
170
198
|
/**
|
|
171
199
|
* Whether the screenshot / element-select tools are actually usable
|
|
@@ -212,8 +240,20 @@ declare class MushiWidget {
|
|
|
212
240
|
private featureBoard;
|
|
213
241
|
private reporterComments;
|
|
214
242
|
private selectedReportId;
|
|
215
|
-
|
|
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. */
|
|
216
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;
|
|
217
257
|
private attachedLaunchers;
|
|
218
258
|
private smartHideCleanup;
|
|
219
259
|
private smartHideTimer;
|
|
@@ -221,12 +261,20 @@ declare class MushiWidget {
|
|
|
221
261
|
* ("REPORT · 14:23:07 JST") doesn't drift while the success step
|
|
222
262
|
* is on screen. */
|
|
223
263
|
private submittedAt;
|
|
224
|
-
/** Pending success-state
|
|
225
|
-
*
|
|
226
|
-
*
|
|
227
|
-
* 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). */
|
|
228
267
|
private successTimer;
|
|
229
|
-
|
|
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;
|
|
230
278
|
private rewardsState;
|
|
231
279
|
private leaderboardEntries;
|
|
232
280
|
private leaderboardLoading;
|
|
@@ -341,7 +389,12 @@ declare class MushiWidget {
|
|
|
341
389
|
/** Surface a failed/cancelled element-selection attempt (mirrors setScreenshotError). */
|
|
342
390
|
setElementError(failed: boolean): void;
|
|
343
391
|
setScreenshotCapturing(capturing: boolean): void;
|
|
344
|
-
|
|
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;
|
|
345
398
|
setElementCapturing(capturing: boolean): void;
|
|
346
399
|
/** Hide the widget panel (but keep the host element) during element selection
|
|
347
400
|
* so the user can click any element on the page without the panel
|
|
@@ -471,6 +524,12 @@ declare class MushiWidget {
|
|
|
471
524
|
/** Lift the panel above the software keyboard using visualViewport. */
|
|
472
525
|
private attachViewportHandlers;
|
|
473
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;
|
|
474
533
|
/**
|
|
475
534
|
* Minimum description length, lowered for CJK locales where each character
|
|
476
535
|
* carries more meaning. Used by both the view layer (via renderCtx) and the
|
|
@@ -490,12 +549,25 @@ declare class MushiWidget {
|
|
|
490
549
|
private unreadCount;
|
|
491
550
|
private loadFeatureBoard;
|
|
492
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;
|
|
493
558
|
private submitReporterReopen;
|
|
494
559
|
/** Refresh My Reports data for unread badges without opening the inbox panel. */
|
|
495
560
|
refreshReporterInboxQuiet(): Promise<void>;
|
|
496
561
|
/** Patch the "Your reports (N new)" nav label in place, if it is rendered. */
|
|
497
562
|
private updateReportsBadgeText;
|
|
498
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
|
+
*/
|
|
499
571
|
private loadReporterComments;
|
|
500
572
|
private submitReporterFeedback;
|
|
501
573
|
private submitReporterReply;
|
|
@@ -525,6 +597,272 @@ declare class MushiWidget {
|
|
|
525
597
|
recorderOpenMyReports(): void;
|
|
526
598
|
}
|
|
527
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
|
+
|
|
528
866
|
/**
|
|
529
867
|
* FILE: packages/web/src/build-widget-theme.ts
|
|
530
868
|
* PURPOSE: Resolve Shadow-DOM CSS variables from @mushi-mushi/core tokens.
|
|
@@ -697,4 +1035,4 @@ interface ProactiveTriggerCleanup {
|
|
|
697
1035
|
}
|
|
698
1036
|
declare function setupProactiveTriggers(callbacks: ProactiveTriggerCallbacks, config?: ProactiveTriggerConfig): ProactiveTriggerCleanup;
|
|
699
1037
|
|
|
700
|
-
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 };
|