@buoy-gg/impersonate 7.0.4 → 7.0.5
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/lib/commonjs/impersonate/components/ImpersonateBanner.js +1 -1
- package/lib/commonjs/impersonate/components/ImpersonateModal.js +73 -29
- package/lib/commonjs/index.js +6 -0
- package/lib/commonjs/preset.js +21 -35
- package/lib/module/impersonate/components/ImpersonateBanner.js +1 -1
- package/lib/module/impersonate/components/ImpersonateModal.js +73 -30
- package/lib/module/index.js +3 -1
- package/lib/module/preset.js +10 -34
- package/lib/typescript/impersonate/components/ImpersonateModal.d.ts +8 -1
- package/lib/typescript/impersonate/components/ImpersonateModal.d.ts.map +1 -1
- package/lib/typescript/impersonate/types/types.d.ts +6 -0
- package/lib/typescript/impersonate/types/types.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +1 -1
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/preset.d.ts +8 -7
- package/lib/typescript/preset.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -177,7 +177,7 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
177
177
|
width: 22,
|
|
178
178
|
height: 22,
|
|
179
179
|
borderRadius: 11,
|
|
180
|
-
backgroundColor: "rgba(
|
|
180
|
+
backgroundColor: "rgba(128, 128, 128, 0.16)",
|
|
181
181
|
alignItems: "center",
|
|
182
182
|
justifyContent: "center",
|
|
183
183
|
marginLeft: -4
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.ImpersonateModal = ImpersonateModal;
|
|
7
|
+
exports.ImpersonateToolView = ImpersonateToolView;
|
|
7
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
9
|
var _reactNative = require("react-native");
|
|
9
10
|
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
@@ -56,7 +57,8 @@ function ImpersonateModal({
|
|
|
56
57
|
onClearRedux,
|
|
57
58
|
onClearAsyncStorage,
|
|
58
59
|
onClearMMKV,
|
|
59
|
-
showSettingsTab = true
|
|
60
|
+
showSettingsTab = true,
|
|
61
|
+
inline = false
|
|
60
62
|
}) {
|
|
61
63
|
// Select tabs based on showSettingsTab prop
|
|
62
64
|
const tabs = showSettingsTab ? ALL_TABS : TABS_WITHOUT_SETTINGS;
|
|
@@ -224,6 +226,48 @@ function ImpersonateModal({
|
|
|
224
226
|
if (!visible) {
|
|
225
227
|
return null;
|
|
226
228
|
}
|
|
229
|
+
const body = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
230
|
+
style: styles.container,
|
|
231
|
+
children: [activeTab === "search" && /*#__PURE__*/(0, _jsxRuntime.jsx)(_UserSearchView.UserSearchView, {
|
|
232
|
+
currentUser: currentUser,
|
|
233
|
+
isActive: isActive,
|
|
234
|
+
searchQuery: searchQuery,
|
|
235
|
+
searchResults: searchResults,
|
|
236
|
+
isSearching: isSearching,
|
|
237
|
+
searchError: searchError,
|
|
238
|
+
onSelectUser: handleSelectUser,
|
|
239
|
+
onStopImpersonation: stopImpersonation,
|
|
240
|
+
searchAvailable: !!onSearchUsers
|
|
241
|
+
}), activeTab === "history" && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ImpersonateHistoryList.ImpersonateHistoryList, {
|
|
242
|
+
history: history,
|
|
243
|
+
currentUserId: currentUser?.id ?? null,
|
|
244
|
+
onSelectUser: handleSelectUser,
|
|
245
|
+
onStopImpersonation: stopImpersonation,
|
|
246
|
+
onRemoveFromHistory: removeFromHistory,
|
|
247
|
+
onClearHistory: clearHistory
|
|
248
|
+
}), activeTab === "settings" && /*#__PURE__*/(0, _jsxRuntime.jsx)(_DataNukeSettings.DataNukeSettings, {
|
|
249
|
+
headerKey: headerKey,
|
|
250
|
+
settings: dataNukeSettings,
|
|
251
|
+
showBanner: showBanner,
|
|
252
|
+
onSave: handleSaveSettings,
|
|
253
|
+
onShowBannerChange: updateShowBanner,
|
|
254
|
+
detectionStatus: detectionStatus
|
|
255
|
+
})]
|
|
256
|
+
});
|
|
257
|
+
|
|
258
|
+
// The ONLY difference between the phone and the desktop dashboard is which
|
|
259
|
+
// shell the header and body go in. Everything above this line is shared.
|
|
260
|
+
if (inline) {
|
|
261
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.TickProvider, {
|
|
262
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
263
|
+
style: styles.inlineRoot,
|
|
264
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
265
|
+
style: styles.inlineHeader,
|
|
266
|
+
children: renderHeaderContent()
|
|
267
|
+
}), body]
|
|
268
|
+
})
|
|
269
|
+
});
|
|
270
|
+
}
|
|
227
271
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.TickProvider, {
|
|
228
272
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(JsModal, {
|
|
229
273
|
visible: visible,
|
|
@@ -236,38 +280,38 @@ function ImpersonateModal({
|
|
|
236
280
|
enablePersistence: true,
|
|
237
281
|
initialMode: "bottomSheet",
|
|
238
282
|
disableScrollWrapper: true,
|
|
239
|
-
children:
|
|
240
|
-
style: styles.container,
|
|
241
|
-
children: [activeTab === "search" && /*#__PURE__*/(0, _jsxRuntime.jsx)(_UserSearchView.UserSearchView, {
|
|
242
|
-
currentUser: currentUser,
|
|
243
|
-
isActive: isActive,
|
|
244
|
-
searchQuery: searchQuery,
|
|
245
|
-
searchResults: searchResults,
|
|
246
|
-
isSearching: isSearching,
|
|
247
|
-
searchError: searchError,
|
|
248
|
-
onSelectUser: handleSelectUser,
|
|
249
|
-
onStopImpersonation: stopImpersonation,
|
|
250
|
-
searchAvailable: !!onSearchUsers
|
|
251
|
-
}), activeTab === "history" && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ImpersonateHistoryList.ImpersonateHistoryList, {
|
|
252
|
-
history: history,
|
|
253
|
-
currentUserId: currentUser?.id ?? null,
|
|
254
|
-
onSelectUser: handleSelectUser,
|
|
255
|
-
onStopImpersonation: stopImpersonation,
|
|
256
|
-
onRemoveFromHistory: removeFromHistory,
|
|
257
|
-
onClearHistory: clearHistory
|
|
258
|
-
}), activeTab === "settings" && /*#__PURE__*/(0, _jsxRuntime.jsx)(_DataNukeSettings.DataNukeSettings, {
|
|
259
|
-
headerKey: headerKey,
|
|
260
|
-
settings: dataNukeSettings,
|
|
261
|
-
showBanner: showBanner,
|
|
262
|
-
onSave: handleSaveSettings,
|
|
263
|
-
onShowBannerChange: updateShowBanner,
|
|
264
|
-
detectionStatus: detectionStatus
|
|
265
|
-
})]
|
|
266
|
-
})
|
|
283
|
+
children: body
|
|
267
284
|
})
|
|
268
285
|
});
|
|
269
286
|
}
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* The same impersonation tool as `ImpersonateModal`, rendered INLINE for hosts
|
|
290
|
+
* that place tools in a panel rather than a modal. Exists so there is exactly
|
|
291
|
+
* one implementation — the desktop dashboard used to ship its own copy of this
|
|
292
|
+
* component's header and tab router.
|
|
293
|
+
*/
|
|
294
|
+
function ImpersonateToolView(props) {
|
|
295
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(ImpersonateModal, {
|
|
296
|
+
...props,
|
|
297
|
+
inline: true,
|
|
298
|
+
visible: true,
|
|
299
|
+
onClose: () => {}
|
|
300
|
+
});
|
|
301
|
+
}
|
|
270
302
|
const styles = _reactNative.StyleSheet.create({
|
|
303
|
+
inlineRoot: {
|
|
304
|
+
flex: 1,
|
|
305
|
+
minHeight: 0,
|
|
306
|
+
backgroundColor: _sharedUi.buoyColors.base
|
|
307
|
+
},
|
|
308
|
+
inlineHeader: {
|
|
309
|
+
paddingHorizontal: 12,
|
|
310
|
+
paddingVertical: 8,
|
|
311
|
+
borderBottomWidth: 1,
|
|
312
|
+
borderBottomColor: _sharedUi.buoyColors.border,
|
|
313
|
+
backgroundColor: _sharedUi.buoyColors.card
|
|
314
|
+
},
|
|
271
315
|
container: {
|
|
272
316
|
flex: 1
|
|
273
317
|
},
|
package/lib/commonjs/index.js
CHANGED
|
@@ -51,6 +51,12 @@ Object.defineProperty(exports, "ImpersonateStatusBar", {
|
|
|
51
51
|
return _ImpersonateStatusBar.ImpersonateStatusBar;
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
|
+
Object.defineProperty(exports, "ImpersonateToolView", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return _ImpersonateModal.ImpersonateToolView;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
54
60
|
Object.defineProperty(exports, "UserSearchView", {
|
|
55
61
|
enumerable: true,
|
|
56
62
|
get: function () {
|
package/lib/commonjs/preset.js
CHANGED
|
@@ -3,15 +3,26 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
6
|
+
Object.defineProperty(exports, "IMPERSONATE_ICON_COLOR", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _sharedUi.IMPERSONATE_ICON_COLOR;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "ImpersonateIcon", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _sharedUi.ImpersonateIcon;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
7
18
|
exports.createImpersonateTool = createImpersonateTool;
|
|
8
19
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _reactNative = require("react-native");
|
|
10
20
|
var _ImpersonateModal = require("./impersonate/components/ImpersonateModal");
|
|
11
21
|
var _ImpersonateBanner = require("./impersonate/components/ImpersonateBanner");
|
|
12
22
|
var _impersonateStore = require("./impersonate/utils/impersonateStore");
|
|
13
23
|
var _impersonateListener = require("./impersonate/utils/impersonateListener");
|
|
14
24
|
var _impersonateSyncAdapter = require("./sync/impersonateSyncAdapter");
|
|
25
|
+
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
15
26
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
27
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
28
|
/**
|
|
@@ -84,27 +95,13 @@ async function bootstrapImpersonate() {
|
|
|
84
95
|
// =============================================================================
|
|
85
96
|
|
|
86
97
|
/**
|
|
87
|
-
* Impersonate tool icon
|
|
98
|
+
* Impersonate tool icon — a masked figure with a second identity behind it.
|
|
99
|
+
*
|
|
100
|
+
* The artwork lives in shared/icons/impersonate.json (Buoy Icon Format) and is
|
|
101
|
+
* generated into @buoy-gg/floating-tools-core, so React Native, the desktop
|
|
102
|
+
* dashboard and Flutter all render the same drawing. Edit the JSON, then
|
|
103
|
+
* `pnpm icons`.
|
|
88
104
|
*/
|
|
89
|
-
function ImpersonateIcon({
|
|
90
|
-
size,
|
|
91
|
-
color = "#F59E0B"
|
|
92
|
-
}) {
|
|
93
|
-
const scale = size / 24;
|
|
94
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
95
|
-
style: [styles.iconContainer, {
|
|
96
|
-
width: size,
|
|
97
|
-
height: size
|
|
98
|
-
}],
|
|
99
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
100
|
-
style: [styles.iconText, {
|
|
101
|
-
fontSize: 14 * scale,
|
|
102
|
-
color
|
|
103
|
-
}],
|
|
104
|
-
children: "IMP"
|
|
105
|
-
})
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
105
|
|
|
109
106
|
// =============================================================================
|
|
110
107
|
// WRAPPER COMPONENT
|
|
@@ -194,9 +191,9 @@ function createImpersonateTool(config) {
|
|
|
194
191
|
slot: "both",
|
|
195
192
|
icon: ({
|
|
196
193
|
size
|
|
197
|
-
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(ImpersonateIcon, {
|
|
194
|
+
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ImpersonateIcon, {
|
|
198
195
|
size: size,
|
|
199
|
-
color:
|
|
196
|
+
color: _sharedUi.IMPERSONATE_ICON_COLOR
|
|
200
197
|
}),
|
|
201
198
|
component: props => /*#__PURE__*/(0, _jsxRuntime.jsx)(_ImpersonateModal.ImpersonateModal, {
|
|
202
199
|
...props,
|
|
@@ -220,17 +217,6 @@ function createImpersonateTool(config) {
|
|
|
220
217
|
// STYLES
|
|
221
218
|
// =============================================================================
|
|
222
219
|
|
|
223
|
-
const styles = _reactNative.StyleSheet.create({
|
|
224
|
-
iconContainer: {
|
|
225
|
-
alignItems: "center",
|
|
226
|
-
justifyContent: "center"
|
|
227
|
-
},
|
|
228
|
-
iconText: {
|
|
229
|
-
fontWeight: "700",
|
|
230
|
-
letterSpacing: -0.5
|
|
231
|
-
}
|
|
232
|
-
});
|
|
233
|
-
|
|
234
220
|
// =============================================================================
|
|
235
221
|
// NOTE: No default preset export
|
|
236
222
|
// =============================================================================
|
|
@@ -171,7 +171,7 @@ const styles = StyleSheet.create({
|
|
|
171
171
|
width: 22,
|
|
172
172
|
height: 22,
|
|
173
173
|
borderRadius: 11,
|
|
174
|
-
backgroundColor: "rgba(
|
|
174
|
+
backgroundColor: "rgba(128, 128, 128, 0.16)",
|
|
175
175
|
alignItems: "center",
|
|
176
176
|
justifyContent: "center",
|
|
177
177
|
marginLeft: -4
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
import React, { useState, useCallback, useRef, useEffect } from "react";
|
|
11
11
|
import { View, StyleSheet, TouchableOpacity, TextInput } from "react-native";
|
|
12
|
-
import { JsModal as JsModalBase, TabSelector, ModalHeader, macOSColors, Search, X, TickProvider } from "@buoy-gg/shared-ui";
|
|
12
|
+
import { JsModal as JsModalBase, TabSelector, ModalHeader, buoyColors, macOSColors, Search, X, TickProvider } from "@buoy-gg/shared-ui";
|
|
13
13
|
import { useImpersonate } from "../hooks/useImpersonate";
|
|
14
14
|
import { useAutoClearReactQuery } from "../hooks/useAutoClearReactQuery";
|
|
15
15
|
import { useAutoClearRedux } from "../hooks/useAutoClearRedux";
|
|
@@ -52,7 +52,8 @@ export function ImpersonateModal({
|
|
|
52
52
|
onClearRedux,
|
|
53
53
|
onClearAsyncStorage,
|
|
54
54
|
onClearMMKV,
|
|
55
|
-
showSettingsTab = true
|
|
55
|
+
showSettingsTab = true,
|
|
56
|
+
inline = false
|
|
56
57
|
}) {
|
|
57
58
|
// Select tabs based on showSettingsTab prop
|
|
58
59
|
const tabs = showSettingsTab ? ALL_TABS : TABS_WITHOUT_SETTINGS;
|
|
@@ -220,6 +221,48 @@ export function ImpersonateModal({
|
|
|
220
221
|
if (!visible) {
|
|
221
222
|
return null;
|
|
222
223
|
}
|
|
224
|
+
const body = /*#__PURE__*/_jsxs(View, {
|
|
225
|
+
style: styles.container,
|
|
226
|
+
children: [activeTab === "search" && /*#__PURE__*/_jsx(UserSearchView, {
|
|
227
|
+
currentUser: currentUser,
|
|
228
|
+
isActive: isActive,
|
|
229
|
+
searchQuery: searchQuery,
|
|
230
|
+
searchResults: searchResults,
|
|
231
|
+
isSearching: isSearching,
|
|
232
|
+
searchError: searchError,
|
|
233
|
+
onSelectUser: handleSelectUser,
|
|
234
|
+
onStopImpersonation: stopImpersonation,
|
|
235
|
+
searchAvailable: !!onSearchUsers
|
|
236
|
+
}), activeTab === "history" && /*#__PURE__*/_jsx(ImpersonateHistoryList, {
|
|
237
|
+
history: history,
|
|
238
|
+
currentUserId: currentUser?.id ?? null,
|
|
239
|
+
onSelectUser: handleSelectUser,
|
|
240
|
+
onStopImpersonation: stopImpersonation,
|
|
241
|
+
onRemoveFromHistory: removeFromHistory,
|
|
242
|
+
onClearHistory: clearHistory
|
|
243
|
+
}), activeTab === "settings" && /*#__PURE__*/_jsx(DataNukeSettingsComponent, {
|
|
244
|
+
headerKey: headerKey,
|
|
245
|
+
settings: dataNukeSettings,
|
|
246
|
+
showBanner: showBanner,
|
|
247
|
+
onSave: handleSaveSettings,
|
|
248
|
+
onShowBannerChange: updateShowBanner,
|
|
249
|
+
detectionStatus: detectionStatus
|
|
250
|
+
})]
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
// The ONLY difference between the phone and the desktop dashboard is which
|
|
254
|
+
// shell the header and body go in. Everything above this line is shared.
|
|
255
|
+
if (inline) {
|
|
256
|
+
return /*#__PURE__*/_jsx(TickProvider, {
|
|
257
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
258
|
+
style: styles.inlineRoot,
|
|
259
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
260
|
+
style: styles.inlineHeader,
|
|
261
|
+
children: renderHeaderContent()
|
|
262
|
+
}), body]
|
|
263
|
+
})
|
|
264
|
+
});
|
|
265
|
+
}
|
|
223
266
|
return /*#__PURE__*/_jsx(TickProvider, {
|
|
224
267
|
children: /*#__PURE__*/_jsx(JsModal, {
|
|
225
268
|
visible: visible,
|
|
@@ -232,38 +275,38 @@ export function ImpersonateModal({
|
|
|
232
275
|
enablePersistence: true,
|
|
233
276
|
initialMode: "bottomSheet",
|
|
234
277
|
disableScrollWrapper: true,
|
|
235
|
-
children:
|
|
236
|
-
style: styles.container,
|
|
237
|
-
children: [activeTab === "search" && /*#__PURE__*/_jsx(UserSearchView, {
|
|
238
|
-
currentUser: currentUser,
|
|
239
|
-
isActive: isActive,
|
|
240
|
-
searchQuery: searchQuery,
|
|
241
|
-
searchResults: searchResults,
|
|
242
|
-
isSearching: isSearching,
|
|
243
|
-
searchError: searchError,
|
|
244
|
-
onSelectUser: handleSelectUser,
|
|
245
|
-
onStopImpersonation: stopImpersonation,
|
|
246
|
-
searchAvailable: !!onSearchUsers
|
|
247
|
-
}), activeTab === "history" && /*#__PURE__*/_jsx(ImpersonateHistoryList, {
|
|
248
|
-
history: history,
|
|
249
|
-
currentUserId: currentUser?.id ?? null,
|
|
250
|
-
onSelectUser: handleSelectUser,
|
|
251
|
-
onStopImpersonation: stopImpersonation,
|
|
252
|
-
onRemoveFromHistory: removeFromHistory,
|
|
253
|
-
onClearHistory: clearHistory
|
|
254
|
-
}), activeTab === "settings" && /*#__PURE__*/_jsx(DataNukeSettingsComponent, {
|
|
255
|
-
headerKey: headerKey,
|
|
256
|
-
settings: dataNukeSettings,
|
|
257
|
-
showBanner: showBanner,
|
|
258
|
-
onSave: handleSaveSettings,
|
|
259
|
-
onShowBannerChange: updateShowBanner,
|
|
260
|
-
detectionStatus: detectionStatus
|
|
261
|
-
})]
|
|
262
|
-
})
|
|
278
|
+
children: body
|
|
263
279
|
})
|
|
264
280
|
});
|
|
265
281
|
}
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* The same impersonation tool as `ImpersonateModal`, rendered INLINE for hosts
|
|
285
|
+
* that place tools in a panel rather than a modal. Exists so there is exactly
|
|
286
|
+
* one implementation — the desktop dashboard used to ship its own copy of this
|
|
287
|
+
* component's header and tab router.
|
|
288
|
+
*/
|
|
289
|
+
export function ImpersonateToolView(props) {
|
|
290
|
+
return /*#__PURE__*/_jsx(ImpersonateModal, {
|
|
291
|
+
...props,
|
|
292
|
+
inline: true,
|
|
293
|
+
visible: true,
|
|
294
|
+
onClose: () => {}
|
|
295
|
+
});
|
|
296
|
+
}
|
|
266
297
|
const styles = StyleSheet.create({
|
|
298
|
+
inlineRoot: {
|
|
299
|
+
flex: 1,
|
|
300
|
+
minHeight: 0,
|
|
301
|
+
backgroundColor: buoyColors.base
|
|
302
|
+
},
|
|
303
|
+
inlineHeader: {
|
|
304
|
+
paddingHorizontal: 12,
|
|
305
|
+
paddingVertical: 8,
|
|
306
|
+
borderBottomWidth: 1,
|
|
307
|
+
borderBottomColor: buoyColors.border,
|
|
308
|
+
backgroundColor: buoyColors.card
|
|
309
|
+
},
|
|
267
310
|
container: {
|
|
268
311
|
flex: 1
|
|
269
312
|
},
|
package/lib/module/index.js
CHANGED
|
@@ -38,7 +38,9 @@ export { createImpersonateSyncAdapter, impersonateSyncAdapter } from "./sync/imp
|
|
|
38
38
|
// COMPONENTS (For custom UI implementations)
|
|
39
39
|
// =============================================================================
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
// `ImpersonateToolView` is the same tool rendered inline (header bar + body)
|
|
42
|
+
// instead of inside a JsModal — for hosts that show tools in a panel.
|
|
43
|
+
export { ImpersonateModal, ImpersonateToolView } from "./impersonate/components/ImpersonateModal";
|
|
42
44
|
export { ImpersonateBanner, ImpersonateBannerMinimal } from "./impersonate/components/ImpersonateBanner";
|
|
43
45
|
/**
|
|
44
46
|
* Auto-rendered by FloatingDevTools when this package is installed — the
|
package/lib/module/preset.js
CHANGED
|
@@ -8,13 +8,11 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import React from "react";
|
|
11
|
-
import { View, Text, StyleSheet } from "react-native";
|
|
12
11
|
import { ImpersonateModal } from "./impersonate/components/ImpersonateModal";
|
|
13
12
|
import { ImpersonateBanner } from "./impersonate/components/ImpersonateBanner";
|
|
14
13
|
import { impersonateStore } from "./impersonate/utils/impersonateStore";
|
|
15
14
|
import { impersonateListener } from "./impersonate/utils/impersonateListener";
|
|
16
15
|
import { registerImpersonateSearchUsers } from "./sync/impersonateSyncAdapter";
|
|
17
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
16
|
// =============================================================================
|
|
19
17
|
// EAGER BOOTSTRAP
|
|
20
18
|
// =============================================================================
|
|
@@ -78,27 +76,16 @@ async function bootstrapImpersonate() {
|
|
|
78
76
|
// =============================================================================
|
|
79
77
|
|
|
80
78
|
/**
|
|
81
|
-
* Impersonate tool icon
|
|
79
|
+
* Impersonate tool icon — a masked figure with a second identity behind it.
|
|
80
|
+
*
|
|
81
|
+
* The artwork lives in shared/icons/impersonate.json (Buoy Icon Format) and is
|
|
82
|
+
* generated into @buoy-gg/floating-tools-core, so React Native, the desktop
|
|
83
|
+
* dashboard and Flutter all render the same drawing. Edit the JSON, then
|
|
84
|
+
* `pnpm icons`.
|
|
82
85
|
*/
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}) {
|
|
87
|
-
const scale = size / 24;
|
|
88
|
-
return /*#__PURE__*/_jsx(View, {
|
|
89
|
-
style: [styles.iconContainer, {
|
|
90
|
-
width: size,
|
|
91
|
-
height: size
|
|
92
|
-
}],
|
|
93
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
94
|
-
style: [styles.iconText, {
|
|
95
|
-
fontSize: 14 * scale,
|
|
96
|
-
color
|
|
97
|
-
}],
|
|
98
|
-
children: "IMP"
|
|
99
|
-
})
|
|
100
|
-
});
|
|
101
|
-
}
|
|
86
|
+
import { ImpersonateIcon, IMPERSONATE_ICON_COLOR } from "@buoy-gg/shared-ui";
|
|
87
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
88
|
+
export { ImpersonateIcon, IMPERSONATE_ICON_COLOR };
|
|
102
89
|
|
|
103
90
|
// =============================================================================
|
|
104
91
|
// WRAPPER COMPONENT
|
|
@@ -190,7 +177,7 @@ export function createImpersonateTool(config) {
|
|
|
190
177
|
size
|
|
191
178
|
}) => /*#__PURE__*/_jsx(ImpersonateIcon, {
|
|
192
179
|
size: size,
|
|
193
|
-
color:
|
|
180
|
+
color: IMPERSONATE_ICON_COLOR
|
|
194
181
|
}),
|
|
195
182
|
component: props => /*#__PURE__*/_jsx(ImpersonateModal, {
|
|
196
183
|
...props,
|
|
@@ -214,17 +201,6 @@ export function createImpersonateTool(config) {
|
|
|
214
201
|
// STYLES
|
|
215
202
|
// =============================================================================
|
|
216
203
|
|
|
217
|
-
const styles = StyleSheet.create({
|
|
218
|
-
iconContainer: {
|
|
219
|
-
alignItems: "center",
|
|
220
|
-
justifyContent: "center"
|
|
221
|
-
},
|
|
222
|
-
iconText: {
|
|
223
|
-
fontWeight: "700",
|
|
224
|
-
letterSpacing: -0.5
|
|
225
|
-
}
|
|
226
|
-
});
|
|
227
|
-
|
|
228
204
|
// =============================================================================
|
|
229
205
|
// NOTE: No default preset export
|
|
230
206
|
// =============================================================================
|
|
@@ -6,5 +6,12 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from "react";
|
|
8
8
|
import type { ImpersonateModalProps } from "../types";
|
|
9
|
-
export declare function ImpersonateModal({ visible, onClose, onBack, onMinimize, onSearchUsers, onClearReactQuery, onClearRedux, onClearAsyncStorage, onClearMMKV, showSettingsTab, }: ImpersonateModalProps): React.JSX.Element | null;
|
|
9
|
+
export declare function ImpersonateModal({ visible, onClose, onBack, onMinimize, onSearchUsers, onClearReactQuery, onClearRedux, onClearAsyncStorage, onClearMMKV, showSettingsTab, inline, }: ImpersonateModalProps): React.JSX.Element | null;
|
|
10
|
+
/**
|
|
11
|
+
* The same impersonation tool as `ImpersonateModal`, rendered INLINE for hosts
|
|
12
|
+
* that place tools in a panel rather than a modal. Exists so there is exactly
|
|
13
|
+
* one implementation — the desktop dashboard used to ship its own copy of this
|
|
14
|
+
* component's header and tab router.
|
|
15
|
+
*/
|
|
16
|
+
export declare function ImpersonateToolView(props: Omit<ImpersonateModalProps, "visible" | "onClose" | "inline">): React.JSX.Element;
|
|
10
17
|
//# sourceMappingURL=ImpersonateModal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImpersonateModal.d.ts","sourceRoot":"","sources":["../../../../src/impersonate/components/ImpersonateModal.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAmD,MAAM,OAAO,CAAC;AAiBxE,OAAO,KAAK,EAAE,qBAAqB,EAA0B,MAAM,UAAU,CAAC;AAgC9E,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,OAAO,EACP,MAAM,EACN,UAAU,EACV,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,mBAAmB,EACnB,WAAW,EACX,eAAsB,
|
|
1
|
+
{"version":3,"file":"ImpersonateModal.d.ts","sourceRoot":"","sources":["../../../../src/impersonate/components/ImpersonateModal.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAmD,MAAM,OAAO,CAAC;AAiBxE,OAAO,KAAK,EAAE,qBAAqB,EAA0B,MAAM,UAAU,CAAC;AAgC9E,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,OAAO,EACP,MAAM,EACN,UAAU,EACV,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,mBAAmB,EACnB,WAAW,EACX,eAAsB,EACtB,MAAc,GACf,EAAE,qBAAqB,4BAyPvB;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,IAAI,CAAC,qBAAqB,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC,qBAGrE"}
|
|
@@ -164,6 +164,12 @@ export interface ImpersonateModalProps {
|
|
|
164
164
|
onClearMMKV?: () => void | Promise<void>;
|
|
165
165
|
/** Show the settings tab (default: true) */
|
|
166
166
|
showSettingsTab?: boolean;
|
|
167
|
+
/**
|
|
168
|
+
* Render as a header-bar + body stack instead of inside `JsModal`, for hosts
|
|
169
|
+
* that place tools in a panel rather than a modal (Buoy Desktop). Only the
|
|
170
|
+
* shell differs — header, tabs and state are shared. See `ImpersonateToolView`.
|
|
171
|
+
*/
|
|
172
|
+
inline?: boolean;
|
|
167
173
|
}
|
|
168
174
|
/**
|
|
169
175
|
* Props for the ImpersonateBanner component
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/impersonate/types/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,WAAW,IAAI;IACnB,8EAA8E;IAC9E,EAAE,EAAE,MAAM,CAAC;IACX,yDAAyD;IACzD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2BAA2B;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAA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C;CAC1B"}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
*/
|
|
22
22
|
export { createImpersonateTool, ImpersonateIcon } from "./preset";
|
|
23
23
|
export { createImpersonateSyncAdapter, impersonateSyncAdapter, } from "./sync/impersonateSyncAdapter";
|
|
24
|
-
export { ImpersonateModal } from "./impersonate/components/ImpersonateModal";
|
|
24
|
+
export { ImpersonateModal, ImpersonateToolView, } from "./impersonate/components/ImpersonateModal";
|
|
25
25
|
export { ImpersonateBanner, ImpersonateBannerMinimal, } from "./impersonate/components/ImpersonateBanner";
|
|
26
26
|
/**
|
|
27
27
|
* Auto-rendered by FloatingDevTools when this package is installed — the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAMH,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAMlE,OAAO,EACL,4BAA4B,EAC5B,sBAAsB,GACvB,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAMH,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAMlE,OAAO,EACL,4BAA4B,EAC5B,sBAAsB,GACvB,MAAM,+BAA+B,CAAC;AAQvC,OAAO,EACL,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACL,iBAAiB,EACjB,wBAAwB,GACzB,MAAM,4CAA4C,CAAC;AACpD;;;;GAIG;AACH,OAAO,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,EAAE,gBAAgB,IAAI,yBAAyB,EAAE,MAAM,2CAA2C,CAAC;AAC1G,OAAO,EAAE,sBAAsB,EAAE,MAAM,iDAAiD,CAAC;AACzF,OAAO,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AAMrF,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,YAAY,EACV,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,2CAA2C,CAAC;AAClF,YAAY,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AAM7F,YAAY,EACV,IAAI,EACJ,gBAAgB,IAAI,oBAAoB,EACxC,kBAAkB,EAClB,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,yBAAyB,GAC1B,MAAM,qBAAqB,CAAC;AAM7B;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAExE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,uBAAuB,EACvB,oBAAoB,EACpB,eAAe,EACf,qBAAqB,GACtB,MAAM,yCAAyC,CAAC"}
|
|
@@ -7,14 +7,16 @@
|
|
|
7
7
|
import React from "react";
|
|
8
8
|
import { ImpersonateBanner } from "./impersonate/components/ImpersonateBanner";
|
|
9
9
|
import type { ImpersonateToolConfig } from "./impersonate/types";
|
|
10
|
-
interface IconProps {
|
|
11
|
-
size: number;
|
|
12
|
-
color?: string;
|
|
13
|
-
}
|
|
14
10
|
/**
|
|
15
|
-
* Impersonate tool icon
|
|
11
|
+
* Impersonate tool icon — a masked figure with a second identity behind it.
|
|
12
|
+
*
|
|
13
|
+
* The artwork lives in shared/icons/impersonate.json (Buoy Icon Format) and is
|
|
14
|
+
* generated into @buoy-gg/floating-tools-core, so React Native, the desktop
|
|
15
|
+
* dashboard and Flutter all render the same drawing. Edit the JSON, then
|
|
16
|
+
* `pnpm icons`.
|
|
16
17
|
*/
|
|
17
|
-
|
|
18
|
+
import { ImpersonateIcon, IMPERSONATE_ICON_COLOR } from "@buoy-gg/shared-ui";
|
|
19
|
+
export { ImpersonateIcon, IMPERSONATE_ICON_COLOR };
|
|
18
20
|
/**
|
|
19
21
|
* Create an impersonate tool with custom configuration
|
|
20
22
|
*
|
|
@@ -78,5 +80,4 @@ export declare function createImpersonateTool(config: ImpersonateToolConfig): {
|
|
|
78
80
|
};
|
|
79
81
|
Banner: typeof ImpersonateBanner;
|
|
80
82
|
};
|
|
81
|
-
export {};
|
|
82
83
|
//# sourceMappingURL=preset.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preset.d.ts","sourceRoot":"","sources":["../../src/preset.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"preset.d.ts","sourceRoot":"","sources":["../../src/preset.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAI/E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAyEjE;;;;;;;GAOG;AACH,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAE7E,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,CAAC;AAWnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,qBAAqB;;;;;qBAkC9C;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE;uBAGd;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,MAAM,IAAI,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;QAAC,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;KAAE;;;;;EAmB3H"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buoy-gg/impersonate",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.5",
|
|
4
4
|
"description": "Test your React Native app as any user, role, or flag combo — without logging out or rebuilding. Part of Buoy devtools.",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
],
|
|
27
27
|
"sideEffects": false,
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@buoy-gg/shared-ui": "7.0.
|
|
29
|
+
"@buoy-gg/shared-ui": "7.0.5"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"react": "*",
|