@mushi-mushi/react-native 0.17.0 → 0.19.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/CHANGELOG.md CHANGED
@@ -1,10 +1,54 @@
1
1
  # @mushi-mushi/react-native
2
2
 
3
- ## 0.17.0
3
+ ## 0.19.0
4
4
 
5
5
  ### Minor Changes
6
6
 
7
- - 94e93e8: Report payload + identity parity with the web SDK, and a web-parity bottom sheet.
7
+ - a8f183e: Show the captured screenshot as a visible preview with a configurable
8
+ "remove anything sensitive" privacy caption, so reporters can see and consent to
9
+ exactly what gets sent.
10
+
11
+ - **core/types**: new `widget.screenshotSensitiveHint?: boolean | string` config.
12
+ `true` (default) shows the localized caption, a string overrides it verbatim,
13
+ `false` hides the caption (the preview + remove control always remain). Travels
14
+ in the `widget` block of `GET /v1/sdk/config`, so it's settable per-host via the
15
+ SDK and remotely via the Mushi console runtime config.
16
+ - **web/widget**: the details step now renders the attached screenshot as an
17
+ `<img>` preview (previously only a "Screenshot attached ✓" label) with an
18
+ optional privacy caption beneath it. The preview stays in sync through the
19
+ annotate/markup flow and clears when the screenshot is removed. Image `src` and
20
+ caption are HTML-escaped. New `en`/`es`/`ja`/`th` strings.
21
+ - **react-native**: the bottom sheet's existing screenshot thumbnail gains the
22
+ same configurable privacy caption, resolved by the provider from
23
+ `widget.screenshotSensitiveHint`.
24
+
25
+ This lets privacy-sensitive hosts (e.g. finance apps) enable screenshot capture
26
+ with an explicit user-facing review-and-remove step instead of disabling it
27
+ outright.
28
+
29
+ ### Patch Changes
30
+
31
+ - Updated dependencies [a8f183e]
32
+ - Updated dependencies [a8f183e]
33
+ - @mushi-mushi/core@1.19.0
34
+
35
+ ## 0.18.1
36
+
37
+ ### Patch Changes
38
+
39
+ - 8516682: Dependency housekeeping — runtime major-version bumps.
40
+
41
+ - **inventory-schema**: migrate to **Zod 4** (`zod@^4.4.3`), aligning with `@mushi-mushi/mcp` and `@mushi-mushi/agents`, which were already on v4. The public API is unchanged; the validation-issue path formatter now handles Zod 4's widened `PropertyKey[]` issue paths.
42
+ - **cli**: bump `commander` to **v15** (ESM-only; the CLI is already pure ESM, so the change is transparent to consumers).
43
+ - **mcp-ci**: bump `@actions/core` to **v3** (ESM-only, Node 24-ready; bundled via tsup).
44
+ - **react-native**: build and test against **react-native 0.86**. `StyleSheet.absoluteFillObject` was dropped from RN 0.86's TypeScript types, so the backdrop style now inlines the equivalent absolute-fill literal — runtime behavior is identical and it compiles against all supported `react-native >= 0.72`.
45
+
46
+ ## 0.18.0
47
+
48
+ ### Minor Changes
49
+
50
+ - 679b158: Report payload + identity parity with the web SDK, and a web-parity bottom sheet.
51
+
8
52
  - **Reporter identity (fixes anonymous-token reporter):** `submitReport` now emits nested `metadata.user = { id, email, name, provider }` — the shape the server's `resolveEndUser()` reads — while keeping the flat `userId/userEmail/userName` keys for back-compat. Adds a `setUser()` alias next to `identify()`.
9
53
  - **Sentry-level payload:** every report now carries a per-launch `sessionId`, `sdkPackage`/`sdkVersion`/`appVersion`, a device `fingerprintHash`, and a 50-entry breadcrumb ring buffer that is also sent as a derived repro `timeline` (so the admin "Repro timeline" renders instead of nudging "Upgrade the SDK"). New `addBreadcrumb()` method; `setScreen()` auto-adds a navigation breadcrumb.
10
54
  - **Screenshots:** new `capture.screenshot` config flag (default on) gating the optional `react-native-view-shot` capture; documented masking guidance for sensitive screens.
@@ -12,8 +56,15 @@
12
56
 
13
57
  ### Patch Changes
14
58
 
15
- - Updated dependencies [94e93e8]
16
- - @mushi-mushi/core@1.16.0
59
+ - Dependency housekeeping — runtime major-version bumps.
60
+
61
+ - **inventory-schema**: migrate to **Zod 4** (`zod@^4.4.3`), aligning with `@mushi-mushi/mcp` and `@mushi-mushi/agents`, which were already on v4. The public API is unchanged; the validation-issue path formatter now handles Zod 4's widened `PropertyKey[]` issue paths.
62
+ - **cli**: bump `commander` to **v15** (now ESM-only; the CLI is already pure ESM, so the change is transparent to consumers).
63
+ - **mcp-ci**: bump `@actions/core` to **v3** (ESM-only, Node 24-ready; bundled via tsup).
64
+ - **react-native**: build and test against **react-native 0.86**. `StyleSheet.absoluteFillObject` was dropped from RN 0.86's TypeScript types, so the backdrop style now inlines the equivalent absolute-fill literal — runtime behavior is identical and it compiles against all supported `react-native >= 0.72`.
65
+
66
+ - Updated dependencies [679b158]
67
+ - @mushi-mushi/core@1.17.0
17
68
 
18
69
  ## 0.16.0
19
70
 
package/dist/index.cjs CHANGED
@@ -364,7 +364,8 @@ var MushiBottomSheet = ({
364
364
  visible,
365
365
  onClose,
366
366
  screenshotDataUrl,
367
- onClearScreenshot
367
+ onClearScreenshot,
368
+ screenshotSensitiveHint
368
369
  }) => {
369
370
  const mushi = useMushiContext();
370
371
  const scheme = (0, import_react_native2.useColorScheme)();
@@ -656,7 +657,7 @@ var MushiBottomSheet = ({
656
657
  ),
657
658
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_native2.View, { style: s.screenshotMeta, children: [
658
659
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Text, { style: [s.screenshotLabel, { color: colors.text }], children: "Screenshot attached" }),
659
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Text, { style: [s.screenshotSub, { color: colors.sub }], children: "Helps the team see the issue" })
660
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Text, { style: [s.screenshotSub, { color: colors.sub }], children: screenshotSensitiveHint && screenshotSensitiveHint.trim() ? `\u26A0 ${screenshotSensitiveHint}` : "Helps the team see the issue" })
660
661
  ] }),
661
662
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
662
663
  import_react_native2.TouchableOpacity,
@@ -697,7 +698,13 @@ var MushiBottomSheet = ({
697
698
  var s = import_react_native2.StyleSheet.create({
698
699
  flex: { flex: 1 },
699
700
  backdrop: {
700
- ...import_react_native2.StyleSheet.absoluteFillObject
701
+ // Inlined StyleSheet.absoluteFillObject — RN 0.86 dropped it from the
702
+ // StyleSheet TS types; the literal is equivalent and works on all RN >=0.72.
703
+ position: "absolute",
704
+ top: 0,
705
+ left: 0,
706
+ right: 0,
707
+ bottom: 0
701
708
  },
702
709
  sheet: {
703
710
  position: "absolute",
@@ -1074,11 +1081,17 @@ var s2 = import_react_native3.StyleSheet.create({
1074
1081
 
1075
1082
  // src/version.ts
1076
1083
  var MUSHI_SDK_PACKAGE = "@mushi-mushi/react-native";
1077
- var MUSHI_SDK_VERSION = "0.17.0" ? "0.17.0" : "0.17.0";
1084
+ var MUSHI_SDK_VERSION = "0.19.0" ? "0.19.0" : "0.17.0";
1078
1085
 
1079
1086
  // src/provider.tsx
1080
1087
  var import_jsx_runtime3 = require("react/jsx-runtime");
1081
1088
  var MushiContext = (0, import_react3.createContext)(null);
1089
+ var DEFAULT_SCREENSHOT_HINT = "Check the preview \u2014 remove it if any private info (balances, personal details) is visible.";
1090
+ function resolveScreenshotHint(v) {
1091
+ if (v === false) return null;
1092
+ if (typeof v === "string") return v.trim() ? v : null;
1093
+ return DEFAULT_SCREENSHOT_HINT;
1094
+ }
1082
1095
  function breadcrumbToTimelineKind(category) {
1083
1096
  switch (category) {
1084
1097
  case "navigation":
@@ -1152,7 +1165,9 @@ function MushiProvider({ children, config: configProp, ...barePropConfig }) {
1152
1165
  projectId: config.projectId,
1153
1166
  apiKey: config.apiKey,
1154
1167
  apiEndpoint,
1155
- getUserToken: () => userTokenRef.current
1168
+ getUserToken: () => userTokenRef.current,
1169
+ sdkPackage: MUSHI_SDK_PACKAGE,
1170
+ sdkVersion: MUSHI_SDK_VERSION
1156
1171
  });
1157
1172
  queueRef.current = new AsyncStorageQueue({
1158
1173
  maxSize: config.storage?.maxQueueSize,
@@ -1524,7 +1539,8 @@ function MushiProvider({ children, config: configProp, ...barePropConfig }) {
1524
1539
  visible: sheetVisible,
1525
1540
  onClose: close,
1526
1541
  screenshotDataUrl: sheetScreenshot ?? void 0,
1527
- onClearScreenshot: () => setSheetScreenshot(null)
1542
+ onClearScreenshot: () => setSheetScreenshot(null),
1543
+ screenshotSensitiveHint: resolveScreenshotHint(config.widget?.screenshotSensitiveHint)
1528
1544
  }
1529
1545
  )
1530
1546
  ] });
package/dist/index.d.cts CHANGED
@@ -1,4 +1,3 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
1
  import * as react from 'react';
3
2
  import { ReactNode, FC, ReactElement } from 'react';
4
3
  import { MushiRewardsConfig, MushiPageContext, MushiBreadcrumb, MushiReporterReport, MushiReporterComment, MushiHallOfFameEntry, MushiTierResult, MushiReputationResult } from '@mushi-mushi/core';
@@ -67,6 +66,16 @@ interface MushiRNConfig {
67
66
  left?: number;
68
67
  right?: number;
69
68
  };
69
+ /**
70
+ * Privacy nudge shown beneath the attached-screenshot preview, reminding
71
+ * the reporter to remove anything sensitive (balances, PII) before sending.
72
+ * The sheet always shows the captured image as a preview the user can
73
+ * remove; this only controls the caption.
74
+ * - `true` (default) — show the default caption.
75
+ * - string — show this custom caption.
76
+ * - `false` — hide the caption (preview + remove still show).
77
+ */
78
+ screenshotSensitiveHint?: boolean | string;
70
79
  };
71
80
  capture?: {
72
81
  console?: boolean;
@@ -170,7 +179,7 @@ interface MushiRNInstance {
170
179
  declare function MushiProvider({ children, config: configProp, ...barePropConfig }: MushiRNConfig & {
171
180
  children: ReactNode;
172
181
  config?: Partial<MushiRNConfig>;
173
- }): react_jsx_runtime.JSX.Element;
182
+ }): react.JSX.Element;
174
183
 
175
184
  declare function useMushi(): MushiRNInstance | null;
176
185
 
@@ -221,6 +230,11 @@ interface MushiBottomSheetProps {
221
230
  screenshotDataUrl?: string;
222
231
  /** Called when the user removes the attached screenshot. */
223
232
  onClearScreenshot?: () => void;
233
+ /**
234
+ * Privacy caption shown beneath the screenshot preview. `null` hides it.
235
+ * Resolved by the provider from `widget.screenshotSensitiveHint`.
236
+ */
237
+ screenshotSensitiveHint?: string | null;
224
238
  }
225
239
  declare const MushiBottomSheet: FC<MushiBottomSheetProps>;
226
240
 
package/dist/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
1
  import * as react from 'react';
3
2
  import { ReactNode, FC, ReactElement } from 'react';
4
3
  import { MushiRewardsConfig, MushiPageContext, MushiBreadcrumb, MushiReporterReport, MushiReporterComment, MushiHallOfFameEntry, MushiTierResult, MushiReputationResult } from '@mushi-mushi/core';
@@ -67,6 +66,16 @@ interface MushiRNConfig {
67
66
  left?: number;
68
67
  right?: number;
69
68
  };
69
+ /**
70
+ * Privacy nudge shown beneath the attached-screenshot preview, reminding
71
+ * the reporter to remove anything sensitive (balances, PII) before sending.
72
+ * The sheet always shows the captured image as a preview the user can
73
+ * remove; this only controls the caption.
74
+ * - `true` (default) — show the default caption.
75
+ * - string — show this custom caption.
76
+ * - `false` — hide the caption (preview + remove still show).
77
+ */
78
+ screenshotSensitiveHint?: boolean | string;
70
79
  };
71
80
  capture?: {
72
81
  console?: boolean;
@@ -170,7 +179,7 @@ interface MushiRNInstance {
170
179
  declare function MushiProvider({ children, config: configProp, ...barePropConfig }: MushiRNConfig & {
171
180
  children: ReactNode;
172
181
  config?: Partial<MushiRNConfig>;
173
- }): react_jsx_runtime.JSX.Element;
182
+ }): react.JSX.Element;
174
183
 
175
184
  declare function useMushi(): MushiRNInstance | null;
176
185
 
@@ -221,6 +230,11 @@ interface MushiBottomSheetProps {
221
230
  screenshotDataUrl?: string;
222
231
  /** Called when the user removes the attached screenshot. */
223
232
  onClearScreenshot?: () => void;
233
+ /**
234
+ * Privacy caption shown beneath the screenshot preview. `null` hides it.
235
+ * Resolved by the provider from `widget.screenshotSensitiveHint`.
236
+ */
237
+ screenshotSensitiveHint?: string | null;
224
238
  }
225
239
  declare const MushiBottomSheet: FC<MushiBottomSheetProps>;
226
240
 
package/dist/index.js CHANGED
@@ -358,7 +358,8 @@ var MushiBottomSheet = ({
358
358
  visible,
359
359
  onClose,
360
360
  screenshotDataUrl,
361
- onClearScreenshot
361
+ onClearScreenshot,
362
+ screenshotSensitiveHint
362
363
  }) => {
363
364
  const mushi = useMushiContext();
364
365
  const scheme = useColorScheme();
@@ -650,7 +651,7 @@ var MushiBottomSheet = ({
650
651
  ),
651
652
  /* @__PURE__ */ jsxs(View, { style: s.screenshotMeta, children: [
652
653
  /* @__PURE__ */ jsx(Text, { style: [s.screenshotLabel, { color: colors.text }], children: "Screenshot attached" }),
653
- /* @__PURE__ */ jsx(Text, { style: [s.screenshotSub, { color: colors.sub }], children: "Helps the team see the issue" })
654
+ /* @__PURE__ */ jsx(Text, { style: [s.screenshotSub, { color: colors.sub }], children: screenshotSensitiveHint && screenshotSensitiveHint.trim() ? `\u26A0 ${screenshotSensitiveHint}` : "Helps the team see the issue" })
654
655
  ] }),
655
656
  /* @__PURE__ */ jsx(
656
657
  TouchableOpacity,
@@ -691,7 +692,13 @@ var MushiBottomSheet = ({
691
692
  var s = StyleSheet.create({
692
693
  flex: { flex: 1 },
693
694
  backdrop: {
694
- ...StyleSheet.absoluteFillObject
695
+ // Inlined StyleSheet.absoluteFillObject — RN 0.86 dropped it from the
696
+ // StyleSheet TS types; the literal is equivalent and works on all RN >=0.72.
697
+ position: "absolute",
698
+ top: 0,
699
+ left: 0,
700
+ right: 0,
701
+ bottom: 0
695
702
  },
696
703
  sheet: {
697
704
  position: "absolute",
@@ -1075,11 +1082,17 @@ var s2 = StyleSheet2.create({
1075
1082
 
1076
1083
  // src/version.ts
1077
1084
  var MUSHI_SDK_PACKAGE = "@mushi-mushi/react-native";
1078
- var MUSHI_SDK_VERSION = "0.17.0" ? "0.17.0" : "0.17.0";
1085
+ var MUSHI_SDK_VERSION = "0.19.0" ? "0.19.0" : "0.17.0";
1079
1086
 
1080
1087
  // src/provider.tsx
1081
1088
  import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
1082
1089
  var MushiContext = createContext(null);
1090
+ var DEFAULT_SCREENSHOT_HINT = "Check the preview \u2014 remove it if any private info (balances, personal details) is visible.";
1091
+ function resolveScreenshotHint(v) {
1092
+ if (v === false) return null;
1093
+ if (typeof v === "string") return v.trim() ? v : null;
1094
+ return DEFAULT_SCREENSHOT_HINT;
1095
+ }
1083
1096
  function breadcrumbToTimelineKind(category) {
1084
1097
  switch (category) {
1085
1098
  case "navigation":
@@ -1153,7 +1166,9 @@ function MushiProvider({ children, config: configProp, ...barePropConfig }) {
1153
1166
  projectId: config.projectId,
1154
1167
  apiKey: config.apiKey,
1155
1168
  apiEndpoint,
1156
- getUserToken: () => userTokenRef.current
1169
+ getUserToken: () => userTokenRef.current,
1170
+ sdkPackage: MUSHI_SDK_PACKAGE,
1171
+ sdkVersion: MUSHI_SDK_VERSION
1157
1172
  });
1158
1173
  queueRef.current = new AsyncStorageQueue({
1159
1174
  maxSize: config.storage?.maxQueueSize,
@@ -1525,7 +1540,8 @@ function MushiProvider({ children, config: configProp, ...barePropConfig }) {
1525
1540
  visible: sheetVisible,
1526
1541
  onClose: close,
1527
1542
  screenshotDataUrl: sheetScreenshot ?? void 0,
1528
- onClearScreenshot: () => setSheetScreenshot(null)
1543
+ onClearScreenshot: () => setSheetScreenshot(null),
1544
+ screenshotSensitiveHint: resolveScreenshotHint(config.widget?.screenshotSensitiveHint)
1529
1545
  }
1530
1546
  )
1531
1547
  ] });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mushi-mushi/react-native",
3
- "version": "0.17.0",
3
+ "version": "0.19.0",
4
4
  "license": "MIT",
5
5
  "description": "React Native SDK for Mushi Mushi — shake-to-report, bottom sheet widget, full context capture",
6
6
  "main": "./dist/index.cjs",
@@ -33,15 +33,15 @@
33
33
  }
34
34
  },
35
35
  "dependencies": {
36
- "@mushi-mushi/core": "^1.16.0"
36
+ "@mushi-mushi/core": "^1.19.0"
37
37
  },
38
38
  "devDependencies": {
39
- "@types/react": "^19.2.14",
40
- "react": "^19.2.5",
41
- "react-native": "^0.79.7",
39
+ "@types/react": "^19.2.17",
40
+ "react": "^19.2.7",
41
+ "react-native": "^0.86.0",
42
42
  "tsup": "^8.5.1",
43
43
  "typescript": "^6.0.3",
44
- "vitest": "^4.1.5"
44
+ "vitest": "^4.1.8"
45
45
  },
46
46
  "author": "Kenji Sakuramoto",
47
47
  "repository": {