@buoy-gg/events 2.1.1 → 2.1.2

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.
@@ -147,13 +147,10 @@ function EventsModal({
147
147
  size: 14,
148
148
  color: totalCount > 0 ? _sharedUi.buoyColors.textMuted : _sharedUi.buoyColors.textMuted + "50"
149
149
  })
150
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
151
- onPress: toggleCapturing,
152
- style: [styles.headerActionButton, isCapturing ? styles.startButton : styles.stopButton],
153
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.Power, {
154
- size: 14,
155
- color: isCapturing ? _sharedUi.buoyColors.success : _sharedUi.buoyColors.error
156
- })
150
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.PowerToggleButton, {
151
+ isEnabled: isCapturing,
152
+ onToggle: toggleCapturing,
153
+ accessibilityLabel: "Toggle event capture"
157
154
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
158
155
  onPress: clearEvents,
159
156
  style: [styles.headerActionButton, totalCount === 0 && styles.headerActionButtonDisabled],
@@ -10,7 +10,7 @@
10
10
  import { View, StyleSheet, TouchableOpacity, Text, Alert } from "react-native";
11
11
  import { useState, useCallback } from "react";
12
12
  import { useRouter } from "expo-router";
13
- import { JsModal, ModalHeader, buoyColors, Trash2, Power, Copy, devToolsStorageKeys, ToolbarCopyButton, UpgradeModal } from "@buoy-gg/shared-ui";
13
+ import { JsModal, ModalHeader, buoyColors, Trash2, Copy, devToolsStorageKeys, ToolbarCopyButton, UpgradeModal, PowerToggleButton } from "@buoy-gg/shared-ui";
14
14
  import { useUnifiedEvents } from "../hooks/useUnifiedEvents";
15
15
  import { UnifiedEventFilters } from "./UnifiedEventFilters";
16
16
  import { UnifiedEventList } from "./UnifiedEventList";
@@ -143,13 +143,10 @@ export function EventsModal({
143
143
  size: 14,
144
144
  color: totalCount > 0 ? buoyColors.textMuted : buoyColors.textMuted + "50"
145
145
  })
146
- }), /*#__PURE__*/_jsx(TouchableOpacity, {
147
- onPress: toggleCapturing,
148
- style: [styles.headerActionButton, isCapturing ? styles.startButton : styles.stopButton],
149
- children: /*#__PURE__*/_jsx(Power, {
150
- size: 14,
151
- color: isCapturing ? buoyColors.success : buoyColors.error
152
- })
146
+ }), /*#__PURE__*/_jsx(PowerToggleButton, {
147
+ isEnabled: isCapturing,
148
+ onToggle: toggleCapturing,
149
+ accessibilityLabel: "Toggle event capture"
153
150
  }), /*#__PURE__*/_jsx(TouchableOpacity, {
154
151
  onPress: clearEvents,
155
152
  style: [styles.headerActionButton, totalCount === 0 && styles.headerActionButtonDisabled],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buoy-gg/events",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "description": "events package",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -27,8 +27,8 @@
27
27
  ],
28
28
  "sideEffects": false,
29
29
  "dependencies": {
30
- "@buoy-gg/floating-tools-core": "2.1.1",
31
- "@buoy-gg/shared-ui": "2.1.1"
30
+ "@buoy-gg/floating-tools-core": "2.1.2",
31
+ "@buoy-gg/shared-ui": "2.1.2"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "react": "*",
@@ -13,11 +13,11 @@ import {
13
13
  ModalHeader,
14
14
  buoyColors,
15
15
  Trash2,
16
- Power,
17
16
  Copy,
18
17
  devToolsStorageKeys,
19
18
  ToolbarCopyButton,
20
19
  UpgradeModal,
20
+ PowerToggleButton,
21
21
  } from "@buoy-gg/shared-ui";
22
22
  import type { ModalMode } from "@buoy-gg/shared-ui";
23
23
  import { useUnifiedEvents } from "../hooks/useUnifiedEvents";
@@ -180,22 +180,11 @@ export function EventsModal({
180
180
  />
181
181
  </TouchableOpacity>
182
182
 
183
- <TouchableOpacity
184
- onPress={toggleCapturing}
185
- style={[
186
- styles.headerActionButton,
187
- isCapturing ? styles.startButton : styles.stopButton,
188
- ]}
189
- >
190
- <Power
191
- size={14}
192
- color={
193
- isCapturing
194
- ? buoyColors.success
195
- : buoyColors.error
196
- }
197
- />
198
- </TouchableOpacity>
183
+ <PowerToggleButton
184
+ isEnabled={isCapturing}
185
+ onToggle={toggleCapturing}
186
+ accessibilityLabel="Toggle event capture"
187
+ />
199
188
 
200
189
  <TouchableOpacity
201
190
  onPress={clearEvents}