@blipit/react-native 0.6.1 → 0.6.3

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.
@@ -16,8 +16,8 @@ Pod::Spec.new do |s|
16
16
  s.swift_version = "5.9"
17
17
  s.dependency "React-Core"
18
18
  if defined?(spm_dependency)
19
- spm_dependency(s, url: "https://github.com/blipit-io/blipit-swift", requirement: { kind: "upToNextMinorVersion", minimumVersion: "0.6.0" }, products: ["BlipitSwift"])
19
+ spm_dependency(s, url: "https://github.com/blipit-io/blipit-swift", requirement: { kind: "upToNextMinorVersion", minimumVersion: "0.7.2" }, products: ["BlipitSwift"])
20
20
  else
21
- s.dependency "BlipitSwift", "~> 0.6.0"
21
+ s.dependency "BlipitSwift", "~> 0.7.2"
22
22
  end
23
23
  end
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## 0.6.3
2
+
3
+ - The bug reporter has a new, quieter look that matches app.blipit.io: it follows the phone's light or dark mode, uses neutral greys with hairline borders, 8px corners on buttons, fields and tools, and one filled button per screen (Next in the editor, Send on the form). The selected drawing tool is shown with a grey fill instead of a coloured one.
4
+ - `<BlipitReporter color="#0F766E">` sets your app's main colour for the filled button and the floating Report a bug button; text on it turns dark when the colour is light. Without it Blipit blue (`#2A6FDC`) is used.
5
+ - The floating Report a bug button is an 8px-corner button at the end edge (left in right-to-left layouts) instead of a round pill.
6
+ - Nothing else changes: same screens, steps, gestures, labels and API.
7
+
8
+ ## 0.6.2
9
+
10
+ - Native SDKs raised to blipit-android v0.7.4 and blipit-swift 0.7.2 (were 0.6.0). Nothing changes in the JavaScript API.
11
+ - From the native SDKs: the breadcrumbs of the previous launch ride on the first event of the next launch, and every native request to Blipit carries the SDK version.
12
+ - iOS: requests that end with a network error or an HTTP 5xx are reported on their own as `HTTPRequestFailed`, at most one event per endpoint per minute. The switch is in Blipit, on by default.
13
+ - Android: the report screen no longer uses the status and navigation bar APIs Android 15 deprecated, so Google Play stops warning about them.
14
+
1
15
  ## 0.6.1
2
16
 
3
17
  - Every request to Blipit (events, sessions, bug reports and their uploads, report settings) sends `X-Blipit-Sdk: @blipit/react-native/<version>`, so the update card in Blipit always shows the version you run.
package/README.md CHANGED
@@ -11,7 +11,7 @@ npm install @blipit/react-native
11
11
  npx pod-install
12
12
  ```
13
13
 
14
- The package links a small native module, `BlipitNuggets`, that starts Blipit's own native SDKs for native crashes: `blipit-android` (JitPack, `com.github.blipit-io:blipit-android:v0.5.0`) and `blipit-swift` (`https://github.com/blipit-io/blipit-swift`, 0.5.0 or newer). The module's Gradle file adds the JitPack repository on its own. If your `settings.gradle` uses `RepositoriesMode.FAIL_ON_PROJECT_REPOS`, add `maven { url "https://jitpack.io" }` there. On iOS, React Native 0.75 and newer pull `blipit-swift` through Swift Package Manager from the podspec; older versions use the `BlipitSwift` 0.5.0 pod.
14
+ The package links a small native module, `BlipitNuggets`, that starts Blipit's own native SDKs for native crashes: `blipit-android` (JitPack, `com.github.blipit-io:blipit-android:v0.7.4`) and `blipit-swift` (`https://github.com/blipit-io/blipit-swift`, 0.7.2 or newer). The module's Gradle file adds the JitPack repository on its own. If your `settings.gradle` uses `RepositoriesMode.FAIL_ON_PROJECT_REPOS`, add `maven { url "https://jitpack.io" }` there. On iOS, React Native 0.75 and newer pull `blipit-swift` through Swift Package Manager from the podspec; older versions use the `BlipitSwift` 0.5.0 pod.
15
15
 
16
16
  Expo: run `npx expo prebuild` (or use a development build). Expo Go has no custom native code, so JavaScript errors are still reported there but native crashes are not.
17
17
 
@@ -101,7 +101,7 @@ Blipit.hasReplayConsent();
101
101
 
102
102
  ## Bug reports
103
103
 
104
- Install `react-native-view-shot` for screenshots, wrap your app in `BlipitReporter` (`showButton` adds the floating Report a bug button) and call `showReport()` from your own menu:
104
+ Install `react-native-view-shot` for screenshots, wrap your app in `BlipitReporter` (`showButton` adds the floating Report a bug button, `color="#0F766E"` sets your main colour for its filled buttons; it follows the phone's light or dark mode) and call `showReport()` from your own menu:
105
105
 
106
106
  ```tsx
107
107
  npm install react-native-view-shot
@@ -186,7 +186,7 @@ What the SDK collects: error type, message and stack, breadcrumbs listed above,
186
186
 
187
187
  ### Google Play
188
188
 
189
- - The module adds no permissions of its own. blipit-android 0.6.0 declares `DETECT_SCREEN_CAPTURE`, a normal install-time permission with no prompt, used only on Android 14 or later when `screenshotToReport` is on. Shake uses the accelerometer through `SensorManager` while the app is open, which needs no permission. `INTERNET` comes from React Native itself.
189
+ - The module adds no permissions of its own. blipit-android declares `DETECT_SCREEN_CAPTURE`, a normal install-time permission with no prompt, used only on Android 14 or later when `screenshotToReport` is on. Shake uses the accelerometer through `SensorManager` while the app is open, which needs no permission. `INTERNET` comes from React Native itself.
190
190
  - Data safety: screenshot to report only learns that a screenshot was taken; it reads no screenshot, photo, gallery or storage data. A bug report sends only what the person chooses to send (their text, the screen they marked up, an optional email).
191
191
  - Data safety form: Crash logs and Diagnostics, collected, not shared, encrypted in transit (HTTPS), purpose App functionality. Add User IDs and Email address if you call `setUser`.
192
192
  - No advertising ID, no device identifiers beyond the model name; nothing that Play's Families policy forbids. For child-directed apps keep `setUser` to an internal id.
@@ -28,5 +28,5 @@ repositories {
28
28
 
29
29
  dependencies {
30
30
  implementation "com.facebook.react:react-android"
31
- implementation "com.github.blipit-io:blipit-android:v0.6.0"
31
+ implementation "com.github.blipit-io:blipit-android:v0.7.4"
32
32
  }
package/dist/index.cjs CHANGED
@@ -132,7 +132,7 @@ function lastFatal(queue) {
132
132
  }
133
133
 
134
134
  // src/nuggets.ts
135
- var VERSION = "0.6.1";
135
+ var VERSION = "0.6.3";
136
136
  var SDK_NAME = "@blipit/react-native";
137
137
  var SDK_HEADER = `${SDK_NAME}/${VERSION}`;
138
138
  var DEFAULT_ENDPOINT = "https://in.blipit.io";
@@ -1116,6 +1116,20 @@ function zoomAround(zoom, pan, next, focal, view, image) {
1116
1116
  return { zoom: target, pan: clampPan(moved, target, view, image) };
1117
1117
  }
1118
1118
  var strokeFor = (image) => Math.max(4, image.width / 130);
1119
+ var LIGHT = { bg: "#FFFFFF", fg: "#0F172A", muted: "#525B6B", line: "rgba(15,23,42,0.12)", soft: "#EFF1F4", danger: "#DC2626" };
1120
+ var DARK = { bg: "#18191C", fg: "#EDEDED", muted: "#A1A1A6", line: "rgba(237,237,237,0.12)", soft: "#222327", danger: "#E5484D" };
1121
+ function onColor(hex2) {
1122
+ const m = /^#?([0-9a-f]{6})$/i.exec(hex2.trim());
1123
+ if (!m) return "#FFFFFF";
1124
+ const n = parseInt(m[1], 16);
1125
+ const lin = (v) => (v /= 255) <= 0.03928 ? v / 12.92 : ((v + 0.055) / 1.055) ** 2.4;
1126
+ const l = 0.2126 * lin(n >> 16) + 0.7152 * lin(n >> 8 & 255) + 0.0722 * lin(n & 255);
1127
+ return l > 0.45 ? "#0F172A" : "#FFFFFF";
1128
+ }
1129
+ function palette(dark, color) {
1130
+ const primary = color && /^#[0-9a-f]{6}$/i.test(color.trim()) ? color.trim() : "#2A6FDC";
1131
+ return { ...dark ? DARK : LIGHT, primary, onPrimary: onColor(primary) };
1132
+ }
1119
1133
 
1120
1134
  // src/stuck.ts
1121
1135
  var STARTUP = "startup";
@@ -1256,7 +1270,8 @@ function createStuck(transport, info, clock = Date.now) {
1256
1270
  var import_react2 = require("react");
1257
1271
  var import_react_native2 = require("react-native");
1258
1272
  var import_jsx_runtime = require("react/jsx-runtime");
1259
- var C = { navy: "#0B1A3A", card: "#1A2135", brand: "#3882F6", muted: "#98A6BE", mark: "#FF3B30", danger: "#FF7A6E", white: "#FFFFFF" };
1273
+ var MARK = "#FF3B30";
1274
+ var Theme = (0, import_react2.createContext)(palette(false));
1260
1275
  var opener = null;
1261
1276
  var config = null;
1262
1277
  var open = false;
@@ -1314,7 +1329,9 @@ var languages = () => {
1314
1329
  return ["en"];
1315
1330
  }
1316
1331
  };
1317
- function BlipitReporter({ children, showButton = false }) {
1332
+ function BlipitReporter({ children, showButton = false, color }) {
1333
+ const scheme = (0, import_react_native2.useColorScheme)();
1334
+ const C = (0, import_react2.useMemo)(() => palette(scheme === "dark", color), [scheme, color]);
1318
1335
  const lang = (0, import_react2.useMemo)(() => pickLang(languages()), []);
1319
1336
  const t = (key) => text(key, lang);
1320
1337
  const [stage, setStage] = (0, import_react2.useState)("closed");
@@ -1365,17 +1382,17 @@ function BlipitReporter({ children, showButton = false }) {
1365
1382
  setStage("details");
1366
1383
  }
1367
1384
  };
1368
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_native2.View, { style: { flex: 1 }, children: [
1385
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Theme.Provider, { value: C, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_native2.View, { style: { flex: 1 }, children: [
1369
1386
  children,
1370
- (showButton || server) && stage === "closed" ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_native2.Pressable, { accessibilityRole: "button", accessibilityLabel: t("title"), onPress: showReport, style: ({ pressed }) => [s.fab, pressed && { opacity: 0.85 }], children: [
1371
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Text, { style: s.fabIcon, children: "!" }),
1372
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Text, { style: s.fabText, children: t("title") })
1387
+ (showButton || server) && stage === "closed" ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_native2.Pressable, { accessibilityRole: "button", accessibilityLabel: t("title"), onPress: showReport, style: ({ pressed }) => [s.fab, { backgroundColor: C.primary }, pressed && { opacity: 0.9 }], children: [
1388
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Text, { style: [s.fabIcon, { color: C.onPrimary, borderColor: C.onPrimary }], children: "!" }),
1389
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Text, { style: [s.fabText, { color: C.onPrimary }], children: t("title") })
1373
1390
  ] }) : null,
1374
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Modal, { visible: stage !== "closed", animationType: "none", presentationStyle: "fullScreen", onRequestClose: () => setStage(stage === "details" && shot ? "editor" : stage === "choice" ? "closed" : "choice"), statusBarTranslucent: false, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_native2.SafeAreaView, { style: [s.screen, { direction: lang === "ar" ? "rtl" : import_react_native2.I18nManager.isRTL ? "rtl" : "ltr" }], children: [
1391
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Modal, { visible: stage !== "closed", animationType: "none", presentationStyle: "fullScreen", onRequestClose: () => setStage(stage === "details" && shot ? "editor" : stage === "choice" ? "closed" : "choice"), statusBarTranslucent: false, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_native2.SafeAreaView, { style: [s.screen, { backgroundColor: C.bg, direction: lang === "ar" ? "rtl" : import_react_native2.I18nManager.isRTL ? "rtl" : "ltr" }], children: [
1375
1392
  stage === "choice" ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_native2.View, { style: s.pad, children: [
1376
1393
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Bar, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BarButton, { label: t("close"), glyph: "\u2715", onPress: () => setStage("closed") }) }),
1377
1394
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_native2.View, { style: s.center, children: [
1378
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Text, { style: s.h1, children: t("mHow") }),
1395
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Text, { style: [s.h1, { color: C.fg }], children: t("mHow") }),
1379
1396
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Card, { title: t("mShot"), glyph: "\u25CE", onPress: capture }),
1380
1397
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1381
1398
  Card,
@@ -1392,7 +1409,7 @@ function BlipitReporter({ children, showButton = false }) {
1392
1409
  ] }) : null,
1393
1410
  stage === "pick" && shot ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_native2.View, { style: s.pad, children: [
1394
1411
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Bar, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BarButton, { label: t("mBack"), glyph: "\u2039", onPress: () => setStage("choice") }) }),
1395
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Text, { style: s.h1, children: t("pickTitle") }),
1412
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Text, { style: [s.h1, { color: C.fg }], children: t("pickTitle") }),
1396
1413
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.ScrollView, { contentContainerStyle: s.thumbs, children: [shot, ...earlier].map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
1397
1414
  import_react_native2.Pressable,
1398
1415
  {
@@ -1403,10 +1420,10 @@ function BlipitReporter({ children, showButton = false }) {
1403
1420
  setEarlier([]);
1404
1421
  setStage("editor");
1405
1422
  },
1406
- style: ({ pressed }) => [s.thumb, pressed && { opacity: 0.85 }],
1423
+ style: ({ pressed }) => [s.thumb, { borderColor: C.line, backgroundColor: pressed ? C.soft : C.bg }],
1407
1424
  children: [
1408
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Image, { source: { uri: item.uri }, style: [s.thumbImage, { aspectRatio: item.width / Math.max(1, item.height) }], resizeMode: "contain", accessibilityIgnoresInvertColors: true }),
1409
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Text, { style: s.thumbText, numberOfLines: 1, children: i === 0 ? t("pickNow") : t("pickBefore") })
1425
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Image, { source: { uri: item.uri }, style: [s.thumbImage, { backgroundColor: C.soft, aspectRatio: item.width / Math.max(1, item.height) }], resizeMode: "contain", accessibilityIgnoresInvertColors: true }),
1426
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Text, { style: [s.thumbText, { color: C.fg }], numberOfLines: 1, children: i === 0 ? t("pickNow") : t("pickBefore") })
1410
1427
  ]
1411
1428
  },
1412
1429
  i
@@ -1440,24 +1457,28 @@ function BlipitReporter({ children, showButton = false }) {
1440
1457
  }
1441
1458
  ) : null
1442
1459
  ] }) })
1443
- ] });
1460
+ ] }) });
1444
1461
  }
1445
1462
  function Bar({ children }) {
1446
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.View, { style: s.bar, children });
1463
+ const C = (0, import_react2.useContext)(Theme);
1464
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.View, { style: [s.bar, { borderBottomColor: C.line }], children });
1447
1465
  }
1448
1466
  function BarButton({ label, glyph, onPress }) {
1449
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_native2.Pressable, { accessibilityRole: "button", accessibilityLabel: label, onPress, style: s.barButton, hitSlop: 6, children: [
1450
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Text, { style: s.glyph, children: glyph }),
1451
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Text, { style: s.barText, numberOfLines: 1, children: label })
1467
+ const C = (0, import_react2.useContext)(Theme);
1468
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_native2.Pressable, { accessibilityRole: "button", accessibilityLabel: label, onPress, style: ({ pressed }) => [s.barButton, pressed && { backgroundColor: C.soft }], hitSlop: 6, children: [
1469
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Text, { style: [s.glyph, { color: C.fg }], children: glyph }),
1470
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Text, { style: [s.barText, { color: C.fg }], numberOfLines: 1, children: label })
1452
1471
  ] });
1453
1472
  }
1454
1473
  function Primary({ label, onPress, disabled }) {
1455
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Pressable, { accessibilityRole: "button", accessibilityLabel: label, accessibilityState: { disabled }, disabled, onPress, style: [s.primary, disabled && { opacity: 0.6 }], children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Text, { style: s.primaryText, children: label }) });
1474
+ const C = (0, import_react2.useContext)(Theme);
1475
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Pressable, { accessibilityRole: "button", accessibilityLabel: label, accessibilityState: { disabled }, disabled, onPress, hitSlop: 4, style: ({ pressed }) => [s.primary, { backgroundColor: C.primary }, pressed && { opacity: 0.9 }, disabled && { opacity: 0.5 }], children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Text, { style: [s.primaryText, { color: C.onPrimary }], children: label }) });
1456
1476
  }
1457
1477
  function Card({ title, glyph, onPress }) {
1458
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_native2.Pressable, { accessibilityRole: "button", accessibilityLabel: title, onPress, style: ({ pressed }) => [s.card, pressed && { opacity: 0.85 }], children: [
1459
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Text, { style: s.cardGlyph, children: glyph }),
1460
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Text, { style: s.cardText, children: title })
1478
+ const C = (0, import_react2.useContext)(Theme);
1479
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_native2.Pressable, { accessibilityRole: "button", accessibilityLabel: title, onPress, style: ({ pressed }) => [s.card, { borderColor: C.line, backgroundColor: pressed ? C.soft : C.bg }], children: [
1480
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.View, { style: [s.cardIcon, { backgroundColor: C.soft }], children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Text, { style: [s.cardGlyph, { color: C.fg }], children: glyph }) }),
1481
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Text, { style: [s.cardText, { color: C.fg }], children: title })
1461
1482
  ] });
1462
1483
  }
1463
1484
  function Editor({ shot, shapes, t, onBack, onNext }) {
@@ -1476,6 +1497,7 @@ function Editor({ shot, shapes, t, onBack, onNext }) {
1476
1497
  live.current.view = view;
1477
1498
  live.current.tool = tool;
1478
1499
  const image = { width: shot.width, height: shot.height };
1500
+ const C = (0, import_react2.useContext)(Theme);
1479
1501
  const local = (e) => e.nativeEvent.touches.map((touch) => ({ x: touch.pageX - live.current.view.x, y: touch.pageY - live.current.view.y }));
1480
1502
  const responder = (0, import_react2.useMemo)(
1481
1503
  () => import_react_native2.PanResponder.create({
@@ -1488,7 +1510,7 @@ function Editor({ shot, shapes, t, onBack, onNext }) {
1488
1510
  L.moved = false;
1489
1511
  if (pts.length >= 2) return;
1490
1512
  const p = toImage(pts[0] ?? { x: e.nativeEvent.locationX, y: e.nativeEvent.locationY }, L.pan, L.zoom, L.view, image);
1491
- L.current = { tool: L.tool, points: [p, p], color: C.mark };
1513
+ L.current = { tool: L.tool, points: [p, p], color: MARK };
1492
1514
  setCurrent(L.current);
1493
1515
  },
1494
1516
  onPanResponderMove: (e) => {
@@ -1584,20 +1606,20 @@ function Editor({ shot, shapes, t, onBack, onNext }) {
1584
1606
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BarButton, { label: t("mBack"), glyph: "\u2039", onPress: onBack }),
1585
1607
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.View, { style: { flex: 1 } }),
1586
1608
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(IconButton, { label: t("mZoomOut"), glyph: "\u2212", onPress: () => zoomBy(1 / 1.5) }),
1587
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_native2.Text, { style: s.zoom, children: [
1609
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_native2.Text, { style: [s.zoom, { color: C.muted }], children: [
1588
1610
  Math.round(zoom * 100),
1589
1611
  "%"
1590
1612
  ] }),
1591
1613
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(IconButton, { label: t("mZoomIn"), glyph: "+", onPress: () => zoomBy(1.5) }),
1592
1614
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.View, { style: { flex: 1 } }),
1593
- busy ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.ActivityIndicator, { color: C.white, style: { marginHorizontal: 8 } }) : null,
1615
+ busy ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.ActivityIndicator, { color: C.muted, style: { marginHorizontal: 8 } }) : null,
1594
1616
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Primary, { label: t("mNext"), onPress: next, disabled: busy })
1595
1617
  ] }),
1596
1618
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1597
1619
  import_react_native2.View,
1598
1620
  {
1599
1621
  ref: box,
1600
- style: s.stage,
1622
+ style: [s.stage, { backgroundColor: C.soft }],
1601
1623
  onLayout: (e) => {
1602
1624
  const { width: w, height: h } = e.nativeEvent.layout;
1603
1625
  box.current?.measureInWindow((x, y) => setView({ width: w, height: h, x, y }));
@@ -1610,7 +1632,7 @@ function Editor({ shot, shapes, t, onBack, onNext }) {
1610
1632
  ] })
1611
1633
  }
1612
1634
  ),
1613
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_native2.View, { style: s.tools, children: [
1635
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_native2.View, { style: [s.tools, { borderTopColor: C.line }], children: [
1614
1636
  tools.map(([id, label, glyph]) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToolButton, { label, glyph, on: tool === id, onPress: () => setTool(id) }, id)),
1615
1637
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1616
1638
  ToolButton,
@@ -1643,12 +1665,12 @@ function Mark({ shape, scale, width }) {
1643
1665
  const ay = a2.y * scale;
1644
1666
  const len = Math.hypot(b2.x * scale - ax, b2.y * scale - ay);
1645
1667
  const angle = Math.atan2(b2.y * scale - ay, b2.x * scale - ax);
1646
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.View, { style: { position: "absolute", left: ax + (b2.x * scale - ax - len) / 2, top: ay + (b2.y * scale - ay) / 2 - width / 2, width: len, height: width, borderRadius: width / 2, backgroundColor: C.mark, transform: [{ rotate: `${angle}rad` }] } }, key);
1668
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.View, { style: { position: "absolute", left: ax + (b2.x * scale - ax - len) / 2, top: ay + (b2.y * scale - ay) / 2 - width / 2, width: len, height: width, borderRadius: width / 2, backgroundColor: MARK, transform: [{ rotate: `${angle}rad` }] } }, key);
1647
1669
  };
1648
1670
  const a = shape.points[0];
1649
1671
  const b = shape.points[shape.points.length - 1];
1650
1672
  if (shape.tool === "rect") {
1651
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.View, { style: { position: "absolute", left: Math.min(a.x, b.x) * scale, top: Math.min(a.y, b.y) * scale, width: Math.abs(b.x - a.x) * scale, height: Math.abs(b.y - a.y) * scale, borderWidth: width, borderColor: C.mark } });
1673
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.View, { style: { position: "absolute", left: Math.min(a.x, b.x) * scale, top: Math.min(a.y, b.y) * scale, width: Math.abs(b.x - a.x) * scale, height: Math.abs(b.y - a.y) * scale, borderWidth: width, borderColor: MARK } });
1652
1674
  }
1653
1675
  if (shape.tool === "arrow") {
1654
1676
  const angle = Math.atan2(b.y - a.y, b.x - a.x);
@@ -1659,12 +1681,14 @@ function Mark({ shape, scale, width }) {
1659
1681
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: shape.points.slice(1).map((p, i) => line(shape.points[i], p, i)) });
1660
1682
  }
1661
1683
  function IconButton({ label, glyph, onPress }) {
1662
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Pressable, { accessibilityRole: "button", accessibilityLabel: label, onPress, style: s.icon, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Text, { style: s.iconText, children: glyph }) });
1684
+ const C = (0, import_react2.useContext)(Theme);
1685
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Pressable, { accessibilityRole: "button", accessibilityLabel: label, onPress, style: ({ pressed }) => [s.icon, { borderColor: C.line }, pressed && { backgroundColor: C.soft }], children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Text, { style: [s.iconText, { color: C.fg }], children: glyph }) });
1663
1686
  }
1664
1687
  function ToolButton({ label, glyph, on, onPress }) {
1665
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_native2.Pressable, { accessibilityRole: "button", accessibilityLabel: label, accessibilityState: { selected: !!on }, onPress, style: [s.tool, on && { backgroundColor: C.brand }], children: [
1666
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Text, { style: [s.toolGlyph, { color: on ? C.white : C.muted }], children: glyph }),
1667
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Text, { style: [s.toolText, { color: on ? C.white : C.muted }], numberOfLines: 1, children: label })
1688
+ const C = (0, import_react2.useContext)(Theme);
1689
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_native2.Pressable, { accessibilityRole: "button", accessibilityLabel: label, accessibilityState: { selected: !!on }, onPress, style: ({ pressed }) => [s.tool, (on || pressed) && { backgroundColor: C.soft }], children: [
1690
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Text, { style: [s.toolGlyph, { color: on ? C.fg : C.muted }], children: glyph }),
1691
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Text, { style: [s.toolText, { color: on ? C.fg : C.muted, fontWeight: on ? "600" : "500" }], numberOfLines: 1, children: label })
1668
1692
  ] });
1669
1693
  }
1670
1694
  function Details({ t, lang, shot, flat, shapes, notice, eventId, onBack, onDone }) {
@@ -1674,6 +1698,8 @@ function Details({ t, lang, shot, flat, shapes, notice, eventId, onBack, onDone
1674
1698
  const [status, setStatus] = (0, import_react2.useState)(notice ? { text: notice, error: true } : { text: "", error: false });
1675
1699
  const [busy, setBusy] = (0, import_react2.useState)(false);
1676
1700
  const image = flat ?? shot;
1701
+ const C = (0, import_react2.useContext)(Theme);
1702
+ const field = [s.input, { borderColor: C.line, color: C.fg, backgroundColor: C.bg }];
1677
1703
  const submit = async () => {
1678
1704
  if (busy || !config) return;
1679
1705
  if (!message.trim()) {
@@ -1706,51 +1732,52 @@ function Details({ t, lang, shot, flat, shapes, notice, eventId, onBack, onDone
1706
1732
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Bar, { children: [
1707
1733
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BarButton, { label: t("mBack"), glyph: "\u2039", onPress: () => !busy && onBack() }),
1708
1734
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.View, { style: { flex: 1 } }),
1709
- busy ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.ActivityIndicator, { color: C.white, style: { marginHorizontal: 10 } }) : null,
1735
+ busy ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.ActivityIndicator, { color: C.muted, style: { marginHorizontal: 10 } }) : null,
1710
1736
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Primary, { label: t("send"), onPress: submit, disabled: busy })
1711
1737
  ] }),
1712
1738
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_native2.ScrollView, { contentContainerStyle: { padding: 20, paddingTop: 8, gap: 12 }, keyboardShouldPersistTaps: "handled", children: [
1713
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Text, { style: s.h2, children: t("title") }),
1714
- image ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Image, { source: { uri: image.uri }, style: s.preview, resizeMode: "contain", accessibilityIgnoresInvertColors: true }) : null,
1715
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.TextInput, { value: title, onChangeText: setTitle, placeholder: t("fTitle"), placeholderTextColor: C.muted, style: s.input, accessibilityLabel: t("fTitle") }),
1716
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.TextInput, { value: message, onChangeText: setMessage, placeholder: t("fDesc"), placeholderTextColor: C.muted, style: [s.input, { minHeight: 120, textAlignVertical: "top" }], multiline: true, accessibilityLabel: t("fDesc") }),
1717
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.TextInput, { value: email, onChangeText: setEmail, placeholder: t("email"), placeholderTextColor: C.muted, style: s.input, keyboardType: "email-address", autoCapitalize: "none", autoCorrect: false, accessibilityLabel: t("email") }),
1739
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Text, { style: [s.h2, { color: C.fg }], children: t("title") }),
1740
+ image ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Image, { source: { uri: image.uri }, style: [s.preview, { backgroundColor: C.soft, borderColor: C.line }], resizeMode: "contain", accessibilityIgnoresInvertColors: true }) : null,
1741
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.TextInput, { value: title, onChangeText: setTitle, placeholder: t("fTitle"), placeholderTextColor: C.muted, style: field, accessibilityLabel: t("fTitle") }),
1742
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.TextInput, { value: message, onChangeText: setMessage, placeholder: t("fDesc"), placeholderTextColor: C.muted, style: [...field, { minHeight: 120, textAlignVertical: "top" }], multiline: true, accessibilityLabel: t("fDesc") }),
1743
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.TextInput, { value: email, onChangeText: setEmail, placeholder: t("email"), placeholderTextColor: C.muted, style: field, keyboardType: "email-address", autoCapitalize: "none", autoCorrect: false, accessibilityLabel: t("email") }),
1718
1744
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Text, { accessibilityLiveRegion: "polite", style: { color: status.error ? C.danger : C.muted, fontSize: 14 }, children: status.text })
1719
1745
  ] })
1720
1746
  ] });
1721
1747
  }
1722
1748
  var s = import_react_native2.StyleSheet.create({
1723
- screen: { flex: 1, backgroundColor: C.navy, paddingTop: import_react_native2.Platform.OS === "android" ? import_react_native2.StatusBar.currentHeight ?? 0 : 0 },
1724
- pad: { flex: 1, paddingHorizontal: 20 },
1725
- center: { flex: 1, justifyContent: "center", gap: 14 },
1726
- h1: { color: C.white, fontSize: 24, fontWeight: "700", marginBottom: 8 },
1727
- h2: { color: C.white, fontSize: 22, fontWeight: "700" },
1728
- bar: { height: 56, flexDirection: "row", alignItems: "center", paddingHorizontal: 8 },
1729
- barButton: { flexDirection: "row", alignItems: "center", minHeight: 48, minWidth: 48, paddingHorizontal: 6, flexShrink: 1 },
1730
- barText: { color: C.white, fontSize: 16, flexShrink: 1 },
1731
- glyph: { color: C.white, fontSize: 22, marginEnd: 6 },
1732
- primary: { backgroundColor: C.brand, borderRadius: 12, minHeight: 44, paddingHorizontal: 18, justifyContent: "center" },
1733
- primaryText: { color: C.white, fontSize: 16, fontWeight: "600" },
1734
- card: { flexDirection: "row", alignItems: "center", backgroundColor: C.card, borderRadius: 16, borderWidth: 1, borderColor: "rgba(255,255,255,0.1)", padding: 16, minHeight: 64 },
1735
- cardGlyph: { color: C.brand, fontSize: 22, width: 32, marginEnd: 14, textAlign: "center" },
1736
- cardText: { color: C.white, fontSize: 17, fontWeight: "600", flex: 1 },
1737
- stage: { flex: 1, overflow: "hidden", backgroundColor: "rgba(0,0,0,0.25)" },
1738
- zoom: { color: C.muted, fontSize: 13, width: 48, textAlign: "center" },
1739
- icon: { width: 44, height: 44, alignItems: "center", justifyContent: "center" },
1740
- iconText: { color: C.white, fontSize: 24 },
1741
- tools: { flexDirection: "row", paddingHorizontal: 8, paddingVertical: 6 },
1742
- tool: { flex: 1, height: 60, alignItems: "center", justifyContent: "center", borderRadius: 12, marginHorizontal: 2 },
1743
- toolGlyph: { fontSize: 20 },
1744
- toolText: { fontSize: 11, marginTop: 2 },
1749
+ screen: { flex: 1, paddingTop: import_react_native2.Platform.OS === "android" ? import_react_native2.StatusBar.currentHeight ?? 0 : 0 },
1750
+ pad: { flex: 1, paddingHorizontal: 16 },
1751
+ center: { flex: 1, justifyContent: "center", gap: 8 },
1752
+ h1: { fontSize: 20, fontWeight: "600", letterSpacing: -0.2, marginBottom: 8 },
1753
+ h2: { fontSize: 18, fontWeight: "600", letterSpacing: -0.2 },
1754
+ bar: { height: 56, flexDirection: "row", alignItems: "center", paddingHorizontal: 8, gap: 4, borderBottomWidth: import_react_native2.StyleSheet.hairlineWidth },
1755
+ barButton: { flexDirection: "row", alignItems: "center", minHeight: 44, minWidth: 44, paddingHorizontal: 8, borderRadius: 8, flexShrink: 1 },
1756
+ barText: { fontSize: 15, fontWeight: "500", flexShrink: 1 },
1757
+ glyph: { fontSize: 20, marginEnd: 6 },
1758
+ primary: { borderRadius: 8, minHeight: 40, paddingHorizontal: 16, justifyContent: "center" },
1759
+ primaryText: { fontSize: 15, fontWeight: "500" },
1760
+ card: { flexDirection: "row", alignItems: "center", borderRadius: 12, borderWidth: import_react_native2.StyleSheet.hairlineWidth, padding: 12, minHeight: 64 },
1761
+ cardIcon: { width: 36, height: 36, borderRadius: 8, alignItems: "center", justifyContent: "center", marginEnd: 12 },
1762
+ cardGlyph: { fontSize: 18, textAlign: "center" },
1763
+ cardText: { fontSize: 15, fontWeight: "500", flex: 1 },
1764
+ stage: { flex: 1, overflow: "hidden" },
1765
+ zoom: { fontSize: 13, width: 48, textAlign: "center", fontVariant: ["tabular-nums"] },
1766
+ icon: { width: 44, height: 44, borderRadius: 8, borderWidth: import_react_native2.StyleSheet.hairlineWidth, alignItems: "center", justifyContent: "center" },
1767
+ iconText: { fontSize: 20 },
1768
+ tools: { flexDirection: "row", paddingHorizontal: 8, paddingVertical: 6, borderTopWidth: import_react_native2.StyleSheet.hairlineWidth },
1769
+ tool: { flex: 1, height: 56, alignItems: "center", justifyContent: "center", borderRadius: 8, marginHorizontal: 2 },
1770
+ toolGlyph: { fontSize: 18 },
1771
+ toolText: { fontSize: 12, marginTop: 2 },
1745
1772
  thumbs: { flexDirection: "row", flexWrap: "wrap", gap: 12, paddingVertical: 12 },
1746
- thumb: { width: "47%", backgroundColor: C.card, borderRadius: 14, borderWidth: 1, borderColor: "rgba(255,255,255,0.1)", padding: 8, gap: 8 },
1747
- thumbImage: { width: "100%", borderRadius: 8, backgroundColor: C.navy },
1748
- thumbText: { color: C.white, fontSize: 14, fontWeight: "600", textAlign: "center" },
1749
- preview: { height: 150, borderRadius: 12, backgroundColor: C.card },
1750
- input: { backgroundColor: C.card, borderRadius: 12, color: C.white, fontSize: 16, paddingHorizontal: 14, paddingVertical: 12, minHeight: 48 },
1751
- fab: { position: "absolute", right: 16, bottom: 32, height: 48, borderRadius: 24, backgroundColor: C.brand, flexDirection: "row", alignItems: "center", paddingHorizontal: 18, elevation: 6, shadowColor: "#000", shadowOpacity: 0.25, shadowRadius: 10, shadowOffset: { width: 0, height: 4 } },
1752
- fabIcon: { color: C.white, fontSize: 15, fontWeight: "800", marginEnd: 8, width: 20, height: 20, borderRadius: 10, borderWidth: 1.5, borderColor: C.white, textAlign: "center", lineHeight: 17 },
1753
- fabText: { color: C.white, fontSize: 15, fontWeight: "600" }
1773
+ thumb: { width: "47%", borderRadius: 12, borderWidth: import_react_native2.StyleSheet.hairlineWidth, padding: 8, gap: 8 },
1774
+ thumbImage: { width: "100%", borderRadius: 8 },
1775
+ thumbText: { fontSize: 14, fontWeight: "500", textAlign: "center" },
1776
+ preview: { height: 150, borderRadius: 8, borderWidth: import_react_native2.StyleSheet.hairlineWidth },
1777
+ input: { borderRadius: 8, borderWidth: 1, fontSize: 16, paddingHorizontal: 12, paddingVertical: 10, minHeight: 44 },
1778
+ fab: { position: "absolute", end: 16, bottom: 32, height: 44, borderRadius: 8, flexDirection: "row", alignItems: "center", paddingHorizontal: 16, elevation: 3, shadowColor: "#000", shadowOpacity: 0.12, shadowRadius: 6, shadowOffset: { width: 0, height: 2 } },
1779
+ fabIcon: { fontSize: 13, fontWeight: "700", marginEnd: 8, width: 18, height: 18, borderRadius: 9, borderWidth: 1.5, textAlign: "center", lineHeight: 16 },
1780
+ fabText: { fontSize: 15, fontWeight: "500" }
1754
1781
  });
1755
1782
 
1756
1783
  // src/index.ts
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import { Component, ReactNode, ComponentType } from 'react';
3
3
 
4
- declare const VERSION = "0.6.1";
4
+ declare const VERSION = "0.6.3";
5
5
  declare const DEFAULT_ENDPOINT = "https://in.blipit.io";
6
6
  type Level = "fatal" | "error" | "warning" | "info" | "debug";
7
7
  type SeverityLevel = Level;
@@ -107,9 +107,10 @@ declare class ErrorBoundary extends Component<ErrorBoundaryProps, {
107
107
  declare function wrap<P extends object>(Root: ComponentType<P>, options?: Omit<ErrorBoundaryProps, "children">): ComponentType<P>;
108
108
 
109
109
  declare function showReport(): void;
110
- declare function BlipitReporter({ children, showButton }: {
110
+ declare function BlipitReporter({ children, showButton, color }: {
111
111
  children?: ReactNode;
112
112
  showButton?: boolean;
113
+ color?: string;
113
114
  }): react.JSX.Element;
114
115
 
115
116
  interface BlipitOptions {
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import { Component, ReactNode, ComponentType } from 'react';
3
3
 
4
- declare const VERSION = "0.6.1";
4
+ declare const VERSION = "0.6.3";
5
5
  declare const DEFAULT_ENDPOINT = "https://in.blipit.io";
6
6
  type Level = "fatal" | "error" | "warning" | "info" | "debug";
7
7
  type SeverityLevel = Level;
@@ -107,9 +107,10 @@ declare class ErrorBoundary extends Component<ErrorBoundaryProps, {
107
107
  declare function wrap<P extends object>(Root: ComponentType<P>, options?: Omit<ErrorBoundaryProps, "children">): ComponentType<P>;
108
108
 
109
109
  declare function showReport(): void;
110
- declare function BlipitReporter({ children, showButton }: {
110
+ declare function BlipitReporter({ children, showButton, color }: {
111
111
  children?: ReactNode;
112
112
  showButton?: boolean;
113
+ color?: string;
113
114
  }): react.JSX.Element;
114
115
 
115
116
  interface BlipitOptions {
package/dist/index.js CHANGED
@@ -92,7 +92,7 @@ function lastFatal(queue) {
92
92
  }
93
93
 
94
94
  // src/nuggets.ts
95
- var VERSION = "0.6.1";
95
+ var VERSION = "0.6.3";
96
96
  var SDK_NAME = "@blipit/react-native";
97
97
  var SDK_HEADER = `${SDK_NAME}/${VERSION}`;
98
98
  var DEFAULT_ENDPOINT = "https://in.blipit.io";
@@ -1076,6 +1076,20 @@ function zoomAround(zoom, pan, next, focal, view, image) {
1076
1076
  return { zoom: target, pan: clampPan(moved, target, view, image) };
1077
1077
  }
1078
1078
  var strokeFor = (image) => Math.max(4, image.width / 130);
1079
+ var LIGHT = { bg: "#FFFFFF", fg: "#0F172A", muted: "#525B6B", line: "rgba(15,23,42,0.12)", soft: "#EFF1F4", danger: "#DC2626" };
1080
+ var DARK = { bg: "#18191C", fg: "#EDEDED", muted: "#A1A1A6", line: "rgba(237,237,237,0.12)", soft: "#222327", danger: "#E5484D" };
1081
+ function onColor(hex2) {
1082
+ const m = /^#?([0-9a-f]{6})$/i.exec(hex2.trim());
1083
+ if (!m) return "#FFFFFF";
1084
+ const n = parseInt(m[1], 16);
1085
+ const lin = (v) => (v /= 255) <= 0.03928 ? v / 12.92 : ((v + 0.055) / 1.055) ** 2.4;
1086
+ const l = 0.2126 * lin(n >> 16) + 0.7152 * lin(n >> 8 & 255) + 0.0722 * lin(n & 255);
1087
+ return l > 0.45 ? "#0F172A" : "#FFFFFF";
1088
+ }
1089
+ function palette(dark, color) {
1090
+ const primary = color && /^#[0-9a-f]{6}$/i.test(color.trim()) ? color.trim() : "#2A6FDC";
1091
+ return { ...dark ? DARK : LIGHT, primary, onPrimary: onColor(primary) };
1092
+ }
1079
1093
 
1080
1094
  // src/stuck.ts
1081
1095
  var STARTUP = "startup";
@@ -1213,7 +1227,7 @@ function createStuck(transport, info, clock = Date.now) {
1213
1227
  }
1214
1228
 
1215
1229
  // src/reporter.tsx
1216
- import { useEffect, useMemo, useRef, useState } from "react";
1230
+ import { createContext, useContext, useEffect, useMemo, useRef, useState } from "react";
1217
1231
  import {
1218
1232
  ActivityIndicator,
1219
1233
  Dimensions,
@@ -1230,10 +1244,12 @@ import {
1230
1244
  StyleSheet,
1231
1245
  Text,
1232
1246
  TextInput,
1233
- View
1247
+ View,
1248
+ useColorScheme
1234
1249
  } from "react-native";
1235
1250
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
1236
- var C = { navy: "#0B1A3A", card: "#1A2135", brand: "#3882F6", muted: "#98A6BE", mark: "#FF3B30", danger: "#FF7A6E", white: "#FFFFFF" };
1251
+ var MARK = "#FF3B30";
1252
+ var Theme = createContext(palette(false));
1237
1253
  var opener = null;
1238
1254
  var config = null;
1239
1255
  var open = false;
@@ -1291,7 +1307,9 @@ var languages = () => {
1291
1307
  return ["en"];
1292
1308
  }
1293
1309
  };
1294
- function BlipitReporter({ children, showButton = false }) {
1310
+ function BlipitReporter({ children, showButton = false, color }) {
1311
+ const scheme = useColorScheme();
1312
+ const C = useMemo(() => palette(scheme === "dark", color), [scheme, color]);
1295
1313
  const lang = useMemo(() => pickLang(languages()), []);
1296
1314
  const t = (key) => text(key, lang);
1297
1315
  const [stage, setStage] = useState("closed");
@@ -1342,17 +1360,17 @@ function BlipitReporter({ children, showButton = false }) {
1342
1360
  setStage("details");
1343
1361
  }
1344
1362
  };
1345
- return /* @__PURE__ */ jsxs(View, { style: { flex: 1 }, children: [
1363
+ return /* @__PURE__ */ jsx(Theme.Provider, { value: C, children: /* @__PURE__ */ jsxs(View, { style: { flex: 1 }, children: [
1346
1364
  children,
1347
- (showButton || server) && stage === "closed" ? /* @__PURE__ */ jsxs(Pressable, { accessibilityRole: "button", accessibilityLabel: t("title"), onPress: showReport, style: ({ pressed }) => [s.fab, pressed && { opacity: 0.85 }], children: [
1348
- /* @__PURE__ */ jsx(Text, { style: s.fabIcon, children: "!" }),
1349
- /* @__PURE__ */ jsx(Text, { style: s.fabText, children: t("title") })
1365
+ (showButton || server) && stage === "closed" ? /* @__PURE__ */ jsxs(Pressable, { accessibilityRole: "button", accessibilityLabel: t("title"), onPress: showReport, style: ({ pressed }) => [s.fab, { backgroundColor: C.primary }, pressed && { opacity: 0.9 }], children: [
1366
+ /* @__PURE__ */ jsx(Text, { style: [s.fabIcon, { color: C.onPrimary, borderColor: C.onPrimary }], children: "!" }),
1367
+ /* @__PURE__ */ jsx(Text, { style: [s.fabText, { color: C.onPrimary }], children: t("title") })
1350
1368
  ] }) : null,
1351
- /* @__PURE__ */ jsx(Modal, { visible: stage !== "closed", animationType: "none", presentationStyle: "fullScreen", onRequestClose: () => setStage(stage === "details" && shot ? "editor" : stage === "choice" ? "closed" : "choice"), statusBarTranslucent: false, children: /* @__PURE__ */ jsxs(SafeAreaView, { style: [s.screen, { direction: lang === "ar" ? "rtl" : I18nManager.isRTL ? "rtl" : "ltr" }], children: [
1369
+ /* @__PURE__ */ jsx(Modal, { visible: stage !== "closed", animationType: "none", presentationStyle: "fullScreen", onRequestClose: () => setStage(stage === "details" && shot ? "editor" : stage === "choice" ? "closed" : "choice"), statusBarTranslucent: false, children: /* @__PURE__ */ jsxs(SafeAreaView, { style: [s.screen, { backgroundColor: C.bg, direction: lang === "ar" ? "rtl" : I18nManager.isRTL ? "rtl" : "ltr" }], children: [
1352
1370
  stage === "choice" ? /* @__PURE__ */ jsxs(View, { style: s.pad, children: [
1353
1371
  /* @__PURE__ */ jsx(Bar, { children: /* @__PURE__ */ jsx(BarButton, { label: t("close"), glyph: "\u2715", onPress: () => setStage("closed") }) }),
1354
1372
  /* @__PURE__ */ jsxs(View, { style: s.center, children: [
1355
- /* @__PURE__ */ jsx(Text, { style: s.h1, children: t("mHow") }),
1373
+ /* @__PURE__ */ jsx(Text, { style: [s.h1, { color: C.fg }], children: t("mHow") }),
1356
1374
  /* @__PURE__ */ jsx(Card, { title: t("mShot"), glyph: "\u25CE", onPress: capture }),
1357
1375
  /* @__PURE__ */ jsx(
1358
1376
  Card,
@@ -1369,7 +1387,7 @@ function BlipitReporter({ children, showButton = false }) {
1369
1387
  ] }) : null,
1370
1388
  stage === "pick" && shot ? /* @__PURE__ */ jsxs(View, { style: s.pad, children: [
1371
1389
  /* @__PURE__ */ jsx(Bar, { children: /* @__PURE__ */ jsx(BarButton, { label: t("mBack"), glyph: "\u2039", onPress: () => setStage("choice") }) }),
1372
- /* @__PURE__ */ jsx(Text, { style: s.h1, children: t("pickTitle") }),
1390
+ /* @__PURE__ */ jsx(Text, { style: [s.h1, { color: C.fg }], children: t("pickTitle") }),
1373
1391
  /* @__PURE__ */ jsx(ScrollView, { contentContainerStyle: s.thumbs, children: [shot, ...earlier].map((item, i) => /* @__PURE__ */ jsxs(
1374
1392
  Pressable,
1375
1393
  {
@@ -1380,10 +1398,10 @@ function BlipitReporter({ children, showButton = false }) {
1380
1398
  setEarlier([]);
1381
1399
  setStage("editor");
1382
1400
  },
1383
- style: ({ pressed }) => [s.thumb, pressed && { opacity: 0.85 }],
1401
+ style: ({ pressed }) => [s.thumb, { borderColor: C.line, backgroundColor: pressed ? C.soft : C.bg }],
1384
1402
  children: [
1385
- /* @__PURE__ */ jsx(Image, { source: { uri: item.uri }, style: [s.thumbImage, { aspectRatio: item.width / Math.max(1, item.height) }], resizeMode: "contain", accessibilityIgnoresInvertColors: true }),
1386
- /* @__PURE__ */ jsx(Text, { style: s.thumbText, numberOfLines: 1, children: i === 0 ? t("pickNow") : t("pickBefore") })
1403
+ /* @__PURE__ */ jsx(Image, { source: { uri: item.uri }, style: [s.thumbImage, { backgroundColor: C.soft, aspectRatio: item.width / Math.max(1, item.height) }], resizeMode: "contain", accessibilityIgnoresInvertColors: true }),
1404
+ /* @__PURE__ */ jsx(Text, { style: [s.thumbText, { color: C.fg }], numberOfLines: 1, children: i === 0 ? t("pickNow") : t("pickBefore") })
1387
1405
  ]
1388
1406
  },
1389
1407
  i
@@ -1417,24 +1435,28 @@ function BlipitReporter({ children, showButton = false }) {
1417
1435
  }
1418
1436
  ) : null
1419
1437
  ] }) })
1420
- ] });
1438
+ ] }) });
1421
1439
  }
1422
1440
  function Bar({ children }) {
1423
- return /* @__PURE__ */ jsx(View, { style: s.bar, children });
1441
+ const C = useContext(Theme);
1442
+ return /* @__PURE__ */ jsx(View, { style: [s.bar, { borderBottomColor: C.line }], children });
1424
1443
  }
1425
1444
  function BarButton({ label, glyph, onPress }) {
1426
- return /* @__PURE__ */ jsxs(Pressable, { accessibilityRole: "button", accessibilityLabel: label, onPress, style: s.barButton, hitSlop: 6, children: [
1427
- /* @__PURE__ */ jsx(Text, { style: s.glyph, children: glyph }),
1428
- /* @__PURE__ */ jsx(Text, { style: s.barText, numberOfLines: 1, children: label })
1445
+ const C = useContext(Theme);
1446
+ return /* @__PURE__ */ jsxs(Pressable, { accessibilityRole: "button", accessibilityLabel: label, onPress, style: ({ pressed }) => [s.barButton, pressed && { backgroundColor: C.soft }], hitSlop: 6, children: [
1447
+ /* @__PURE__ */ jsx(Text, { style: [s.glyph, { color: C.fg }], children: glyph }),
1448
+ /* @__PURE__ */ jsx(Text, { style: [s.barText, { color: C.fg }], numberOfLines: 1, children: label })
1429
1449
  ] });
1430
1450
  }
1431
1451
  function Primary({ label, onPress, disabled }) {
1432
- return /* @__PURE__ */ jsx(Pressable, { accessibilityRole: "button", accessibilityLabel: label, accessibilityState: { disabled }, disabled, onPress, style: [s.primary, disabled && { opacity: 0.6 }], children: /* @__PURE__ */ jsx(Text, { style: s.primaryText, children: label }) });
1452
+ const C = useContext(Theme);
1453
+ return /* @__PURE__ */ jsx(Pressable, { accessibilityRole: "button", accessibilityLabel: label, accessibilityState: { disabled }, disabled, onPress, hitSlop: 4, style: ({ pressed }) => [s.primary, { backgroundColor: C.primary }, pressed && { opacity: 0.9 }, disabled && { opacity: 0.5 }], children: /* @__PURE__ */ jsx(Text, { style: [s.primaryText, { color: C.onPrimary }], children: label }) });
1433
1454
  }
1434
1455
  function Card({ title, glyph, onPress }) {
1435
- return /* @__PURE__ */ jsxs(Pressable, { accessibilityRole: "button", accessibilityLabel: title, onPress, style: ({ pressed }) => [s.card, pressed && { opacity: 0.85 }], children: [
1436
- /* @__PURE__ */ jsx(Text, { style: s.cardGlyph, children: glyph }),
1437
- /* @__PURE__ */ jsx(Text, { style: s.cardText, children: title })
1456
+ const C = useContext(Theme);
1457
+ return /* @__PURE__ */ jsxs(Pressable, { accessibilityRole: "button", accessibilityLabel: title, onPress, style: ({ pressed }) => [s.card, { borderColor: C.line, backgroundColor: pressed ? C.soft : C.bg }], children: [
1458
+ /* @__PURE__ */ jsx(View, { style: [s.cardIcon, { backgroundColor: C.soft }], children: /* @__PURE__ */ jsx(Text, { style: [s.cardGlyph, { color: C.fg }], children: glyph }) }),
1459
+ /* @__PURE__ */ jsx(Text, { style: [s.cardText, { color: C.fg }], children: title })
1438
1460
  ] });
1439
1461
  }
1440
1462
  function Editor({ shot, shapes, t, onBack, onNext }) {
@@ -1453,6 +1475,7 @@ function Editor({ shot, shapes, t, onBack, onNext }) {
1453
1475
  live.current.view = view;
1454
1476
  live.current.tool = tool;
1455
1477
  const image = { width: shot.width, height: shot.height };
1478
+ const C = useContext(Theme);
1456
1479
  const local = (e) => e.nativeEvent.touches.map((touch) => ({ x: touch.pageX - live.current.view.x, y: touch.pageY - live.current.view.y }));
1457
1480
  const responder = useMemo(
1458
1481
  () => PanResponder.create({
@@ -1465,7 +1488,7 @@ function Editor({ shot, shapes, t, onBack, onNext }) {
1465
1488
  L.moved = false;
1466
1489
  if (pts.length >= 2) return;
1467
1490
  const p = toImage(pts[0] ?? { x: e.nativeEvent.locationX, y: e.nativeEvent.locationY }, L.pan, L.zoom, L.view, image);
1468
- L.current = { tool: L.tool, points: [p, p], color: C.mark };
1491
+ L.current = { tool: L.tool, points: [p, p], color: MARK };
1469
1492
  setCurrent(L.current);
1470
1493
  },
1471
1494
  onPanResponderMove: (e) => {
@@ -1561,20 +1584,20 @@ function Editor({ shot, shapes, t, onBack, onNext }) {
1561
1584
  /* @__PURE__ */ jsx(BarButton, { label: t("mBack"), glyph: "\u2039", onPress: onBack }),
1562
1585
  /* @__PURE__ */ jsx(View, { style: { flex: 1 } }),
1563
1586
  /* @__PURE__ */ jsx(IconButton, { label: t("mZoomOut"), glyph: "\u2212", onPress: () => zoomBy(1 / 1.5) }),
1564
- /* @__PURE__ */ jsxs(Text, { style: s.zoom, children: [
1587
+ /* @__PURE__ */ jsxs(Text, { style: [s.zoom, { color: C.muted }], children: [
1565
1588
  Math.round(zoom * 100),
1566
1589
  "%"
1567
1590
  ] }),
1568
1591
  /* @__PURE__ */ jsx(IconButton, { label: t("mZoomIn"), glyph: "+", onPress: () => zoomBy(1.5) }),
1569
1592
  /* @__PURE__ */ jsx(View, { style: { flex: 1 } }),
1570
- busy ? /* @__PURE__ */ jsx(ActivityIndicator, { color: C.white, style: { marginHorizontal: 8 } }) : null,
1593
+ busy ? /* @__PURE__ */ jsx(ActivityIndicator, { color: C.muted, style: { marginHorizontal: 8 } }) : null,
1571
1594
  /* @__PURE__ */ jsx(Primary, { label: t("mNext"), onPress: next, disabled: busy })
1572
1595
  ] }),
1573
1596
  /* @__PURE__ */ jsx(
1574
1597
  View,
1575
1598
  {
1576
1599
  ref: box,
1577
- style: s.stage,
1600
+ style: [s.stage, { backgroundColor: C.soft }],
1578
1601
  onLayout: (e) => {
1579
1602
  const { width: w, height: h } = e.nativeEvent.layout;
1580
1603
  box.current?.measureInWindow((x, y) => setView({ width: w, height: h, x, y }));
@@ -1587,7 +1610,7 @@ function Editor({ shot, shapes, t, onBack, onNext }) {
1587
1610
  ] })
1588
1611
  }
1589
1612
  ),
1590
- /* @__PURE__ */ jsxs(View, { style: s.tools, children: [
1613
+ /* @__PURE__ */ jsxs(View, { style: [s.tools, { borderTopColor: C.line }], children: [
1591
1614
  tools.map(([id, label, glyph]) => /* @__PURE__ */ jsx(ToolButton, { label, glyph, on: tool === id, onPress: () => setTool(id) }, id)),
1592
1615
  /* @__PURE__ */ jsx(
1593
1616
  ToolButton,
@@ -1620,12 +1643,12 @@ function Mark({ shape, scale, width }) {
1620
1643
  const ay = a2.y * scale;
1621
1644
  const len = Math.hypot(b2.x * scale - ax, b2.y * scale - ay);
1622
1645
  const angle = Math.atan2(b2.y * scale - ay, b2.x * scale - ax);
1623
- return /* @__PURE__ */ jsx(View, { style: { position: "absolute", left: ax + (b2.x * scale - ax - len) / 2, top: ay + (b2.y * scale - ay) / 2 - width / 2, width: len, height: width, borderRadius: width / 2, backgroundColor: C.mark, transform: [{ rotate: `${angle}rad` }] } }, key);
1646
+ return /* @__PURE__ */ jsx(View, { style: { position: "absolute", left: ax + (b2.x * scale - ax - len) / 2, top: ay + (b2.y * scale - ay) / 2 - width / 2, width: len, height: width, borderRadius: width / 2, backgroundColor: MARK, transform: [{ rotate: `${angle}rad` }] } }, key);
1624
1647
  };
1625
1648
  const a = shape.points[0];
1626
1649
  const b = shape.points[shape.points.length - 1];
1627
1650
  if (shape.tool === "rect") {
1628
- return /* @__PURE__ */ jsx(View, { style: { position: "absolute", left: Math.min(a.x, b.x) * scale, top: Math.min(a.y, b.y) * scale, width: Math.abs(b.x - a.x) * scale, height: Math.abs(b.y - a.y) * scale, borderWidth: width, borderColor: C.mark } });
1651
+ return /* @__PURE__ */ jsx(View, { style: { position: "absolute", left: Math.min(a.x, b.x) * scale, top: Math.min(a.y, b.y) * scale, width: Math.abs(b.x - a.x) * scale, height: Math.abs(b.y - a.y) * scale, borderWidth: width, borderColor: MARK } });
1629
1652
  }
1630
1653
  if (shape.tool === "arrow") {
1631
1654
  const angle = Math.atan2(b.y - a.y, b.x - a.x);
@@ -1636,12 +1659,14 @@ function Mark({ shape, scale, width }) {
1636
1659
  return /* @__PURE__ */ jsx(Fragment, { children: shape.points.slice(1).map((p, i) => line(shape.points[i], p, i)) });
1637
1660
  }
1638
1661
  function IconButton({ label, glyph, onPress }) {
1639
- return /* @__PURE__ */ jsx(Pressable, { accessibilityRole: "button", accessibilityLabel: label, onPress, style: s.icon, children: /* @__PURE__ */ jsx(Text, { style: s.iconText, children: glyph }) });
1662
+ const C = useContext(Theme);
1663
+ return /* @__PURE__ */ jsx(Pressable, { accessibilityRole: "button", accessibilityLabel: label, onPress, style: ({ pressed }) => [s.icon, { borderColor: C.line }, pressed && { backgroundColor: C.soft }], children: /* @__PURE__ */ jsx(Text, { style: [s.iconText, { color: C.fg }], children: glyph }) });
1640
1664
  }
1641
1665
  function ToolButton({ label, glyph, on, onPress }) {
1642
- return /* @__PURE__ */ jsxs(Pressable, { accessibilityRole: "button", accessibilityLabel: label, accessibilityState: { selected: !!on }, onPress, style: [s.tool, on && { backgroundColor: C.brand }], children: [
1643
- /* @__PURE__ */ jsx(Text, { style: [s.toolGlyph, { color: on ? C.white : C.muted }], children: glyph }),
1644
- /* @__PURE__ */ jsx(Text, { style: [s.toolText, { color: on ? C.white : C.muted }], numberOfLines: 1, children: label })
1666
+ const C = useContext(Theme);
1667
+ return /* @__PURE__ */ jsxs(Pressable, { accessibilityRole: "button", accessibilityLabel: label, accessibilityState: { selected: !!on }, onPress, style: ({ pressed }) => [s.tool, (on || pressed) && { backgroundColor: C.soft }], children: [
1668
+ /* @__PURE__ */ jsx(Text, { style: [s.toolGlyph, { color: on ? C.fg : C.muted }], children: glyph }),
1669
+ /* @__PURE__ */ jsx(Text, { style: [s.toolText, { color: on ? C.fg : C.muted, fontWeight: on ? "600" : "500" }], numberOfLines: 1, children: label })
1645
1670
  ] });
1646
1671
  }
1647
1672
  function Details({ t, lang, shot, flat, shapes, notice, eventId, onBack, onDone }) {
@@ -1651,6 +1676,8 @@ function Details({ t, lang, shot, flat, shapes, notice, eventId, onBack, onDone
1651
1676
  const [status, setStatus] = useState(notice ? { text: notice, error: true } : { text: "", error: false });
1652
1677
  const [busy, setBusy] = useState(false);
1653
1678
  const image = flat ?? shot;
1679
+ const C = useContext(Theme);
1680
+ const field = [s.input, { borderColor: C.line, color: C.fg, backgroundColor: C.bg }];
1654
1681
  const submit = async () => {
1655
1682
  if (busy || !config) return;
1656
1683
  if (!message.trim()) {
@@ -1683,51 +1710,52 @@ function Details({ t, lang, shot, flat, shapes, notice, eventId, onBack, onDone
1683
1710
  /* @__PURE__ */ jsxs(Bar, { children: [
1684
1711
  /* @__PURE__ */ jsx(BarButton, { label: t("mBack"), glyph: "\u2039", onPress: () => !busy && onBack() }),
1685
1712
  /* @__PURE__ */ jsx(View, { style: { flex: 1 } }),
1686
- busy ? /* @__PURE__ */ jsx(ActivityIndicator, { color: C.white, style: { marginHorizontal: 10 } }) : null,
1713
+ busy ? /* @__PURE__ */ jsx(ActivityIndicator, { color: C.muted, style: { marginHorizontal: 10 } }) : null,
1687
1714
  /* @__PURE__ */ jsx(Primary, { label: t("send"), onPress: submit, disabled: busy })
1688
1715
  ] }),
1689
1716
  /* @__PURE__ */ jsxs(ScrollView, { contentContainerStyle: { padding: 20, paddingTop: 8, gap: 12 }, keyboardShouldPersistTaps: "handled", children: [
1690
- /* @__PURE__ */ jsx(Text, { style: s.h2, children: t("title") }),
1691
- image ? /* @__PURE__ */ jsx(Image, { source: { uri: image.uri }, style: s.preview, resizeMode: "contain", accessibilityIgnoresInvertColors: true }) : null,
1692
- /* @__PURE__ */ jsx(TextInput, { value: title, onChangeText: setTitle, placeholder: t("fTitle"), placeholderTextColor: C.muted, style: s.input, accessibilityLabel: t("fTitle") }),
1693
- /* @__PURE__ */ jsx(TextInput, { value: message, onChangeText: setMessage, placeholder: t("fDesc"), placeholderTextColor: C.muted, style: [s.input, { minHeight: 120, textAlignVertical: "top" }], multiline: true, accessibilityLabel: t("fDesc") }),
1694
- /* @__PURE__ */ jsx(TextInput, { value: email, onChangeText: setEmail, placeholder: t("email"), placeholderTextColor: C.muted, style: s.input, keyboardType: "email-address", autoCapitalize: "none", autoCorrect: false, accessibilityLabel: t("email") }),
1717
+ /* @__PURE__ */ jsx(Text, { style: [s.h2, { color: C.fg }], children: t("title") }),
1718
+ image ? /* @__PURE__ */ jsx(Image, { source: { uri: image.uri }, style: [s.preview, { backgroundColor: C.soft, borderColor: C.line }], resizeMode: "contain", accessibilityIgnoresInvertColors: true }) : null,
1719
+ /* @__PURE__ */ jsx(TextInput, { value: title, onChangeText: setTitle, placeholder: t("fTitle"), placeholderTextColor: C.muted, style: field, accessibilityLabel: t("fTitle") }),
1720
+ /* @__PURE__ */ jsx(TextInput, { value: message, onChangeText: setMessage, placeholder: t("fDesc"), placeholderTextColor: C.muted, style: [...field, { minHeight: 120, textAlignVertical: "top" }], multiline: true, accessibilityLabel: t("fDesc") }),
1721
+ /* @__PURE__ */ jsx(TextInput, { value: email, onChangeText: setEmail, placeholder: t("email"), placeholderTextColor: C.muted, style: field, keyboardType: "email-address", autoCapitalize: "none", autoCorrect: false, accessibilityLabel: t("email") }),
1695
1722
  /* @__PURE__ */ jsx(Text, { accessibilityLiveRegion: "polite", style: { color: status.error ? C.danger : C.muted, fontSize: 14 }, children: status.text })
1696
1723
  ] })
1697
1724
  ] });
1698
1725
  }
1699
1726
  var s = StyleSheet.create({
1700
- screen: { flex: 1, backgroundColor: C.navy, paddingTop: Platform.OS === "android" ? StatusBar.currentHeight ?? 0 : 0 },
1701
- pad: { flex: 1, paddingHorizontal: 20 },
1702
- center: { flex: 1, justifyContent: "center", gap: 14 },
1703
- h1: { color: C.white, fontSize: 24, fontWeight: "700", marginBottom: 8 },
1704
- h2: { color: C.white, fontSize: 22, fontWeight: "700" },
1705
- bar: { height: 56, flexDirection: "row", alignItems: "center", paddingHorizontal: 8 },
1706
- barButton: { flexDirection: "row", alignItems: "center", minHeight: 48, minWidth: 48, paddingHorizontal: 6, flexShrink: 1 },
1707
- barText: { color: C.white, fontSize: 16, flexShrink: 1 },
1708
- glyph: { color: C.white, fontSize: 22, marginEnd: 6 },
1709
- primary: { backgroundColor: C.brand, borderRadius: 12, minHeight: 44, paddingHorizontal: 18, justifyContent: "center" },
1710
- primaryText: { color: C.white, fontSize: 16, fontWeight: "600" },
1711
- card: { flexDirection: "row", alignItems: "center", backgroundColor: C.card, borderRadius: 16, borderWidth: 1, borderColor: "rgba(255,255,255,0.1)", padding: 16, minHeight: 64 },
1712
- cardGlyph: { color: C.brand, fontSize: 22, width: 32, marginEnd: 14, textAlign: "center" },
1713
- cardText: { color: C.white, fontSize: 17, fontWeight: "600", flex: 1 },
1714
- stage: { flex: 1, overflow: "hidden", backgroundColor: "rgba(0,0,0,0.25)" },
1715
- zoom: { color: C.muted, fontSize: 13, width: 48, textAlign: "center" },
1716
- icon: { width: 44, height: 44, alignItems: "center", justifyContent: "center" },
1717
- iconText: { color: C.white, fontSize: 24 },
1718
- tools: { flexDirection: "row", paddingHorizontal: 8, paddingVertical: 6 },
1719
- tool: { flex: 1, height: 60, alignItems: "center", justifyContent: "center", borderRadius: 12, marginHorizontal: 2 },
1720
- toolGlyph: { fontSize: 20 },
1721
- toolText: { fontSize: 11, marginTop: 2 },
1727
+ screen: { flex: 1, paddingTop: Platform.OS === "android" ? StatusBar.currentHeight ?? 0 : 0 },
1728
+ pad: { flex: 1, paddingHorizontal: 16 },
1729
+ center: { flex: 1, justifyContent: "center", gap: 8 },
1730
+ h1: { fontSize: 20, fontWeight: "600", letterSpacing: -0.2, marginBottom: 8 },
1731
+ h2: { fontSize: 18, fontWeight: "600", letterSpacing: -0.2 },
1732
+ bar: { height: 56, flexDirection: "row", alignItems: "center", paddingHorizontal: 8, gap: 4, borderBottomWidth: StyleSheet.hairlineWidth },
1733
+ barButton: { flexDirection: "row", alignItems: "center", minHeight: 44, minWidth: 44, paddingHorizontal: 8, borderRadius: 8, flexShrink: 1 },
1734
+ barText: { fontSize: 15, fontWeight: "500", flexShrink: 1 },
1735
+ glyph: { fontSize: 20, marginEnd: 6 },
1736
+ primary: { borderRadius: 8, minHeight: 40, paddingHorizontal: 16, justifyContent: "center" },
1737
+ primaryText: { fontSize: 15, fontWeight: "500" },
1738
+ card: { flexDirection: "row", alignItems: "center", borderRadius: 12, borderWidth: StyleSheet.hairlineWidth, padding: 12, minHeight: 64 },
1739
+ cardIcon: { width: 36, height: 36, borderRadius: 8, alignItems: "center", justifyContent: "center", marginEnd: 12 },
1740
+ cardGlyph: { fontSize: 18, textAlign: "center" },
1741
+ cardText: { fontSize: 15, fontWeight: "500", flex: 1 },
1742
+ stage: { flex: 1, overflow: "hidden" },
1743
+ zoom: { fontSize: 13, width: 48, textAlign: "center", fontVariant: ["tabular-nums"] },
1744
+ icon: { width: 44, height: 44, borderRadius: 8, borderWidth: StyleSheet.hairlineWidth, alignItems: "center", justifyContent: "center" },
1745
+ iconText: { fontSize: 20 },
1746
+ tools: { flexDirection: "row", paddingHorizontal: 8, paddingVertical: 6, borderTopWidth: StyleSheet.hairlineWidth },
1747
+ tool: { flex: 1, height: 56, alignItems: "center", justifyContent: "center", borderRadius: 8, marginHorizontal: 2 },
1748
+ toolGlyph: { fontSize: 18 },
1749
+ toolText: { fontSize: 12, marginTop: 2 },
1722
1750
  thumbs: { flexDirection: "row", flexWrap: "wrap", gap: 12, paddingVertical: 12 },
1723
- thumb: { width: "47%", backgroundColor: C.card, borderRadius: 14, borderWidth: 1, borderColor: "rgba(255,255,255,0.1)", padding: 8, gap: 8 },
1724
- thumbImage: { width: "100%", borderRadius: 8, backgroundColor: C.navy },
1725
- thumbText: { color: C.white, fontSize: 14, fontWeight: "600", textAlign: "center" },
1726
- preview: { height: 150, borderRadius: 12, backgroundColor: C.card },
1727
- input: { backgroundColor: C.card, borderRadius: 12, color: C.white, fontSize: 16, paddingHorizontal: 14, paddingVertical: 12, minHeight: 48 },
1728
- fab: { position: "absolute", right: 16, bottom: 32, height: 48, borderRadius: 24, backgroundColor: C.brand, flexDirection: "row", alignItems: "center", paddingHorizontal: 18, elevation: 6, shadowColor: "#000", shadowOpacity: 0.25, shadowRadius: 10, shadowOffset: { width: 0, height: 4 } },
1729
- fabIcon: { color: C.white, fontSize: 15, fontWeight: "800", marginEnd: 8, width: 20, height: 20, borderRadius: 10, borderWidth: 1.5, borderColor: C.white, textAlign: "center", lineHeight: 17 },
1730
- fabText: { color: C.white, fontSize: 15, fontWeight: "600" }
1751
+ thumb: { width: "47%", borderRadius: 12, borderWidth: StyleSheet.hairlineWidth, padding: 8, gap: 8 },
1752
+ thumbImage: { width: "100%", borderRadius: 8 },
1753
+ thumbText: { fontSize: 14, fontWeight: "500", textAlign: "center" },
1754
+ preview: { height: 150, borderRadius: 8, borderWidth: StyleSheet.hairlineWidth },
1755
+ input: { borderRadius: 8, borderWidth: 1, fontSize: 16, paddingHorizontal: 12, paddingVertical: 10, minHeight: 44 },
1756
+ fab: { position: "absolute", end: 16, bottom: 32, height: 44, borderRadius: 8, flexDirection: "row", alignItems: "center", paddingHorizontal: 16, elevation: 3, shadowColor: "#000", shadowOpacity: 0.12, shadowRadius: 6, shadowOffset: { width: 0, height: 2 } },
1757
+ fabIcon: { fontSize: 13, fontWeight: "700", marginEnd: 8, width: 18, height: 18, borderRadius: 9, borderWidth: 1.5, textAlign: "center", lineHeight: 16 },
1758
+ fabText: { fontSize: 15, fontWeight: "500" }
1731
1759
  });
1732
1760
 
1733
1761
  // src/index.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blipit/react-native",
3
- "version": "0.6.1",
3
+ "version": "0.6.3",
4
4
  "description": "Blipit error monitoring for React Native and Expo. Know your app broke before your users tell you.",
5
5
  "license": "MIT",
6
6
  "type": "module",