makethisbetter 1.20.1 → 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/README.md +32 -13
- package/dist/context/frustration.d.ts +0 -1
- package/dist/context/frustration.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/makethisbetter.cjs +20 -20
- package/dist/makethisbetter.cjs.map +1 -1
- package/dist/makethisbetter.esm.js +582 -543
- package/dist/makethisbetter.esm.js.map +1 -1
- package/dist/makethisbetter.js +20 -20
- package/dist/makethisbetter.js.map +1 -1
- package/dist/popup/clarify.d.ts +1 -0
- package/dist/popup/clarify.d.ts.map +1 -1
- package/dist/screenshot/capture.d.ts +2 -2
- package/dist/screenshot/capture.d.ts.map +1 -1
- package/dist/styles.d.ts +2 -2
- package/dist/types.d.ts +7 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/widget/brand-colors.d.ts +4 -0
- package/dist/widget/brand-colors.d.ts.map +1 -0
- package/dist/widget/controller.d.ts +1 -0
- package/dist/widget/controller.d.ts.map +1 -1
- package/dist/widget/shadow.d.ts +4 -1
- package/dist/widget/shadow.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/context/frustration.ts +5 -12
- package/src/index.ts +11 -12
- package/src/popup/clarify.ts +21 -11
- package/src/popup/comment.ts +1 -1
- package/src/screenshot/capture.ts +32 -14
- package/src/styles/widget.css +132 -103
- package/src/styles.ts +2 -2
- package/src/types.ts +8 -0
- package/src/widget/brand-colors.ts +32 -0
- package/src/widget/controller.ts +10 -3
- package/src/widget/shadow.ts +44 -1
package/README.md
CHANGED
|
@@ -219,7 +219,7 @@ The SDK watches for signals that a user is struggling and proactively offers to
|
|
|
219
219
|
| Rage click | 4+ clicks on the same interaction target within 1.5 seconds |
|
|
220
220
|
| Interaction error | Uncaught error within 2 seconds after an interaction |
|
|
221
221
|
| Dead click (DOM) | Command-style control with no response after 1 second |
|
|
222
|
-
| Rapid navigation | 3+
|
|
222
|
+
| Rapid navigation | 3+ browser back/forward navigations within 5 seconds |
|
|
223
223
|
| Form failure | The same form fails validation twice within 30 seconds |
|
|
224
224
|
| Error page | Landing on a 404/500 error page |
|
|
225
225
|
|
|
@@ -264,7 +264,13 @@ MakeThisBetter.init({
|
|
|
264
264
|
locale: 'en', // UI language. Unset: falls back to <html lang>, then 'en'
|
|
265
265
|
position: 'right', // Tab position: 'left' | 'right'
|
|
266
266
|
tabText: 'Feedback', // Label on the docked tab. Unset: the locale's own wording
|
|
267
|
-
|
|
267
|
+
brandColors: { // Optional semantic colors for the complete Widget
|
|
268
|
+
primary: '#2563eb',
|
|
269
|
+
hover: '#1d4ed8',
|
|
270
|
+
active: '#1e40af',
|
|
271
|
+
onPrimary: '#ffffff',
|
|
272
|
+
},
|
|
273
|
+
tabColor: '#2563eb', // Legacy launcher-only color; ignored when brandColors is valid
|
|
268
274
|
entryMode: 'button', // 'button' docks a tab | 'api' renders none
|
|
269
275
|
theme: 'auto', // 'light' | 'dark' | 'auto'
|
|
270
276
|
frustrationDetection: true, // Proactive frustration prompts
|
|
@@ -281,26 +287,39 @@ MakeThisBetter.init({
|
|
|
281
287
|
})
|
|
282
288
|
```
|
|
283
289
|
|
|
284
|
-
###
|
|
290
|
+
### Widget branding
|
|
285
291
|
|
|
286
|
-
Use `
|
|
287
|
-
|
|
288
|
-
|
|
292
|
+
Use `brandColors` to apply your product's semantic colors across the launcher,
|
|
293
|
+
annotation tools, focus and selection states, calls to action, Reporter bubbles,
|
|
294
|
+
and AI decoration. Supply all four values as six-digit hex colors. The SDK uses
|
|
295
|
+
them exactly as provided and does not generate a color scale.
|
|
289
296
|
|
|
290
297
|
```js
|
|
291
298
|
MakeThisBetter.init({
|
|
292
299
|
projectKey: 'mtb_proj_xxx',
|
|
293
300
|
tabText: 'Report a problem',
|
|
294
|
-
|
|
301
|
+
brandColors: {
|
|
302
|
+
primary: '#2563eb',
|
|
303
|
+
hover: '#1d4ed8',
|
|
304
|
+
active: '#1e40af',
|
|
305
|
+
onPrimary: '#ffffff',
|
|
306
|
+
},
|
|
295
307
|
})
|
|
296
308
|
```
|
|
297
309
|
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
310
|
+
Success, error, warning, and recording colors keep their state meanings. An
|
|
311
|
+
incomplete group or any value that is not `#RRGGBB` rejects the complete group
|
|
312
|
+
and leaves the default Widget colors in place.
|
|
313
|
+
|
|
314
|
+
`tabColor` remains available for existing installations and for products that
|
|
315
|
+
only expose one brand color. It accepts one six-digit hex color, affects only
|
|
316
|
+
the docked launcher, and derives its launcher hover, active, and foreground
|
|
317
|
+
colors. When both options are present and `brandColors` is valid, `tabColor` is
|
|
318
|
+
ignored. Omit both options to keep the Make This Better green.
|
|
319
|
+
|
|
320
|
+
The `/makethisbetter setup` skill recommends `brandColors` only when it finds a
|
|
321
|
+
complete semantic group in your design system. When it finds only a primary
|
|
322
|
+
color, it offers `tabColor` instead; it never guesses the missing shades.
|
|
304
323
|
|
|
305
324
|
`locale` is resolved once, in this order: the `locale` you pass, then the page's
|
|
306
325
|
`<html lang>` attribute, then `en`. A tag with no exact match is retried without
|
|
@@ -19,7 +19,6 @@ export declare class FrustrationDetector {
|
|
|
19
19
|
private boundPageLeaveHandler;
|
|
20
20
|
private boundTurboNavigationHandler;
|
|
21
21
|
private lastNavigationAt;
|
|
22
|
-
private userNavigationIntentUntil;
|
|
23
22
|
private boundSubmitHandler;
|
|
24
23
|
private boundInvalidHandler;
|
|
25
24
|
private recentSubmitForms;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frustration.d.ts","sourceRoot":"","sources":["../../src/context/frustration.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,iBAAiB,GACzB,YAAY,GACZ,YAAY,GACZ,kBAAkB,GAClB,cAAc,GACd,YAAY,GACZ,gBAAgB,CAAA;AAEpB,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,iBAAiB,CAAA;I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BAEf,aAAa,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI;IAK5D,KAAK,IAAI,IAAI;IAwBb,IAAI,IAAI,IAAI;IAgBZ,OAAO,CAAC,uBAAuB;IAmB/B,OAAO,CAAC,sBAAsB;IAmB9B,OAAO,CAAC,qBAAqB;IAQ7B,OAAO,CAAC,YAAY;IAOpB,OAAO,CAAC,YAAY;IAUpB,OAAO,CAAC,iBAAiB;IAOzB,OAAO,CAAC,gBAAgB;IAWxB,OAAO,CAAC,WAAW;IA8BnB,OAAO,CAAC,gBAAgB;IAyBxB,OAAO,CAAC,gBAAgB;IAexB,OAAO,CAAC,qBAAqB;IAS7B,OAAO,CAAC,2BAA2B;IAQnC,OAAO,CAAC,qBAAqB;IAO7B,OAAO,CAAC,iBAAiB;IAoBzB,OAAO,CAAC,iBAAiB;IASzB,OAAO,CAAC,cAAc;IAmCtB,OAAO,CAAC,iBAAiB;IAwBzB,OAAO,CAAC,iBAAiB;IAazB,OAAO,CAAC,qBAAqB;IAK7B,OAAO,CAAC,gBAAgB;IAmBxB,OAAO,CAAC,iBAAiB;IAgBzB,OAAO,CAAC,sBAAsB;IAU9B,OAAO,CAAC,WAAW;IAQnB,OAAO,CAAC,gBAAgB;CAKzB"}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAsBnD,QAAA,MAAM,cAAc;iBACL,oBAAoB,GAAG,IAAI;eAc7B,IAAI;sBAKG,MAAM,GAAG,IAAI;IAK/B;;;;OAIG;YACK,IAAI;aAIH,IAAI;IAIb,sFAAsF;oBACtE,IAAI;oBAIJ,IAAI;CAGrB,CAAA;AAED,OAAO,EAAE,cAAc,EAAE,CAAA;AACzB,YAAY,EAAE,oBAAoB,EAAE,CAAA"}
|