@mushi-mushi/web 1.19.2 → 1.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.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 */
@@ -1134,6 +1609,16 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
1134
1609
  line-height: 1.4;
1135
1610
  letter-spacing: 0.02em;
1136
1611
  }
1612
+ .mushi-identified-user {
1613
+ margin: 8px 0 0;
1614
+ font-size: 11.5px;
1615
+ color: ${inkMuted};
1616
+ line-height: 1.4;
1617
+ }
1618
+ .mushi-identified-user strong {
1619
+ color: ${ink};
1620
+ font-weight: 600;
1621
+ }
1137
1622
  .mushi-annotate-toolbar {
1138
1623
  display: flex;
1139
1624
  flex-wrap: wrap;
@@ -1181,7 +1666,7 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
1181
1666
  border: 1px solid ${widgetAccent};
1182
1667
  border-radius: 3px;
1183
1668
  background: ${widgetAccent};
1184
- color: #FAF7F0;
1669
+ color: ${onAccent};
1185
1670
  font-family: ${fontMono};
1186
1671
  font-size: 11px;
1187
1672
  letter-spacing: 0.16em;
@@ -1189,7 +1674,7 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
1189
1674
  cursor: pointer;
1190
1675
  overflow: hidden;
1191
1676
  transition: transform 180ms ${easeStamp}, box-shadow 180ms ${easeStamp};
1192
- box-shadow: 0 2px 0 ${isDark ? "#7A1F15" : "#9A2A1E"};
1677
+ box-shadow: 0 2px 0 ${widgetAccentShadow};
1193
1678
  }
1194
1679
  .mushi-submit::after {
1195
1680
  content: '';
@@ -1203,10 +1688,10 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
1203
1688
  }
1204
1689
  .mushi-submit:hover {
1205
1690
  transform: translateY(-1px);
1206
- box-shadow: 0 3px 0 ${isDark ? "#7A1F15" : "#9A2A1E"};
1691
+ box-shadow: 0 3px 0 ${widgetAccentShadow};
1207
1692
  }
1208
1693
  .mushi-submit:hover::after { opacity: 1; transform: scale(1.4); }
1209
- .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}; }
1210
1695
  .mushi-submit:disabled {
1211
1696
  cursor: wait;
1212
1697
  opacity: 0.7;
@@ -1316,7 +1801,7 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
1316
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 */
1317
1802
  /* The receipt block sits below the stamp/meta. Three states: */
1318
1803
  /* 1. delivering... (spinner pill, while host onSubmit awaits) */
1319
- /* 2. confirmed (Receipt #abc12345 + Track on Mushi link) */
1804
+ /* 2. confirmed (Receipt id + Track on Mushi link) */
1320
1805
  /* 3. queued offline (warn pill \u2014 degrade gracefully) */
1321
1806
  .mushi-success-receipt {
1322
1807
  margin-top: 14px;
@@ -1376,7 +1861,7 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
1376
1861
  padding: 6px 10px;
1377
1862
  border-radius: 4px;
1378
1863
  background: ${widgetAccent};
1379
- color: #fff;
1864
+ color: ${inverse};
1380
1865
  font-family: ${fontMono};
1381
1866
  font-size: 11px;
1382
1867
  letter-spacing: 0.10em;
@@ -1539,7 +2024,7 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
1539
2024
 
1540
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 */
1541
2026
  /* Brand palette: widgetAccent (vermillion) + washi ink for the strip.
1542
- The previous indigo (#6366f1) is the single most recognisable AI-template
2027
+ The previous generic indigo purple is the single most recognisable AI-template
1543
2028
  colour; replaced with the widget's own vermillion wash so the beta panel
1544
2029
  reads as a Mushi-native surface rather than a generic SaaS plug-in. */
1545
2030
 
@@ -1566,7 +2051,7 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
1566
2051
  padding: 1px 6px;
1567
2052
  border-radius: 3px;
1568
2053
  background: ${widgetAccent};
1569
- color: #FAF7F0;
2054
+ color: ${onAccent};
1570
2055
  font-family: ${fontMono};
1571
2056
  font-size: 9px;
1572
2057
  font-weight: 700;
@@ -1685,7 +2170,7 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
1685
2170
  fix \u2014 Workstream C). Horizontal padding also clears the left/right
1686
2171
  insets for landscape notches. */
1687
2172
  box-sizing: border-box;
1688
- min-height: 36px;
2173
+ min-height: ${bannerHeight}px;
1689
2174
  display: flex;
1690
2175
  align-items: center;
1691
2176
  justify-content: center;
@@ -1696,7 +2181,7 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
1696
2181
  letter-spacing: 0.04em;
1697
2182
  white-space: nowrap;
1698
2183
  overflow: hidden;
1699
- z-index: var(--mushi-banner-z, 99998);
2184
+ z-index: var(--mushi-banner-z, ${zBanner});
1700
2185
  animation: mushi-banner-slide-in 0.3s ${easeStamp} both;
1701
2186
  }
1702
2187
 
@@ -1705,17 +2190,17 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
1705
2190
 
1706
2191
  /* --- neon variant (electric lime \u2014 dev / beta tool aesthetic) --- */
1707
2192
  .mushi-banner.neon {
1708
- background: #0FFF50;
1709
- color: #0a1a0a;
1710
- border-bottom: 1.5px solid #00C43A;
2193
+ background: ${neonBannerBg};
2194
+ color: ${neonBannerFg};
2195
+ border-bottom: 1.5px solid ${neonBannerBorder};
1711
2196
  }
1712
2197
  .mushi-banner.neon.bottom {
1713
- border-top: 1.5px solid #00C43A;
2198
+ border-top: 1.5px solid ${neonBannerBorder};
1714
2199
  border-bottom: none;
1715
2200
  }
1716
2201
  .mushi-banner.neon .mushi-banner-btn {
1717
2202
  background: rgba(0,0,0,0.14);
1718
- color: #0a1a0a;
2203
+ color: ${neonBannerFg};
1719
2204
  border: 1px solid rgba(0,0,0,0.22);
1720
2205
  }
1721
2206
  .mushi-banner.neon .mushi-banner-btn:hover {
@@ -1725,16 +2210,16 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
1725
2210
  /* --- brand variant (widgetAccent \u2014 editorial, app-quality) --- */
1726
2211
  .mushi-banner.brand {
1727
2212
  background: ${widgetAccent};
1728
- color: #fff;
1729
- border-bottom: 1.5px solid ${isDark ? "#C4321E" : "#B52F1F"};
2213
+ color: ${inverse};
2214
+ border-bottom: 1.5px solid ${brandBannerBorder};
1730
2215
  }
1731
2216
  .mushi-banner.brand.bottom {
1732
- border-top: 1.5px solid ${isDark ? "#C4321E" : "#B52F1F"};
2217
+ border-top: 1.5px solid ${brandBannerBorder};
1733
2218
  border-bottom: none;
1734
2219
  }
1735
2220
  .mushi-banner.brand .mushi-banner-btn {
1736
2221
  background: rgba(255,255,255,0.18);
1737
- color: #fff;
2222
+ color: ${inverse};
1738
2223
  border: 1px solid rgba(255,255,255,0.32);
1739
2224
  }
1740
2225
  .mushi-banner.brand .mushi-banner-btn:hover {
@@ -1777,7 +2262,7 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
1777
2262
  .mushi-banner--rich {
1778
2263
  justify-content: space-between;
1779
2264
  gap: 12px;
1780
- min-height: 36px;
2265
+ min-height: ${bannerHeight}px;
1781
2266
  height: auto;
1782
2267
  padding: 4px 12px 4px 16px;
1783
2268
  white-space: normal;
@@ -1838,7 +2323,7 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
1838
2323
  font-size: 11px;
1839
2324
  }
1840
2325
  .mushi-banner-actions::-webkit-scrollbar { display: none; }
1841
- @media (max-width: 480px) {
2326
+ @media (max-width: ${panelSheetBreakpoint}px) {
1842
2327
  /* Phones: keep only the primary bug CTA (+ dismiss outside the nav). */
1843
2328
  .mushi-banner-actions .mushi-banner-extra { display: none; }
1844
2329
  }
@@ -1961,6 +2446,17 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
1961
2446
 
1962
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}
1963
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}
1964
2460
  /* \u2500\u2500 "More issue types \u2192" toggle (progressive disclosure) \u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
1965
2461
  .mushi-more-toggle {
1966
2462
  display: flex;
@@ -2024,7 +2520,7 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
2024
2520
  .mushi-account-rank{display:block}
2025
2521
  .mushi-xapp-app-head{display:flex;align-items:center;gap:8px;margin:0 0 6px}
2026
2522
  .mushi-xapp-app-name{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;margin:0}
2027
- .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}
2028
2524
  .mushi-app-icon-img{display:block;width:16px;height:16px;object-fit:contain}
2029
2525
  .mushi-app-icon-initials{font-size:9px;font-weight:700;color:${inkDim};line-height:1}
2030
2526
  .mushi-app-icon-initials-only{background:${isDark ? "rgba(255,255,255,0.06)" : "rgba(0,0,0,0.04)"}}
@@ -2041,14 +2537,14 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
2041
2537
  .mushi-assistant-chip:hover{background:${isDark ? "rgba(255,90,71,0.22)" : "rgba(224,60,44,0.14)"}}
2042
2538
  .mushi-assistant-chip:focus-visible{outline:2px solid ${widgetAccent};outline-offset:2px}
2043
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}
2044
- .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}
2045
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}
2046
2542
  .mushi-assistant-thinking{opacity:0.6;font-size:18px;letter-spacing:2px}
2047
- .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}
2048
2544
  .mushi-assistant-form{display:flex;align-items:flex-end;gap:8px;border-top:1px solid ${rule};padding-top:8px}
2049
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}}
2050
2546
  .mushi-assistant-input:focus-visible{outline:2px solid ${widgetAccent};outline-offset:1px}
2051
- .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}
2052
2548
  .mushi-assistant-submit:hover{transform:translateY(-1px)}
2053
2549
  .mushi-assistant-submit:disabled{opacity:0.5;cursor:default;transform:none}
2054
2550
  .mushi-assistant-submit:focus-visible{outline:2px solid ${widgetAccent};outline-offset:2px}
@@ -2057,7 +2553,7 @@ function getWidgetStyles(theme, accent = "", accentText = "") {
2057
2553
 
2058
2554
  // src/version.ts
2059
2555
  var MUSHI_SDK_PACKAGE = "@mushi-mushi/web";
2060
- var MUSHI_SDK_VERSION = "1.19.2" ;
2556
+ var MUSHI_SDK_VERSION = "1.21.0" ;
2061
2557
  var CATEGORY_ICONS = {
2062
2558
  bug: "\u26A0\uFE0F",
2063
2559
  slow: "\u{1F40C}",
@@ -2256,8 +2752,9 @@ function renderStep(ctx) {
2256
2752
  }
2257
2753
  }
2258
2754
  function renderAssistantStep(ctx) {
2259
- const label = ctx.callbacks.assistantLabel || "Ask";
2260
- 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;
2261
2758
  const suggestions = ctx.callbacks.assistantSuggestions ?? [];
2262
2759
  const empty = ctx.assistantTurns.length === 0;
2263
2760
  const transcript = empty ? `<div class="mushi-assistant-greeting">${escapeHtml(greeting)}</div>
@@ -2266,7 +2763,7 @@ function renderAssistantStep(ctx) {
2266
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>` : "";
2267
2764
  return `<div class="mushi-assistant-msg ${cls}">${escapeHtml(turn.text)}</div>${opts}`;
2268
2765
  }).join("");
2269
- 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>` : "";
2270
2767
  const error = ctx.assistantError ? `<div class="mushi-assistant-error" role="alert">${escapeHtml(ctx.assistantError)}</div>` : "";
2271
2768
  return `
2272
2769
  ${renderHeader(ctx, { title: label, showBack: true })}
@@ -2280,10 +2777,10 @@ function renderAssistantStep(ctx) {
2280
2777
  <textarea
2281
2778
  class="mushi-assistant-input"
2282
2779
  rows="1"
2283
- placeholder="Type your question\u2026"
2780
+ placeholder="${escapeHtml(t.assistant.inputPlaceholder)}"
2284
2781
  ${ctx.assistantSending ? "disabled" : ""}
2285
2782
  ></textarea>
2286
- <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>
2287
2784
  </form>
2288
2785
  </div>
2289
2786
  `;
@@ -2303,7 +2800,7 @@ function renderOutdatedBanner(ctx) {
2303
2800
  }
2304
2801
  function renderBrandFooter(ctx) {
2305
2802
  if (ctx.config.brandFooter === false) return "";
2306
- 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>`;
2307
2804
  }
2308
2805
  function renderHeader(ctx, opts) {
2309
2806
  const t = ctx.locale;
@@ -2324,14 +2821,76 @@ function renderHeader(ctx, opts) {
2324
2821
  </div>
2325
2822
  `;
2326
2823
  }
2327
- function renderStepIndicator(_ctx, currentStep) {
2328
- const segments = [];
2329
- for (let i = 1; i <= TOTAL_STEPS; i++) {
2330
- const cls = i < currentStep ? "mushi-step-num done" : i === currentStep ? "mushi-step-num active" : "mushi-step-num";
2331
- segments.push(`<span class="${cls}">${pad2(i)}</span>`);
2332
- 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>`);
2333
2874
  }
2334
- 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
+ `;
2335
2894
  }
2336
2895
  function renderCategoryStep(ctx) {
2337
2896
  const t = ctx.locale;
@@ -2372,42 +2931,21 @@ function renderCategoryStep(ctx) {
2372
2931
  ${renderHeader(ctx, { title: t.step1.heading, step: STEP_NUMBER.category })}
2373
2932
  ${ctx.config.betaMode?.enabled ? renderBetaStrip(ctx) : ""}
2374
2933
  <div class="mushi-body" role="radiogroup" aria-label="${escapeHtml(t.step1.heading)}">
2375
- <button type="button" class="mushi-option-btn mushi-reports-entry" data-action="reports">
2376
- <span class="mushi-option-icon" aria-hidden="true">\u{1F4EC}</span>
2377
- <div class="mushi-option-text">
2378
- <span class="mushi-option-label">Your reports${ctx.unreadCount() ? ` (${ctx.unreadCount()} new)` : ""}</span>
2379
- <span class="mushi-option-desc">See status, developer replies, and respond</span>
2380
- </div>
2381
- <span class="mushi-option-arrow" aria-hidden="true">\u2192</span>
2382
- </button>
2934
+ <p class="mushi-section-label">${escapeHtml(t.step1.reportSectionLabel)}</p>
2383
2935
  ${renderFeatureRequestEntry(ctx)}
2384
- ${ctx.callbacks.onFeatureBoardRequest ? `
2385
- <button type="button" class="mushi-option-btn" data-action="roadmap">
2386
- <span class="mushi-option-icon" aria-hidden="true">\u{1F5F3}\uFE0F</span>
2387
- <div class="mushi-option-text">
2388
- <span class="mushi-option-label">Community ideas</span>
2389
- <span class="mushi-option-desc">Vote on features and see what shipped</span>
2390
- </div>
2391
- <span class="mushi-option-arrow" aria-hidden="true">\u2192</span>
2392
- </button>` : ""}
2393
2936
  ${primaryCategories}
2394
2937
  ${secondaryHtml}
2395
2938
  ${ctx.rewardsState ? renderRewardsNudge(ctx) : ""}
2396
- <div class="mushi-community-footer">
2397
- <button type="button" class="mushi-link-btn mushi-community-btn" data-action="open-account">
2398
- ${ctx.testerInfo ? `\u{1F464} ${escapeHtml(ctx.testerInfo.public_handle ?? ctx.testerInfo.display_name ?? "My account")}` : "\u{1F310} Join community \xB7 Track reports across apps"}
2399
- </button>
2400
- ${ctx.rewardsState ? `<button type="button" class="mushi-link-btn" data-action="open-leaderboard">\u{1F3C6} Leaderboard</button>` : ""}
2401
- </div>
2939
+ ${renderMoreNavSection(ctx)}
2402
2940
  </div>
2403
- ${renderStepIndicator(ctx, STEP_NUMBER.category)}
2404
2941
  `;
2405
2942
  }
2406
2943
  function renderFeatureRequestEntry(ctx) {
2407
2944
  const enabled = ctx.config.featureRequestCard !== false;
2408
2945
  if (!enabled) return "";
2409
- const label = ctx.config.featureRequestLabel || "Feature request";
2410
- 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;
2411
2949
  return `
2412
2950
  <button
2413
2951
  type="button"
@@ -2440,7 +2978,7 @@ function renderBetaChangelog(ctx) {
2440
2978
  function renderBetaStrip(ctx) {
2441
2979
  const beta = ctx.config.betaMode;
2442
2980
  const appName = escapeHtml(beta.appName ?? "This app");
2443
- 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`;
2444
2982
  const email = beta.contactEmail ? escapeHtml(beta.contactEmail) : null;
2445
2983
  const perks = beta.perks ?? [];
2446
2984
  return `
@@ -2460,6 +2998,7 @@ function renderBetaStrip(ctx) {
2460
2998
  `;
2461
2999
  }
2462
3000
  function renderReportsStep(ctx) {
3001
+ const f = ctx.locale.flows;
2463
3002
  const reports = ctx.reporterReports.map((report) => {
2464
3003
  const title = report.summary ?? report.description ?? `Report ${report.id.slice(0, 8)}`;
2465
3004
  const tone = reporterStatusTone(report.status);
@@ -2478,50 +3017,53 @@ function renderReportsStep(ctx) {
2478
3017
  <span class="mushi-report-chevron" aria-hidden="true">\u203A</span>
2479
3018
  </button>`;
2480
3019
  }).join("");
2481
- 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>` : "";
2482
3021
  return `
2483
- ${renderHeader(ctx, { title: "Your reports", showBack: true, eyebrow: "Mushi \xB7 Inbox" })}
3022
+ ${renderHeader(ctx, { title: f.reports.title, showBack: true, eyebrow: f.eyebrows.inbox })}
2484
3023
  <div class="mushi-body">
2485
- ${ctx.reporterLoading ? '<p class="mushi-muted">Loading reports\u2026</p>' : ""}
3024
+ ${ctx.reporterLoading ? `<p class="mushi-muted">${escapeHtml(f.reports.loading)}</p>` : ""}
2486
3025
  ${ctx.reporterError ? `<p class="mushi-error-inline">${escapeHtml(ctx.reporterError)}</p>` : ""}
2487
- ${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>` : "")}
2488
3027
  ${leaderboardBtn}
2489
3028
  </div>
2490
3029
  `;
2491
3030
  }
2492
3031
  function renderRoadmapStep(ctx) {
3032
+ const f = ctx.locale.flows;
2493
3033
  const rows = ctx.featureBoard.map((ticket) => {
2494
3034
  const id = String(ticket.id ?? "");
2495
- const subject = escapeHtml(String(ticket.subject ?? "Untitled idea"));
3035
+ const subject = escapeHtml(String(ticket.subject ?? f.roadmap.untitled));
2496
3036
  const votes = Number(ticket.vote_count ?? 0);
2497
3037
  const shipped = Boolean(ticket.shipped_at);
2498
3038
  const voted = Boolean(ticket.my_vote);
2499
- 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));
2500
3041
  return `
2501
3042
  <div class="mushi-report-row mushi-roadmap-row">
2502
3043
  <div class="mushi-report-main">
2503
3044
  <span class="mushi-report-title">${subject}</span>
2504
3045
  <span class="mushi-report-meta">
2505
3046
  <span class="mushi-report-status">${escapeHtml(status)}</span>
2506
- <span class="mushi-report-when">${votes} vote${votes === 1 ? "" : "s"}</span>
3047
+ <span class="mushi-report-when">${escapeHtml(voteLabel)}</span>
2507
3048
  </span>
2508
3049
  </div>
2509
3050
  ${ctx.callbacks.onFeatureBoardVote ? `
2510
3051
  <button type="button" class="mushi-vote-btn" data-vote-id="${escapeHtml(id)}" aria-pressed="${voted}">
2511
- ${voted ? "Voted" : "Vote"}
3052
+ ${voted ? escapeHtml(f.roadmap.voted) : escapeHtml(f.roadmap.vote)}
2512
3053
  </button>` : ""}
2513
3054
  </div>`;
2514
3055
  }).join("");
2515
3056
  return `
2516
- ${renderHeader(ctx, { title: "Community ideas", showBack: true, eyebrow: "Mushi \xB7 Roadmap" })}
3057
+ ${renderHeader(ctx, { title: f.roadmap.title, showBack: true, eyebrow: f.eyebrows.roadmap })}
2517
3058
  <div class="mushi-body">
2518
- ${ctx.reporterLoading ? '<p class="mushi-muted">Loading ideas\u2026</p>' : ""}
3059
+ ${ctx.reporterLoading ? `<p class="mushi-muted">${escapeHtml(f.roadmap.loading)}</p>` : ""}
2519
3060
  ${ctx.reporterError ? `<p class="mushi-error-inline">${escapeHtml(ctx.reporterError)}</p>` : ""}
2520
- ${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>` : "")}
2521
3062
  </div>
2522
3063
  `;
2523
3064
  }
2524
3065
  function renderLeaderboardStep(ctx) {
3066
+ const f = ctx.locale.flows;
2525
3067
  const isGlobal = ctx.globalLeaderboard !== null || ctx.globalLeaderboardLoading;
2526
3068
  const entries = isGlobal ? ctx.globalLeaderboard ?? [] : (ctx.leaderboardEntries ?? []).map((e) => ({
2527
3069
  tester_id: "",
@@ -2539,88 +3081,91 @@ function renderLeaderboardStep(ctx) {
2539
3081
  return `
2540
3082
  <div class="mushi-lb-row ${rank === 1 ? "mushi-lb-top" : ""}${isMe ? " mushi-lb-me" : ""}">
2541
3083
  <span class="mushi-lb-rank">#${rank}</span>
2542
- <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>
2543
3085
  <span class="mushi-lb-pts">${(e.points_30d ?? e.total_points).toLocaleString()} pts</span>
2544
3086
  </div>
2545
3087
  `;
2546
3088
  }).join("");
2547
- 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>` : "";
2548
3090
  return `
2549
- ${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 })}
2550
3092
  <div class="mushi-body">
2551
- ${loading ? '<p class="mushi-muted">Loading leaderboard\u2026</p>' : ""}
2552
- ${!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>` : ""}
2553
3095
  <div class="mushi-lb-list">${rows}</div>
2554
3096
  ${myRankBadge}
2555
- <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>
2556
3098
  </div>
2557
3099
  `;
2558
3100
  }
2559
3101
  function renderAccountStep(ctx) {
3102
+ const f = ctx.locale.flows;
2560
3103
  const tester = ctx.testerInfo;
2561
3104
  if (tester) {
2562
- const handle = tester.public_handle ?? tester.display_name ?? "Tester";
3105
+ const handle = tester.public_handle ?? tester.display_name ?? f.leaderboard.anon;
2563
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()) : "";
2564
3108
  return `
2565
- ${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 })}
2566
3110
  <div class="mushi-body">
2567
3111
  <div class="mushi-account-card">
2568
3112
  <div class="mushi-account-avatar">${escapeHtml(handle.charAt(0).toUpperCase())}</div>
2569
3113
  <div class="mushi-account-info">
2570
3114
  <strong>${escapeHtml(handle)}</strong>
2571
- ${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>` : ""}
2572
3116
  </div>
2573
3117
  </div>
2574
3118
  <button type="button" class="mushi-nav-item" data-action="open-cross-app-reports">
2575
- My reports across all apps \u2192
3119
+ ${escapeHtml(f.account.crossAppReports)}
2576
3120
  </button>
2577
3121
  <button type="button" class="mushi-nav-item" data-action="open-global-leaderboard">
2578
- View global leaderboard \u2192
3122
+ ${escapeHtml(f.account.viewLeaderboard)}
2579
3123
  </button>
2580
- <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>
2581
3125
  </div>
2582
3126
  `;
2583
3127
  }
2584
3128
  if (ctx.magicLinkSent) {
2585
3129
  return `
2586
- ${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 })}
2587
3131
  <div class="mushi-body">
2588
- <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>
2589
- <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>
2590
3134
  ${ctx.magicLinkError ? `<p class="mushi-error">${escapeHtml(ctx.magicLinkError)}</p>` : ""}
2591
3135
  </div>
2592
3136
  `;
2593
3137
  }
2594
3138
  return `
2595
- ${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 })}
2596
3140
  <div class="mushi-body">
2597
- <p class="mushi-muted">Sign in to see your reports across all apps and climb the global leaderboard. No password needed.</p>
2598
- <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>
2599
3143
  <input
2600
3144
  id="mushi-email-input"
2601
3145
  type="email"
2602
3146
  class="mushi-textarea"
2603
3147
  data-role="magic-link-email"
2604
- placeholder="you@example.com"
3148
+ placeholder="${escapeHtml(f.account.emailPlaceholder)}"
2605
3149
  autocomplete="email"
2606
3150
  value="${escapeHtml(ctx.magicLinkEmail)}"
2607
3151
  style="padding: 10px 12px; height: auto; resize: none;"
2608
3152
  />
2609
3153
  ${ctx.magicLinkError ? `<p class="mushi-error">${escapeHtml(ctx.magicLinkError)}</p>` : ""}
2610
3154
  <button type="button" class="mushi-submit" data-action="send-magic-link"${ctx.magicLinkSending ? ' disabled aria-disabled="true"' : ""}>
2611
- <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>
2612
3156
  </button>
2613
3157
  </div>
2614
3158
  `;
2615
3159
  }
2616
3160
  function renderCrossAppReportsStep(ctx) {
3161
+ const f = ctx.locale.flows;
2617
3162
  const reports = ctx.crossAppReports ?? [];
2618
3163
  const grouped = /* @__PURE__ */ new Map();
2619
3164
  for (const r of reports) {
2620
3165
  const key = r.project_id ?? "unknown";
2621
3166
  if (!grouped.has(key)) {
2622
3167
  grouped.set(key, {
2623
- name: r.app_name ?? "Unknown App",
3168
+ name: r.app_name ?? f.crossApp.unknownApp,
2624
3169
  slug: r.app_slug ?? null,
2625
3170
  domain: r.app_domain ?? null,
2626
3171
  reports: []
@@ -2655,15 +3200,16 @@ function renderCrossAppReportsStep(ctx) {
2655
3200
  `;
2656
3201
  }).join("");
2657
3202
  return `
2658
- ${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 })}
2659
3204
  <div class="mushi-body">
2660
- ${ctx.crossAppLoading ? '<p class="mushi-muted">Loading your reports\u2026</p>' : ""}
2661
- ${!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>` : ""}
2662
3207
  ${rows}
2663
3208
  </div>
2664
3209
  `;
2665
3210
  }
2666
3211
  function renderReportDetailStep(ctx) {
3212
+ const f = ctx.locale.flows;
2667
3213
  const report = ctx.reporterReports.find((r) => r.id === ctx.selectedReportId);
2668
3214
  const status = report?.status ?? "unknown";
2669
3215
  const tone = reporterStatusTone(status);
@@ -2675,7 +3221,7 @@ function renderReportDetailStep(ctx) {
2675
3221
  </div>
2676
3222
  `).join("");
2677
3223
  return `
2678
- ${renderHeader(ctx, { title: "Report thread", showBack: true, eyebrow: "Mushi \xB7 Inbox" })}
3224
+ ${renderHeader(ctx, { title: f.thread.title, showBack: true, eyebrow: f.eyebrows.thread })}
2679
3225
  <div class="mushi-body">
2680
3226
  <div class="mushi-thread-summary">
2681
3227
  <div class="mushi-thread-summary-meta">
@@ -2685,12 +3231,12 @@ function renderReportDetailStep(ctx) {
2685
3231
  <p>${escapeHtml(report?.summary ?? report?.description ?? "Report details")}</p>
2686
3232
  </div>
2687
3233
  <div class="mushi-thread">
2688
- ${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>`}
2689
3235
  </div>
2690
3236
  ${["fixed", "resolved", "verified"].includes(status) ? `
2691
3237
  <div class="mushi-verify-actions" role="group" aria-label="Fix verification">
2692
- <button type="button" class="mushi-intent-btn" data-action="reporter-confirms">Yes, fixed for me</button>
2693
- <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>
2694
3240
  </div>
2695
3241
  ` : ""}
2696
3242
  <textarea class="mushi-textarea" data-role="reporter-reply" rows="3" placeholder="Reply to the developer\u2026"></textarea>
@@ -2706,8 +3252,9 @@ function renderIntentStep(ctx) {
2706
3252
  const customEntry = ctx.resolveCustomCategory(catId);
2707
3253
  const intents = customEntry?.intents ?? (t.step2.intents[catId] || []);
2708
3254
  const options = intents.map((intent) => `
2709
- <button type="button" class="mushi-intent-btn" data-intent="${escapeHtml(intent)}">
2710
- ${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>
2711
3258
  </button>
2712
3259
  `).join("");
2713
3260
  const icon = ctx.categoryIcon(catId);
@@ -2723,7 +3270,6 @@ function renderIntentStep(ctx) {
2723
3270
  ${options}
2724
3271
  </div>
2725
3272
  </div>
2726
- ${renderStepIndicator(ctx, STEP_NUMBER.intent)}
2727
3273
  `;
2728
3274
  }
2729
3275
  function renderDetailsStep(ctx) {
@@ -2784,6 +3330,7 @@ function renderDetailsStep(ctx) {
2784
3330
  ${ctx.screenshotHint ? `<figcaption class="mushi-screenshot-hint">\u26A0 ${escapeHtml(ctx.screenshotHint)}</figcaption>` : ""}
2785
3331
  </figure>` : ""}
2786
3332
  <div class="mushi-error" style="display:none" role="alert"></div>
3333
+ ${ctx.identifiedUser ? `<p class="mushi-identified-user" aria-label="Reporting as ${escapeHtml(ctx.identifiedUser.name ?? ctx.identifiedUser.email ?? "")}">\u{1F464} Reporting as <strong>${escapeHtml(ctx.identifiedUser.name ?? ctx.identifiedUser.email ?? "you")}</strong></p>` : ""}
2787
3334
  </div>
2788
3335
  <div class="mushi-footer">
2789
3336
  <span class="mushi-footer-hint" aria-hidden="true">\u2318 + ENTER \u2192 send</span>
@@ -2792,7 +3339,6 @@ function renderDetailsStep(ctx) {
2792
3339
  <span class="mushi-submit-arrow" aria-hidden="true">\u2192</span>
2793
3340
  </button>
2794
3341
  </div>
2795
- ${renderStepIndicator(ctx, STEP_NUMBER.details)}
2796
3342
  `;
2797
3343
  }
2798
3344
  function renderSuccessStep(ctx) {
@@ -2813,19 +3359,20 @@ function renderSuccessStep(ctx) {
2813
3359
  ${ctx.rewardsState ? renderSuccessRewards(ctx) : ""}
2814
3360
  ${ctx.config.betaMode?.enabled ? renderBetaSuccessFooter(ctx) : ""}
2815
3361
  <button type="button" class="mushi-link-btn mushi-success-my-reports" data-action="view-my-reports">
2816
- \u{1F4EC} Track this report &rsaquo;
3362
+ ${escapeHtml(ctx.locale.flows.success.trackReport)}
2817
3363
  </button>
2818
3364
  </div>
2819
3365
  </div>
2820
3366
  `;
2821
3367
  }
2822
3368
  function renderSuccessReceipt(ctx) {
3369
+ const s = ctx.locale.flows.success;
2823
3370
  if (ctx.lastSubmitQueuedOffline) {
2824
3371
  return `
2825
3372
  <div class="mushi-success-receipt" role="status">
2826
3373
  <div class="mushi-success-receipt-row mushi-success-receipt-warn">
2827
- <span class="mushi-success-receipt-label">Queued offline</span>
2828
- <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>
2829
3376
  </div>
2830
3377
  </div>
2831
3378
  `;
@@ -2835,7 +3382,7 @@ function renderSuccessReceipt(ctx) {
2835
3382
  <div class="mushi-success-receipt" role="status">
2836
3383
  <div class="mushi-success-receipt-row">
2837
3384
  <span class="mushi-success-receipt-spinner" aria-hidden="true"></span>
2838
- <span class="mushi-success-receipt-hint">Delivering to the team\u2026</span>
3385
+ <span class="mushi-success-receipt-hint">${escapeHtml(s.delivering)}</span>
2839
3386
  </div>
2840
3387
  ${renderSlaLine(ctx)}
2841
3388
  </div>
@@ -2847,7 +3394,7 @@ function renderSuccessReceipt(ctx) {
2847
3394
  return `
2848
3395
  <div class="mushi-success-receipt" role="status">
2849
3396
  <div class="mushi-success-receipt-row">
2850
- <span class="mushi-success-receipt-label">Receipt</span>
3397
+ <span class="mushi-success-receipt-label">${escapeHtml(s.receipt)}</span>
2851
3398
  <button
2852
3399
  type="button"
2853
3400
  class="mushi-success-receipt-id"
@@ -2863,7 +3410,7 @@ function renderSuccessReceipt(ctx) {
2863
3410
  href="${escapeHtml(trackHref)}"
2864
3411
  target="_blank"
2865
3412
  rel="noopener noreferrer"
2866
- >Track on Mushi <span aria-hidden="true">\u2197</span></a>
3413
+ >${escapeHtml(s.trackOnMushi)} <span aria-hidden="true">\u2197</span></a>
2867
3414
  ` : ""}
2868
3415
  ${renderSlaLine(ctx)}
2869
3416
  </div>
@@ -2874,7 +3421,7 @@ function renderSlaLine(ctx) {
2874
3421
  if (sla) {
2875
3422
  return `<div class="mushi-success-sla">${escapeHtml(sla)}</div>`;
2876
3423
  }
2877
- 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>`;
2878
3425
  }
2879
3426
  function renderBetaSuccessFooter(ctx) {
2880
3427
  const beta = ctx.config.betaMode;
@@ -2883,7 +3430,6 @@ function renderBetaSuccessFooter(ctx) {
2883
3430
  return `
2884
3431
  <div class="mushi-beta-success-footer" role="note" aria-label="Beta feedback acknowledgement">
2885
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>`}
2886
- <div class="mushi-beta-success-line mushi-beta-success-dim">We aim to review within 48h \xB7 thank you for helping build this</div>
2887
3433
  </div>
2888
3434
  `;
2889
3435
  }
@@ -2973,7 +3519,7 @@ var MushiWidget = class _MushiWidget {
2973
3519
  environments: config.environments ?? {},
2974
3520
  smartHide: config.smartHide ?? false,
2975
3521
  draggable: config.draggable ?? false,
2976
- brandFooter: config.brandFooter ?? true,
3522
+ brandFooter: config.brandFooter ?? false,
2977
3523
  outdatedBanner: config.outdatedBanner ?? "auto",
2978
3524
  screenshotSensitiveHint: config.screenshotSensitiveHint ?? true,
2979
3525
  betaMode: config.betaMode ?? {},
@@ -2992,7 +3538,7 @@ var MushiWidget = class _MushiWidget {
2992
3538
  this.locale = getLocale(this.config.locale === "auto" ? void 0 : this.config.locale);
2993
3539
  this.host = document.createElement("div");
2994
3540
  this.host.id = "mushi-mushi-widget";
2995
- this.shadow = this.host.attachShadow({ mode: "closed" });
3541
+ this.shadow = this.host.attachShadow({ mode: "open" });
2996
3542
  }
2997
3543
  sdkVersion;
2998
3544
  host;
@@ -3018,6 +3564,8 @@ var MushiWidget = class _MushiWidget {
3018
3564
  viaFeatureRequest = false;
3019
3565
  /** Whether the category list is fully expanded (progressive disclosure). */
3020
3566
  showAllCategories = false;
3567
+ /** Secondary hub nav (inbox, assistant, community) collapsed under "More". */
3568
+ showMoreNav = false;
3021
3569
  screenshotAttached = false;
3022
3570
  screenshotCapturing = false;
3023
3571
  screenshotError = false;
@@ -3078,6 +3626,13 @@ var MushiWidget = class _MushiWidget {
3078
3626
  fabPos = null;
3079
3627
  /** Cleanup fn for visualViewport keyboard listener. */
3080
3628
  vvCleanup = null;
3629
+ /**
3630
+ * Host-app user identity forwarded via `Mushi.identify()` or
3631
+ * `Mushi.identifyWithToken()`. Used to show "Reporting as <name>"
3632
+ * in the details step so logged-in users know their report is linked.
3633
+ * Independent of the Mushi tester magic-link session below.
3634
+ */
3635
+ identifiedUser = null;
3081
3636
  /** Mushi tester session JWT — set after in-widget sign-in or by mushi.ts. */
3082
3637
  testerJwt = null;
3083
3638
  /** Tester identity (public_handle, display_name). */
@@ -3230,6 +3785,7 @@ var MushiWidget = class _MushiWidget {
3230
3785
  if (!this.isOpen) return;
3231
3786
  this.isOpen = false;
3232
3787
  this.showAllCategories = false;
3788
+ this.showMoreNav = false;
3233
3789
  this.render();
3234
3790
  this.callbacks.onClose();
3235
3791
  }
@@ -3272,10 +3828,10 @@ var MushiWidget = class _MushiWidget {
3272
3828
  this.assistantTurns.push({ role: "assistant", text: reply.text ?? "\u2026" });
3273
3829
  }
3274
3830
  } else {
3275
- this.assistantError = "No response \u2014 please try again.";
3831
+ this.assistantError = this.locale.assistant.errors.noResponse;
3276
3832
  }
3277
3833
  } catch {
3278
- this.assistantError = "Something went wrong. Please try again.";
3834
+ this.assistantError = this.locale.assistant.errors.generic;
3279
3835
  } finally {
3280
3836
  this.assistantSending = false;
3281
3837
  this.render();
@@ -3478,6 +4034,10 @@ var MushiWidget = class _MushiWidget {
3478
4034
  if (this.isOpen && this.step === "leaderboard") this.render();
3479
4035
  }
3480
4036
  // ── Community public setters (called by mushi.ts after API calls) ──────────
4037
+ setIdentifiedUser(user) {
4038
+ this.identifiedUser = user;
4039
+ if (this.isOpen) this.render();
4040
+ }
3481
4041
  setTesterSession(jwt, info) {
3482
4042
  this.testerJwt = jwt;
3483
4043
  this.testerInfo = info;
@@ -4194,13 +4754,8 @@ var MushiWidget = class _MushiWidget {
4194
4754
  }
4195
4755
  /** Tier accent colour for the rewards UI. */
4196
4756
  tierColor(slug) {
4197
- const colors = {
4198
- free: "#6b7280",
4199
- explorer: "#3b82f6",
4200
- contributor: "#8b5cf6",
4201
- champion: "#f59e0b"
4202
- };
4203
- return colors[slug] ?? "#6c47ff";
4757
+ const colors = core.MUSHI_TIER_COLORS;
4758
+ return colors[slug] ?? core.MUSHI_TIER_COLORS.default;
4204
4759
  }
4205
4760
  /**
4206
4761
  * Build the read-only snapshot + bound helper closures the stateless view
@@ -4214,6 +4769,7 @@ var MushiWidget = class _MushiWidget {
4214
4769
  lastReportId: this.lastReportId,
4215
4770
  reporterLoading: this.reporterLoading,
4216
4771
  locale: this.locale,
4772
+ identifiedUser: this.identifiedUser,
4217
4773
  testerReputation: this.testerReputation,
4218
4774
  testerInfo: this.testerInfo,
4219
4775
  screenshotCapturing: this.screenshotCapturing,
@@ -4258,6 +4814,7 @@ var MushiWidget = class _MushiWidget {
4258
4814
  assistantSending: this.assistantSending,
4259
4815
  assistantError: this.assistantError,
4260
4816
  showAllCategories: this.showAllCategories,
4817
+ showMoreNav: this.showMoreNav,
4261
4818
  pageFaviconHref: core.readPageFaviconHref()
4262
4819
  };
4263
4820
  }
@@ -4300,13 +4857,20 @@ var MushiWidget = class _MushiWidget {
4300
4857
  this.selectedIntent = null;
4301
4858
  this.viaFeatureRequest = false;
4302
4859
  }
4303
- if (this.step === "category") this.showAllCategories = false;
4860
+ if (this.step === "category") {
4861
+ this.showAllCategories = false;
4862
+ this.showMoreNav = false;
4863
+ }
4304
4864
  this.render();
4305
4865
  });
4306
4866
  panel.querySelector('[data-action="show-all-categories"]')?.addEventListener("click", () => {
4307
4867
  this.showAllCategories = true;
4308
4868
  this.render();
4309
4869
  });
4870
+ panel.querySelector('[data-action="toggle-more-nav"]')?.addEventListener("click", () => {
4871
+ this.showMoreNav = !this.showMoreNav;
4872
+ this.render();
4873
+ });
4310
4874
  panel.querySelector('[data-action="assistant"]')?.addEventListener("click", () => {
4311
4875
  this.openAssistantTab();
4312
4876
  });
@@ -4637,6 +5201,14 @@ var MushiWidget = class _MushiWidget {
4637
5201
  this.render();
4638
5202
  }
4639
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
+ }
4640
5212
  async loadReporterReports() {
4641
5213
  this.step = "reports";
4642
5214
  this.reporterLoading = true;
@@ -4728,6 +5300,14 @@ var MushiWidget = class _MushiWidget {
4728
5300
  getRecorderStep() {
4729
5301
  return this.step;
4730
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
+ }
4731
5311
  getRecorderTrigger() {
4732
5312
  return this.shadow.querySelector(".mushi-trigger");
4733
5313
  }
@@ -4802,6 +5382,7 @@ function exposeMarketingRecorder(widget) {
4802
5382
  const api = {
4803
5383
  ready: () => widget.getIsMounted(),
4804
5384
  getStep: () => widget.getRecorderStep(),
5385
+ getCategoryStepIA: () => widget.getRecorderCategoryStepIA(),
4805
5386
  getTriggerCenter: () => centerOf(widget.getRecorderTrigger()),
4806
5387
  getCategoryCenter: (category) => centerOf(widget.getRecorderCategoryButton(category)),
4807
5388
  getIntentCenter: (label) => centerOf(widget.getRecorderIntentButton(label)),
@@ -4815,8 +5396,6 @@ function exposeMarketingRecorder(widget) {
4815
5396
  };
4816
5397
  globalThis.__mushiRecorder = api;
4817
5398
  }
4818
-
4819
- // src/rewards.ts
4820
5399
  var MIN_FLUSH_INTERVAL = 3e4;
4821
5400
  var DEFAULT_FLUSH_INTERVAL = 3e5;
4822
5401
  var DWELL_SAMPLE_INTERVAL = 6e4;
@@ -4827,7 +5406,7 @@ var flushTimer = null;
4827
5406
  var dwellTimer = null;
4828
5407
  var currentUserId = null;
4829
5408
  var currentUserTraits = null;
4830
- var reporterTokenHash = null;
5409
+ var reporterTokenRaw = null;
4831
5410
  var apiClient = null;
4832
5411
  var optedIn = false;
4833
5412
  var tierCache = null;
@@ -4890,7 +5469,7 @@ function initRewards(ctx) {
4890
5469
  apiClient = ctx.client;
4891
5470
  currentUserId = ctx.userId;
4892
5471
  currentUserTraits = ctx.traits ?? null;
4893
- reporterTokenHash = ctx.reporterToken ?? null;
5472
+ reporterTokenRaw = ctx.reporterToken ?? null;
4894
5473
  const { projectId } = ctx;
4895
5474
  const flushMs = Math.max(
4896
5475
  MIN_FLUSH_INTERVAL,
@@ -4925,12 +5504,6 @@ function initRewards(ctx) {
4925
5504
  renderConsentBanner(projectId, ctx.config);
4926
5505
  }
4927
5506
  }
4928
- function updateRewardsUser(userId, traits) {
4929
- currentUserId = userId;
4930
- currentUserTraits = traits ?? null;
4931
- tierCache = null;
4932
- tierCacheTime = 0;
4933
- }
4934
5507
  function enqueue(event) {
4935
5508
  if (!optedIn || !currentUserId) return;
4936
5509
  pendingEvents.push({ ...event, queuedAt: Date.now() });
@@ -4947,9 +5520,10 @@ async function flush(ctx) {
4947
5520
  if (isRewardsApiBackedOff()) return;
4948
5521
  const batch = pendingEvents.splice(0, 100);
4949
5522
  try {
5523
+ const reporterTokenHash = reporterTokenRaw ? await core.sha256Hex(reporterTokenRaw) : void 0;
4950
5524
  const result = await ctx.client.submitActivity(currentUserId, batch, {
4951
5525
  userTraits: currentUserTraits ?? void 0,
4952
- reporterTokenHash: reporterTokenHash ?? void 0,
5526
+ reporterTokenHash,
4953
5527
  optedIn: true,
4954
5528
  hostJwt: hostJwt ?? void 0
4955
5529
  });
@@ -5069,7 +5643,7 @@ function renderTierBadge(tier, config) {
5069
5643
  width: 6px;
5070
5644
  height: 6px;
5071
5645
  border-radius: 50%;
5072
- background: #6c47ff;
5646
+ background: ${core.MUSHI_COLORS_LIGHT.accent};
5073
5647
  flex-shrink: 0;
5074
5648
  }
5075
5649
  </style>
@@ -5098,16 +5672,16 @@ function renderConsentBanner(projectId, config) {
5098
5672
  <style>
5099
5673
  :host { display: block; }
5100
5674
  .banner {
5101
- background: #fff;
5102
- border: 1px solid #e5e7eb;
5675
+ background: ${core.MUSHI_COLORS_LIGHT.paperRaised};
5676
+ border: 1px solid ${core.MUSHI_COLORS_LIGHT.ruleStrong};
5103
5677
  border-radius: 12px;
5104
5678
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
5105
5679
  padding: 14px 16px;
5106
5680
  font-size: 13px;
5107
5681
  line-height: 1.5;
5108
- color: #374151;
5682
+ color: ${core.MUSHI_COLORS_LIGHT.inkMuted};
5109
5683
  }
5110
- .title { font-weight: 700; margin-bottom: 6px; color: #111827; }
5684
+ .title { font-weight: 700; margin-bottom: 6px; color: ${core.MUSHI_COLORS_LIGHT.ink}; }
5111
5685
  .actions { display: flex; gap: 8px; margin-top: 10px; }
5112
5686
  button {
5113
5687
  flex: 1;
@@ -5118,8 +5692,8 @@ function renderConsentBanner(projectId, config) {
5118
5692
  font-size: 12px;
5119
5693
  font-weight: 600;
5120
5694
  }
5121
- .accept { background: #6c47ff; color: #fff; }
5122
- .decline { background: #f3f4f6; color: #374151; }
5695
+ .accept { background: ${core.MUSHI_COLORS_LIGHT.accent}; color: ${core.MUSHI_COLORS_LIGHT.paperRaised}; }
5696
+ .decline { background: ${core.MUSHI_COLORS_LIGHT.paper}; color: ${core.MUSHI_COLORS_LIGHT.inkMuted}; }
5123
5697
  </style>
5124
5698
  <div class="banner">
5125
5699
  <div class="title">\u{1F3AF} Earn rewards</div>
@@ -5668,8 +6242,6 @@ function createPerformanceCapture() {
5668
6242
  }
5669
6243
  };
5670
6244
  }
5671
-
5672
- // src/capture/element-selector.ts
5673
6245
  function createElementSelector() {
5674
6246
  let active = false;
5675
6247
  let overlay = null;
@@ -5729,8 +6301,8 @@ function createElementSelector() {
5729
6301
  position: fixed;
5730
6302
  pointer-events: none;
5731
6303
  z-index: 2147483647;
5732
- border: 2px solid #6366f1;
5733
- background: rgba(99, 102, 241, 0.1);
6304
+ border: 2px solid ${core.MUSHI_COLORS_LIGHT.accent};
6305
+ background: ${core.MUSHI_COLORS_LIGHT.accentWash};
5734
6306
  border-radius: 4px;
5735
6307
  transition: all 0.1s ease;
5736
6308
  display: none;
@@ -6824,6 +7396,12 @@ function createProactiveManager(config = {}) {
6824
7396
  }
6825
7397
 
6826
7398
  // src/mushi.ts
7399
+ function resolveReportAppVersion(config, environment) {
7400
+ if (config.appVersion) return config.appVersion;
7401
+ const vercelId = config.integrations?.vercel?.analyticsId;
7402
+ if (vercelId) return vercelId;
7403
+ return environment?.buildId;
7404
+ }
6827
7405
  var instance = null;
6828
7406
  var Mushi = class {
6829
7407
  constructor() {
@@ -6859,6 +7437,8 @@ var Mushi = class {
6859
7437
  };
6860
7438
  function createInstance(config) {
6861
7439
  const bootstrapConfig = applyPresetConfig(config);
7440
+ const projectId = bootstrapConfig.projectId;
7441
+ const reporterTokenForProject = () => core.getReporterToken(projectId);
6862
7442
  let activeConfig = bootstrapConfig;
6863
7443
  const log = config.debug ?? false ? core.createLogger({ scope: "mushi", level: "debug", format: "pretty" }) : core.noopLogger;
6864
7444
  let userToken = null;
@@ -6976,7 +7556,9 @@ function createInstance(config) {
6976
7556
  }
6977
7557
  if (activeConfig.capture?.screenshot !== "off") {
6978
7558
  const screenshotOptions = { privacy: activeConfig.privacy };
6979
- if (screenshotCap) {
7559
+ if (activeConfig.capture?.screenshotProvider) {
7560
+ screenshotCap = null;
7561
+ } else if (screenshotCap) {
6980
7562
  screenshotCap.updateOptions(screenshotOptions);
6981
7563
  } else {
6982
7564
  screenshotCap = createScreenshotCapture(screenshotOptions);
@@ -6984,7 +7566,7 @@ function createInstance(config) {
6984
7566
  } else {
6985
7567
  screenshotCap = null;
6986
7568
  }
6987
- if (!screenshotCap) pendingScreenshot = null;
7569
+ if (!screenshotCap && !activeConfig.capture?.screenshotProvider) pendingScreenshot = null;
6988
7570
  widget.setAllowScreenshotRemove(activeConfig.privacy?.allowUserRemoveScreenshot !== false);
6989
7571
  if (activeConfig.capture?.elementSelector !== false) {
6990
7572
  elementSelector ??= createElementSelector();
@@ -7055,6 +7637,9 @@ function createInstance(config) {
7055
7637
  let pendingElement = null;
7056
7638
  let pendingProactiveTrigger = null;
7057
7639
  let runtimeConfigLoaded = false;
7640
+ let reporterNotificationsEnabled = true;
7641
+ let reporterPollTimer = null;
7642
+ let reporterPollVisibleHandler = null;
7058
7643
  let userInfo = null;
7059
7644
  const customMetadata = {};
7060
7645
  const stickyTags = {};
@@ -7068,8 +7653,76 @@ function createInstance(config) {
7068
7653
  let detachAutoBreadcrumbs = null;
7069
7654
  detachAutoBreadcrumbs = installAutoBreadcrumbs(breadcrumbs);
7070
7655
  let screenshotCaptureInFlight = false;
7656
+ function syncReporterInboxQuiet() {
7657
+ void widget.refreshReporterInboxQuiet();
7658
+ }
7659
+ function stopReporterInboxPolling() {
7660
+ if (reporterPollTimer) clearInterval(reporterPollTimer);
7661
+ reporterPollTimer = null;
7662
+ if (reporterPollVisibleHandler && typeof document !== "undefined") {
7663
+ document.removeEventListener("visibilitychange", reporterPollVisibleHandler);
7664
+ }
7665
+ reporterPollVisibleHandler = null;
7666
+ }
7667
+ function startReporterInboxPolling() {
7668
+ stopReporterInboxPolling();
7669
+ if (!reporterNotificationsEnabled) return;
7670
+ const POLL_MS = 6e4;
7671
+ const tick = () => {
7672
+ if (typeof document !== "undefined" && document.visibilityState === "hidden") return;
7673
+ syncReporterInboxQuiet();
7674
+ };
7675
+ reporterPollTimer = setInterval(tick, POLL_MS);
7676
+ if (typeof document !== "undefined") {
7677
+ reporterPollVisibleHandler = () => {
7678
+ if (document.visibilityState === "visible") syncReporterInboxQuiet();
7679
+ };
7680
+ document.addEventListener("visibilitychange", reporterPollVisibleHandler);
7681
+ }
7682
+ syncReporterInboxQuiet();
7683
+ }
7684
+ function wireRewardsForIdentifiedUser(userId, traits) {
7685
+ if (!activeConfig.rewards?.enabled) return;
7686
+ const rewardsCtx = {
7687
+ client: apiClient2,
7688
+ config: activeConfig.rewards,
7689
+ projectId,
7690
+ userId,
7691
+ traits,
7692
+ reporterToken: reporterTokenForProject()
7693
+ };
7694
+ initRewards(rewardsCtx);
7695
+ if (activeConfig.rewards.showInWidget !== false) {
7696
+ void apiClient2.getMyPoints(userId).then((res) => {
7697
+ if (!res.ok) return;
7698
+ const d = res.data;
7699
+ widget.setRewardsState({
7700
+ tier: d.tier ? { slug: d.tier.slug ?? "free", displayName: d.tier.display_name ?? "Free", pointsThreshold: d.tier.points_threshold ?? 0 } : null,
7701
+ nextTier: d.next_tier ? { displayName: d.next_tier.display_name ?? "", pointsThreshold: d.next_tier.points_threshold ?? 0 } : null,
7702
+ totalPoints: d.total_points ?? 0,
7703
+ pointsForReport: d.report_submit_pts ?? 50
7704
+ });
7705
+ }).catch(() => {
7706
+ });
7707
+ }
7708
+ }
7071
7709
  async function takeScreenshotWithoutChrome() {
7072
- if (!screenshotCap || screenshotCaptureInFlight) return null;
7710
+ if (screenshotCaptureInFlight) return null;
7711
+ const provider = activeConfig.capture?.screenshotProvider;
7712
+ if (provider) {
7713
+ screenshotCaptureInFlight = true;
7714
+ try {
7715
+ const result = await provider();
7716
+ return result ?? null;
7717
+ } catch (err) {
7718
+ log.warn("screenshotProvider threw, falling back to built-in capturer", {
7719
+ error: err instanceof Error ? err.message : String(err)
7720
+ });
7721
+ } finally {
7722
+ screenshotCaptureInFlight = false;
7723
+ }
7724
+ }
7725
+ if (!screenshotCap) return null;
7073
7726
  screenshotCaptureInFlight = true;
7074
7727
  const panelWasVisible = widget.getIsOpen();
7075
7728
  if (panelWasVisible) widget.hidePanel();
@@ -7089,7 +7742,8 @@ function createInstance(config) {
7089
7742
  }
7090
7743
  async function autoCaptureScreenshot(when) {
7091
7744
  const mode = activeConfig.capture?.screenshot;
7092
- if (!screenshotCap || mode === "off" || pendingScreenshot) return;
7745
+ const hasCapture = !!screenshotCap || !!activeConfig.capture?.screenshotProvider;
7746
+ if (!hasCapture || mode === "off" || pendingScreenshot) return;
7093
7747
  if (when === "open" && mode !== "auto") return;
7094
7748
  if (when === "submit" && mode !== "on-report" && mode !== "auto") return;
7095
7749
  log.debug("Auto-capturing screenshot", { when, mode });
@@ -7123,7 +7777,8 @@ function createInstance(config) {
7123
7777
  emit("widget:closed");
7124
7778
  },
7125
7779
  onScreenshotRequest: async () => {
7126
- if (!screenshotCap || activeConfig.capture?.screenshot === "off") return;
7780
+ const hasCapture = !!screenshotCap || !!activeConfig.capture?.screenshotProvider;
7781
+ if (!hasCapture || activeConfig.capture?.screenshot === "off") return;
7127
7782
  log.debug("Taking screenshot");
7128
7783
  pendingScreenshot = await takeScreenshotWithoutChrome();
7129
7784
  widget.setScreenshotAttached(pendingScreenshot !== null);
@@ -7203,36 +7858,36 @@ function createInstance(config) {
7203
7858
  }
7204
7859
  },
7205
7860
  async onReporterReportsRequest() {
7206
- const result = await apiClient2.listReporterReports(core.getReporterToken());
7861
+ const result = await apiClient2.listReporterReports(core.getReporterToken(projectId));
7207
7862
  if (!result.ok) throw new Error(result.error?.message ?? "Could not load reports");
7208
7863
  return result.data?.reports ?? [];
7209
7864
  },
7210
7865
  async onReporterCommentsRequest(reportId) {
7211
- const result = await apiClient2.listReporterComments(reportId, core.getReporterToken());
7866
+ const result = await apiClient2.listReporterComments(reportId, core.getReporterToken(projectId));
7212
7867
  if (!result.ok) throw new Error(result.error?.message ?? "Could not load thread");
7213
7868
  return result.data?.comments ?? [];
7214
7869
  },
7215
7870
  async onReporterReply(reportId, body) {
7216
- const result = await apiClient2.replyToReporterReport(reportId, core.getReporterToken(), body);
7871
+ const result = await apiClient2.replyToReporterReport(reportId, core.getReporterToken(projectId), body);
7217
7872
  if (!result.ok) throw new Error(result.error?.message ?? "Could not send reply");
7218
7873
  },
7219
7874
  async onReporterFeedback(reportId, signal, note) {
7220
- const result = await apiClient2.replyToReporterReport(reportId, core.getReporterToken(), note ?? "", signal);
7875
+ const result = await apiClient2.replyToReporterReport(reportId, core.getReporterToken(projectId), note ?? "", signal);
7221
7876
  if (!result.ok) throw new Error(result.error?.message ?? "Could not send feedback");
7222
7877
  return result.data?.feedback ?? null;
7223
7878
  },
7224
7879
  async onReporterReopen(reportId, note) {
7225
- const result = await apiClient2.reopenReporterReport(reportId, core.getReporterToken(), note);
7880
+ const result = await apiClient2.reopenReporterReport(reportId, core.getReporterToken(projectId), note);
7226
7881
  if (!result.ok) throw new Error(result.error?.message ?? "Could not reopen report");
7227
7882
  return result.data?.outcome ?? null;
7228
7883
  },
7229
7884
  async onFeatureBoardRequest() {
7230
- const result = await apiClient2.listReporterFeatureBoard(core.getReporterToken());
7885
+ const result = await apiClient2.listReporterFeatureBoard(core.getReporterToken(projectId));
7231
7886
  if (!result.ok) throw new Error(result.error?.message ?? "Could not load community ideas");
7232
7887
  return result.data?.tickets ?? [];
7233
7888
  },
7234
7889
  async onFeatureBoardVote(requestId) {
7235
- const result = await apiClient2.voteReporterFeatureBoard(requestId, core.getReporterToken());
7890
+ const result = await apiClient2.voteReporterFeatureBoard(requestId, core.getReporterToken(projectId));
7236
7891
  if (!result.ok) throw new Error(result.error?.message ?? "Could not vote");
7237
7892
  return result.data ?? { voted: true, action: "added" };
7238
7893
  },
@@ -7367,17 +8022,21 @@ function createInstance(config) {
7367
8022
  });
7368
8023
  function applyRuntimeConfig(runtime) {
7369
8024
  runtimeConfigLoaded = true;
8025
+ reporterNotificationsEnabled = runtime.reporterNotificationsEnabled !== false;
7370
8026
  if (runtime.enabled === false) {
7371
8027
  activeConfig = bootstrapConfig;
7372
8028
  clearCachedRuntimeConfig(config.projectId);
7373
8029
  syncCaptureModules();
7374
8030
  widget.updateConfig(activeConfig.widget);
8031
+ stopReporterInboxPolling();
7375
8032
  log.debug("Runtime SDK config disabled; using bootstrap config", { version: runtime.version });
7376
8033
  return;
7377
8034
  }
7378
8035
  activeConfig = mergeRuntimeConfig(activeConfig, runtime);
7379
8036
  syncCaptureModules();
7380
8037
  if (runtime.widget) widget.updateConfig(activeConfig.widget);
8038
+ if (reporterNotificationsEnabled) startReporterInboxPolling();
8039
+ else stopReporterInboxPolling();
7381
8040
  log.debug("Applied runtime SDK config", { version: runtime.version });
7382
8041
  }
7383
8042
  if (shouldUseRuntimeConfig(config)) {
@@ -7397,6 +8056,7 @@ function createInstance(config) {
7397
8056
  log.debug("Runtime SDK config disabled via runtimeConfig:false; using static bootstrap config");
7398
8057
  }
7399
8058
  void checkSdkFreshness();
8059
+ startReporterInboxPolling();
7400
8060
  log.info("Initialized", { projectId: config.projectId });
7401
8061
  async function checkSdkFreshness() {
7402
8062
  if (activeConfig.widget?.outdatedBanner === "off") return;
@@ -7484,6 +8144,7 @@ function createInstance(config) {
7484
8144
  if (pendingScreenshot && !screenshotForWire) {
7485
8145
  log.warn("Screenshot dropped \u2014 could not compress under wire budget");
7486
8146
  }
8147
+ const capturedEnvironment = core.captureEnvironment();
7487
8148
  const report = {
7488
8149
  id: core.newUuid(),
7489
8150
  projectId: config.projectId,
@@ -7491,7 +8152,7 @@ function createInstance(config) {
7491
8152
  ...userCategory ? { userCategory } : {},
7492
8153
  description: scrubbedDescription,
7493
8154
  userIntent: intent,
7494
- environment: core.captureEnvironment(),
8155
+ environment: capturedEnvironment,
7495
8156
  consoleLogs,
7496
8157
  networkLogs,
7497
8158
  performanceMetrics: activeConfig.capture?.performance === false ? void 0 : perfCap?.getMetrics(),
@@ -7505,9 +8166,9 @@ function createInstance(config) {
7505
8166
  ...sentryCtx?.release ? { sentryRelease: sentryCtx.release } : {}
7506
8167
  },
7507
8168
  sessionId: core.getSessionId(),
7508
- reporterToken: core.getReporterToken(),
8169
+ reporterToken: core.getReporterToken(projectId),
7509
8170
  ...fingerprintHash ? { fingerprintHash } : {},
7510
- appVersion: config.integrations?.vercel?.analyticsId,
8171
+ appVersion: resolveReportAppVersion(activeConfig, capturedEnvironment),
7511
8172
  sdkPackage: MUSHI_SDK_PACKAGE,
7512
8173
  sdkVersion: MUSHI_SDK_VERSION,
7513
8174
  proactiveTrigger: pendingProactiveTrigger ?? void 0,
@@ -7592,6 +8253,7 @@ function createInstance(config) {
7592
8253
  if (result.ok) {
7593
8254
  log.info("Report sent", { reportId: result.data?.reportId });
7594
8255
  emit("report:sent", { reportId: result.data?.reportId });
8256
+ syncReporterInboxQuiet();
7595
8257
  if (result.data?.cursorAgentId) {
7596
8258
  const d = result.data;
7597
8259
  emit("report:dispatched", { reportId: d.reportId, agentId: d.cursorAgentId, fixId: d.fixId });
@@ -7713,6 +8375,7 @@ function createInstance(config) {
7713
8375
  replayCap?.destroy();
7714
8376
  replayCap = null;
7715
8377
  offlineQueue.stopAutoSync();
8378
+ stopReporterInboxPolling();
7716
8379
  detachAutoBreadcrumbs?.();
7717
8380
  detachAutoBreadcrumbs = null;
7718
8381
  breadcrumbs.clear();
@@ -7740,12 +8403,13 @@ function createInstance(config) {
7740
8403
  ...sentryCtx.breadcrumbs ? { breadcrumbs: scrubBreadcrumbsForWire(sentryCtx.breadcrumbs) } : {},
7741
8404
  ...sentryCtx.tags ? { tags: scrubTagsForWire(sentryCtx.tags) } : {}
7742
8405
  } : void 0;
8406
+ const capturedEnvironment = core.captureEnvironment();
7743
8407
  const report = {
7744
8408
  id: core.newUuid(),
7745
8409
  projectId: config.projectId,
7746
8410
  category,
7747
8411
  description,
7748
- environment: core.captureEnvironment(),
8412
+ environment: capturedEnvironment,
7749
8413
  timeline: timelineCap.getEntries(),
7750
8414
  metadata: {
7751
8415
  ...input.metadata ?? {},
@@ -7759,20 +8423,39 @@ function createInstance(config) {
7759
8423
  ...mergedTags && Object.keys(mergedTags).length > 0 ? { tags: mergedTags } : {},
7760
8424
  ...sentryCtxScrubbed ? { sentryContext: sentryCtxScrubbed } : {},
7761
8425
  sessionId: core.getSessionId(),
7762
- reporterToken: core.getReporterToken(),
8426
+ reporterToken: core.getReporterToken(projectId),
8427
+ appVersion: resolveReportAppVersion(activeConfig, capturedEnvironment),
7763
8428
  sdkPackage: MUSHI_SDK_PACKAGE,
7764
8429
  sdkVersion: MUSHI_SDK_VERSION,
7765
8430
  sentryEventId: sentryCtx?.eventId,
7766
8431
  sentryReplayId: sentryCtx?.replayId,
7767
8432
  createdAt: (/* @__PURE__ */ new Date()).toISOString()
7768
8433
  };
7769
- emit("report:submitted", { reportId: report.id });
8434
+ let finalReport = report;
8435
+ if (activeConfig.beforeSendFeedback) {
8436
+ try {
8437
+ const hookResult = await Promise.race([
8438
+ Promise.resolve(activeConfig.beforeSendFeedback(report)),
8439
+ new Promise((resolve) => setTimeout(() => resolve(report), 2e3))
8440
+ ]);
8441
+ if (hookResult === null) {
8442
+ log.info("captureEvent dropped by beforeSendFeedback hook", { reportId: report.id });
8443
+ return null;
8444
+ }
8445
+ finalReport = hookResult;
8446
+ } catch (err) {
8447
+ log.warn("captureEvent beforeSendFeedback threw \u2014 sending unmodified report", {
8448
+ error: err instanceof Error ? err.message : String(err)
8449
+ });
8450
+ }
8451
+ }
8452
+ emit("report:submitted", { reportId: finalReport.id });
7770
8453
  if (typeof navigator !== "undefined" && !navigator.onLine) {
7771
- await offlineQueue.enqueue(report);
7772
- emit("report:queued", { reportId: report.id });
8454
+ await offlineQueue.enqueue(finalReport);
8455
+ emit("report:queued", { reportId: finalReport.id });
7773
8456
  return null;
7774
8457
  }
7775
- const res = await apiClient2.submitReport(report);
8458
+ const res = await apiClient2.submitReport(finalReport);
7776
8459
  if (res.ok) {
7777
8460
  emit("report:sent", { reportId: res.data?.reportId });
7778
8461
  try {
@@ -7781,8 +8464,8 @@ function createInstance(config) {
7781
8464
  }
7782
8465
  return res.data?.reportId ?? null;
7783
8466
  }
7784
- await offlineQueue.enqueue(report);
7785
- emit("report:failed", { reportId: report.id, error: res.error });
8467
+ await offlineQueue.enqueue(finalReport);
8468
+ emit("report:failed", { reportId: finalReport.id, error: res.error });
7786
8469
  return null;
7787
8470
  },
7788
8471
  async captureException(error, options) {
@@ -7814,6 +8497,9 @@ function createInstance(config) {
7814
8497
  },
7815
8498
  identify(userId, traits) {
7816
8499
  userInfo = { id: userId, ...traits?.email ? { email: traits.email } : {}, ...traits?.name ? { name: traits.name } : {} };
8500
+ widget.setIdentifiedUser(
8501
+ userInfo.name || userInfo.email ? { name: userInfo.name, email: userInfo.email } : null
8502
+ );
7817
8503
  if (traits) {
7818
8504
  for (const [k, v] of Object.entries(traits)) {
7819
8505
  if (k !== "email" && k !== "name") customMetadata[`user.${k}`] = v;
@@ -7824,33 +8510,14 @@ function createInstance(config) {
7824
8510
  level: "info",
7825
8511
  message: `Mushi.identify(${userId})`
7826
8512
  });
7827
- if (activeConfig.rewards?.enabled) {
7828
- const rewardsCtx = {
7829
- client: apiClient2,
7830
- config: activeConfig.rewards,
7831
- projectId: bootstrapConfig.projectId,
7832
- userId,
7833
- traits: traits ? { email: traits.email, name: traits.name, provider: traits.provider } : void 0
7834
- };
7835
- if (userInfo.id === userId) {
7836
- initRewards(rewardsCtx);
7837
- } else {
7838
- updateRewardsUser(userId, rewardsCtx.traits);
7839
- }
7840
- if (activeConfig.rewards.showInWidget !== false) {
7841
- void apiClient2.getMyPoints(userId).then((res) => {
7842
- if (!res.ok) return;
7843
- const d = res.data;
7844
- widget.setRewardsState({
7845
- tier: d.tier ? { slug: d.tier.slug ?? "free", displayName: d.tier.display_name ?? "Free", pointsThreshold: d.tier.points_threshold ?? 0 } : null,
7846
- nextTier: d.next_tier ? { displayName: d.next_tier.display_name ?? "", pointsThreshold: d.next_tier.points_threshold ?? 0 } : null,
7847
- totalPoints: d.total_points ?? 0,
7848
- pointsForReport: d.report_submit_pts ?? 50
7849
- });
7850
- }).catch(() => {
7851
- });
7852
- }
7853
- }
8513
+ wireRewardsForIdentifiedUser(
8514
+ userId,
8515
+ traits ? {
8516
+ email: traits.email,
8517
+ name: traits.name,
8518
+ provider: traits.provider
8519
+ } : void 0
8520
+ );
7854
8521
  },
7855
8522
  identifyWithToken(token) {
7856
8523
  userToken = token && typeof token === "string" ? token : null;
@@ -7862,9 +8529,18 @@ function createInstance(config) {
7862
8529
  ...claims.email ? { email: claims.email } : {},
7863
8530
  ...claims.name ? { name: claims.name } : {}
7864
8531
  };
8532
+ widget.setIdentifiedUser(
8533
+ userInfo.name || userInfo.email ? { name: userInfo.name, email: userInfo.email } : null
8534
+ );
8535
+ wireRewardsForIdentifiedUser(userInfo.id, {
8536
+ email: userInfo.email,
8537
+ name: userInfo.name
8538
+ });
7865
8539
  }
7866
8540
  breadcrumbs.add({ category: "lifecycle", level: "info", message: "Mushi.identifyWithToken()" });
7867
8541
  } else {
8542
+ userInfo = null;
8543
+ widget.setIdentifiedUser(null);
7868
8544
  breadcrumbs.add({ category: "lifecycle", level: "info", message: "Mushi.identifyWithToken(null)" });
7869
8545
  }
7870
8546
  },
@@ -7925,27 +8601,27 @@ function createInstance(config) {
7925
8601
  },
7926
8602
  // ─── Reporter API (cross-platform) ────────────────────────────────
7927
8603
  async listMyReports() {
7928
- const result = await apiClient2.listReporterReports(core.getReporterToken());
8604
+ const result = await apiClient2.listReporterReports(core.getReporterToken(projectId));
7929
8605
  if (!result.ok) return [];
7930
8606
  return result.data?.reports ?? [];
7931
8607
  },
7932
8608
  async listMyComments(reportId) {
7933
- const result = await apiClient2.listReporterComments(reportId, core.getReporterToken());
8609
+ const result = await apiClient2.listReporterComments(reportId, core.getReporterToken(projectId));
7934
8610
  if (!result.ok) return [];
7935
8611
  return result.data?.comments ?? [];
7936
8612
  },
7937
8613
  async replyToReport(reportId, body) {
7938
- const result = await apiClient2.replyToReporterReport(reportId, core.getReporterToken(), body);
8614
+ const result = await apiClient2.replyToReporterReport(reportId, core.getReporterToken(projectId), body);
7939
8615
  if (!result.ok) return null;
7940
8616
  return result.data?.comment ?? null;
7941
8617
  },
7942
8618
  async submitFeedbackSignal(reportId, signal, note) {
7943
- const result = await apiClient2.replyToReporterReport(reportId, core.getReporterToken(), note ?? "", signal);
8619
+ const result = await apiClient2.replyToReporterReport(reportId, core.getReporterToken(projectId), note ?? "", signal);
7944
8620
  if (!result.ok) return null;
7945
8621
  return result.data?.feedback ?? null;
7946
8622
  },
7947
8623
  async reopenReport(reportId, note) {
7948
- const result = await apiClient2.reopenReporterReport(reportId, core.getReporterToken(), note);
8624
+ const result = await apiClient2.reopenReporterReport(reportId, core.getReporterToken(projectId), note);
7949
8625
  if (!result.ok) return null;
7950
8626
  return result.data?.outcome ?? null;
7951
8627
  },
@@ -8430,6 +9106,8 @@ exports.createScreenshotCapture = createScreenshotCapture;
8430
9106
  exports.createTimelineCapture = createTimelineCapture;
8431
9107
  exports.getAvailableLocales = getAvailableLocales;
8432
9108
  exports.getLocale = getLocale;
9109
+ exports.getWidgetPreviewTokens = getWidgetPreviewTokens;
9110
+ exports.getWidgetThemeVars = getWidgetThemeVars;
8433
9111
  exports.setupProactiveTriggers = setupProactiveTriggers;
8434
9112
  //# sourceMappingURL=index.cjs.map
8435
9113
  //# sourceMappingURL=index.cjs.map