@mushi-mushi/web 1.2.1 → 1.3.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/index.d.cts CHANGED
@@ -63,12 +63,22 @@ declare class MushiWidget {
63
63
  private selectedCategory;
64
64
  private selectedIntent;
65
65
  private screenshotAttached;
66
+ private screenshotCapturing;
67
+ private screenshotError;
66
68
  private allowScreenshotRemove;
67
69
  private elementSelected;
70
+ private elementCapturing;
68
71
  private submitting;
72
+ /** Hint element injected outside the shadow DOM during element selection. */
73
+ private selectorHint;
69
74
  private triggerVisible;
70
75
  private triggerShrunk;
71
76
  private triggerHiddenByScroll;
77
+ /** Milliseconds since mount — used for the 30s first-time nudge gate. */
78
+ private mountedAt;
79
+ private nudgeShown;
80
+ private nudgeEl;
81
+ private nudgeTimer;
72
82
  private sdkFreshness;
73
83
  private reporterReports;
74
84
  private reporterComments;
@@ -105,6 +115,18 @@ declare class MushiWidget {
105
115
  setScreenshotAttached(attached: boolean): void;
106
116
  setAllowScreenshotRemove(allow: boolean): void;
107
117
  setElementSelected(selected: boolean): void;
118
+ setScreenshotCapturing(capturing: boolean): void;
119
+ setScreenshotError(failed: boolean): void;
120
+ setElementCapturing(capturing: boolean): void;
121
+ /** Hide the widget panel (but keep the host element) during element selection
122
+ * so the user can click any element on the page without the panel
123
+ * intercepting the event. */
124
+ hidePanel(): void;
125
+ showPanel(): void;
126
+ private showSelectorHint;
127
+ private removeSelectorHint;
128
+ private showNudge;
129
+ private removeNudge;
108
130
  setSdkFreshness(info: {
109
131
  latest: string | null;
110
132
  current: string;
@@ -155,6 +177,7 @@ declare class MushiWidget {
155
177
  private renderReportsStep;
156
178
  private renderReportDetailStep;
157
179
  private renderIntentStep;
180
+ private effectiveMinLength;
158
181
  private renderDetailsStep;
159
182
  /**
160
183
  * Editorial success state: 朱印-style red stamp ring with the kanji
@@ -215,12 +238,20 @@ interface NetworkCaptureOptions {
215
238
  declare function createNetworkCapture(options?: NetworkCaptureOptions): NetworkCapture;
216
239
 
217
240
  interface ScreenshotCapture {
218
- take(): Promise<string | null>;
241
+ take(): Promise<ScreenshotResult>;
219
242
  updateOptions(options: ScreenshotCaptureOptions): void;
220
243
  }
221
244
  interface ScreenshotCaptureOptions {
222
245
  privacy?: MushiPrivacyConfig;
223
246
  }
247
+ type ScreenshotResult = {
248
+ ok: true;
249
+ dataUrl: string;
250
+ } | {
251
+ ok: false;
252
+ reason: 'tainted' | 'load-error' | 'unsupported' | 'cancelled' | 'error';
253
+ message?: string;
254
+ };
224
255
  declare function createScreenshotCapture(options?: ScreenshotCaptureOptions): ScreenshotCapture;
225
256
 
226
257
  interface PerformanceCapture {
@@ -276,9 +307,17 @@ interface MushiLocale {
276
307
  descriptionPlaceholder: string;
277
308
  screenshotButton: string;
278
309
  screenshotAttached: string;
310
+ screenshotCapturing: string;
311
+ screenshotFailed: string;
279
312
  elementButton: string;
280
313
  elementSelected: string;
314
+ elementCapturing: string;
315
+ elementSelectorHint: string;
281
316
  optional: string;
317
+ /** Inline validation: description is below the minimum length. */
318
+ tooShort: string;
319
+ /** Example starter chips rendered above the textarea to lower the barrier. */
320
+ examplePrompts: string[];
282
321
  };
283
322
  }
284
323
 
package/dist/index.d.ts CHANGED
@@ -63,12 +63,22 @@ declare class MushiWidget {
63
63
  private selectedCategory;
64
64
  private selectedIntent;
65
65
  private screenshotAttached;
66
+ private screenshotCapturing;
67
+ private screenshotError;
66
68
  private allowScreenshotRemove;
67
69
  private elementSelected;
70
+ private elementCapturing;
68
71
  private submitting;
72
+ /** Hint element injected outside the shadow DOM during element selection. */
73
+ private selectorHint;
69
74
  private triggerVisible;
70
75
  private triggerShrunk;
71
76
  private triggerHiddenByScroll;
77
+ /** Milliseconds since mount — used for the 30s first-time nudge gate. */
78
+ private mountedAt;
79
+ private nudgeShown;
80
+ private nudgeEl;
81
+ private nudgeTimer;
72
82
  private sdkFreshness;
73
83
  private reporterReports;
74
84
  private reporterComments;
@@ -105,6 +115,18 @@ declare class MushiWidget {
105
115
  setScreenshotAttached(attached: boolean): void;
106
116
  setAllowScreenshotRemove(allow: boolean): void;
107
117
  setElementSelected(selected: boolean): void;
118
+ setScreenshotCapturing(capturing: boolean): void;
119
+ setScreenshotError(failed: boolean): void;
120
+ setElementCapturing(capturing: boolean): void;
121
+ /** Hide the widget panel (but keep the host element) during element selection
122
+ * so the user can click any element on the page without the panel
123
+ * intercepting the event. */
124
+ hidePanel(): void;
125
+ showPanel(): void;
126
+ private showSelectorHint;
127
+ private removeSelectorHint;
128
+ private showNudge;
129
+ private removeNudge;
108
130
  setSdkFreshness(info: {
109
131
  latest: string | null;
110
132
  current: string;
@@ -155,6 +177,7 @@ declare class MushiWidget {
155
177
  private renderReportsStep;
156
178
  private renderReportDetailStep;
157
179
  private renderIntentStep;
180
+ private effectiveMinLength;
158
181
  private renderDetailsStep;
159
182
  /**
160
183
  * Editorial success state: 朱印-style red stamp ring with the kanji
@@ -215,12 +238,20 @@ interface NetworkCaptureOptions {
215
238
  declare function createNetworkCapture(options?: NetworkCaptureOptions): NetworkCapture;
216
239
 
217
240
  interface ScreenshotCapture {
218
- take(): Promise<string | null>;
241
+ take(): Promise<ScreenshotResult>;
219
242
  updateOptions(options: ScreenshotCaptureOptions): void;
220
243
  }
221
244
  interface ScreenshotCaptureOptions {
222
245
  privacy?: MushiPrivacyConfig;
223
246
  }
247
+ type ScreenshotResult = {
248
+ ok: true;
249
+ dataUrl: string;
250
+ } | {
251
+ ok: false;
252
+ reason: 'tainted' | 'load-error' | 'unsupported' | 'cancelled' | 'error';
253
+ message?: string;
254
+ };
224
255
  declare function createScreenshotCapture(options?: ScreenshotCaptureOptions): ScreenshotCapture;
225
256
 
226
257
  interface PerformanceCapture {
@@ -276,9 +307,17 @@ interface MushiLocale {
276
307
  descriptionPlaceholder: string;
277
308
  screenshotButton: string;
278
309
  screenshotAttached: string;
310
+ screenshotCapturing: string;
311
+ screenshotFailed: string;
279
312
  elementButton: string;
280
313
  elementSelected: string;
314
+ elementCapturing: string;
315
+ elementSelectorHint: string;
281
316
  optional: string;
317
+ /** Inline validation: description is below the minimum length. */
318
+ tooShort: string;
319
+ /** Example starter chips rendered above the textarea to lower the barrier. */
320
+ examplePrompts: string[];
282
321
  };
283
322
  }
284
323