@mushi-mushi/web 1.39.2 → 1.41.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.
Files changed (40) hide show
  1. package/README.md +2 -2
  2. package/dist/chunks/chunk-SUR37XF4.js +105 -0
  3. package/dist/chunks/chunk-SUR37XF4.js.map +1 -0
  4. package/dist/chunks/{screenshot-dom-K3N2HPNN.js → screenshot-dom-TFN24FGW.js} +4 -3
  5. package/dist/chunks/screenshot-dom-TFN24FGW.js.map +1 -0
  6. package/dist/chunks/{widget-views-DX3OYHGR.js → widget-views-NARMWQAB.js} +12 -6
  7. package/dist/chunks/widget-views-NARMWQAB.js.map +1 -0
  8. package/dist/headless.cjs +74 -2
  9. package/dist/headless.cjs.map +1 -1
  10. package/dist/headless.d.cts +3 -2
  11. package/dist/headless.d.ts +2 -1
  12. package/dist/headless.js +74 -2
  13. package/dist/headless.js.map +1 -1
  14. package/dist/i18n/index.cjs +87 -7
  15. package/dist/i18n/index.cjs.map +1 -1
  16. package/dist/i18n/index.d.cts +27 -2
  17. package/dist/i18n/index.d.ts +27 -2
  18. package/dist/i18n/index.js +87 -7
  19. package/dist/i18n/index.js.map +1 -1
  20. package/dist/index.cjs +466 -66
  21. package/dist/index.cjs.map +1 -1
  22. package/dist/index.d.cts +34 -5
  23. package/dist/index.d.ts +57 -4
  24. package/dist/index.js +373 -63
  25. package/dist/index.js.map +1 -1
  26. package/dist/mushi.loader.global.js +24 -23
  27. package/dist/otel.d.cts +2 -1
  28. package/dist/otel.d.ts +2 -1
  29. package/dist/test-utils.cjs +8848 -36
  30. package/dist/test-utils.cjs.map +1 -1
  31. package/dist/test-utils.d.cts +2 -1
  32. package/dist/test-utils.d.ts +2 -1
  33. package/dist/test-utils.js +8849 -37
  34. package/dist/test-utils.js.map +1 -1
  35. package/dist/{timeline-DoBCj4dt.d.cts → timeline-CG613pDm.d.cts} +2 -1
  36. package/package.json +9 -9
  37. package/dist/chunks/chunk-ONXNS7MQ.js +0 -35
  38. package/dist/chunks/chunk-ONXNS7MQ.js.map +0 -1
  39. package/dist/chunks/screenshot-dom-K3N2HPNN.js.map +0 -1
  40. package/dist/chunks/widget-views-DX3OYHGR.js.map +0 -1
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
- import { MushiInitConfig, MushiSDKInstance, MushiDiagnosticsResult, MushiReportCategory, MushiReporterReport, MushiReporterComment, MushiReporterTimelineItem, MushiAssistantReply, MushiWidgetConfig, MushiLeaderboardEntry, MushiCrossAppReport, MushiTesterReputation, MushiReporterUpdates, MushiApiCascadeConfig, MushiErrorFilter } from '@mushi-mushi/core';
1
+ import { MushiInitConfig, MushiSDKInstance, MushiDiagnosticsResult, MushiReportCategory, MushiReporterReport, MushiReporterComment, MushiReporterTimelineItem, MushiAssistantReply, MushiWidgetConfig, MushiLeaderboardEntry, MushiCrossAppReport, MushiTesterReputation, MushiReporterUpdates, MushiReportTypeId, MushiReportTypeTone, 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-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';
3
+ import { g as ScreenshotFailureReason } from './timeline-CG613pDm.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-CG613pDm.cjs';
5
5
  export { MushiLocale, getAvailableLocales, getLocale } from './i18n/index.cjs';
6
6
 
7
7
  declare class Mushi {
@@ -206,6 +206,14 @@ declare class MushiWidget {
206
206
  private showAllCategories;
207
207
  /** Header overflow menu. */
208
208
  private showMoreNav;
209
+ /** Send was pressed below the minimum; the meter stays red until the text is long enough. */
210
+ private lengthNudge;
211
+ /** Shake the meter on the next render only (not on every later keystroke). */
212
+ private nudgeShake;
213
+ /** The header BETA chip's disclosure (ADR 0070). */
214
+ private betaOpen;
215
+ /** A pointer tap picked a type: move focus to the textarea after the patch. */
216
+ private focusDescriptionNext;
209
217
  private screenshotAttached;
210
218
  private screenshotCapturing;
211
219
  private screenshotError;
@@ -325,6 +333,12 @@ declare class MushiWidget {
325
333
  private resolveCopy;
326
334
  mount(): void;
327
335
  getIsMounted(): boolean;
336
+ /**
337
+ * Mushi's own screenshot of the app (capture-mode.ts): the widget stays
338
+ * hidden and never opens, so the report sheet is never in the picture.
339
+ */
340
+ private captureMode;
341
+ setCaptureMode(on: boolean): void;
328
342
  updateConfig(config?: MushiWidgetConfig): void;
329
343
  /** Find a custom category entry by id. Returns undefined for built-in ids. */
330
344
  private resolveCustomCategory;
@@ -478,7 +492,11 @@ declare class MushiWidget {
478
492
  private dragOptions;
479
493
  private render;
480
494
  private renderPanel;
481
- /** On a new surface: the report textarea, else the title, so screen readers announce where they are. */
495
+ /**
496
+ * On a new surface: the report screen's first step (the checked or first
497
+ * type tile; the textarea when a type was preset or text is drafted), else
498
+ * the textarea, else the title, so screen readers announce where they are.
499
+ */
482
500
  private focusView;
483
501
  /** Snapshot field values + caret from the live DOM before a patch. */
484
502
  private captureFormDrafts;
@@ -519,6 +537,8 @@ declare class MushiWidget {
519
537
  private effectiveMinLength;
520
538
  /** Enough words, or something the reporter attached on purpose. */
521
539
  private canSend;
540
+ /** Characters still needed for Send (0 once `canSend()`), for the meter. */
541
+ private charsNeeded;
522
542
  private unreadCount;
523
543
  /** Read-only snapshot + helper closures for the stateless view layer. */
524
544
  private renderCtx;
@@ -630,6 +650,7 @@ declare class MushiWidget {
630
650
  * Called only on hex values that already passed safeWidgetHex(), so the
631
651
  * regex-based extraction is always well-defined on valid 6-char inputs.
632
652
  */
653
+
633
654
  interface WidgetThemeVars {
634
655
  isDark: boolean;
635
656
  paper: string;
@@ -685,6 +706,13 @@ interface WidgetThemeVars {
685
706
  border: string;
686
707
  };
687
708
  statusClosedBg: string;
709
+ /** Report-type tile colours (core MUSHI_REPORT_TYPE_COLORS) for this mode. */
710
+ reportTypes: Record<MushiReportTypeId, MushiReportTypeTone>;
711
+ /** Tile fill: `solid` at these opacities (unpicked, picked). */
712
+ reportTypeWash: {
713
+ wash: number;
714
+ strong: number;
715
+ };
688
716
  fontDisplay: string;
689
717
  fontBody: string;
690
718
  fontMono: string;
@@ -787,4 +815,5 @@ interface ProactiveTriggerCleanup {
787
815
  }
788
816
  declare function setupProactiveTriggers(callbacks: ProactiveTriggerCallbacks, config?: ProactiveTriggerConfig): ProactiveTriggerCleanup;
789
817
 
790
- export { Mushi, MushiWidget, type ProactiveConfig, type ProactiveManager, type ProactiveTriggerCallbacks, type ProactiveTriggerCleanup, type WidgetThemeVars, createProactiveManager, getWidgetPreviewTokens, getWidgetThemeVars, setupProactiveTriggers };
818
+ export { Mushi, MushiWidget, createProactiveManager, getWidgetPreviewTokens, getWidgetThemeVars, setupProactiveTriggers };
819
+ export type { ProactiveConfig, ProactiveManager, ProactiveTriggerCallbacks, ProactiveTriggerCleanup, WidgetThemeVars };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { MushiInitConfig, MushiSDKInstance, MushiDiagnosticsResult, MushiPrivacyConfig, MushiReportCategory, MushiReporterReport, MushiReporterComment, MushiReporterTimelineItem, MushiAssistantReply, MushiWidgetConfig, MushiLeaderboardEntry, MushiCrossAppReport, MushiTesterReputation, MushiReporterUpdates, MushiConsoleEntry, MushiNetworkEntry, MushiUrlMatcher, MushiTracePropagationConfig, MushiPerformanceMetrics, MushiSelectedElement, MushiTimelineEntry, MushiApiCascadeConfig, MushiErrorFilter } from '@mushi-mushi/core';
1
+ import { MushiInitConfig, MushiSDKInstance, MushiDiagnosticsResult, MushiPrivacyConfig, MushiReportCategory, MushiReporterReport, MushiReporterComment, MushiReporterTimelineItem, MushiAssistantReply, MushiWidgetConfig, MushiLeaderboardEntry, MushiCrossAppReport, MushiTesterReputation, MushiReporterUpdates, MushiConsoleEntry, MushiNetworkEntry, MushiUrlMatcher, MushiTracePropagationConfig, MushiPerformanceMetrics, MushiSelectedElement, MushiTimelineEntry, MushiReportTypeId, MushiReportTypeTone, 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
3
 
4
4
  declare class Mushi {
@@ -228,6 +228,14 @@ declare class MushiWidget {
228
228
  private showAllCategories;
229
229
  /** Header overflow menu. */
230
230
  private showMoreNav;
231
+ /** Send was pressed below the minimum; the meter stays red until the text is long enough. */
232
+ private lengthNudge;
233
+ /** Shake the meter on the next render only (not on every later keystroke). */
234
+ private nudgeShake;
235
+ /** The header BETA chip's disclosure (ADR 0070). */
236
+ private betaOpen;
237
+ /** A pointer tap picked a type: move focus to the textarea after the patch. */
238
+ private focusDescriptionNext;
231
239
  private screenshotAttached;
232
240
  private screenshotCapturing;
233
241
  private screenshotError;
@@ -347,6 +355,12 @@ declare class MushiWidget {
347
355
  private resolveCopy;
348
356
  mount(): void;
349
357
  getIsMounted(): boolean;
358
+ /**
359
+ * Mushi's own screenshot of the app (capture-mode.ts): the widget stays
360
+ * hidden and never opens, so the report sheet is never in the picture.
361
+ */
362
+ private captureMode;
363
+ setCaptureMode(on: boolean): void;
350
364
  updateConfig(config?: MushiWidgetConfig): void;
351
365
  /** Find a custom category entry by id. Returns undefined for built-in ids. */
352
366
  private resolveCustomCategory;
@@ -500,7 +514,11 @@ declare class MushiWidget {
500
514
  private dragOptions;
501
515
  private render;
502
516
  private renderPanel;
503
- /** On a new surface: the report textarea, else the title, so screen readers announce where they are. */
517
+ /**
518
+ * On a new surface: the report screen's first step (the checked or first
519
+ * type tile; the textarea when a type was preset or text is drafted), else
520
+ * the textarea, else the title, so screen readers announce where they are.
521
+ */
504
522
  private focusView;
505
523
  /** Snapshot field values + caret from the live DOM before a patch. */
506
524
  private captureFormDrafts;
@@ -541,6 +559,8 @@ declare class MushiWidget {
541
559
  private effectiveMinLength;
542
560
  /** Enough words, or something the reporter attached on purpose. */
543
561
  private canSend;
562
+ /** Characters still needed for Send (0 once `canSend()`), for the meter. */
563
+ private charsNeeded;
544
564
  private unreadCount;
545
565
  /** Read-only snapshot + helper closures for the stateless view layer. */
546
566
  private renderCtx;
@@ -806,8 +826,23 @@ interface MushiLocale {
806
826
  pointAt: string;
807
827
  remove: string;
808
828
  markUp: string;
809
- /** Privacy line under the attachments. */
829
+ /** Privacy sentence: the tooltip and screen-reader text of the footer 🔒 line. */
810
830
  privacy: string;
831
+ /**
832
+ * The footer 🔒 line itself, a few words (ADR 0070). Optional so a custom
833
+ * locale written before 1.40 still type-checks; English fills the gap.
834
+ */
835
+ privacyShort?: string;
836
+ /** Accessible name of the report-type tile group. */
837
+ typeQuestion?: string;
838
+ /** Textarea prompt per picked type; `other` is also the prompt before a pick. */
839
+ prompts?: Partial<Record<'bug' | 'slow' | 'visual' | 'confusing' | 'idea' | 'other', string>>;
840
+ /** Length meter under the textarea; `{n}` = characters still needed. */
841
+ charsLeft?: string;
842
+ /** Announced once when the description reaches the minimum. */
843
+ ready?: string;
844
+ /** Big line under the success check. */
845
+ delivered?: string;
811
846
  send: string;
812
847
  /** Header pill that opens "Your reports". */
813
848
  yourReports: string;
@@ -832,8 +867,15 @@ interface MushiLocale {
832
867
  fileReportCta: string;
833
868
  /** Softer footer escape when the thread already has turns. */
834
869
  stillStuckCta: string;
870
+ /**
871
+ * Always shown above the conversation: the person is talking to an AI
872
+ * (EU AI Act Art. 50(1)). Optional for custom locales; English is the fallback.
873
+ */
874
+ aiNotice?: string;
835
875
  errors: {
836
876
  noResponse: string;
877
+ /** The app has no AI key for the assistant yet (server code ASSISTANT_NEEDS_KEY). */
878
+ notSetUp: string;
837
879
  generic: string;
838
880
  };
839
881
  };
@@ -852,6 +894,8 @@ interface MushiLocale {
852
894
  reports: {
853
895
  title: string;
854
896
  loading: string;
897
+ /** Under the list when an AI wrote a row's title (EU AI Act Art. 50(2)). English is the fallback. */
898
+ aiTitlesNote?: string;
855
899
  /** @deprecated Unused since 1.30 — core `ui.empty`. */
856
900
  empty?: string;
857
901
  /** @deprecated Unused since 1.30. */
@@ -984,6 +1028,7 @@ declare function getAvailableLocales(): string[];
984
1028
  * Called only on hex values that already passed safeWidgetHex(), so the
985
1029
  * regex-based extraction is always well-defined on valid 6-char inputs.
986
1030
  */
1031
+
987
1032
  interface WidgetThemeVars {
988
1033
  isDark: boolean;
989
1034
  paper: string;
@@ -1039,6 +1084,13 @@ interface WidgetThemeVars {
1039
1084
  border: string;
1040
1085
  };
1041
1086
  statusClosedBg: string;
1087
+ /** Report-type tile colours (core MUSHI_REPORT_TYPE_COLORS) for this mode. */
1088
+ reportTypes: Record<MushiReportTypeId, MushiReportTypeTone>;
1089
+ /** Tile fill: `solid` at these opacities (unpicked, picked). */
1090
+ reportTypeWash: {
1091
+ wash: number;
1092
+ strong: number;
1093
+ };
1042
1094
  fontDisplay: string;
1043
1095
  fontBody: string;
1044
1096
  fontMono: string;
@@ -1141,4 +1193,5 @@ interface ProactiveTriggerCleanup {
1141
1193
  }
1142
1194
  declare function setupProactiveTriggers(callbacks: ProactiveTriggerCallbacks, config?: ProactiveTriggerConfig): ProactiveTriggerCleanup;
1143
1195
 
1144
- 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 };
1196
+ export { Mushi, MushiWidget, createConsoleCapture, createElementSelector, createNetworkCapture, createPerformanceCapture, createProactiveManager, createScreenshotCapture, createTimelineCapture, getAvailableLocales, getLocale, getWidgetPreviewTokens, getWidgetThemeVars, setupProactiveTriggers };
1197
+ export type { ConsoleCapture, ElementSelector, MushiLocale, NetworkCapture, PerformanceCapture, ProactiveConfig, ProactiveManager, ProactiveTriggerCallbacks, ProactiveTriggerCleanup, ScreenshotCapture, TimelineCapture, WidgetThemeVars };