@mushi-mushi/web 1.20.0 → 1.21.1

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.cjs CHANGED
@@ -48,10 +48,22 @@ var en = {
48
48
  submit: "Submit",
49
49
  submitting: "Submitting\u2026",
50
50
  submitted: "Thank you! Your report has been submitted.",
51
- error: "Something went wrong. Please try again."
51
+ error: "Could not send your report. Check your connection and try again."
52
52
  },
53
53
  step1: {
54
54
  heading: "What kind of issue?",
55
+ reportSectionLabel: "Report an issue",
56
+ moreNavLabel: "More",
57
+ moreNav: {
58
+ yourReports: "Your reports",
59
+ yourReportsDesc: "See status, developer replies, and respond",
60
+ unreadNew: "new",
61
+ communityIdeas: "Community ideas",
62
+ communityIdeasDesc: "Vote on features and see what shipped",
63
+ leaderboard: "Leaderboard",
64
+ joinCommunity: "Join community \xB7 Track reports across apps",
65
+ myAccount: "My account"
66
+ },
55
67
  categories: {
56
68
  bug: "Bug",
57
69
  slow: "Slow / Laggy",
@@ -97,6 +109,100 @@ var en = {
97
109
  "Page froze for 10 seconds",
98
110
  "Layout looks broken here"
99
111
  ]
112
+ },
113
+ assistant: {
114
+ defaultLabel: "Ask",
115
+ defaultGreeting: "Ask about this page \u2014 I only use what you see here.",
116
+ inputPlaceholder: "Type your question\u2026",
117
+ sendAriaLabel: "Send",
118
+ hubDescription: "Get help using this app",
119
+ thinking: "Thinking\u2026",
120
+ errors: {
121
+ noResponse: "No response \u2014 check your connection and try again.",
122
+ generic: "Could not reach the assistant. Try again in a moment."
123
+ }
124
+ },
125
+ flows: {
126
+ eyebrows: {
127
+ inbox: "Mushi \xB7 Inbox",
128
+ roadmap: "Mushi \xB7 Roadmap",
129
+ community: "Mushi \xB7 Community",
130
+ identity: "Mushi \xB7 Identity",
131
+ signIn: "Mushi \xB7 Sign in",
132
+ allApps: "Mushi \xB7 All apps",
133
+ receipt: "Mushi \xB7 Receipt",
134
+ thread: "Mushi \xB7 Inbox"
135
+ },
136
+ reports: {
137
+ title: "Your reports",
138
+ loading: "Loading reports\u2026",
139
+ empty: "No reports from this browser yet.",
140
+ leaderboardLink: "Leaderboard"
141
+ },
142
+ roadmap: {
143
+ title: "Community ideas",
144
+ loading: "Loading ideas\u2026",
145
+ empty: "No community ideas yet. Be the first to suggest one.",
146
+ shipped: "Shipped",
147
+ vote: "Vote",
148
+ voted: "Voted",
149
+ voteCount: "{n} votes",
150
+ untitled: "Untitled idea"
151
+ },
152
+ leaderboard: {
153
+ title: "Global leaderboard",
154
+ loading: "Loading leaderboard\u2026",
155
+ empty: "No contributors yet \u2014 be the first!",
156
+ signInPrompt: "Sign in to see your rank \u2192",
157
+ myRank: "You are ranked #{rank} this month",
158
+ footer: "Global contributors this month \xB7 Points refresh monthly",
159
+ anon: "Anon"
160
+ },
161
+ account: {
162
+ title: "Mushi account",
163
+ checkEmailTitle: "Check your email",
164
+ joinTitle: "Join the community",
165
+ emailLabel: "Email address",
166
+ emailPlaceholder: "Email",
167
+ signInPrompt: "Sign in to see your reports across all apps and climb the global leaderboard. No password needed.",
168
+ magicLinkSent: "We sent a sign-in link to {email}. Click it to connect your reports across apps.",
169
+ resendEmail: "Resend email",
170
+ sendLink: "Send sign-in link",
171
+ sending: "Sending\u2026",
172
+ crossAppReports: "My reports across all apps \u2192",
173
+ viewLeaderboard: "View global leaderboard \u2192",
174
+ signOut: "Sign out",
175
+ rankSummary: "Rank #{rank} \xB7 {points} pts this month"
176
+ },
177
+ crossApp: {
178
+ title: "My reports",
179
+ loading: "Loading your reports\u2026",
180
+ empty: "No reports filed yet.",
181
+ unknownApp: "Unknown app"
182
+ },
183
+ thread: {
184
+ title: "Report thread",
185
+ loading: "Loading thread\u2026",
186
+ empty: "No developer replies yet.",
187
+ confirmFixed: "Yes, fixed for me",
188
+ notFixed: "Not fixed yet",
189
+ replyPlaceholder: "Reply to the developer\u2026",
190
+ send: "Send"
191
+ },
192
+ success: {
193
+ trackReport: "Track this report \u203A",
194
+ receipt: "Receipt",
195
+ delivering: "Delivering to the team\u2026",
196
+ queuedOffline: "Queued offline",
197
+ queuedHint: "We'll send it the moment you're back online.",
198
+ trackOnMushi: "Track on Mushi",
199
+ slaDefault: "We will review your report."
200
+ },
201
+ featureRequest: {
202
+ label: "Feature request",
203
+ description: "Suggest a change"
204
+ },
205
+ poweredBy: "Powered by Mushi v{version}"
100
206
  }
101
207
  };
102
208
 
@@ -114,6 +220,18 @@ var ja = {
114
220
  },
115
221
  step1: {
116
222
  heading: "\u3069\u306E\u3088\u3046\u306A\u554F\u984C\u3067\u3059\u304B\uFF1F",
223
+ reportSectionLabel: "\u554F\u984C\u3092\u5831\u544A",
224
+ moreNavLabel: "\u305D\u306E\u4ED6",
225
+ moreNav: {
226
+ yourReports: "\u3042\u306A\u305F\u306E\u30EC\u30DD\u30FC\u30C8",
227
+ yourReportsDesc: "\u30B9\u30C6\u30FC\u30BF\u30B9\u3001\u958B\u767A\u8005\u304B\u3089\u306E\u8FD4\u4FE1\u3001\u8FD4\u7B54",
228
+ unreadNew: "\u4EF6\u306E\u65B0\u7740",
229
+ communityIdeas: "\u30B3\u30DF\u30E5\u30CB\u30C6\u30A3\u306E\u30A2\u30A4\u30C7\u30A2",
230
+ communityIdeasDesc: "\u6A5F\u80FD\u306B\u6295\u7968\u3057\u3066\u30EA\u30EA\u30FC\u30B9\u72B6\u6CC1\u3092\u78BA\u8A8D",
231
+ leaderboard: "\u30EA\u30FC\u30C0\u30FC\u30DC\u30FC\u30C9",
232
+ joinCommunity: "\u30B3\u30DF\u30E5\u30CB\u30C6\u30A3\u306B\u53C2\u52A0 \xB7 \u30A2\u30D7\u30EA\u6A2A\u65AD\u3067\u30EC\u30DD\u30FC\u30C8\u3092\u8FFD\u8DE1",
233
+ myAccount: "\u30DE\u30A4\u30A2\u30AB\u30A6\u30F3\u30C8"
234
+ },
117
235
  categories: {
118
236
  bug: "\u30D0\u30B0",
119
237
  slow: "\u9045\u3044\u30FB\u91CD\u3044",
@@ -159,6 +277,100 @@ var ja = {
159
277
  "\u30DA\u30FC\u30B8\u304C10\u79D2\u56FA\u307E\u3063\u305F",
160
278
  "\u30EC\u30A4\u30A2\u30A6\u30C8\u304C\u5D29\u308C\u3066\u3044\u308B"
161
279
  ]
280
+ },
281
+ assistant: {
282
+ defaultLabel: "\u8CEA\u554F",
283
+ defaultGreeting: "\u3053\u306E\u30DA\u30FC\u30B8\u306B\u3064\u3044\u3066\u8CEA\u554F\u3057\u3066\u304F\u3060\u3055\u3044 \u2014 \u8868\u793A\u3055\u308C\u3066\u3044\u308B\u5185\u5BB9\u3060\u3051\u3092\u4F7F\u3044\u307E\u3059\u3002",
284
+ inputPlaceholder: "\u8CEA\u554F\u3092\u5165\u529B\u2026",
285
+ sendAriaLabel: "\u9001\u4FE1",
286
+ hubDescription: "\u3053\u306E\u30A2\u30D7\u30EA\u306E\u4F7F\u3044\u65B9\u3092\u805E\u304F",
287
+ thinking: "\u8003\u3048\u4E2D\u2026",
288
+ errors: {
289
+ noResponse: "\u5FDC\u7B54\u304C\u3042\u308A\u307E\u305B\u3093 \u2014 \u63A5\u7D9A\u3092\u78BA\u8A8D\u3057\u3066\u518D\u8A66\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
290
+ generic: "\u30A2\u30B7\u30B9\u30BF\u30F3\u30C8\u306B\u63A5\u7D9A\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u3057\u3070\u3089\u304F\u3057\u3066\u304B\u3089\u518D\u8A66\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002"
291
+ }
292
+ },
293
+ flows: {
294
+ eyebrows: {
295
+ inbox: "Mushi \xB7 \u53D7\u4FE1\u7BB1",
296
+ roadmap: "Mushi \xB7 \u30A2\u30A4\u30C7\u30A2",
297
+ community: "Mushi \xB7 \u30B3\u30DF\u30E5\u30CB\u30C6\u30A3",
298
+ identity: "Mushi \xB7 \u30A2\u30AB\u30A6\u30F3\u30C8",
299
+ signIn: "Mushi \xB7 \u30B5\u30A4\u30F3\u30A4\u30F3",
300
+ allApps: "Mushi \xB7 \u5168\u30A2\u30D7\u30EA",
301
+ receipt: "Mushi \xB7 \u53D7\u4ED8",
302
+ thread: "Mushi \xB7 \u53D7\u4FE1\u7BB1"
303
+ },
304
+ reports: {
305
+ title: "\u3042\u306A\u305F\u306E\u30EC\u30DD\u30FC\u30C8",
306
+ loading: "\u30EC\u30DD\u30FC\u30C8\u3092\u8AAD\u307F\u8FBC\u307F\u4E2D\u2026",
307
+ empty: "\u3053\u306E\u30D6\u30E9\u30A6\u30B6\u304B\u3089\u306E\u30EC\u30DD\u30FC\u30C8\u306F\u307E\u3060\u3042\u308A\u307E\u305B\u3093\u3002",
308
+ leaderboardLink: "\u30E9\u30F3\u30AD\u30F3\u30B0"
309
+ },
310
+ roadmap: {
311
+ title: "\u30B3\u30DF\u30E5\u30CB\u30C6\u30A3\u306E\u30A2\u30A4\u30C7\u30A2",
312
+ loading: "\u30A2\u30A4\u30C7\u30A2\u3092\u8AAD\u307F\u8FBC\u307F\u4E2D\u2026",
313
+ empty: "\u307E\u3060\u30A2\u30A4\u30C7\u30A2\u304C\u3042\u308A\u307E\u305B\u3093\u3002\u6700\u521D\u306E\u63D0\u6848\u3092\u3069\u3046\u305E\u3002",
314
+ shipped: "\u30EA\u30EA\u30FC\u30B9\u6E08\u307F",
315
+ vote: "\u6295\u7968",
316
+ voted: "\u6295\u7968\u6E08\u307F",
317
+ voteCount: "{n} \u7968",
318
+ untitled: "\u7121\u984C\u306E\u30A2\u30A4\u30C7\u30A2"
319
+ },
320
+ leaderboard: {
321
+ title: "\u30B0\u30ED\u30FC\u30D0\u30EB\u30E9\u30F3\u30AD\u30F3\u30B0",
322
+ loading: "\u30E9\u30F3\u30AD\u30F3\u30B0\u3092\u8AAD\u307F\u8FBC\u307F\u4E2D\u2026",
323
+ empty: "\u307E\u3060\u53C2\u52A0\u8005\u304C\u3044\u307E\u305B\u3093 \u2014 \u6700\u521D\u306E\u4E00\u4EBA\u306B\u306A\u308D\u3046\u3002",
324
+ signInPrompt: "\u30B5\u30A4\u30F3\u30A4\u30F3\u3057\u3066\u9806\u4F4D\u3092\u898B\u308B \u2192",
325
+ myRank: "\u4ECA\u6708\u306E\u9806\u4F4D\u306F #{rank}",
326
+ footer: "\u4ECA\u6708\u306E\u30B0\u30ED\u30FC\u30D0\u30EB\u8CA2\u732E\u8005 \xB7 \u30DD\u30A4\u30F3\u30C8\u306F\u6BCE\u6708\u30EA\u30BB\u30C3\u30C8",
327
+ anon: "\u533F\u540D"
328
+ },
329
+ account: {
330
+ title: "Mushi \u30A2\u30AB\u30A6\u30F3\u30C8",
331
+ checkEmailTitle: "\u30E1\u30FC\u30EB\u3092\u78BA\u8A8D",
332
+ joinTitle: "\u30B3\u30DF\u30E5\u30CB\u30C6\u30A3\u306B\u53C2\u52A0",
333
+ emailLabel: "\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",
334
+ emailPlaceholder: "\u30E1\u30FC\u30EB",
335
+ signInPrompt: "\u30B5\u30A4\u30F3\u30A4\u30F3\u3059\u308B\u3068\u5168\u30A2\u30D7\u30EA\u306E\u30EC\u30DD\u30FC\u30C8\u3068\u30E9\u30F3\u30AD\u30F3\u30B0\u304C\u898B\u3089\u308C\u307E\u3059\u3002\u30D1\u30B9\u30EF\u30FC\u30C9\u4E0D\u8981\u3002",
336
+ magicLinkSent: "{email} \u306B\u30B5\u30A4\u30F3\u30A4\u30F3\u30EA\u30F3\u30AF\u3092\u9001\u308A\u307E\u3057\u305F\u3002\u30EA\u30F3\u30AF\u3092\u958B\u3044\u3066\u30EC\u30DD\u30FC\u30C8\u3092\u63A5\u7D9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
337
+ resendEmail: "\u30E1\u30FC\u30EB\u3092\u518D\u9001",
338
+ sendLink: "\u30B5\u30A4\u30F3\u30A4\u30F3\u30EA\u30F3\u30AF\u3092\u9001\u308B",
339
+ sending: "\u9001\u4FE1\u4E2D\u2026",
340
+ crossAppReports: "\u5168\u30A2\u30D7\u30EA\u306E\u30EC\u30DD\u30FC\u30C8 \u2192",
341
+ viewLeaderboard: "\u30B0\u30ED\u30FC\u30D0\u30EB\u30E9\u30F3\u30AD\u30F3\u30B0 \u2192",
342
+ signOut: "\u30B5\u30A4\u30F3\u30A2\u30A6\u30C8",
343
+ rankSummary: "\u9806\u4F4D #{rank} \xB7 \u4ECA\u6708 {points} pts"
344
+ },
345
+ crossApp: {
346
+ title: "\u30DE\u30A4\u30EC\u30DD\u30FC\u30C8",
347
+ loading: "\u30EC\u30DD\u30FC\u30C8\u3092\u8AAD\u307F\u8FBC\u307F\u4E2D\u2026",
348
+ empty: "\u307E\u3060\u30EC\u30DD\u30FC\u30C8\u304C\u3042\u308A\u307E\u305B\u3093\u3002",
349
+ unknownApp: "\u4E0D\u660E\u306A\u30A2\u30D7\u30EA"
350
+ },
351
+ thread: {
352
+ title: "\u30EC\u30DD\u30FC\u30C8\u30B9\u30EC\u30C3\u30C9",
353
+ loading: "\u30B9\u30EC\u30C3\u30C9\u3092\u8AAD\u307F\u8FBC\u307F\u4E2D\u2026",
354
+ empty: "\u958B\u767A\u8005\u304B\u3089\u306E\u8FD4\u4FE1\u306F\u307E\u3060\u3042\u308A\u307E\u305B\u3093\u3002",
355
+ confirmFixed: "\u306F\u3044\u3001\u76F4\u308A\u307E\u3057\u305F",
356
+ notFixed: "\u307E\u3060\u76F4\u3063\u3066\u3044\u307E\u305B\u3093",
357
+ replyPlaceholder: "\u958B\u767A\u8005\u306B\u8FD4\u4FE1\u2026",
358
+ send: "\u9001\u4FE1"
359
+ },
360
+ success: {
361
+ trackReport: "\u3053\u306E\u30EC\u30DD\u30FC\u30C8\u3092\u8FFD\u8DE1 \u203A",
362
+ receipt: "\u53D7\u4ED8",
363
+ delivering: "\u30C1\u30FC\u30E0\u306B\u9001\u4FE1\u4E2D\u2026",
364
+ queuedOffline: "\u30AA\u30D5\u30E9\u30A4\u30F3\u5F85\u6A5F\u4E2D",
365
+ queuedHint: "\u30AA\u30F3\u30E9\u30A4\u30F3\u306B\u623B\u308A\u6B21\u7B2C\u9001\u4FE1\u3057\u307E\u3059\u3002",
366
+ trackOnMushi: "Mushi\u3067\u8FFD\u8DE1",
367
+ slaDefault: "\u30EC\u30DD\u30FC\u30C8\u3092\u78BA\u8A8D\u3057\u307E\u3059\u3002"
368
+ },
369
+ featureRequest: {
370
+ label: "\u6A5F\u80FD\u30EA\u30AF\u30A8\u30B9\u30C8",
371
+ description: "\u5909\u66F4\u3092\u63D0\u6848"
372
+ },
373
+ poweredBy: "Mushi v{version}"
162
374
  }
163
375
  };
164
376
 
@@ -176,6 +388,18 @@ var th = {
176
388
  },
177
389
  step1: {
178
390
  heading: "\u0E1B\u0E31\u0E0D\u0E2B\u0E32\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E44\u0E2B\u0E19?",
391
+ reportSectionLabel: "\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E1B\u0E31\u0E0D\u0E2B\u0E32",
392
+ moreNavLabel: "\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E15\u0E34\u0E21",
393
+ moreNav: {
394
+ yourReports: "\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13",
395
+ yourReportsDesc: "\u0E14\u0E39\u0E2A\u0E16\u0E32\u0E19\u0E30 \u0E04\u0E33\u0E15\u0E2D\u0E1A\u0E08\u0E32\u0E01\u0E19\u0E31\u0E01\u0E1E\u0E31\u0E12\u0E19\u0E32 \u0E41\u0E25\u0E30\u0E15\u0E2D\u0E1A\u0E01\u0E25\u0E31\u0E1A",
396
+ unreadNew: "\u0E43\u0E2B\u0E21\u0E48",
397
+ communityIdeas: "\u0E44\u0E2D\u0E40\u0E14\u0E35\u0E22\u0E08\u0E32\u0E01\u0E0A\u0E38\u0E21\u0E0A\u0E19",
398
+ communityIdeasDesc: "\u0E42\u0E2B\u0E27\u0E15\u0E1F\u0E35\u0E40\u0E08\u0E2D\u0E23\u0E4C\u0E41\u0E25\u0E30\u0E14\u0E39\u0E2A\u0E34\u0E48\u0E07\u0E17\u0E35\u0E48\u0E1B\u0E25\u0E48\u0E2D\u0E22\u0E41\u0E25\u0E49\u0E27",
399
+ leaderboard: "\u0E01\u0E23\u0E30\u0E14\u0E32\u0E19\u0E1C\u0E39\u0E49\u0E19\u0E33",
400
+ joinCommunity: "\u0E40\u0E02\u0E49\u0E32\u0E23\u0E48\u0E27\u0E21\u0E0A\u0E38\u0E21\u0E0A\u0E19 \xB7 \u0E15\u0E34\u0E14\u0E15\u0E32\u0E21\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E02\u0E49\u0E32\u0E21\u0E41\u0E2D\u0E1B",
401
+ myAccount: "\u0E1A\u0E31\u0E0D\u0E0A\u0E35\u0E02\u0E2D\u0E07\u0E09\u0E31\u0E19"
402
+ },
179
403
  categories: {
180
404
  bug: "\u0E1A\u0E31\u0E01",
181
405
  slow: "\u0E0A\u0E49\u0E32 / \u0E41\u0E25\u0E04",
@@ -221,6 +445,100 @@ var th = {
221
445
  "\u0E2B\u0E19\u0E49\u0E32\u0E04\u0E49\u0E32\u0E07\u0E19\u0E32\u0E19 10 \u0E27\u0E34\u0E19\u0E32\u0E17\u0E35",
222
446
  "\u0E40\u0E25\u0E22\u0E4C\u0E40\u0E2D\u0E32\u0E15\u0E4C\u0E1E\u0E31\u0E07"
223
447
  ]
448
+ },
449
+ assistant: {
450
+ defaultLabel: "\u0E16\u0E32\u0E21",
451
+ defaultGreeting: "\u0E16\u0E32\u0E21\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E01\u0E31\u0E1A\u0E2B\u0E19\u0E49\u0E32\u0E19\u0E35\u0E49 \u2014 \u0E43\u0E0A\u0E49\u0E40\u0E09\u0E1E\u0E32\u0E30\u0E2A\u0E34\u0E48\u0E07\u0E17\u0E35\u0E48\u0E04\u0E38\u0E13\u0E40\u0E2B\u0E47\u0E19\u0E1A\u0E19\u0E2B\u0E19\u0E49\u0E32\u0E08\u0E2D",
452
+ inputPlaceholder: "\u0E1E\u0E34\u0E21\u0E1E\u0E4C\u0E04\u0E33\u0E16\u0E32\u0E21\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u2026",
453
+ sendAriaLabel: "\u0E2A\u0E48\u0E07",
454
+ hubDescription: "\u0E02\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E0A\u0E48\u0E27\u0E22\u0E40\u0E2B\u0E25\u0E37\u0E2D\u0E43\u0E19\u0E01\u0E32\u0E23\u0E43\u0E0A\u0E49\u0E41\u0E2D\u0E1B",
455
+ thinking: "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E04\u0E34\u0E14\u2026",
456
+ errors: {
457
+ noResponse: "\u0E44\u0E21\u0E48\u0E21\u0E35\u0E01\u0E32\u0E23\u0E15\u0E2D\u0E1A\u0E01\u0E25\u0E31\u0E1A \u2014 \u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E01\u0E32\u0E23\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D\u0E41\u0E25\u0E49\u0E27\u0E25\u0E2D\u0E07\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07",
458
+ generic: "\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D\u0E1C\u0E39\u0E49\u0E0A\u0E48\u0E27\u0E22\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49 \u0E25\u0E2D\u0E07\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07\u0E43\u0E19\u0E2D\u0E35\u0E01\u0E2A\u0E31\u0E01\u0E04\u0E23\u0E39\u0E48"
459
+ }
460
+ },
461
+ flows: {
462
+ eyebrows: {
463
+ inbox: "Mushi \xB7 \u0E01\u0E25\u0E48\u0E2D\u0E07\u0E02\u0E32\u0E40\u0E02\u0E49\u0E32",
464
+ roadmap: "Mushi \xB7 \u0E44\u0E2D\u0E40\u0E14\u0E35\u0E22",
465
+ community: "Mushi \xB7 \u0E0A\u0E38\u0E21\u0E0A\u0E19",
466
+ identity: "Mushi \xB7 \u0E1A\u0E31\u0E0D\u0E0A\u0E35",
467
+ signIn: "Mushi \xB7 \u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A",
468
+ allApps: "Mushi \xB7 \u0E17\u0E38\u0E01\u0E41\u0E2D\u0E1B",
469
+ receipt: "Mushi \xB7 \u0E43\u0E1A\u0E23\u0E31\u0E1A",
470
+ thread: "Mushi \xB7 \u0E01\u0E25\u0E48\u0E2D\u0E07\u0E02\u0E32\u0E40\u0E02\u0E49\u0E32"
471
+ },
472
+ reports: {
473
+ title: "\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13",
474
+ loading: "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u2026",
475
+ empty: "\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E08\u0E32\u0E01\u0E40\u0E1A\u0E23\u0E32\u0E27\u0E4C\u0E40\u0E0B\u0E2D\u0E23\u0E4C\u0E19\u0E35\u0E49",
476
+ leaderboardLink: "\u0E01\u0E23\u0E30\u0E14\u0E32\u0E19\u0E1C\u0E39\u0E49\u0E19\u0E33"
477
+ },
478
+ roadmap: {
479
+ title: "\u0E44\u0E2D\u0E40\u0E14\u0E35\u0E22\u0E08\u0E32\u0E01\u0E0A\u0E38\u0E21\u0E0A\u0E19",
480
+ loading: "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14\u0E44\u0E2D\u0E40\u0E14\u0E35\u0E22\u2026",
481
+ empty: "\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E44\u0E2D\u0E40\u0E14\u0E35\u0E22 \u0E40\u0E1B\u0E47\u0E19\u0E04\u0E19\u0E41\u0E23\u0E01\u0E17\u0E35\u0E48\u0E40\u0E2A\u0E19\u0E2D\u0E44\u0E14\u0E49",
482
+ shipped: "\u0E1B\u0E25\u0E48\u0E2D\u0E22\u0E41\u0E25\u0E49\u0E27",
483
+ vote: "\u0E42\u0E2B\u0E27\u0E15",
484
+ voted: "\u0E42\u0E2B\u0E27\u0E15\u0E41\u0E25\u0E49\u0E27",
485
+ voteCount: "{n} \u0E42\u0E2B\u0E27\u0E15",
486
+ untitled: "\u0E44\u0E2D\u0E40\u0E14\u0E35\u0E22\u0E44\u0E21\u0E48\u0E21\u0E35\u0E0A\u0E37\u0E48\u0E2D"
487
+ },
488
+ leaderboard: {
489
+ title: "\u0E01\u0E23\u0E30\u0E14\u0E32\u0E19\u0E1C\u0E39\u0E49\u0E19\u0E33\u0E17\u0E31\u0E48\u0E27\u0E42\u0E25\u0E01",
490
+ loading: "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14\u0E01\u0E23\u0E30\u0E14\u0E32\u0E19\u0E1C\u0E39\u0E49\u0E19\u0E33\u2026",
491
+ empty: "\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E2A\u0E19\u0E31\u0E1A\u0E2A\u0E19\u0E38\u0E19 \u2014 \u0E21\u0E32\u0E40\u0E1B\u0E47\u0E19\u0E04\u0E19\u0E41\u0E23\u0E01",
492
+ signInPrompt: "\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E14\u0E39\u0E2D\u0E31\u0E19\u0E14\u0E31\u0E1A\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13 \u2192",
493
+ myRank: "\u0E2D\u0E31\u0E19\u0E14\u0E31\u0E1A\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E04\u0E37\u0E2D #{rank} \u0E40\u0E14\u0E37\u0E2D\u0E19\u0E19\u0E35\u0E49",
494
+ footer: "\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E2A\u0E19\u0E31\u0E1A\u0E2A\u0E19\u0E38\u0E19\u0E17\u0E31\u0E48\u0E27\u0E42\u0E25\u0E01\u0E40\u0E14\u0E37\u0E2D\u0E19\u0E19\u0E35\u0E49 \xB7 \u0E04\u0E30\u0E41\u0E19\u0E19\u0E23\u0E35\u0E40\u0E0B\u0E47\u0E15\u0E17\u0E38\u0E01\u0E40\u0E14\u0E37\u0E2D\u0E19",
495
+ anon: "\u0E44\u0E21\u0E48\u0E23\u0E30\u0E1A\u0E38\u0E0A\u0E37\u0E48\u0E2D"
496
+ },
497
+ account: {
498
+ title: "\u0E1A\u0E31\u0E0D\u0E0A\u0E35 Mushi",
499
+ checkEmailTitle: "\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E2D\u0E35\u0E40\u0E21\u0E25",
500
+ joinTitle: "\u0E40\u0E02\u0E49\u0E32\u0E23\u0E48\u0E27\u0E21\u0E0A\u0E38\u0E21\u0E0A\u0E19",
501
+ emailLabel: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",
502
+ emailPlaceholder: "\u0E2D\u0E35\u0E40\u0E21\u0E25",
503
+ signInPrompt: "\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E14\u0E39\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E17\u0E38\u0E01\u0E41\u0E2D\u0E1B\u0E41\u0E25\u0E30\u0E44\u0E15\u0E48\u0E2D\u0E31\u0E19\u0E14\u0E31\u0E1A \u0E44\u0E21\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E0A\u0E49\u0E23\u0E2B\u0E31\u0E2A\u0E1C\u0E48\u0E32\u0E19",
504
+ magicLinkSent: "\u0E40\u0E23\u0E32\u0E2A\u0E48\u0E07\u0E25\u0E34\u0E07\u0E01\u0E4C\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u0E44\u0E1B\u0E17\u0E35\u0E48 {email} \u0E41\u0E25\u0E49\u0E27 \u0E04\u0E25\u0E34\u0E01\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13",
505
+ resendEmail: "\u0E2A\u0E48\u0E07\u0E2D\u0E35\u0E40\u0E21\u0E25\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07",
506
+ sendLink: "\u0E2A\u0E48\u0E07\u0E25\u0E34\u0E07\u0E01\u0E4C\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A",
507
+ sending: "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E2A\u0E48\u0E07\u2026",
508
+ crossAppReports: "\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E02\u0E2D\u0E07\u0E09\u0E31\u0E19\u0E17\u0E38\u0E01\u0E41\u0E2D\u0E1B \u2192",
509
+ viewLeaderboard: "\u0E14\u0E39\u0E01\u0E23\u0E30\u0E14\u0E32\u0E19\u0E1C\u0E39\u0E49\u0E19\u0E33\u0E17\u0E31\u0E48\u0E27\u0E42\u0E25\u0E01 \u2192",
510
+ signOut: "\u0E2D\u0E2D\u0E01\u0E08\u0E32\u0E01\u0E23\u0E30\u0E1A\u0E1A",
511
+ rankSummary: "\u0E2D\u0E31\u0E19\u0E14\u0E31\u0E1A #{rank} \xB7 {points} pts \u0E40\u0E14\u0E37\u0E2D\u0E19\u0E19\u0E35\u0E49"
512
+ },
513
+ crossApp: {
514
+ title: "\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E02\u0E2D\u0E07\u0E09\u0E31\u0E19",
515
+ loading: "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u2026",
516
+ empty: "\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19",
517
+ unknownApp: "\u0E41\u0E2D\u0E1B\u0E44\u0E21\u0E48\u0E17\u0E23\u0E32\u0E1A\u0E0A\u0E37\u0E48\u0E2D"
518
+ },
519
+ thread: {
520
+ title: "\u0E40\u0E18\u0E23\u0E14\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19",
521
+ loading: "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14\u0E40\u0E18\u0E23\u0E14\u2026",
522
+ empty: "\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E33\u0E15\u0E2D\u0E1A\u0E08\u0E32\u0E01\u0E17\u0E35\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32",
523
+ confirmFixed: "\u0E43\u0E0A\u0E48 \u0E41\u0E01\u0E49\u0E41\u0E25\u0E49\u0E27",
524
+ notFixed: "\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E41\u0E01\u0E49",
525
+ replyPlaceholder: "\u0E15\u0E2D\u0E1A\u0E19\u0E31\u0E01\u0E1E\u0E31\u0E12\u0E19\u0E32\u2026",
526
+ send: "\u0E2A\u0E48\u0E07"
527
+ },
528
+ success: {
529
+ trackReport: "\u0E15\u0E34\u0E14\u0E15\u0E32\u0E21\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E19\u0E35\u0E49 \u203A",
530
+ receipt: "\u0E43\u0E1A\u0E23\u0E31\u0E1A",
531
+ delivering: "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E2A\u0E48\u0E07\u0E44\u0E1B\u0E22\u0E31\u0E07\u0E17\u0E35\u0E21\u2026",
532
+ queuedOffline: "\u0E04\u0E34\u0E27\u0E2D\u0E2D\u0E1F\u0E44\u0E25\u0E19\u0E4C",
533
+ queuedHint: "\u0E08\u0E30\u0E2A\u0E48\u0E07\u0E17\u0E31\u0E19\u0E17\u0E35\u0E17\u0E35\u0E48\u0E04\u0E38\u0E13\u0E01\u0E25\u0E31\u0E1A\u0E21\u0E32\u0E2D\u0E2D\u0E19\u0E44\u0E25\u0E19\u0E4C",
534
+ trackOnMushi: "\u0E15\u0E34\u0E14\u0E15\u0E32\u0E21\u0E1A\u0E19 Mushi",
535
+ slaDefault: "\u0E40\u0E23\u0E32\u0E08\u0E30\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13"
536
+ },
537
+ featureRequest: {
538
+ label: "\u0E02\u0E2D\u0E1F\u0E35\u0E40\u0E08\u0E2D\u0E23\u0E4C",
539
+ description: "\u0E40\u0E2A\u0E19\u0E2D\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07"
540
+ },
541
+ poweredBy: "Powered by Mushi v{version}"
224
542
  }
225
543
  };
226
544
 
@@ -234,10 +552,22 @@ var es = {
234
552
  submit: "Enviar",
235
553
  submitting: "Enviando\u2026",
236
554
  submitted: "\xA1Gracias! Tu reporte ha sido enviado.",
237
- error: "Algo sali\xF3 mal. Por favor, int\xE9ntalo de nuevo."
555
+ error: "No se pudo enviar tu reporte. Revisa tu conexi\xF3n e int\xE9ntalo de nuevo."
238
556
  },
239
557
  step1: {
240
558
  heading: "\xBFQu\xE9 tipo de problema?",
559
+ reportSectionLabel: "Reportar un problema",
560
+ moreNavLabel: "M\xE1s",
561
+ moreNav: {
562
+ yourReports: "Tus reportes",
563
+ yourReportsDesc: "Ver estado, respuestas del desarrollador y responder",
564
+ unreadNew: "nuevos",
565
+ communityIdeas: "Ideas de la comunidad",
566
+ communityIdeasDesc: "Vota funciones y mira qu\xE9 se lanz\xF3",
567
+ leaderboard: "Clasificaci\xF3n",
568
+ joinCommunity: "Unirse a la comunidad \xB7 Rastrea reportes entre apps",
569
+ myAccount: "Mi cuenta"
570
+ },
241
571
  categories: {
242
572
  bug: "Error",
243
573
  slow: "Lento",
@@ -256,7 +586,7 @@ var es = {
256
586
  step2: {
257
587
  heading: "\xBFQu\xE9 pas\xF3?",
258
588
  intents: {
259
- bug: ["Crash", "Sin respuesta", "P\xE9rdida de datos", "Resultado incorrecto", "Otro"],
589
+ bug: ["Cierre inesperado", "Sin respuesta", "P\xE9rdida de datos", "Resultado incorrecto", "Otro"],
260
590
  slow: ["Carga de p\xE1gina", "Interacci\xF3n", "Llamada API", "Animaci\xF3n", "Otro"],
261
591
  visual: ["Layout roto", "Superposici\xF3n", "Elemento faltante", "Color/fuente incorrecta", "Otro"],
262
592
  confusing: ["Etiqueta confusa", "Sin ayuda", "Flujo inesperado", "Navegaci\xF3n perdida", "Otro"],
@@ -283,6 +613,100 @@ var es = {
283
613
  "La p\xE1gina se congel\xF3 10 segundos",
284
614
  "El dise\xF1o se ve roto aqu\xED"
285
615
  ]
616
+ },
617
+ assistant: {
618
+ defaultLabel: "Preguntar",
619
+ defaultGreeting: "Pregunta sobre esta p\xE1gina \u2014 solo uso lo que ves aqu\xED.",
620
+ inputPlaceholder: "Escribe tu pregunta\u2026",
621
+ sendAriaLabel: "Enviar",
622
+ hubDescription: "Obt\xE9n ayuda para usar esta app",
623
+ thinking: "Pensando\u2026",
624
+ errors: {
625
+ noResponse: "Sin respuesta \u2014 revisa tu conexi\xF3n e int\xE9ntalo de nuevo.",
626
+ generic: "No se pudo contactar al asistente. Int\xE9ntalo en un momento."
627
+ }
628
+ },
629
+ flows: {
630
+ eyebrows: {
631
+ inbox: "Mushi \xB7 Bandeja",
632
+ roadmap: "Mushi \xB7 Ideas",
633
+ community: "Mushi \xB7 Comunidad",
634
+ identity: "Mushi \xB7 Cuenta",
635
+ signIn: "Mushi \xB7 Acceso",
636
+ allApps: "Mushi \xB7 Todas las apps",
637
+ receipt: "Mushi \xB7 Recibo",
638
+ thread: "Mushi \xB7 Bandeja"
639
+ },
640
+ reports: {
641
+ title: "Tus reportes",
642
+ loading: "Cargando reportes\u2026",
643
+ empty: "A\xFAn no hay reportes en este navegador.",
644
+ leaderboardLink: "Clasificaci\xF3n"
645
+ },
646
+ roadmap: {
647
+ title: "Ideas de la comunidad",
648
+ loading: "Cargando ideas\u2026",
649
+ empty: "A\xFAn no hay ideas. S\xE9 el primero en sugerir una.",
650
+ shipped: "Publicado",
651
+ vote: "Votar",
652
+ voted: "Votado",
653
+ voteCount: "{n} votos",
654
+ untitled: "Idea sin t\xEDtulo"
655
+ },
656
+ leaderboard: {
657
+ title: "Clasificaci\xF3n global",
658
+ loading: "Cargando clasificaci\xF3n\u2026",
659
+ empty: "A\xFAn no hay colaboradores \u2014 s\xE9 el primero.",
660
+ signInPrompt: "Inicia sesi\xF3n para ver tu puesto \u2192",
661
+ myRank: "Est\xE1s en el puesto #{rank} este mes",
662
+ footer: "Colaboradores globales este mes \xB7 Los puntos se reinician mensualmente",
663
+ anon: "An\xF3nimo"
664
+ },
665
+ account: {
666
+ title: "Cuenta Mushi",
667
+ checkEmailTitle: "Revisa tu correo",
668
+ joinTitle: "\xDAnete a la comunidad",
669
+ emailLabel: "Correo electr\xF3nico",
670
+ emailPlaceholder: "Correo",
671
+ signInPrompt: "Inicia sesi\xF3n para ver tus reportes en todas las apps y subir en la clasificaci\xF3n. Sin contrase\xF1a.",
672
+ magicLinkSent: "Enviamos un enlace de acceso a {email}. \xC1brelo para conectar tus reportes.",
673
+ resendEmail: "Reenviar correo",
674
+ sendLink: "Enviar enlace de acceso",
675
+ sending: "Enviando\u2026",
676
+ crossAppReports: "Mis reportes en todas las apps \u2192",
677
+ viewLeaderboard: "Ver clasificaci\xF3n global \u2192",
678
+ signOut: "Cerrar sesi\xF3n",
679
+ rankSummary: "Puesto #{rank} \xB7 {points} pts este mes"
680
+ },
681
+ crossApp: {
682
+ title: "Mis reportes",
683
+ loading: "Cargando tus reportes\u2026",
684
+ empty: "A\xFAn no has enviado reportes.",
685
+ unknownApp: "App desconocida"
686
+ },
687
+ thread: {
688
+ title: "Hilo del reporte",
689
+ loading: "Cargando hilo\u2026",
690
+ empty: "A\xFAn no hay respuestas del equipo.",
691
+ confirmFixed: "S\xED, qued\xF3 resuelto",
692
+ notFixed: "A\xFAn no est\xE1 resuelto",
693
+ replyPlaceholder: "Responder al desarrollador\u2026",
694
+ send: "Enviar"
695
+ },
696
+ success: {
697
+ trackReport: "Seguir este reporte \u203A",
698
+ receipt: "Recibo",
699
+ delivering: "Enviando al equipo\u2026",
700
+ queuedOffline: "En cola sin conexi\xF3n",
701
+ queuedHint: "Lo enviaremos en cuanto vuelvas a estar en l\xEDnea.",
702
+ trackOnMushi: "Seguir en Mushi",
703
+ slaDefault: "Revisaremos tu reporte."
704
+ },
705
+ featureRequest: {
706
+ label: "Solicitud de funci\xF3n",
707
+ description: "Sugerir un cambio"
708
+ },
709
+ poweredBy: "Con tecnolog\xEDa de Mushi v{version}"
286
710
  }
287
711
  };
288
712
 
@@ -297,38 +721,122 @@ function getLocale(code) {
297
721
  function getAvailableLocales() {
298
722
  return Object.keys(locales);
299
723
  }
300
-
301
- // src/styles.ts
302
- function getWidgetStyles(theme, accent = "", accentText = "") {
724
+ function getWidgetThemeVars(theme, accent = "", accentText = "") {
303
725
  const isDark = theme === "dark";
304
- const safeHex = (v) => /^#[0-9a-fA-F]{3,8}$/.test(v) ? v : "";
305
- const safeAccent = safeHex(accent);
306
- const safeAccentText = safeHex(accentText);
307
- const paper = isDark ? "#0F0E0C" : "#F8F4ED";
308
- const ink = isDark ? "#F2EBDD" : "#0E0D0B";
309
- const inkMuted = isDark ? "#928B7E" : "#5C5852";
310
- const inkFaint = isDark ? "#5A5650" : "#9A9489";
311
- const inkDim = isDark ? "#7A7268" : "#6E6760";
312
- const rule = isDark ? "rgba(242,235,221,0.10)" : "rgba(14,13,11,0.10)";
313
- const ruleStrong = isDark ? "rgba(242,235,221,0.18)" : "rgba(14,13,11,0.16)";
314
- const widgetAccent = safeAccent || (isDark ? "#FF5A47" : "#E03C2C");
315
- const widgetAccentWash = isDark ? `${widgetAccent}1F` : `${widgetAccent}14`;
316
- const widgetAccentInk = safeAccentText || (isDark ? "#FFE5E0" : "#7A1F15");
317
- const fontDisplay = `'Iowan Old Style', 'Palatino Linotype', 'Palatino', 'Book Antiqua', 'Cambria', Georgia, 'Times New Roman', serif`;
318
- const fontBody = `system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI Variable Display', 'Segoe UI', sans-serif`;
319
- const fontMono = `ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, 'Liberation Mono', monospace`;
320
- const easeStamp = "cubic-bezier(0.22, 1, 0.36, 1)";
726
+ const mode = isDark ? "dark" : "light";
727
+ const pal = core.mushiPalette(mode);
728
+ const accentResolved = core.resolveWidgetAccent(mode, accent, accentText);
729
+ const status = core.MUSHI_REPORTER_STATUS[mode];
730
+ return {
731
+ isDark,
732
+ paper: pal.paper,
733
+ paperRaised: pal.paperRaised,
734
+ ink: pal.ink,
735
+ inkMuted: pal.inkMuted,
736
+ inkFaint: pal.inkFaint,
737
+ inkDim: pal.inkDim,
738
+ rule: pal.rule,
739
+ ruleStrong: pal.ruleStrong,
740
+ widgetAccent: accentResolved.accent,
741
+ widgetAccentWash: accentResolved.accentWash,
742
+ widgetAccentInk: accentResolved.accentInk,
743
+ widgetAccentShadow: isDark ? core.MUSHI_ACCENT_SHADOW.dark : core.MUSHI_ACCENT_SHADOW.light,
744
+ ok: pal.ok,
745
+ danger: pal.danger,
746
+ onAccent: core.MUSHI_ON_ACCENT,
747
+ inverse: core.MUSHI_INVERSE,
748
+ neonBannerBg: core.MUSHI_BANNER_NEON.bg,
749
+ neonBannerFg: core.MUSHI_BANNER_NEON.fg,
750
+ neonBannerBorder: core.MUSHI_BANNER_NEON.border,
751
+ brandBannerBorder: isDark ? core.MUSHI_BANNER_BRAND_BORDER.dark : core.MUSHI_BANNER_BRAND_BORDER.light,
752
+ statusSent: status.sent,
753
+ statusReview: status.review,
754
+ statusFixing: status.fixing,
755
+ statusFixed: status.fixed,
756
+ statusClosedBg: isDark ? "rgba(242,235,221,0.06)" : "rgba(14,13,11,0.05)",
757
+ fontDisplay: core.MUSHI_TYPE.fontDisplay,
758
+ fontBody: core.MUSHI_TYPE.fontBody,
759
+ fontMono: core.MUSHI_TYPE.fontMono,
760
+ easeStamp: core.MUSHI_MOTION.easeStamp,
761
+ zBanner: core.MUSHI_Z.banner,
762
+ zPanel: core.MUSHI_Z.panel,
763
+ zOverlay: core.MUSHI_Z.overlay,
764
+ fabSize: core.MUSHI_GEOMETRY.fabSize,
765
+ panelWidth: core.MUSHI_GEOMETRY.panelWidth,
766
+ panelSheetBreakpoint: core.MUSHI_GEOMETRY.panelSheetBreakpoint
767
+ };
768
+ }
769
+ function getWidgetPreviewTokens(theme) {
770
+ const v = getWidgetThemeVars(theme);
771
+ return {
772
+ paper: v.paper,
773
+ paperRaised: v.paperRaised,
774
+ ink: v.ink,
775
+ inkMuted: v.inkMuted,
776
+ rule: v.ruleStrong,
777
+ vermillion: v.widgetAccent,
778
+ vermillionShadow: v.widgetAccentShadow,
779
+ accentWash: v.widgetAccentWash,
780
+ onAccent: v.onAccent,
781
+ neonBannerBg: v.neonBannerBg,
782
+ neonBannerFg: v.neonBannerFg,
783
+ neonBannerBorder: v.neonBannerBorder,
784
+ brandBannerBorder: v.brandBannerBorder
785
+ };
786
+ }
787
+ function getWidgetStyles(theme, accent = "", accentText = "") {
788
+ const v = getWidgetThemeVars(theme, accent, accentText);
789
+ const {
790
+ isDark,
791
+ paper,
792
+ paperRaised,
793
+ ink,
794
+ inkMuted,
795
+ inkFaint,
796
+ inkDim,
797
+ rule,
798
+ ruleStrong,
799
+ widgetAccent,
800
+ widgetAccentWash,
801
+ widgetAccentInk,
802
+ widgetAccentShadow,
803
+ ok,
804
+ danger,
805
+ onAccent,
806
+ inverse,
807
+ neonBannerBg,
808
+ neonBannerFg,
809
+ neonBannerBorder,
810
+ brandBannerBorder,
811
+ statusSent,
812
+ statusReview,
813
+ statusFixing,
814
+ statusFixed,
815
+ statusClosedBg,
816
+ fontDisplay,
817
+ fontBody,
818
+ fontMono,
819
+ easeStamp,
820
+ zBanner,
821
+ fabSize
822
+ } = v;
823
+ const { sizeBody, lineBody } = core.MUSHI_TYPE;
824
+ const { durationFast } = core.MUSHI_MOTION;
825
+ const { bannerHeight, gutter, panelWidth, panelMaxHeight, panelSheetBreakpoint, edgeTabWidth } = core.MUSHI_GEOMETRY;
826
+ const panelLauncherGap = fabSize + 12;
827
+ const { base: zBase } = core.MUSHI_Z;
828
+ const controlRadius = core.MUSHI_RADIUS.control;
321
829
  return `
322
830
  :host {
323
831
  all: initial;
324
832
  font-family: ${fontBody};
325
- font-size: 14px;
326
- line-height: 1.55;
833
+ font-size: ${sizeBody}px;
834
+ line-height: ${lineBody};
327
835
  color: ${ink};
328
836
  -webkit-font-smoothing: antialiased;
329
837
  -moz-osx-font-smoothing: grayscale;
330
838
  font-feature-settings: 'ss01', 'cv11'; /* nicer system-ui glyphs where supported */
331
- --mushi-ok: ${isDark ? "#4ade80" : "#16a34a"};
839
+ --mushi-ok: ${ok};
332
840
  /* SDK contract: the host element is always pass-through. Only the
333
841
  interactive surfaces (.mushi-trigger, .mushi-banner, .mushi-panel)
334
842
  opt back into pointer events so the widget never creates an
@@ -346,10 +854,10 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
346
854
 
347
855
  .mushi-trigger {
348
856
  position: fixed;
349
- width: 52px;
350
- height: 52px;
857
+ width: ${fabSize}px;
858
+ height: ${fabSize}px;
351
859
  border: 1px solid ${ruleStrong};
352
- border-radius: 4px;
860
+ border-radius: ${controlRadius}px;
353
861
  background: ${paper};
354
862
  color: ${ink};
355
863
  cursor: pointer;
@@ -363,7 +871,7 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
363
871
  0 1px 0 ${rule},
364
872
  0 6px 14px -8px rgba(14,13,11,0.35),
365
873
  inset 0 -3px 0 ${widgetAccent};
366
- transition: transform 200ms ${easeStamp}, box-shadow 200ms ${easeStamp};
874
+ transition: transform ${durationFast}ms ${easeStamp}, box-shadow ${durationFast}ms ${easeStamp};
367
875
  overflow: visible;
368
876
  isolation: isolate;
369
877
  }
@@ -413,23 +921,23 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
413
921
  .mushi-trigger-pulse { animation: none; }
414
922
  }
415
923
  .mushi-trigger.bottom-right {
416
- bottom: var(--mushi-bottom, calc(24px + env(safe-area-inset-bottom, 0px)));
417
- right: var(--mushi-right, calc(24px + env(safe-area-inset-right, 0px)));
924
+ bottom: var(--mushi-bottom, calc(${gutter}px + env(safe-area-inset-bottom, 0px)));
925
+ right: var(--mushi-right, calc(${gutter}px + env(safe-area-inset-right, 0px)));
418
926
  }
419
927
  .mushi-trigger.bottom-left {
420
- bottom: var(--mushi-bottom, calc(24px + env(safe-area-inset-bottom, 0px)));
421
- left: var(--mushi-left, calc(24px + env(safe-area-inset-left, 0px)));
928
+ bottom: var(--mushi-bottom, calc(${gutter}px + env(safe-area-inset-bottom, 0px)));
929
+ left: var(--mushi-left, calc(${gutter}px + env(safe-area-inset-left, 0px)));
422
930
  }
423
931
  .mushi-trigger.top-right {
424
- top: var(--mushi-top, calc(24px + env(safe-area-inset-top, 0px)));
425
- right: var(--mushi-right, calc(24px + env(safe-area-inset-right, 0px)));
932
+ top: var(--mushi-top, calc(${gutter}px + env(safe-area-inset-top, 0px)));
933
+ right: var(--mushi-right, calc(${gutter}px + env(safe-area-inset-right, 0px)));
426
934
  }
427
935
  .mushi-trigger.top-left {
428
- top: var(--mushi-top, calc(24px + env(safe-area-inset-top, 0px)));
429
- left: var(--mushi-left, calc(24px + env(safe-area-inset-left, 0px)));
936
+ top: var(--mushi-top, calc(${gutter}px + env(safe-area-inset-top, 0px)));
937
+ left: var(--mushi-left, calc(${gutter}px + env(safe-area-inset-left, 0px)));
430
938
  }
431
939
  .mushi-trigger.edge-tab {
432
- width: 32px;
940
+ width: ${edgeTabWidth}px;
433
941
  height: 88px;
434
942
  border-radius: 4px 0 0 4px;
435
943
  writing-mode: vertical-rl;
@@ -454,8 +962,8 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
454
962
  inset 3px 0 0 ${widgetAccent};
455
963
  }
456
964
  .mushi-trigger.shrunk {
457
- width: 36px;
458
- height: 36px;
965
+ width: ${bannerHeight}px;
966
+ height: ${bannerHeight}px;
459
967
  opacity: 0.82;
460
968
  transform: scale(0.92);
461
969
  }
@@ -475,7 +983,7 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
475
983
  }
476
984
  .mushi-trigger.dragging {
477
985
  cursor: grabbing !important;
478
- z-index: calc(var(--z, 99999) + 2);
986
+ z-index: calc(var(--z, ${zBase}) + 2);
479
987
  transition: none !important;
480
988
  box-shadow:
481
989
  0 1px 0 ${rule},
@@ -495,9 +1003,9 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
495
1003
 
496
1004
  .mushi-panel {
497
1005
  position: fixed;
498
- width: 360px;
499
- max-width: calc(100vw - 32px);
500
- max-height: min(480px, calc(100dvh - 120px - var(--mushi-keyboard-inset, 0px)));
1006
+ width: ${panelWidth}px;
1007
+ max-width: calc(100vw - ${core.MUSHI_SPACING.wide}px);
1008
+ max-height: min(${panelMaxHeight}px, calc(100dvh - 120px - var(--mushi-keyboard-inset, 0px)));
501
1009
  background: ${paper};
502
1010
  border: 1px solid ${ruleStrong};
503
1011
  border-radius: 6px;
@@ -516,7 +1024,7 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
516
1024
  bottom: calc(var(--mushi-keyboard-inset, 0px) + 8px) !important;
517
1025
  }
518
1026
  /* On narrow mobile, fill the width as a bottom sheet */
519
- @media (max-width: 480px) {
1027
+ @media (max-width: ${panelSheetBreakpoint}px) {
520
1028
  .mushi-panel {
521
1029
  left: 0 !important;
522
1030
  right: 0 !important;
@@ -533,23 +1041,23 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
533
1041
  .mushi-panel.open { animation: mushi-stamp-in 320ms ${easeStamp} both; }
534
1042
  .mushi-panel.closed { display: none; }
535
1043
  .mushi-panel.bottom-right {
536
- bottom: var(--mushi-panel-bottom, calc(var(--mushi-bottom, 24px) + 64px));
537
- right: var(--mushi-right, calc(24px + env(safe-area-inset-right, 0px)));
1044
+ bottom: var(--mushi-panel-bottom, calc(var(--mushi-bottom, ${gutter}px) + ${panelLauncherGap}px));
1045
+ right: var(--mushi-right, calc(${gutter}px + env(safe-area-inset-right, 0px)));
538
1046
  --mushi-origin: bottom right;
539
1047
  }
540
1048
  .mushi-panel.bottom-left {
541
- bottom: var(--mushi-panel-bottom, calc(var(--mushi-bottom, 24px) + 64px));
542
- left: var(--mushi-left, calc(24px + env(safe-area-inset-left, 0px)));
1049
+ bottom: var(--mushi-panel-bottom, calc(var(--mushi-bottom, ${gutter}px) + ${panelLauncherGap}px));
1050
+ left: var(--mushi-left, calc(${gutter}px + env(safe-area-inset-left, 0px)));
543
1051
  --mushi-origin: bottom left;
544
1052
  }
545
1053
  .mushi-panel.top-right {
546
- top: var(--mushi-panel-top, calc(var(--mushi-top, 24px) + 64px));
547
- right: var(--mushi-right, calc(24px + env(safe-area-inset-right, 0px)));
1054
+ top: var(--mushi-panel-top, calc(var(--mushi-top, ${gutter}px) + ${panelLauncherGap}px));
1055
+ right: var(--mushi-right, calc(${gutter}px + env(safe-area-inset-right, 0px)));
548
1056
  --mushi-origin: top right;
549
1057
  }
550
1058
  .mushi-panel.top-left {
551
- top: var(--mushi-panel-top, calc(var(--mushi-top, 24px) + 64px));
552
- left: var(--mushi-left, calc(24px + env(safe-area-inset-left, 0px)));
1059
+ top: var(--mushi-panel-top, calc(var(--mushi-top, ${gutter}px) + ${panelLauncherGap}px));
1060
+ left: var(--mushi-left, calc(${gutter}px + env(safe-area-inset-left, 0px)));
553
1061
  --mushi-origin: top left;
554
1062
  }
555
1063
  .mushi-outdated {
@@ -598,7 +1106,7 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
598
1106
  height: 22px;
599
1107
  border-radius: 3px;
600
1108
  background: ${widgetAccent};
601
- color: #FAF7F0;
1109
+ color: ${onAccent};
602
1110
  font-family: ${fontDisplay};
603
1111
  font-size: 14px;
604
1112
  font-weight: 600;
@@ -829,29 +1337,29 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
829
1337
  border: 1px solid transparent;
830
1338
  }
831
1339
  .mushi-status-sent {
832
- color: ${isDark ? "#A8C4FF" : "#1E4A8C"};
833
- background: ${isDark ? "rgba(120,160,255,0.12)" : "rgba(30,74,140,0.08)"};
834
- border-color: ${isDark ? "rgba(120,160,255,0.22)" : "rgba(30,74,140,0.16)"};
1340
+ color: ${statusSent.fg};
1341
+ background: ${statusSent.bg};
1342
+ border-color: ${statusSent.border};
835
1343
  }
836
1344
  .mushi-status-review {
837
- color: ${isDark ? "#FFD27A" : "#8A5A00"};
838
- background: ${isDark ? "rgba(255,190,90,0.12)" : "rgba(180,120,0,0.10)"};
839
- border-color: ${isDark ? "rgba(255,190,90,0.22)" : "rgba(180,120,0,0.18)"};
1345
+ color: ${statusReview.fg};
1346
+ background: ${statusReview.bg};
1347
+ border-color: ${statusReview.border};
840
1348
  }
841
1349
  .mushi-status-fixing {
842
- color: ${isDark ? "#FFB899" : "#9A3D12"};
843
- background: ${isDark ? "rgba(255,120,60,0.12)" : "rgba(224,60,44,0.10)"};
844
- border-color: ${isDark ? "rgba(255,120,60,0.24)" : "rgba(224,60,44,0.18)"};
1350
+ color: ${statusFixing.fg};
1351
+ background: ${statusFixing.bg};
1352
+ border-color: ${statusFixing.border};
845
1353
  }
846
1354
  .mushi-status-fixed {
847
- color: ${isDark ? "#8FE3B0" : "#1F6B3A"};
848
- background: ${isDark ? "rgba(80,200,130,0.12)" : "rgba(31,107,58,0.10)"};
849
- border-color: ${isDark ? "rgba(80,200,130,0.22)" : "rgba(31,107,58,0.18)"};
1355
+ color: ${statusFixed.fg};
1356
+ background: ${statusFixed.bg};
1357
+ border-color: ${statusFixed.border};
850
1358
  }
851
1359
  .mushi-status-closed,
852
1360
  .mushi-status-unknown {
853
1361
  color: ${inkMuted};
854
- background: ${isDark ? "rgba(242,235,221,0.06)" : "rgba(14,13,11,0.05)"};
1362
+ background: ${statusClosedBg};
855
1363
  border-color: ${ruleStrong};
856
1364
  }
857
1365
  .mushi-report-when {
@@ -916,8 +1424,7 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
916
1424
  display: block;
917
1425
  font-family: ${fontMono};
918
1426
  font-size: 10px;
919
- letter-spacing: 0.08em;
920
- text-transform: uppercase;
1427
+ letter-spacing: 0.04em;
921
1428
  margin-bottom: 3px;
922
1429
  }
923
1430
  .mushi-thread-comment p,
@@ -937,10 +1444,8 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
937
1444
  border-left: 2px solid ${widgetAccent};
938
1445
  background: ${widgetAccentWash};
939
1446
  color: ${widgetAccentInk};
940
- font-family: ${fontMono};
941
- font-size: 11px;
942
- letter-spacing: 0.12em;
943
- text-transform: uppercase;
1447
+ font-family: ${fontDisplay};
1448
+ font-size: 13px;
944
1449
  margin: 4px 0 14px;
945
1450
  border-radius: 0 3px 3px 0;
946
1451
  }
@@ -950,38 +1455,8 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
950
1455
  flex-direction: column;
951
1456
  gap: 2px;
952
1457
  }
953
- .mushi-intent-btn {
954
- display: flex;
955
- align-items: center;
956
- justify-content: space-between;
957
- gap: 12px;
958
- padding: 12px 0;
959
- border: none;
960
- border-bottom: 1px solid ${rule};
961
- background: transparent;
962
- cursor: pointer;
963
- color: inherit;
964
- text-align: left;
965
- font-family: ${fontDisplay};
966
- font-size: 15px;
967
- transition: padding 220ms ${easeStamp}, color 220ms ${easeStamp};
968
- }
969
- .mushi-intent-btn::after {
970
- content: '\u2192';
971
- font-family: ${fontMono};
972
- font-size: 13px;
973
- color: ${inkFaint};
974
- opacity: 0;
975
- transform: translateX(-4px);
976
- transition: opacity 220ms ${easeStamp}, transform 220ms ${easeStamp};
977
- }
978
- .mushi-intent-btn:last-child { border-bottom: none; }
979
- .mushi-intent-btn:hover { padding-left: 6px; color: ${widgetAccent}; }
980
- .mushi-intent-btn:hover::after { opacity: 1; transform: translateX(0); color: ${widgetAccent}; }
981
- .mushi-intent-btn:focus-visible {
982
- outline: none;
983
- padding-left: 6px;
984
- box-shadow: inset 2px 0 0 ${widgetAccent};
1458
+ .mushi-intents .mushi-option-btn {
1459
+ grid-template-columns: 1fr auto;
985
1460
  }
986
1461
 
987
1462
  /* Example starter chips \u2014 reduce first-report activation energy */
@@ -1191,7 +1666,7 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
1191
1666
  border: 1px solid ${widgetAccent};
1192
1667
  border-radius: 3px;
1193
1668
  background: ${widgetAccent};
1194
- color: #FAF7F0;
1669
+ color: ${onAccent};
1195
1670
  font-family: ${fontMono};
1196
1671
  font-size: 11px;
1197
1672
  letter-spacing: 0.16em;
@@ -1199,7 +1674,7 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
1199
1674
  cursor: pointer;
1200
1675
  overflow: hidden;
1201
1676
  transition: transform 180ms ${easeStamp}, box-shadow 180ms ${easeStamp};
1202
- box-shadow: 0 2px 0 ${isDark ? "#7A1F15" : "#9A2A1E"};
1677
+ box-shadow: 0 2px 0 ${widgetAccentShadow};
1203
1678
  }
1204
1679
  .mushi-submit::after {
1205
1680
  content: '';
@@ -1213,10 +1688,10 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
1213
1688
  }
1214
1689
  .mushi-submit:hover {
1215
1690
  transform: translateY(-1px);
1216
- box-shadow: 0 3px 0 ${isDark ? "#7A1F15" : "#9A2A1E"};
1691
+ box-shadow: 0 3px 0 ${widgetAccentShadow};
1217
1692
  }
1218
1693
  .mushi-submit:hover::after { opacity: 1; transform: scale(1.4); }
1219
- .mushi-submit:active { transform: translateY(1px); box-shadow: 0 1px 0 ${isDark ? "#7A1F15" : "#9A2A1E"}; }
1694
+ .mushi-submit:active { transform: translateY(1px); box-shadow: 0 1px 0 ${widgetAccentShadow}; }
1220
1695
  .mushi-submit:disabled {
1221
1696
  cursor: wait;
1222
1697
  opacity: 0.7;
@@ -1326,7 +1801,7 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
1326
1801
  /* \u2500\u2500 Two-way receipt (success step) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
1327
1802
  /* The receipt block sits below the stamp/meta. Three states: */
1328
1803
  /* 1. delivering... (spinner pill, while host onSubmit awaits) */
1329
- /* 2. confirmed (Receipt #abc12345 + Track on Mushi link) */
1804
+ /* 2. confirmed (Receipt id + Track on Mushi link) */
1330
1805
  /* 3. queued offline (warn pill \u2014 degrade gracefully) */
1331
1806
  .mushi-success-receipt {
1332
1807
  margin-top: 14px;
@@ -1386,7 +1861,7 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
1386
1861
  padding: 6px 10px;
1387
1862
  border-radius: 4px;
1388
1863
  background: ${widgetAccent};
1389
- color: #fff;
1864
+ color: ${inverse};
1390
1865
  font-family: ${fontMono};
1391
1866
  font-size: 11px;
1392
1867
  letter-spacing: 0.10em;
@@ -1549,7 +2024,7 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
1549
2024
 
1550
2025
  /* \u2500\u2500\u2500 Beta mode strip (category step) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
1551
2026
  /* Brand palette: widgetAccent (vermillion) + washi ink for the strip.
1552
- The previous indigo (#6366f1) is the single most recognisable AI-template
2027
+ The previous generic indigo purple is the single most recognisable AI-template
1553
2028
  colour; replaced with the widget's own vermillion wash so the beta panel
1554
2029
  reads as a Mushi-native surface rather than a generic SaaS plug-in. */
1555
2030
 
@@ -1576,7 +2051,7 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
1576
2051
  padding: 1px 6px;
1577
2052
  border-radius: 3px;
1578
2053
  background: ${widgetAccent};
1579
- color: #FAF7F0;
2054
+ color: ${onAccent};
1580
2055
  font-family: ${fontMono};
1581
2056
  font-size: 9px;
1582
2057
  font-weight: 700;
@@ -1695,7 +2170,7 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
1695
2170
  fix \u2014 Workstream C). Horizontal padding also clears the left/right
1696
2171
  insets for landscape notches. */
1697
2172
  box-sizing: border-box;
1698
- min-height: 36px;
2173
+ min-height: ${bannerHeight}px;
1699
2174
  display: flex;
1700
2175
  align-items: center;
1701
2176
  justify-content: center;
@@ -1706,7 +2181,7 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
1706
2181
  letter-spacing: 0.04em;
1707
2182
  white-space: nowrap;
1708
2183
  overflow: hidden;
1709
- z-index: var(--mushi-banner-z, 99998);
2184
+ z-index: var(--mushi-banner-z, ${zBanner});
1710
2185
  animation: mushi-banner-slide-in 0.3s ${easeStamp} both;
1711
2186
  }
1712
2187
 
@@ -1715,17 +2190,17 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
1715
2190
 
1716
2191
  /* --- neon variant (electric lime \u2014 dev / beta tool aesthetic) --- */
1717
2192
  .mushi-banner.neon {
1718
- background: #0FFF50;
1719
- color: #0a1a0a;
1720
- border-bottom: 1.5px solid #00C43A;
2193
+ background: ${neonBannerBg};
2194
+ color: ${neonBannerFg};
2195
+ border-bottom: 1.5px solid ${neonBannerBorder};
1721
2196
  }
1722
2197
  .mushi-banner.neon.bottom {
1723
- border-top: 1.5px solid #00C43A;
2198
+ border-top: 1.5px solid ${neonBannerBorder};
1724
2199
  border-bottom: none;
1725
2200
  }
1726
2201
  .mushi-banner.neon .mushi-banner-btn {
1727
2202
  background: rgba(0,0,0,0.14);
1728
- color: #0a1a0a;
2203
+ color: ${neonBannerFg};
1729
2204
  border: 1px solid rgba(0,0,0,0.22);
1730
2205
  }
1731
2206
  .mushi-banner.neon .mushi-banner-btn:hover {
@@ -1735,16 +2210,16 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
1735
2210
  /* --- brand variant (widgetAccent \u2014 editorial, app-quality) --- */
1736
2211
  .mushi-banner.brand {
1737
2212
  background: ${widgetAccent};
1738
- color: #fff;
1739
- border-bottom: 1.5px solid ${isDark ? "#C4321E" : "#B52F1F"};
2213
+ color: ${inverse};
2214
+ border-bottom: 1.5px solid ${brandBannerBorder};
1740
2215
  }
1741
2216
  .mushi-banner.brand.bottom {
1742
- border-top: 1.5px solid ${isDark ? "#C4321E" : "#B52F1F"};
2217
+ border-top: 1.5px solid ${brandBannerBorder};
1743
2218
  border-bottom: none;
1744
2219
  }
1745
2220
  .mushi-banner.brand .mushi-banner-btn {
1746
2221
  background: rgba(255,255,255,0.18);
1747
- color: #fff;
2222
+ color: ${inverse};
1748
2223
  border: 1px solid rgba(255,255,255,0.32);
1749
2224
  }
1750
2225
  .mushi-banner.brand .mushi-banner-btn:hover {
@@ -1787,7 +2262,7 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
1787
2262
  .mushi-banner--rich {
1788
2263
  justify-content: space-between;
1789
2264
  gap: 12px;
1790
- min-height: 36px;
2265
+ min-height: ${bannerHeight}px;
1791
2266
  height: auto;
1792
2267
  padding: 4px 12px 4px 16px;
1793
2268
  white-space: normal;
@@ -1848,7 +2323,7 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
1848
2323
  font-size: 11px;
1849
2324
  }
1850
2325
  .mushi-banner-actions::-webkit-scrollbar { display: none; }
1851
- @media (max-width: 480px) {
2326
+ @media (max-width: ${panelSheetBreakpoint}px) {
1852
2327
  /* Phones: keep only the primary bug CTA (+ dismiss outside the nav). */
1853
2328
  .mushi-banner-actions .mushi-banner-extra { display: none; }
1854
2329
  }
@@ -1971,6 +2446,17 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
1971
2446
 
1972
2447
  .mushi-community-footer{display:flex;align-items:center;gap:8px;padding:10px 0 2px;border-top:1px solid ${isDark ? "rgba(255,255,255,0.07)" : "rgba(0,0,0,0.07)"};margin-top:8px;flex-wrap:wrap}
1973
2448
  .mushi-community-btn{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
2449
+ .mushi-section-label{
2450
+ margin:0 0 6px;
2451
+ font-family:${fontMono};
2452
+ font-size:11px;
2453
+ letter-spacing:0.06em;
2454
+ text-transform:uppercase;
2455
+ color:${inkFaint};
2456
+ }
2457
+ .mushi-more-nav{margin-top:4px}
2458
+ .mushi-more-nav-panel{display:flex;flex-direction:column;gap:0;border-top:1px dashed ${rule};padding-top:2px}
2459
+ .mushi-more-nav-link{align-self:flex-start;margin:6px 0 2px;padding:0}
1974
2460
  /* \u2500\u2500 "More issue types \u2192" toggle (progressive disclosure) \u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
1975
2461
  .mushi-more-toggle {
1976
2462
  display: flex;
@@ -2034,7 +2520,7 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
2034
2520
  .mushi-account-rank{display:block}
2035
2521
  .mushi-xapp-app-head{display:flex;align-items:center;gap:8px;margin:0 0 6px}
2036
2522
  .mushi-xapp-app-name{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;margin:0}
2037
- .mushi-app-icon{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:6px;border:1px solid ${isDark ? "rgba(255,255,255,0.12)" : "rgba(0,0,0,0.1)"};background:#fff;overflow:hidden;flex-shrink:0}
2523
+ .mushi-app-icon{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:6px;border:1px solid ${isDark ? "rgba(255,255,255,0.12)" : "rgba(0,0,0,0.1)"};background:${paperRaised};overflow:hidden;flex-shrink:0}
2038
2524
  .mushi-app-icon-img{display:block;width:16px;height:16px;object-fit:contain}
2039
2525
  .mushi-app-icon-initials{font-size:9px;font-weight:700;color:${inkDim};line-height:1}
2040
2526
  .mushi-app-icon-initials-only{background:${isDark ? "rgba(255,255,255,0.06)" : "rgba(0,0,0,0.04)"}}
@@ -2051,14 +2537,14 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
2051
2537
  .mushi-assistant-chip:hover{background:${isDark ? "rgba(255,90,71,0.22)" : "rgba(224,60,44,0.14)"}}
2052
2538
  .mushi-assistant-chip:focus-visible{outline:2px solid ${widgetAccent};outline-offset:2px}
2053
2539
  .mushi-assistant-msg{max-width:85%;padding:8px 12px;border-radius:12px;font:400 14px/1.45 ${fontBody};white-space:pre-wrap;word-break:break-word}
2054
- .mushi-assistant-msg-user{align-self:flex-end;background:${widgetAccent};color:#fff;border-bottom-right-radius:4px}
2540
+ .mushi-assistant-msg-user{align-self:flex-end;background:${widgetAccent};color:${inverse};border-bottom-right-radius:4px}
2055
2541
  .mushi-assistant-msg-bot{align-self:flex-start;background:${isDark ? "rgba(255,255,255,0.06)" : "rgba(0,0,0,0.05)"};color:${ink};border-bottom-left-radius:4px}
2056
2542
  .mushi-assistant-thinking{opacity:0.6;font-size:18px;letter-spacing:2px}
2057
- .mushi-assistant-error{align-self:flex-start;color:${isDark ? "#F87171" : "#DC2626"};font-size:12px;padding:4px 2px}
2543
+ .mushi-assistant-error{align-self:flex-start;color:${danger};font-size:12px;padding:4px 2px}
2058
2544
  .mushi-assistant-form{display:flex;align-items:flex-end;gap:8px;border-top:1px solid ${rule};padding-top:8px}
2059
2545
  .mushi-assistant-input{flex:1;resize:none;max-height:120px;border:1px solid ${ruleStrong};border-radius:10px;padding:8px 12px;font:400 14px/1.4 ${fontBody};background:${paper};color:${ink}}
2060
2546
  .mushi-assistant-input:focus-visible{outline:2px solid ${widgetAccent};outline-offset:1px}
2061
- .mushi-assistant-submit{flex-shrink:0;width:36px;height:36px;border:none;border-radius:50%;background:${widgetAccent};color:#fff;font-size:18px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:transform .15s,opacity .15s}
2547
+ .mushi-assistant-submit{flex-shrink:0;width:36px;height:36px;border:none;border-radius:50%;background:${widgetAccent};color:${inverse};font-size:18px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:transform .15s,opacity .15s}
2062
2548
  .mushi-assistant-submit:hover{transform:translateY(-1px)}
2063
2549
  .mushi-assistant-submit:disabled{opacity:0.5;cursor:default;transform:none}
2064
2550
  .mushi-assistant-submit:focus-visible{outline:2px solid ${widgetAccent};outline-offset:2px}
@@ -2067,7 +2553,7 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
2067
2553
 
2068
2554
  // src/version.ts
2069
2555
  var MUSHI_SDK_PACKAGE = "@mushi-mushi/web";
2070
- var MUSHI_SDK_VERSION = "1.20.0" ;
2556
+ var MUSHI_SDK_VERSION = "1.21.1" ;
2071
2557
  var CATEGORY_ICONS = {
2072
2558
  bug: "\u26A0\uFE0F",
2073
2559
  slow: "\u{1F40C}",
@@ -2266,8 +2752,9 @@ function renderStep(ctx) {
2266
2752
  }
2267
2753
  }
2268
2754
  function renderAssistantStep(ctx) {
2269
- const label = ctx.callbacks.assistantLabel || "Ask";
2270
- const greeting = ctx.callbacks.assistantGreeting || "Ask me anything about this app.";
2755
+ const t = ctx.locale;
2756
+ const label = ctx.callbacks.assistantLabel || t.assistant.defaultLabel;
2757
+ const greeting = ctx.callbacks.assistantGreeting || t.assistant.defaultGreeting;
2271
2758
  const suggestions = ctx.callbacks.assistantSuggestions ?? [];
2272
2759
  const empty = ctx.assistantTurns.length === 0;
2273
2760
  const transcript = empty ? `<div class="mushi-assistant-greeting">${escapeHtml(greeting)}</div>
@@ -2276,7 +2763,7 @@ function renderAssistantStep(ctx) {
2276
2763
  const opts = turn.options && turn.options.length ? `<div class="mushi-assistant-suggestions">${turn.options.map((o) => `<button type="button" class="mushi-assistant-chip" data-action="assistant-suggest" data-value="${escapeHtml(o)}">${escapeHtml(o)}</button>`).join("")}</div>` : "";
2277
2764
  return `<div class="mushi-assistant-msg ${cls}">${escapeHtml(turn.text)}</div>${opts}`;
2278
2765
  }).join("");
2279
- const thinking = ctx.assistantSending ? `<div class="mushi-assistant-msg mushi-assistant-msg-bot mushi-assistant-thinking">\u2026</div>` : "";
2766
+ const thinking = ctx.assistantSending ? `<div class="mushi-assistant-msg mushi-assistant-msg-bot mushi-assistant-thinking" role="status" aria-live="polite">${escapeHtml(t.assistant.thinking)}</div>` : "";
2280
2767
  const error = ctx.assistantError ? `<div class="mushi-assistant-error" role="alert">${escapeHtml(ctx.assistantError)}</div>` : "";
2281
2768
  return `
2282
2769
  ${renderHeader(ctx, { title: label, showBack: true })}
@@ -2290,10 +2777,10 @@ function renderAssistantStep(ctx) {
2290
2777
  <textarea
2291
2778
  class="mushi-assistant-input"
2292
2779
  rows="1"
2293
- placeholder="Type your question\u2026"
2780
+ placeholder="${escapeHtml(t.assistant.inputPlaceholder)}"
2294
2781
  ${ctx.assistantSending ? "disabled" : ""}
2295
2782
  ></textarea>
2296
- <button type="submit" class="mushi-assistant-submit" ${ctx.assistantSending ? "disabled" : ""} aria-label="Send">\u2191</button>
2783
+ <button type="submit" class="mushi-assistant-submit" ${ctx.assistantSending ? "disabled" : ""} aria-label="${escapeHtml(t.assistant.sendAriaLabel)}">\u2191</button>
2297
2784
  </form>
2298
2785
  </div>
2299
2786
  `;
@@ -2313,7 +2800,7 @@ function renderOutdatedBanner(ctx) {
2313
2800
  }
2314
2801
  function renderBrandFooter(ctx) {
2315
2802
  if (ctx.config.brandFooter === false) return "";
2316
- return `<div class="mushi-brand-footer">Powered by Mushi v${escapeHtml(ctx.sdkVersion)}</div>`;
2803
+ return `<div class="mushi-brand-footer">${escapeHtml(ctx.locale.flows.poweredBy.replace("{version}", ctx.sdkVersion))}</div>`;
2317
2804
  }
2318
2805
  function renderHeader(ctx, opts) {
2319
2806
  const t = ctx.locale;
@@ -2334,14 +2821,76 @@ function renderHeader(ctx, opts) {
2334
2821
  </div>
2335
2822
  `;
2336
2823
  }
2337
- function renderStepIndicator(_ctx, currentStep) {
2338
- const segments = [];
2339
- for (let i = 1; i <= TOTAL_STEPS; i++) {
2340
- const cls = i < currentStep ? "mushi-step-num done" : i === currentStep ? "mushi-step-num active" : "mushi-step-num";
2341
- segments.push(`<span class="${cls}">${pad2(i)}</span>`);
2342
- if (i < TOTAL_STEPS) segments.push('<span class="mushi-step-sep" aria-hidden="true"></span>');
2824
+ function countMoreNavItems(ctx) {
2825
+ let n = 1;
2826
+ if (ctx.callbacks.onFeatureBoardRequest) n += 1;
2827
+ if (ctx.callbacks.assistantEnabled) n += 1;
2828
+ if (ctx.rewardsState) n += 1;
2829
+ n += 1;
2830
+ return n;
2831
+ }
2832
+ function renderMoreNavSection(ctx) {
2833
+ const t = ctx.locale;
2834
+ const mn = t.step1.moreNav;
2835
+ const count = countMoreNavItems(ctx);
2836
+ const toggleLabel = `${t.step1.moreNavLabel} (${count})`;
2837
+ const unread = ctx.unreadCount();
2838
+ const reportsLabel = unread ? `${mn.yourReports} (${unread} ${mn.unreadNew})` : mn.yourReports;
2839
+ const panelItems = [
2840
+ `<button type="button" class="mushi-option-btn mushi-reports-entry" data-action="reports">
2841
+ <span class="mushi-option-icon" aria-hidden="true">\u{1F4EC}</span>
2842
+ <div class="mushi-option-text">
2843
+ <span class="mushi-option-label">${escapeHtml(reportsLabel)}</span>
2844
+ <span class="mushi-option-desc">${escapeHtml(mn.yourReportsDesc)}</span>
2845
+ </div>
2846
+ <span class="mushi-option-arrow" aria-hidden="true">\u2192</span>
2847
+ </button>`
2848
+ ];
2849
+ if (ctx.callbacks.onFeatureBoardRequest) {
2850
+ panelItems.push(`
2851
+ <button type="button" class="mushi-option-btn" data-action="roadmap">
2852
+ <span class="mushi-option-icon" aria-hidden="true">\u{1F5F3}\uFE0F</span>
2853
+ <div class="mushi-option-text">
2854
+ <span class="mushi-option-label">${escapeHtml(mn.communityIdeas)}</span>
2855
+ <span class="mushi-option-desc">${escapeHtml(mn.communityIdeasDesc)}</span>
2856
+ </div>
2857
+ <span class="mushi-option-arrow" aria-hidden="true">\u2192</span>
2858
+ </button>`);
2859
+ }
2860
+ if (ctx.callbacks.assistantEnabled) {
2861
+ panelItems.push(`
2862
+ <button type="button" class="mushi-option-btn" data-action="assistant">
2863
+ <span class="mushi-option-icon" aria-hidden="true">\u{1F4AC}</span>
2864
+ <div class="mushi-option-text">
2865
+ <span class="mushi-option-label">${escapeHtml(ctx.callbacks.assistantLabel || t.assistant.defaultLabel)}</span>
2866
+ <span class="mushi-option-desc">${escapeHtml(t.assistant.hubDescription)}</span>
2867
+ </div>
2868
+ <span class="mushi-option-arrow" aria-hidden="true">\u2192</span>
2869
+ </button>`);
2870
+ }
2871
+ if (ctx.rewardsState) {
2872
+ panelItems.push(`
2873
+ <button type="button" class="mushi-link-btn mushi-more-nav-link" data-action="open-leaderboard">\u{1F3C6} ${escapeHtml(mn.leaderboard)}</button>`);
2343
2874
  }
2344
- return `<div class="mushi-step-indicator" aria-hidden="true">${segments.join("")}</div>`;
2875
+ panelItems.push(`
2876
+ <button type="button" class="mushi-link-btn mushi-more-nav-link" data-action="open-account">
2877
+ ${ctx.testerInfo ? `\u{1F464} ${escapeHtml(ctx.testerInfo.public_handle ?? ctx.testerInfo.display_name ?? mn.myAccount)}` : `\u{1F310} ${escapeHtml(mn.joinCommunity)}`}
2878
+ </button>`);
2879
+ const panelHtml = ctx.showMoreNav ? `<div class="mushi-more-nav-panel">${panelItems.join("")}</div>` : "";
2880
+ return `
2881
+ <div class="mushi-more-nav">
2882
+ <button
2883
+ type="button"
2884
+ class="mushi-more-toggle mushi-more-nav-toggle"
2885
+ data-action="toggle-more-nav"
2886
+ aria-expanded="${ctx.showMoreNav ? "true" : "false"}"
2887
+ >
2888
+ <span class="mushi-more-toggle-text">${escapeHtml(toggleLabel)}</span>
2889
+ <span class="mushi-more-toggle-arrow" aria-hidden="true">${ctx.showMoreNav ? "\u25BE" : "\u25B8"}</span>
2890
+ </button>
2891
+ ${panelHtml}
2892
+ </div>
2893
+ `;
2345
2894
  }
2346
2895
  function renderCategoryStep(ctx) {
2347
2896
  const t = ctx.locale;
@@ -2382,42 +2931,21 @@ function renderCategoryStep(ctx) {
2382
2931
  ${renderHeader(ctx, { title: t.step1.heading, step: STEP_NUMBER.category })}
2383
2932
  ${ctx.config.betaMode?.enabled ? renderBetaStrip(ctx) : ""}
2384
2933
  <div class="mushi-body" role="radiogroup" aria-label="${escapeHtml(t.step1.heading)}">
2385
- <button type="button" class="mushi-option-btn mushi-reports-entry" data-action="reports">
2386
- <span class="mushi-option-icon" aria-hidden="true">\u{1F4EC}</span>
2387
- <div class="mushi-option-text">
2388
- <span class="mushi-option-label">Your reports${ctx.unreadCount() ? ` (${ctx.unreadCount()} new)` : ""}</span>
2389
- <span class="mushi-option-desc">See status, developer replies, and respond</span>
2390
- </div>
2391
- <span class="mushi-option-arrow" aria-hidden="true">\u2192</span>
2392
- </button>
2934
+ <p class="mushi-section-label">${escapeHtml(t.step1.reportSectionLabel)}</p>
2393
2935
  ${renderFeatureRequestEntry(ctx)}
2394
- ${ctx.callbacks.onFeatureBoardRequest ? `
2395
- <button type="button" class="mushi-option-btn" data-action="roadmap">
2396
- <span class="mushi-option-icon" aria-hidden="true">\u{1F5F3}\uFE0F</span>
2397
- <div class="mushi-option-text">
2398
- <span class="mushi-option-label">Community ideas</span>
2399
- <span class="mushi-option-desc">Vote on features and see what shipped</span>
2400
- </div>
2401
- <span class="mushi-option-arrow" aria-hidden="true">\u2192</span>
2402
- </button>` : ""}
2403
2936
  ${primaryCategories}
2404
2937
  ${secondaryHtml}
2405
2938
  ${ctx.rewardsState ? renderRewardsNudge(ctx) : ""}
2406
- <div class="mushi-community-footer">
2407
- <button type="button" class="mushi-link-btn mushi-community-btn" data-action="open-account">
2408
- ${ctx.testerInfo ? `\u{1F464} ${escapeHtml(ctx.testerInfo.public_handle ?? ctx.testerInfo.display_name ?? "My account")}` : "\u{1F310} Join community \xB7 Track reports across apps"}
2409
- </button>
2410
- ${ctx.rewardsState ? `<button type="button" class="mushi-link-btn" data-action="open-leaderboard">\u{1F3C6} Leaderboard</button>` : ""}
2411
- </div>
2939
+ ${renderMoreNavSection(ctx)}
2412
2940
  </div>
2413
- ${renderStepIndicator(ctx, STEP_NUMBER.category)}
2414
2941
  `;
2415
2942
  }
2416
2943
  function renderFeatureRequestEntry(ctx) {
2417
2944
  const enabled = ctx.config.featureRequestCard !== false;
2418
2945
  if (!enabled) return "";
2419
- const label = ctx.config.featureRequestLabel || "Feature request";
2420
- const desc = ctx.config.featureRequestDescription || "Suggest something new \u2014 even rough ideas help us prioritise";
2946
+ const f = ctx.locale.flows.featureRequest;
2947
+ const label = ctx.config.featureRequestLabel || f.label;
2948
+ const desc = ctx.config.featureRequestDescription || f.description;
2421
2949
  return `
2422
2950
  <button
2423
2951
  type="button"
@@ -2450,7 +2978,7 @@ function renderBetaChangelog(ctx) {
2450
2978
  function renderBetaStrip(ctx) {
2451
2979
  const beta = ctx.config.betaMode;
2452
2980
  const appName = escapeHtml(beta.appName ?? "This app");
2453
- const message = beta.message ? escapeHtml(beta.message) : `${appName} is in early development \u2014 updates ship weekly`;
2981
+ const message = beta.message ? escapeHtml(beta.message) : `${appName} is in early development`;
2454
2982
  const email = beta.contactEmail ? escapeHtml(beta.contactEmail) : null;
2455
2983
  const perks = beta.perks ?? [];
2456
2984
  return `
@@ -2470,6 +2998,7 @@ function renderBetaStrip(ctx) {
2470
2998
  `;
2471
2999
  }
2472
3000
  function renderReportsStep(ctx) {
3001
+ const f = ctx.locale.flows;
2473
3002
  const reports = ctx.reporterReports.map((report) => {
2474
3003
  const title = report.summary ?? report.description ?? `Report ${report.id.slice(0, 8)}`;
2475
3004
  const tone = reporterStatusTone(report.status);
@@ -2488,50 +3017,53 @@ function renderReportsStep(ctx) {
2488
3017
  <span class="mushi-report-chevron" aria-hidden="true">\u203A</span>
2489
3018
  </button>`;
2490
3019
  }).join("");
2491
- const leaderboardBtn = ctx.rewardsState ? `<button type="button" class="mushi-leaderboard-link" data-action="open-leaderboard">\u{1F3C6} Leaderboard</button>` : "";
3020
+ const leaderboardBtn = ctx.rewardsState ? `<button type="button" class="mushi-leaderboard-link" data-action="open-leaderboard">\u{1F3C6} ${escapeHtml(f.reports.leaderboardLink)}</button>` : "";
2492
3021
  return `
2493
- ${renderHeader(ctx, { title: "Your reports", showBack: true, eyebrow: "Mushi \xB7 Inbox" })}
3022
+ ${renderHeader(ctx, { title: f.reports.title, showBack: true, eyebrow: f.eyebrows.inbox })}
2494
3023
  <div class="mushi-body">
2495
- ${ctx.reporterLoading ? '<p class="mushi-muted">Loading reports\u2026</p>' : ""}
3024
+ ${ctx.reporterLoading ? `<p class="mushi-muted">${escapeHtml(f.reports.loading)}</p>` : ""}
2496
3025
  ${ctx.reporterError ? `<p class="mushi-error-inline">${escapeHtml(ctx.reporterError)}</p>` : ""}
2497
- ${reports || (!ctx.reporterLoading ? '<p class="mushi-muted">No reports from this browser yet.</p>' : "")}
3026
+ ${reports || (!ctx.reporterLoading ? `<p class="mushi-muted">${escapeHtml(f.reports.empty)}</p>` : "")}
2498
3027
  ${leaderboardBtn}
2499
3028
  </div>
2500
3029
  `;
2501
3030
  }
2502
3031
  function renderRoadmapStep(ctx) {
3032
+ const f = ctx.locale.flows;
2503
3033
  const rows = ctx.featureBoard.map((ticket) => {
2504
3034
  const id = String(ticket.id ?? "");
2505
- const subject = escapeHtml(String(ticket.subject ?? "Untitled idea"));
3035
+ const subject = escapeHtml(String(ticket.subject ?? f.roadmap.untitled));
2506
3036
  const votes = Number(ticket.vote_count ?? 0);
2507
3037
  const shipped = Boolean(ticket.shipped_at);
2508
3038
  const voted = Boolean(ticket.my_vote);
2509
- const status = shipped ? "Shipped" : String(ticket.status_label ?? ticket.status ?? "open");
3039
+ const status = shipped ? f.roadmap.shipped : String(ticket.status_label ?? ticket.status ?? "open");
3040
+ const voteLabel = f.roadmap.voteCount.replace("{n}", String(votes));
2510
3041
  return `
2511
3042
  <div class="mushi-report-row mushi-roadmap-row">
2512
3043
  <div class="mushi-report-main">
2513
3044
  <span class="mushi-report-title">${subject}</span>
2514
3045
  <span class="mushi-report-meta">
2515
3046
  <span class="mushi-report-status">${escapeHtml(status)}</span>
2516
- <span class="mushi-report-when">${votes} vote${votes === 1 ? "" : "s"}</span>
3047
+ <span class="mushi-report-when">${escapeHtml(voteLabel)}</span>
2517
3048
  </span>
2518
3049
  </div>
2519
3050
  ${ctx.callbacks.onFeatureBoardVote ? `
2520
3051
  <button type="button" class="mushi-vote-btn" data-vote-id="${escapeHtml(id)}" aria-pressed="${voted}">
2521
- ${voted ? "Voted" : "Vote"}
3052
+ ${voted ? escapeHtml(f.roadmap.voted) : escapeHtml(f.roadmap.vote)}
2522
3053
  </button>` : ""}
2523
3054
  </div>`;
2524
3055
  }).join("");
2525
3056
  return `
2526
- ${renderHeader(ctx, { title: "Community ideas", showBack: true, eyebrow: "Mushi \xB7 Roadmap" })}
3057
+ ${renderHeader(ctx, { title: f.roadmap.title, showBack: true, eyebrow: f.eyebrows.roadmap })}
2527
3058
  <div class="mushi-body">
2528
- ${ctx.reporterLoading ? '<p class="mushi-muted">Loading ideas\u2026</p>' : ""}
3059
+ ${ctx.reporterLoading ? `<p class="mushi-muted">${escapeHtml(f.roadmap.loading)}</p>` : ""}
2529
3060
  ${ctx.reporterError ? `<p class="mushi-error-inline">${escapeHtml(ctx.reporterError)}</p>` : ""}
2530
- ${rows || (!ctx.reporterLoading ? '<p class="mushi-muted">No community ideas yet. Be the first to suggest one.</p>' : "")}
3061
+ ${rows || (!ctx.reporterLoading ? `<p class="mushi-muted">${escapeHtml(f.roadmap.empty)}</p>` : "")}
2531
3062
  </div>
2532
3063
  `;
2533
3064
  }
2534
3065
  function renderLeaderboardStep(ctx) {
3066
+ const f = ctx.locale.flows;
2535
3067
  const isGlobal = ctx.globalLeaderboard !== null || ctx.globalLeaderboardLoading;
2536
3068
  const entries = isGlobal ? ctx.globalLeaderboard ?? [] : (ctx.leaderboardEntries ?? []).map((e) => ({
2537
3069
  tester_id: "",
@@ -2549,88 +3081,91 @@ function renderLeaderboardStep(ctx) {
2549
3081
  return `
2550
3082
  <div class="mushi-lb-row ${rank === 1 ? "mushi-lb-top" : ""}${isMe ? " mushi-lb-me" : ""}">
2551
3083
  <span class="mushi-lb-rank">#${rank}</span>
2552
- <span class="mushi-lb-name">${escapeHtml(e.public_handle ?? e.display_name ?? "Anon")}</span>
3084
+ <span class="mushi-lb-name">${escapeHtml(e.public_handle ?? e.display_name ?? f.leaderboard.anon)}</span>
2553
3085
  <span class="mushi-lb-pts">${(e.points_30d ?? e.total_points).toLocaleString()} pts</span>
2554
3086
  </div>
2555
3087
  `;
2556
3088
  }).join("");
2557
- const myRankBadge = myRank ? `<div class="mushi-lb-myrank">You are ranked <strong>#${myRank}</strong> this month</div>` : !ctx.testerJwt ? `<button type="button" class="mushi-link-btn" data-action="open-account">Sign in to see your rank \u2192</button>` : "";
3089
+ const myRankBadge = myRank ? `<div class="mushi-lb-myrank">${escapeHtml(f.leaderboard.myRank.replace("{rank}", String(myRank)))}</div>` : !ctx.testerJwt ? `<button type="button" class="mushi-link-btn" data-action="open-account">${escapeHtml(f.leaderboard.signInPrompt)}</button>` : "";
2558
3090
  return `
2559
- ${renderHeader(ctx, { title: "\u{1F3C6} Global Leaderboard", showBack: true, eyebrow: "Mushi \xB7 Community" })}
3091
+ ${renderHeader(ctx, { title: f.leaderboard.title, showBack: true, eyebrow: f.eyebrows.community })}
2560
3092
  <div class="mushi-body">
2561
- ${loading ? '<p class="mushi-muted">Loading leaderboard\u2026</p>' : ""}
2562
- ${!loading && !entries.length ? '<p class="mushi-muted">No contributors yet \u2014 be the first!</p>' : ""}
3093
+ ${loading ? `<p class="mushi-muted">${escapeHtml(f.leaderboard.loading)}</p>` : ""}
3094
+ ${!loading && !entries.length ? `<p class="mushi-muted">${escapeHtml(f.leaderboard.empty)}</p>` : ""}
2563
3095
  <div class="mushi-lb-list">${rows}</div>
2564
3096
  ${myRankBadge}
2565
- <p class="mushi-lb-note">Global contributors this month \xB7 Points refresh monthly</p>
3097
+ <p class="mushi-lb-note">${escapeHtml(f.leaderboard.footer)}</p>
2566
3098
  </div>
2567
3099
  `;
2568
3100
  }
2569
3101
  function renderAccountStep(ctx) {
3102
+ const f = ctx.locale.flows;
2570
3103
  const tester = ctx.testerInfo;
2571
3104
  if (tester) {
2572
- const handle = tester.public_handle ?? tester.display_name ?? "Tester";
3105
+ const handle = tester.public_handle ?? tester.display_name ?? f.leaderboard.anon;
2573
3106
  const rep = ctx.testerReputation;
3107
+ const rankLine = rep ? f.account.rankSummary.replace("{rank}", String(rep.rank ?? "\u2014")).replace("{points}", (rep.points_30d ?? 0).toLocaleString()) : "";
2574
3108
  return `
2575
- ${renderHeader(ctx, { title: "\u866B Mushi Account", showBack: true, eyebrow: "Mushi \xB7 Identity" })}
3109
+ ${renderHeader(ctx, { title: f.account.title, showBack: true, eyebrow: f.eyebrows.identity })}
2576
3110
  <div class="mushi-body">
2577
3111
  <div class="mushi-account-card">
2578
3112
  <div class="mushi-account-avatar">${escapeHtml(handle.charAt(0).toUpperCase())}</div>
2579
3113
  <div class="mushi-account-info">
2580
3114
  <strong>${escapeHtml(handle)}</strong>
2581
- ${rep ? `<span class="mushi-account-rank">Rank #${rep.rank ?? "\u2014"} \xB7 ${(rep.points_30d ?? 0).toLocaleString()} pts this month</span>` : ""}
3115
+ ${rep ? `<span class="mushi-account-rank">${escapeHtml(rankLine)}</span>` : ""}
2582
3116
  </div>
2583
3117
  </div>
2584
3118
  <button type="button" class="mushi-nav-item" data-action="open-cross-app-reports">
2585
- My reports across all apps \u2192
3119
+ ${escapeHtml(f.account.crossAppReports)}
2586
3120
  </button>
2587
3121
  <button type="button" class="mushi-nav-item" data-action="open-global-leaderboard">
2588
- View global leaderboard \u2192
3122
+ ${escapeHtml(f.account.viewLeaderboard)}
2589
3123
  </button>
2590
- <button type="button" class="mushi-link-btn" data-action="sign-out-tester">Sign out</button>
3124
+ <button type="button" class="mushi-link-btn" data-action="sign-out-tester">${escapeHtml(f.account.signOut)}</button>
2591
3125
  </div>
2592
3126
  `;
2593
3127
  }
2594
3128
  if (ctx.magicLinkSent) {
2595
3129
  return `
2596
- ${renderHeader(ctx, { title: "\u866B Check your email", showBack: true, eyebrow: "Mushi \xB7 Sign in" })}
3130
+ ${renderHeader(ctx, { title: f.account.checkEmailTitle, showBack: true, eyebrow: f.eyebrows.signIn })}
2597
3131
  <div class="mushi-body">
2598
- <p class="mushi-muted">We sent a sign-in link to <strong>${escapeHtml(ctx.magicLinkEmail)}</strong>. Click it to connect your reports across apps and join the community.</p>
2599
- <button type="button" class="mushi-link-btn" data-action="resend-magic-link">Resend email</button>
3132
+ <p class="mushi-muted">${escapeHtml(f.account.magicLinkSent.replace("{email}", ctx.magicLinkEmail))}</p>
3133
+ <button type="button" class="mushi-link-btn" data-action="resend-magic-link">${escapeHtml(f.account.resendEmail)}</button>
2600
3134
  ${ctx.magicLinkError ? `<p class="mushi-error">${escapeHtml(ctx.magicLinkError)}</p>` : ""}
2601
3135
  </div>
2602
3136
  `;
2603
3137
  }
2604
3138
  return `
2605
- ${renderHeader(ctx, { title: "\u866B Join the community", showBack: true, eyebrow: "Mushi \xB7 Sign in" })}
3139
+ ${renderHeader(ctx, { title: f.account.joinTitle, showBack: true, eyebrow: f.eyebrows.signIn })}
2606
3140
  <div class="mushi-body">
2607
- <p class="mushi-muted">Sign in to see your reports across all apps and climb the global leaderboard. No password needed.</p>
2608
- <label class="mushi-label" for="mushi-email-input">Email address</label>
3141
+ <p class="mushi-muted">${escapeHtml(f.account.signInPrompt)}</p>
3142
+ <label class="mushi-label" for="mushi-email-input">${escapeHtml(f.account.emailLabel)}</label>
2609
3143
  <input
2610
3144
  id="mushi-email-input"
2611
3145
  type="email"
2612
3146
  class="mushi-textarea"
2613
3147
  data-role="magic-link-email"
2614
- placeholder="you@example.com"
3148
+ placeholder="${escapeHtml(f.account.emailPlaceholder)}"
2615
3149
  autocomplete="email"
2616
3150
  value="${escapeHtml(ctx.magicLinkEmail)}"
2617
3151
  style="padding: 10px 12px; height: auto; resize: none;"
2618
3152
  />
2619
3153
  ${ctx.magicLinkError ? `<p class="mushi-error">${escapeHtml(ctx.magicLinkError)}</p>` : ""}
2620
3154
  <button type="button" class="mushi-submit" data-action="send-magic-link"${ctx.magicLinkSending ? ' disabled aria-disabled="true"' : ""}>
2621
- <span>${ctx.magicLinkSending ? "Sending\u2026" : "Send sign-in link"}</span><span class="mushi-submit-arrow" aria-hidden="true">\u2192</span>
3155
+ <span>${ctx.magicLinkSending ? escapeHtml(f.account.sending) : escapeHtml(f.account.sendLink)}</span><span class="mushi-submit-arrow" aria-hidden="true">\u2192</span>
2622
3156
  </button>
2623
3157
  </div>
2624
3158
  `;
2625
3159
  }
2626
3160
  function renderCrossAppReportsStep(ctx) {
3161
+ const f = ctx.locale.flows;
2627
3162
  const reports = ctx.crossAppReports ?? [];
2628
3163
  const grouped = /* @__PURE__ */ new Map();
2629
3164
  for (const r of reports) {
2630
3165
  const key = r.project_id ?? "unknown";
2631
3166
  if (!grouped.has(key)) {
2632
3167
  grouped.set(key, {
2633
- name: r.app_name ?? "Unknown App",
3168
+ name: r.app_name ?? f.crossApp.unknownApp,
2634
3169
  slug: r.app_slug ?? null,
2635
3170
  domain: r.app_domain ?? null,
2636
3171
  reports: []
@@ -2665,15 +3200,16 @@ function renderCrossAppReportsStep(ctx) {
2665
3200
  `;
2666
3201
  }).join("");
2667
3202
  return `
2668
- ${renderHeader(ctx, { title: "My reports", showBack: true, eyebrow: "Mushi \xB7 All apps" })}
3203
+ ${renderHeader(ctx, { title: f.crossApp.title, showBack: true, eyebrow: f.eyebrows.allApps })}
2669
3204
  <div class="mushi-body">
2670
- ${ctx.crossAppLoading ? '<p class="mushi-muted">Loading your reports\u2026</p>' : ""}
2671
- ${!ctx.crossAppLoading && !reports.length ? '<p class="mushi-muted">No reports filed yet.</p>' : ""}
3205
+ ${ctx.crossAppLoading ? `<p class="mushi-muted">${escapeHtml(f.crossApp.loading)}</p>` : ""}
3206
+ ${!ctx.crossAppLoading && !reports.length ? `<p class="mushi-muted">${escapeHtml(f.crossApp.empty)}</p>` : ""}
2672
3207
  ${rows}
2673
3208
  </div>
2674
3209
  `;
2675
3210
  }
2676
3211
  function renderReportDetailStep(ctx) {
3212
+ const f = ctx.locale.flows;
2677
3213
  const report = ctx.reporterReports.find((r) => r.id === ctx.selectedReportId);
2678
3214
  const status = report?.status ?? "unknown";
2679
3215
  const tone = reporterStatusTone(status);
@@ -2685,7 +3221,7 @@ function renderReportDetailStep(ctx) {
2685
3221
  </div>
2686
3222
  `).join("");
2687
3223
  return `
2688
- ${renderHeader(ctx, { title: "Report thread", showBack: true, eyebrow: "Mushi \xB7 Inbox" })}
3224
+ ${renderHeader(ctx, { title: f.thread.title, showBack: true, eyebrow: f.eyebrows.thread })}
2689
3225
  <div class="mushi-body">
2690
3226
  <div class="mushi-thread-summary">
2691
3227
  <div class="mushi-thread-summary-meta">
@@ -2695,12 +3231,12 @@ function renderReportDetailStep(ctx) {
2695
3231
  <p>${escapeHtml(report?.summary ?? report?.description ?? "Report details")}</p>
2696
3232
  </div>
2697
3233
  <div class="mushi-thread">
2698
- ${ctx.reporterLoading ? '<p class="mushi-muted">Loading thread\u2026</p>' : comments || '<p class="mushi-muted">No developer replies yet.</p>'}
3234
+ ${ctx.reporterLoading ? `<p class="mushi-muted">${escapeHtml(f.thread.loading)}</p>` : comments || `<p class="mushi-muted">${escapeHtml(f.thread.empty)}</p>`}
2699
3235
  </div>
2700
3236
  ${["fixed", "resolved", "verified"].includes(status) ? `
2701
3237
  <div class="mushi-verify-actions" role="group" aria-label="Fix verification">
2702
- <button type="button" class="mushi-intent-btn" data-action="reporter-confirms">Yes, fixed for me</button>
2703
- <button type="button" class="mushi-intent-btn" data-action="reporter-not-fixed">Not fixed yet</button>
3238
+ <button type="button" class="mushi-option-btn" data-action="reporter-confirms">${escapeHtml(f.thread.confirmFixed)}</button>
3239
+ <button type="button" class="mushi-option-btn" data-action="reporter-not-fixed">${escapeHtml(f.thread.notFixed)}</button>
2704
3240
  </div>
2705
3241
  ` : ""}
2706
3242
  <textarea class="mushi-textarea" data-role="reporter-reply" rows="3" placeholder="Reply to the developer\u2026"></textarea>
@@ -2716,8 +3252,9 @@ function renderIntentStep(ctx) {
2716
3252
  const customEntry = ctx.resolveCustomCategory(catId);
2717
3253
  const intents = customEntry?.intents ?? (t.step2.intents[catId] || []);
2718
3254
  const options = intents.map((intent) => `
2719
- <button type="button" class="mushi-intent-btn" data-intent="${escapeHtml(intent)}">
2720
- ${escapeHtml(intent)}
3255
+ <button type="button" class="mushi-option-btn" data-intent="${escapeHtml(intent)}">
3256
+ <span class="mushi-option-text"><span class="mushi-option-label">${escapeHtml(intent)}</span></span>
3257
+ <span class="mushi-option-arrow" aria-hidden="true">\u2192</span>
2721
3258
  </button>
2722
3259
  `).join("");
2723
3260
  const icon = ctx.categoryIcon(catId);
@@ -2733,7 +3270,6 @@ function renderIntentStep(ctx) {
2733
3270
  ${options}
2734
3271
  </div>
2735
3272
  </div>
2736
- ${renderStepIndicator(ctx, STEP_NUMBER.intent)}
2737
3273
  `;
2738
3274
  }
2739
3275
  function renderDetailsStep(ctx) {
@@ -2803,7 +3339,6 @@ function renderDetailsStep(ctx) {
2803
3339
  <span class="mushi-submit-arrow" aria-hidden="true">\u2192</span>
2804
3340
  </button>
2805
3341
  </div>
2806
- ${renderStepIndicator(ctx, STEP_NUMBER.details)}
2807
3342
  `;
2808
3343
  }
2809
3344
  function renderSuccessStep(ctx) {
@@ -2824,19 +3359,20 @@ function renderSuccessStep(ctx) {
2824
3359
  ${ctx.rewardsState ? renderSuccessRewards(ctx) : ""}
2825
3360
  ${ctx.config.betaMode?.enabled ? renderBetaSuccessFooter(ctx) : ""}
2826
3361
  <button type="button" class="mushi-link-btn mushi-success-my-reports" data-action="view-my-reports">
2827
- \u{1F4EC} Track this report &rsaquo;
3362
+ ${escapeHtml(ctx.locale.flows.success.trackReport)}
2828
3363
  </button>
2829
3364
  </div>
2830
3365
  </div>
2831
3366
  `;
2832
3367
  }
2833
3368
  function renderSuccessReceipt(ctx) {
3369
+ const s = ctx.locale.flows.success;
2834
3370
  if (ctx.lastSubmitQueuedOffline) {
2835
3371
  return `
2836
3372
  <div class="mushi-success-receipt" role="status">
2837
3373
  <div class="mushi-success-receipt-row mushi-success-receipt-warn">
2838
- <span class="mushi-success-receipt-label">Queued offline</span>
2839
- <span class="mushi-success-receipt-hint">We&rsquo;ll send it the moment you&rsquo;re back online.</span>
3374
+ <span class="mushi-success-receipt-label">${escapeHtml(s.queuedOffline)}</span>
3375
+ <span class="mushi-success-receipt-hint">${escapeHtml(s.queuedHint)}</span>
2840
3376
  </div>
2841
3377
  </div>
2842
3378
  `;
@@ -2846,7 +3382,7 @@ function renderSuccessReceipt(ctx) {
2846
3382
  <div class="mushi-success-receipt" role="status">
2847
3383
  <div class="mushi-success-receipt-row">
2848
3384
  <span class="mushi-success-receipt-spinner" aria-hidden="true"></span>
2849
- <span class="mushi-success-receipt-hint">Delivering to the team\u2026</span>
3385
+ <span class="mushi-success-receipt-hint">${escapeHtml(s.delivering)}</span>
2850
3386
  </div>
2851
3387
  ${renderSlaLine(ctx)}
2852
3388
  </div>
@@ -2858,7 +3394,7 @@ function renderSuccessReceipt(ctx) {
2858
3394
  return `
2859
3395
  <div class="mushi-success-receipt" role="status">
2860
3396
  <div class="mushi-success-receipt-row">
2861
- <span class="mushi-success-receipt-label">Receipt</span>
3397
+ <span class="mushi-success-receipt-label">${escapeHtml(s.receipt)}</span>
2862
3398
  <button
2863
3399
  type="button"
2864
3400
  class="mushi-success-receipt-id"
@@ -2874,7 +3410,7 @@ function renderSuccessReceipt(ctx) {
2874
3410
  href="${escapeHtml(trackHref)}"
2875
3411
  target="_blank"
2876
3412
  rel="noopener noreferrer"
2877
- >Track on Mushi <span aria-hidden="true">\u2197</span></a>
3413
+ >${escapeHtml(s.trackOnMushi)} <span aria-hidden="true">\u2197</span></a>
2878
3414
  ` : ""}
2879
3415
  ${renderSlaLine(ctx)}
2880
3416
  </div>
@@ -2885,7 +3421,7 @@ function renderSlaLine(ctx) {
2885
3421
  if (sla) {
2886
3422
  return `<div class="mushi-success-sla">${escapeHtml(sla)}</div>`;
2887
3423
  }
2888
- return `<div class="mushi-success-sla mushi-success-sla-default">A human will look at this within a working day.</div>`;
3424
+ return `<div class="mushi-success-sla mushi-success-sla-default">${escapeHtml(ctx.locale.flows.success.slaDefault)}</div>`;
2889
3425
  }
2890
3426
  function renderBetaSuccessFooter(ctx) {
2891
3427
  const beta = ctx.config.betaMode;
@@ -2894,7 +3430,6 @@ function renderBetaSuccessFooter(ctx) {
2894
3430
  return `
2895
3431
  <div class="mushi-beta-success-footer" role="note" aria-label="Beta feedback acknowledgement">
2896
3432
  ${email ? `<div class="mushi-beta-success-line">\u{1F4EC} Sent to ${email}</div>` : `<div class="mushi-beta-success-line">\u{1F4EC} Sent to ${appName}</div>`}
2897
- <div class="mushi-beta-success-line mushi-beta-success-dim">We aim to review within 48h \xB7 thank you for helping build this</div>
2898
3433
  </div>
2899
3434
  `;
2900
3435
  }
@@ -2984,7 +3519,7 @@ var MushiWidget = class _MushiWidget {
2984
3519
  environments: config.environments ?? {},
2985
3520
  smartHide: config.smartHide ?? false,
2986
3521
  draggable: config.draggable ?? false,
2987
- brandFooter: config.brandFooter ?? true,
3522
+ brandFooter: config.brandFooter ?? false,
2988
3523
  outdatedBanner: config.outdatedBanner ?? "auto",
2989
3524
  screenshotSensitiveHint: config.screenshotSensitiveHint ?? true,
2990
3525
  betaMode: config.betaMode ?? {},
@@ -3003,7 +3538,7 @@ var MushiWidget = class _MushiWidget {
3003
3538
  this.locale = getLocale(this.config.locale === "auto" ? void 0 : this.config.locale);
3004
3539
  this.host = document.createElement("div");
3005
3540
  this.host.id = "mushi-mushi-widget";
3006
- this.shadow = this.host.attachShadow({ mode: "closed" });
3541
+ this.shadow = this.host.attachShadow({ mode: "open" });
3007
3542
  }
3008
3543
  sdkVersion;
3009
3544
  host;
@@ -3029,6 +3564,8 @@ var MushiWidget = class _MushiWidget {
3029
3564
  viaFeatureRequest = false;
3030
3565
  /** Whether the category list is fully expanded (progressive disclosure). */
3031
3566
  showAllCategories = false;
3567
+ /** Secondary hub nav (inbox, assistant, community) collapsed under "More". */
3568
+ showMoreNav = false;
3032
3569
  screenshotAttached = false;
3033
3570
  screenshotCapturing = false;
3034
3571
  screenshotError = false;
@@ -3248,6 +3785,7 @@ var MushiWidget = class _MushiWidget {
3248
3785
  if (!this.isOpen) return;
3249
3786
  this.isOpen = false;
3250
3787
  this.showAllCategories = false;
3788
+ this.showMoreNav = false;
3251
3789
  this.render();
3252
3790
  this.callbacks.onClose();
3253
3791
  }
@@ -3290,10 +3828,10 @@ var MushiWidget = class _MushiWidget {
3290
3828
  this.assistantTurns.push({ role: "assistant", text: reply.text ?? "\u2026" });
3291
3829
  }
3292
3830
  } else {
3293
- this.assistantError = "No response \u2014 please try again.";
3831
+ this.assistantError = this.locale.assistant.errors.noResponse;
3294
3832
  }
3295
3833
  } catch {
3296
- this.assistantError = "Something went wrong. Please try again.";
3834
+ this.assistantError = this.locale.assistant.errors.generic;
3297
3835
  } finally {
3298
3836
  this.assistantSending = false;
3299
3837
  this.render();
@@ -4216,13 +4754,8 @@ var MushiWidget = class _MushiWidget {
4216
4754
  }
4217
4755
  /** Tier accent colour for the rewards UI. */
4218
4756
  tierColor(slug) {
4219
- const colors = {
4220
- free: "#6b7280",
4221
- explorer: "#3b82f6",
4222
- contributor: "#8b5cf6",
4223
- champion: "#f59e0b"
4224
- };
4225
- return colors[slug] ?? "#6c47ff";
4757
+ const colors = core.MUSHI_TIER_COLORS;
4758
+ return colors[slug] ?? core.MUSHI_TIER_COLORS.default;
4226
4759
  }
4227
4760
  /**
4228
4761
  * Build the read-only snapshot + bound helper closures the stateless view
@@ -4281,6 +4814,7 @@ var MushiWidget = class _MushiWidget {
4281
4814
  assistantSending: this.assistantSending,
4282
4815
  assistantError: this.assistantError,
4283
4816
  showAllCategories: this.showAllCategories,
4817
+ showMoreNav: this.showMoreNav,
4284
4818
  pageFaviconHref: core.readPageFaviconHref()
4285
4819
  };
4286
4820
  }
@@ -4323,13 +4857,20 @@ var MushiWidget = class _MushiWidget {
4323
4857
  this.selectedIntent = null;
4324
4858
  this.viaFeatureRequest = false;
4325
4859
  }
4326
- if (this.step === "category") this.showAllCategories = false;
4860
+ if (this.step === "category") {
4861
+ this.showAllCategories = false;
4862
+ this.showMoreNav = false;
4863
+ }
4327
4864
  this.render();
4328
4865
  });
4329
4866
  panel.querySelector('[data-action="show-all-categories"]')?.addEventListener("click", () => {
4330
4867
  this.showAllCategories = true;
4331
4868
  this.render();
4332
4869
  });
4870
+ panel.querySelector('[data-action="toggle-more-nav"]')?.addEventListener("click", () => {
4871
+ this.showMoreNav = !this.showMoreNav;
4872
+ this.render();
4873
+ });
4333
4874
  panel.querySelector('[data-action="assistant"]')?.addEventListener("click", () => {
4334
4875
  this.openAssistantTab();
4335
4876
  });
@@ -4660,6 +5201,14 @@ var MushiWidget = class _MushiWidget {
4660
5201
  this.render();
4661
5202
  }
4662
5203
  }
5204
+ /** Refresh My Reports data for unread badges without opening the inbox panel. */
5205
+ async refreshReporterInboxQuiet() {
5206
+ try {
5207
+ this.reporterReports = await this.callbacks.onReporterReportsRequest?.() ?? [];
5208
+ if (this.isOpen) this.render();
5209
+ } catch {
5210
+ }
5211
+ }
4663
5212
  async loadReporterReports() {
4664
5213
  this.step = "reports";
4665
5214
  this.reporterLoading = true;
@@ -4751,6 +5300,14 @@ var MushiWidget = class _MushiWidget {
4751
5300
  getRecorderStep() {
4752
5301
  return this.step;
4753
5302
  }
5303
+ /** QA / Playwright: category-step IA without piercing closed shadow from page JS. */
5304
+ getRecorderCategoryStepIA() {
5305
+ return {
5306
+ sectionLabel: this.shadow.querySelector(".mushi-section-label")?.textContent?.trim() ?? "",
5307
+ moreToggle: !!this.shadow.querySelector('[data-action="toggle-more-nav"]'),
5308
+ footerStepIndicators: this.shadow.querySelectorAll(".mushi-step-indicator").length
5309
+ };
5310
+ }
4754
5311
  getRecorderTrigger() {
4755
5312
  return this.shadow.querySelector(".mushi-trigger");
4756
5313
  }
@@ -4825,6 +5382,7 @@ function exposeMarketingRecorder(widget) {
4825
5382
  const api = {
4826
5383
  ready: () => widget.getIsMounted(),
4827
5384
  getStep: () => widget.getRecorderStep(),
5385
+ getCategoryStepIA: () => widget.getRecorderCategoryStepIA(),
4828
5386
  getTriggerCenter: () => centerOf(widget.getRecorderTrigger()),
4829
5387
  getCategoryCenter: (category) => centerOf(widget.getRecorderCategoryButton(category)),
4830
5388
  getIntentCenter: (label) => centerOf(widget.getRecorderIntentButton(label)),
@@ -4838,8 +5396,6 @@ function exposeMarketingRecorder(widget) {
4838
5396
  };
4839
5397
  globalThis.__mushiRecorder = api;
4840
5398
  }
4841
-
4842
- // src/rewards.ts
4843
5399
  var MIN_FLUSH_INTERVAL = 3e4;
4844
5400
  var DEFAULT_FLUSH_INTERVAL = 3e5;
4845
5401
  var DWELL_SAMPLE_INTERVAL = 6e4;
@@ -4850,7 +5406,7 @@ var flushTimer = null;
4850
5406
  var dwellTimer = null;
4851
5407
  var currentUserId = null;
4852
5408
  var currentUserTraits = null;
4853
- var reporterTokenHash = null;
5409
+ var reporterTokenRaw = null;
4854
5410
  var apiClient = null;
4855
5411
  var optedIn = false;
4856
5412
  var tierCache = null;
@@ -4913,7 +5469,7 @@ function initRewards(ctx) {
4913
5469
  apiClient = ctx.client;
4914
5470
  currentUserId = ctx.userId;
4915
5471
  currentUserTraits = ctx.traits ?? null;
4916
- reporterTokenHash = ctx.reporterToken ?? null;
5472
+ reporterTokenRaw = ctx.reporterToken ?? null;
4917
5473
  const { projectId } = ctx;
4918
5474
  const flushMs = Math.max(
4919
5475
  MIN_FLUSH_INTERVAL,
@@ -4948,12 +5504,6 @@ function initRewards(ctx) {
4948
5504
  renderConsentBanner(projectId, ctx.config);
4949
5505
  }
4950
5506
  }
4951
- function updateRewardsUser(userId, traits) {
4952
- currentUserId = userId;
4953
- currentUserTraits = traits ?? null;
4954
- tierCache = null;
4955
- tierCacheTime = 0;
4956
- }
4957
5507
  function enqueue(event) {
4958
5508
  if (!optedIn || !currentUserId) return;
4959
5509
  pendingEvents.push({ ...event, queuedAt: Date.now() });
@@ -4970,9 +5520,10 @@ async function flush(ctx) {
4970
5520
  if (isRewardsApiBackedOff()) return;
4971
5521
  const batch = pendingEvents.splice(0, 100);
4972
5522
  try {
5523
+ const reporterTokenHash = reporterTokenRaw ? await core.sha256Hex(reporterTokenRaw) : void 0;
4973
5524
  const result = await ctx.client.submitActivity(currentUserId, batch, {
4974
5525
  userTraits: currentUserTraits ?? void 0,
4975
- reporterTokenHash: reporterTokenHash ?? void 0,
5526
+ reporterTokenHash,
4976
5527
  optedIn: true,
4977
5528
  hostJwt: hostJwt ?? void 0
4978
5529
  });
@@ -5025,7 +5576,10 @@ var routeObserver = null;
5025
5576
  var clickHandler = null;
5026
5577
  var origPushState = null;
5027
5578
  var lastRoute = "";
5579
+ var listenersInstalled = false;
5028
5580
  function installActivityListeners(projectId) {
5581
+ if (listenersInstalled) return;
5582
+ listenersInstalled = true;
5029
5583
  const emitRoute = () => {
5030
5584
  const route = location.pathname;
5031
5585
  if (route === lastRoute) return;
@@ -5092,7 +5646,7 @@ function renderTierBadge(tier, config) {
5092
5646
  width: 6px;
5093
5647
  height: 6px;
5094
5648
  border-radius: 50%;
5095
- background: #6c47ff;
5649
+ background: ${core.MUSHI_COLORS_LIGHT.accent};
5096
5650
  flex-shrink: 0;
5097
5651
  }
5098
5652
  </style>
@@ -5121,16 +5675,16 @@ function renderConsentBanner(projectId, config) {
5121
5675
  <style>
5122
5676
  :host { display: block; }
5123
5677
  .banner {
5124
- background: #fff;
5125
- border: 1px solid #e5e7eb;
5678
+ background: ${core.MUSHI_COLORS_LIGHT.paperRaised};
5679
+ border: 1px solid ${core.MUSHI_COLORS_LIGHT.ruleStrong};
5126
5680
  border-radius: 12px;
5127
5681
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
5128
5682
  padding: 14px 16px;
5129
5683
  font-size: 13px;
5130
5684
  line-height: 1.5;
5131
- color: #374151;
5685
+ color: ${core.MUSHI_COLORS_LIGHT.inkMuted};
5132
5686
  }
5133
- .title { font-weight: 700; margin-bottom: 6px; color: #111827; }
5687
+ .title { font-weight: 700; margin-bottom: 6px; color: ${core.MUSHI_COLORS_LIGHT.ink}; }
5134
5688
  .actions { display: flex; gap: 8px; margin-top: 10px; }
5135
5689
  button {
5136
5690
  flex: 1;
@@ -5141,8 +5695,8 @@ function renderConsentBanner(projectId, config) {
5141
5695
  font-size: 12px;
5142
5696
  font-weight: 600;
5143
5697
  }
5144
- .accept { background: #6c47ff; color: #fff; }
5145
- .decline { background: #f3f4f6; color: #374151; }
5698
+ .accept { background: ${core.MUSHI_COLORS_LIGHT.accent}; color: ${core.MUSHI_COLORS_LIGHT.paperRaised}; }
5699
+ .decline { background: ${core.MUSHI_COLORS_LIGHT.paper}; color: ${core.MUSHI_COLORS_LIGHT.inkMuted}; }
5146
5700
  </style>
5147
5701
  <div class="banner">
5148
5702
  <div class="title">\u{1F3AF} Earn rewards</div>
@@ -5691,8 +6245,6 @@ function createPerformanceCapture() {
5691
6245
  }
5692
6246
  };
5693
6247
  }
5694
-
5695
- // src/capture/element-selector.ts
5696
6248
  function createElementSelector() {
5697
6249
  let active = false;
5698
6250
  let overlay = null;
@@ -5752,8 +6304,8 @@ function createElementSelector() {
5752
6304
  position: fixed;
5753
6305
  pointer-events: none;
5754
6306
  z-index: 2147483647;
5755
- border: 2px solid #6366f1;
5756
- background: rgba(99, 102, 241, 0.1);
6307
+ border: 2px solid ${core.MUSHI_COLORS_LIGHT.accent};
6308
+ background: ${core.MUSHI_COLORS_LIGHT.accentWash};
5757
6309
  border-radius: 4px;
5758
6310
  transition: all 0.1s ease;
5759
6311
  display: none;
@@ -6847,6 +7399,12 @@ function createProactiveManager(config = {}) {
6847
7399
  }
6848
7400
 
6849
7401
  // src/mushi.ts
7402
+ function resolveReportAppVersion(config, environment) {
7403
+ if (config.appVersion) return config.appVersion;
7404
+ const vercelId = config.integrations?.vercel?.analyticsId;
7405
+ if (vercelId) return vercelId;
7406
+ return environment?.buildId;
7407
+ }
6850
7408
  var instance = null;
6851
7409
  var Mushi = class {
6852
7410
  constructor() {
@@ -6882,6 +7440,8 @@ var Mushi = class {
6882
7440
  };
6883
7441
  function createInstance(config) {
6884
7442
  const bootstrapConfig = applyPresetConfig(config);
7443
+ const projectId = bootstrapConfig.projectId;
7444
+ const reporterTokenForProject = () => core.getReporterToken(projectId);
6885
7445
  let activeConfig = bootstrapConfig;
6886
7446
  const log = config.debug ?? false ? core.createLogger({ scope: "mushi", level: "debug", format: "pretty" }) : core.noopLogger;
6887
7447
  let userToken = null;
@@ -7080,6 +7640,9 @@ function createInstance(config) {
7080
7640
  let pendingElement = null;
7081
7641
  let pendingProactiveTrigger = null;
7082
7642
  let runtimeConfigLoaded = false;
7643
+ let reporterNotificationsEnabled = true;
7644
+ let reporterPollTimer = null;
7645
+ let reporterPollVisibleHandler = null;
7083
7646
  let userInfo = null;
7084
7647
  const customMetadata = {};
7085
7648
  const stickyTags = {};
@@ -7093,6 +7656,59 @@ function createInstance(config) {
7093
7656
  let detachAutoBreadcrumbs = null;
7094
7657
  detachAutoBreadcrumbs = installAutoBreadcrumbs(breadcrumbs);
7095
7658
  let screenshotCaptureInFlight = false;
7659
+ function syncReporterInboxQuiet() {
7660
+ void widget.refreshReporterInboxQuiet();
7661
+ }
7662
+ function stopReporterInboxPolling() {
7663
+ if (reporterPollTimer) clearInterval(reporterPollTimer);
7664
+ reporterPollTimer = null;
7665
+ if (reporterPollVisibleHandler && typeof document !== "undefined") {
7666
+ document.removeEventListener("visibilitychange", reporterPollVisibleHandler);
7667
+ }
7668
+ reporterPollVisibleHandler = null;
7669
+ }
7670
+ function startReporterInboxPolling() {
7671
+ stopReporterInboxPolling();
7672
+ if (!reporterNotificationsEnabled) return;
7673
+ const POLL_MS = 6e4;
7674
+ const tick = () => {
7675
+ if (typeof document !== "undefined" && document.visibilityState === "hidden") return;
7676
+ syncReporterInboxQuiet();
7677
+ };
7678
+ reporterPollTimer = setInterval(tick, POLL_MS);
7679
+ if (typeof document !== "undefined") {
7680
+ reporterPollVisibleHandler = () => {
7681
+ if (document.visibilityState === "visible") syncReporterInboxQuiet();
7682
+ };
7683
+ document.addEventListener("visibilitychange", reporterPollVisibleHandler);
7684
+ }
7685
+ syncReporterInboxQuiet();
7686
+ }
7687
+ function wireRewardsForIdentifiedUser(userId, traits) {
7688
+ if (!activeConfig.rewards?.enabled) return;
7689
+ const rewardsCtx = {
7690
+ client: apiClient2,
7691
+ config: activeConfig.rewards,
7692
+ projectId,
7693
+ userId,
7694
+ traits,
7695
+ reporterToken: reporterTokenForProject()
7696
+ };
7697
+ initRewards(rewardsCtx);
7698
+ if (activeConfig.rewards.showInWidget !== false) {
7699
+ void apiClient2.getMyPoints(userId).then((res) => {
7700
+ if (!res.ok) return;
7701
+ const d = res.data;
7702
+ widget.setRewardsState({
7703
+ tier: d.tier ? { slug: d.tier.slug ?? "free", displayName: d.tier.display_name ?? "Free", pointsThreshold: d.tier.points_threshold ?? 0 } : null,
7704
+ nextTier: d.next_tier ? { displayName: d.next_tier.display_name ?? "", pointsThreshold: d.next_tier.points_threshold ?? 0 } : null,
7705
+ totalPoints: d.total_points ?? 0,
7706
+ pointsForReport: d.report_submit_pts ?? 50
7707
+ });
7708
+ }).catch(() => {
7709
+ });
7710
+ }
7711
+ }
7096
7712
  async function takeScreenshotWithoutChrome() {
7097
7713
  if (screenshotCaptureInFlight) return null;
7098
7714
  const provider = activeConfig.capture?.screenshotProvider;
@@ -7245,36 +7861,36 @@ function createInstance(config) {
7245
7861
  }
7246
7862
  },
7247
7863
  async onReporterReportsRequest() {
7248
- const result = await apiClient2.listReporterReports(core.getReporterToken());
7864
+ const result = await apiClient2.listReporterReports(core.getReporterToken(projectId));
7249
7865
  if (!result.ok) throw new Error(result.error?.message ?? "Could not load reports");
7250
7866
  return result.data?.reports ?? [];
7251
7867
  },
7252
7868
  async onReporterCommentsRequest(reportId) {
7253
- const result = await apiClient2.listReporterComments(reportId, core.getReporterToken());
7869
+ const result = await apiClient2.listReporterComments(reportId, core.getReporterToken(projectId));
7254
7870
  if (!result.ok) throw new Error(result.error?.message ?? "Could not load thread");
7255
7871
  return result.data?.comments ?? [];
7256
7872
  },
7257
7873
  async onReporterReply(reportId, body) {
7258
- const result = await apiClient2.replyToReporterReport(reportId, core.getReporterToken(), body);
7874
+ const result = await apiClient2.replyToReporterReport(reportId, core.getReporterToken(projectId), body);
7259
7875
  if (!result.ok) throw new Error(result.error?.message ?? "Could not send reply");
7260
7876
  },
7261
7877
  async onReporterFeedback(reportId, signal, note) {
7262
- const result = await apiClient2.replyToReporterReport(reportId, core.getReporterToken(), note ?? "", signal);
7878
+ const result = await apiClient2.replyToReporterReport(reportId, core.getReporterToken(projectId), note ?? "", signal);
7263
7879
  if (!result.ok) throw new Error(result.error?.message ?? "Could not send feedback");
7264
7880
  return result.data?.feedback ?? null;
7265
7881
  },
7266
7882
  async onReporterReopen(reportId, note) {
7267
- const result = await apiClient2.reopenReporterReport(reportId, core.getReporterToken(), note);
7883
+ const result = await apiClient2.reopenReporterReport(reportId, core.getReporterToken(projectId), note);
7268
7884
  if (!result.ok) throw new Error(result.error?.message ?? "Could not reopen report");
7269
7885
  return result.data?.outcome ?? null;
7270
7886
  },
7271
7887
  async onFeatureBoardRequest() {
7272
- const result = await apiClient2.listReporterFeatureBoard(core.getReporterToken());
7888
+ const result = await apiClient2.listReporterFeatureBoard(core.getReporterToken(projectId));
7273
7889
  if (!result.ok) throw new Error(result.error?.message ?? "Could not load community ideas");
7274
7890
  return result.data?.tickets ?? [];
7275
7891
  },
7276
7892
  async onFeatureBoardVote(requestId) {
7277
- const result = await apiClient2.voteReporterFeatureBoard(requestId, core.getReporterToken());
7893
+ const result = await apiClient2.voteReporterFeatureBoard(requestId, core.getReporterToken(projectId));
7278
7894
  if (!result.ok) throw new Error(result.error?.message ?? "Could not vote");
7279
7895
  return result.data ?? { voted: true, action: "added" };
7280
7896
  },
@@ -7409,17 +8025,21 @@ function createInstance(config) {
7409
8025
  });
7410
8026
  function applyRuntimeConfig(runtime) {
7411
8027
  runtimeConfigLoaded = true;
8028
+ reporterNotificationsEnabled = runtime.reporterNotificationsEnabled !== false;
7412
8029
  if (runtime.enabled === false) {
7413
8030
  activeConfig = bootstrapConfig;
7414
8031
  clearCachedRuntimeConfig(config.projectId);
7415
8032
  syncCaptureModules();
7416
8033
  widget.updateConfig(activeConfig.widget);
8034
+ stopReporterInboxPolling();
7417
8035
  log.debug("Runtime SDK config disabled; using bootstrap config", { version: runtime.version });
7418
8036
  return;
7419
8037
  }
7420
8038
  activeConfig = mergeRuntimeConfig(activeConfig, runtime);
7421
8039
  syncCaptureModules();
7422
8040
  if (runtime.widget) widget.updateConfig(activeConfig.widget);
8041
+ if (reporterNotificationsEnabled) startReporterInboxPolling();
8042
+ else stopReporterInboxPolling();
7423
8043
  log.debug("Applied runtime SDK config", { version: runtime.version });
7424
8044
  }
7425
8045
  if (shouldUseRuntimeConfig(config)) {
@@ -7439,6 +8059,7 @@ function createInstance(config) {
7439
8059
  log.debug("Runtime SDK config disabled via runtimeConfig:false; using static bootstrap config");
7440
8060
  }
7441
8061
  void checkSdkFreshness();
8062
+ startReporterInboxPolling();
7442
8063
  log.info("Initialized", { projectId: config.projectId });
7443
8064
  async function checkSdkFreshness() {
7444
8065
  if (activeConfig.widget?.outdatedBanner === "off") return;
@@ -7526,6 +8147,7 @@ function createInstance(config) {
7526
8147
  if (pendingScreenshot && !screenshotForWire) {
7527
8148
  log.warn("Screenshot dropped \u2014 could not compress under wire budget");
7528
8149
  }
8150
+ const capturedEnvironment = core.captureEnvironment();
7529
8151
  const report = {
7530
8152
  id: core.newUuid(),
7531
8153
  projectId: config.projectId,
@@ -7533,7 +8155,7 @@ function createInstance(config) {
7533
8155
  ...userCategory ? { userCategory } : {},
7534
8156
  description: scrubbedDescription,
7535
8157
  userIntent: intent,
7536
- environment: core.captureEnvironment(),
8158
+ environment: capturedEnvironment,
7537
8159
  consoleLogs,
7538
8160
  networkLogs,
7539
8161
  performanceMetrics: activeConfig.capture?.performance === false ? void 0 : perfCap?.getMetrics(),
@@ -7547,9 +8169,9 @@ function createInstance(config) {
7547
8169
  ...sentryCtx?.release ? { sentryRelease: sentryCtx.release } : {}
7548
8170
  },
7549
8171
  sessionId: core.getSessionId(),
7550
- reporterToken: core.getReporterToken(),
8172
+ reporterToken: core.getReporterToken(projectId),
7551
8173
  ...fingerprintHash ? { fingerprintHash } : {},
7552
- appVersion: config.integrations?.vercel?.analyticsId,
8174
+ appVersion: resolveReportAppVersion(activeConfig, capturedEnvironment),
7553
8175
  sdkPackage: MUSHI_SDK_PACKAGE,
7554
8176
  sdkVersion: MUSHI_SDK_VERSION,
7555
8177
  proactiveTrigger: pendingProactiveTrigger ?? void 0,
@@ -7634,6 +8256,7 @@ function createInstance(config) {
7634
8256
  if (result.ok) {
7635
8257
  log.info("Report sent", { reportId: result.data?.reportId });
7636
8258
  emit("report:sent", { reportId: result.data?.reportId });
8259
+ syncReporterInboxQuiet();
7637
8260
  if (result.data?.cursorAgentId) {
7638
8261
  const d = result.data;
7639
8262
  emit("report:dispatched", { reportId: d.reportId, agentId: d.cursorAgentId, fixId: d.fixId });
@@ -7755,6 +8378,7 @@ function createInstance(config) {
7755
8378
  replayCap?.destroy();
7756
8379
  replayCap = null;
7757
8380
  offlineQueue.stopAutoSync();
8381
+ stopReporterInboxPolling();
7758
8382
  detachAutoBreadcrumbs?.();
7759
8383
  detachAutoBreadcrumbs = null;
7760
8384
  breadcrumbs.clear();
@@ -7782,12 +8406,13 @@ function createInstance(config) {
7782
8406
  ...sentryCtx.breadcrumbs ? { breadcrumbs: scrubBreadcrumbsForWire(sentryCtx.breadcrumbs) } : {},
7783
8407
  ...sentryCtx.tags ? { tags: scrubTagsForWire(sentryCtx.tags) } : {}
7784
8408
  } : void 0;
8409
+ const capturedEnvironment = core.captureEnvironment();
7785
8410
  const report = {
7786
8411
  id: core.newUuid(),
7787
8412
  projectId: config.projectId,
7788
8413
  category,
7789
8414
  description,
7790
- environment: core.captureEnvironment(),
8415
+ environment: capturedEnvironment,
7791
8416
  timeline: timelineCap.getEntries(),
7792
8417
  metadata: {
7793
8418
  ...input.metadata ?? {},
@@ -7801,20 +8426,39 @@ function createInstance(config) {
7801
8426
  ...mergedTags && Object.keys(mergedTags).length > 0 ? { tags: mergedTags } : {},
7802
8427
  ...sentryCtxScrubbed ? { sentryContext: sentryCtxScrubbed } : {},
7803
8428
  sessionId: core.getSessionId(),
7804
- reporterToken: core.getReporterToken(),
8429
+ reporterToken: core.getReporterToken(projectId),
8430
+ appVersion: resolveReportAppVersion(activeConfig, capturedEnvironment),
7805
8431
  sdkPackage: MUSHI_SDK_PACKAGE,
7806
8432
  sdkVersion: MUSHI_SDK_VERSION,
7807
8433
  sentryEventId: sentryCtx?.eventId,
7808
8434
  sentryReplayId: sentryCtx?.replayId,
7809
8435
  createdAt: (/* @__PURE__ */ new Date()).toISOString()
7810
8436
  };
7811
- emit("report:submitted", { reportId: report.id });
8437
+ let finalReport = report;
8438
+ if (activeConfig.beforeSendFeedback) {
8439
+ try {
8440
+ const hookResult = await Promise.race([
8441
+ Promise.resolve(activeConfig.beforeSendFeedback(report)),
8442
+ new Promise((resolve) => setTimeout(() => resolve(report), 2e3))
8443
+ ]);
8444
+ if (hookResult === null) {
8445
+ log.info("captureEvent dropped by beforeSendFeedback hook", { reportId: report.id });
8446
+ return null;
8447
+ }
8448
+ finalReport = hookResult;
8449
+ } catch (err) {
8450
+ log.warn("captureEvent beforeSendFeedback threw \u2014 sending unmodified report", {
8451
+ error: err instanceof Error ? err.message : String(err)
8452
+ });
8453
+ }
8454
+ }
8455
+ emit("report:submitted", { reportId: finalReport.id });
7812
8456
  if (typeof navigator !== "undefined" && !navigator.onLine) {
7813
- await offlineQueue.enqueue(report);
7814
- emit("report:queued", { reportId: report.id });
8457
+ await offlineQueue.enqueue(finalReport);
8458
+ emit("report:queued", { reportId: finalReport.id });
7815
8459
  return null;
7816
8460
  }
7817
- const res = await apiClient2.submitReport(report);
8461
+ const res = await apiClient2.submitReport(finalReport);
7818
8462
  if (res.ok) {
7819
8463
  emit("report:sent", { reportId: res.data?.reportId });
7820
8464
  try {
@@ -7823,8 +8467,8 @@ function createInstance(config) {
7823
8467
  }
7824
8468
  return res.data?.reportId ?? null;
7825
8469
  }
7826
- await offlineQueue.enqueue(report);
7827
- emit("report:failed", { reportId: report.id, error: res.error });
8470
+ await offlineQueue.enqueue(finalReport);
8471
+ emit("report:failed", { reportId: finalReport.id, error: res.error });
7828
8472
  return null;
7829
8473
  },
7830
8474
  async captureException(error, options) {
@@ -7869,33 +8513,14 @@ function createInstance(config) {
7869
8513
  level: "info",
7870
8514
  message: `Mushi.identify(${userId})`
7871
8515
  });
7872
- if (activeConfig.rewards?.enabled) {
7873
- const rewardsCtx = {
7874
- client: apiClient2,
7875
- config: activeConfig.rewards,
7876
- projectId: bootstrapConfig.projectId,
7877
- userId,
7878
- traits: traits ? { email: traits.email, name: traits.name, provider: traits.provider } : void 0
7879
- };
7880
- if (userInfo.id === userId) {
7881
- initRewards(rewardsCtx);
7882
- } else {
7883
- updateRewardsUser(userId, rewardsCtx.traits);
7884
- }
7885
- if (activeConfig.rewards.showInWidget !== false) {
7886
- void apiClient2.getMyPoints(userId).then((res) => {
7887
- if (!res.ok) return;
7888
- const d = res.data;
7889
- widget.setRewardsState({
7890
- tier: d.tier ? { slug: d.tier.slug ?? "free", displayName: d.tier.display_name ?? "Free", pointsThreshold: d.tier.points_threshold ?? 0 } : null,
7891
- nextTier: d.next_tier ? { displayName: d.next_tier.display_name ?? "", pointsThreshold: d.next_tier.points_threshold ?? 0 } : null,
7892
- totalPoints: d.total_points ?? 0,
7893
- pointsForReport: d.report_submit_pts ?? 50
7894
- });
7895
- }).catch(() => {
7896
- });
7897
- }
7898
- }
8516
+ wireRewardsForIdentifiedUser(
8517
+ userId,
8518
+ traits ? {
8519
+ email: traits.email,
8520
+ name: traits.name,
8521
+ provider: traits.provider
8522
+ } : void 0
8523
+ );
7899
8524
  },
7900
8525
  identifyWithToken(token) {
7901
8526
  userToken = token && typeof token === "string" ? token : null;
@@ -7910,6 +8535,10 @@ function createInstance(config) {
7910
8535
  widget.setIdentifiedUser(
7911
8536
  userInfo.name || userInfo.email ? { name: userInfo.name, email: userInfo.email } : null
7912
8537
  );
8538
+ wireRewardsForIdentifiedUser(userInfo.id, {
8539
+ email: userInfo.email,
8540
+ name: userInfo.name
8541
+ });
7913
8542
  }
7914
8543
  breadcrumbs.add({ category: "lifecycle", level: "info", message: "Mushi.identifyWithToken()" });
7915
8544
  } else {
@@ -7975,27 +8604,27 @@ function createInstance(config) {
7975
8604
  },
7976
8605
  // ─── Reporter API (cross-platform) ────────────────────────────────
7977
8606
  async listMyReports() {
7978
- const result = await apiClient2.listReporterReports(core.getReporterToken());
8607
+ const result = await apiClient2.listReporterReports(core.getReporterToken(projectId));
7979
8608
  if (!result.ok) return [];
7980
8609
  return result.data?.reports ?? [];
7981
8610
  },
7982
8611
  async listMyComments(reportId) {
7983
- const result = await apiClient2.listReporterComments(reportId, core.getReporterToken());
8612
+ const result = await apiClient2.listReporterComments(reportId, core.getReporterToken(projectId));
7984
8613
  if (!result.ok) return [];
7985
8614
  return result.data?.comments ?? [];
7986
8615
  },
7987
8616
  async replyToReport(reportId, body) {
7988
- const result = await apiClient2.replyToReporterReport(reportId, core.getReporterToken(), body);
8617
+ const result = await apiClient2.replyToReporterReport(reportId, core.getReporterToken(projectId), body);
7989
8618
  if (!result.ok) return null;
7990
8619
  return result.data?.comment ?? null;
7991
8620
  },
7992
8621
  async submitFeedbackSignal(reportId, signal, note) {
7993
- const result = await apiClient2.replyToReporterReport(reportId, core.getReporterToken(), note ?? "", signal);
8622
+ const result = await apiClient2.replyToReporterReport(reportId, core.getReporterToken(projectId), note ?? "", signal);
7994
8623
  if (!result.ok) return null;
7995
8624
  return result.data?.feedback ?? null;
7996
8625
  },
7997
8626
  async reopenReport(reportId, note) {
7998
- const result = await apiClient2.reopenReporterReport(reportId, core.getReporterToken(), note);
8627
+ const result = await apiClient2.reopenReporterReport(reportId, core.getReporterToken(projectId), note);
7999
8628
  if (!result.ok) return null;
8000
8629
  return result.data?.outcome ?? null;
8001
8630
  },
@@ -8480,6 +9109,8 @@ exports.createScreenshotCapture = createScreenshotCapture;
8480
9109
  exports.createTimelineCapture = createTimelineCapture;
8481
9110
  exports.getAvailableLocales = getAvailableLocales;
8482
9111
  exports.getLocale = getLocale;
9112
+ exports.getWidgetPreviewTokens = getWidgetPreviewTokens;
9113
+ exports.getWidgetThemeVars = getWidgetThemeVars;
8483
9114
  exports.setupProactiveTriggers = setupProactiveTriggers;
8484
9115
  //# sourceMappingURL=index.cjs.map
8485
9116
  //# sourceMappingURL=index.cjs.map