@mushi-mushi/web 1.0.0 → 1.1.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
@@ -21,6 +21,20 @@ declare class Mushi {
21
21
  * user-facing ARIA / keyboard wiring.
22
22
  */
23
23
 
24
+ interface WidgetRewardsState {
25
+ tier: {
26
+ slug: string;
27
+ displayName: string;
28
+ pointsThreshold: number;
29
+ } | null;
30
+ nextTier: {
31
+ displayName: string;
32
+ pointsThreshold: number;
33
+ } | null;
34
+ totalPoints: number;
35
+ /** Expected base points for a `report_submit` action (default 50). */
36
+ pointsForReport: number;
37
+ }
24
38
  interface WidgetCallbacks {
25
39
  onSubmit(data: {
26
40
  category: MushiReportCategory;
@@ -73,6 +87,7 @@ declare class MushiWidget {
73
87
  * root) for up to ~3.3s after destroy. */
74
88
  private successTimer;
75
89
  private autoCloseTimer;
90
+ private rewardsState;
76
91
  constructor(config: MushiWidgetConfig | undefined, callbacks: WidgetCallbacks, sdkVersion?: string);
77
92
  mount(): void;
78
93
  getIsMounted(): boolean;
@@ -95,6 +110,7 @@ declare class MushiWidget {
95
110
  deprecated: boolean;
96
111
  message?: string | null;
97
112
  }): void;
113
+ setRewardsState(state: WidgetRewardsState | null): void;
98
114
  destroy(): void;
99
115
  private syncAttachedLaunchers;
100
116
  private syncSmartHide;
@@ -127,6 +143,14 @@ declare class MushiWidget {
127
143
  */
128
144
  private renderStepIndicator;
129
145
  private renderCategoryStep;
146
+ /** Collapsible "What's new" changelog row. Closes the reporter feedback loop. */
147
+ private renderBetaChangelog;
148
+ /**
149
+ * Discreet beta status strip: communicates "work in progress", invites
150
+ * feedback, and sets expectations — reducing user frustration while
151
+ * nudging the reciprocity instinct ("your reports help us build this").
152
+ */
153
+ private renderBetaStrip;
130
154
  private renderReportsStep;
131
155
  private renderReportDetailStep;
132
156
  private renderIntentStep;
@@ -140,6 +164,18 @@ declare class MushiWidget {
140
164
  * frame instantly.
141
165
  */
142
166
  private renderSuccessStep;
167
+ /**
168
+ * Reciprocity footer on the success step: closes the feedback loop by
169
+ * attributing where the report goes, sets a response expectation, and
170
+ * reinforces the "beta tester" identity (Peak-End Rule — the last thing
171
+ * the user sees shapes their entire impression of the interaction).
172
+ */
173
+ private renderBetaSuccessFooter;
174
+ private tierColor;
175
+ /** Compact rewards nudge rendered at the bottom of the category-step body. */
176
+ private renderRewardsNudge;
177
+ /** Points earned + tier progress shown on the success step. */
178
+ private renderSuccessRewards;
143
179
  private attachHandlers;
144
180
  private trapFocus;
145
181
  private unreadCount;
package/dist/index.d.ts CHANGED
@@ -21,6 +21,20 @@ declare class Mushi {
21
21
  * user-facing ARIA / keyboard wiring.
22
22
  */
23
23
 
24
+ interface WidgetRewardsState {
25
+ tier: {
26
+ slug: string;
27
+ displayName: string;
28
+ pointsThreshold: number;
29
+ } | null;
30
+ nextTier: {
31
+ displayName: string;
32
+ pointsThreshold: number;
33
+ } | null;
34
+ totalPoints: number;
35
+ /** Expected base points for a `report_submit` action (default 50). */
36
+ pointsForReport: number;
37
+ }
24
38
  interface WidgetCallbacks {
25
39
  onSubmit(data: {
26
40
  category: MushiReportCategory;
@@ -73,6 +87,7 @@ declare class MushiWidget {
73
87
  * root) for up to ~3.3s after destroy. */
74
88
  private successTimer;
75
89
  private autoCloseTimer;
90
+ private rewardsState;
76
91
  constructor(config: MushiWidgetConfig | undefined, callbacks: WidgetCallbacks, sdkVersion?: string);
77
92
  mount(): void;
78
93
  getIsMounted(): boolean;
@@ -95,6 +110,7 @@ declare class MushiWidget {
95
110
  deprecated: boolean;
96
111
  message?: string | null;
97
112
  }): void;
113
+ setRewardsState(state: WidgetRewardsState | null): void;
98
114
  destroy(): void;
99
115
  private syncAttachedLaunchers;
100
116
  private syncSmartHide;
@@ -127,6 +143,14 @@ declare class MushiWidget {
127
143
  */
128
144
  private renderStepIndicator;
129
145
  private renderCategoryStep;
146
+ /** Collapsible "What's new" changelog row. Closes the reporter feedback loop. */
147
+ private renderBetaChangelog;
148
+ /**
149
+ * Discreet beta status strip: communicates "work in progress", invites
150
+ * feedback, and sets expectations — reducing user frustration while
151
+ * nudging the reciprocity instinct ("your reports help us build this").
152
+ */
153
+ private renderBetaStrip;
130
154
  private renderReportsStep;
131
155
  private renderReportDetailStep;
132
156
  private renderIntentStep;
@@ -140,6 +164,18 @@ declare class MushiWidget {
140
164
  * frame instantly.
141
165
  */
142
166
  private renderSuccessStep;
167
+ /**
168
+ * Reciprocity footer on the success step: closes the feedback loop by
169
+ * attributing where the report goes, sets a response expectation, and
170
+ * reinforces the "beta tester" identity (Peak-End Rule — the last thing
171
+ * the user sees shapes their entire impression of the interaction).
172
+ */
173
+ private renderBetaSuccessFooter;
174
+ private tierColor;
175
+ /** Compact rewards nudge rendered at the bottom of the category-step body. */
176
+ private renderRewardsNudge;
177
+ /** Points earned + tier progress shown on the success step. */
178
+ private renderSuccessRewards;
143
179
  private attachHandlers;
144
180
  private trapFocus;
145
181
  private unreadCount;