@buoy-gg/shared-ui 7.0.30 → 7.0.32
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/JsModal.js +18 -2
- package/lib/commonjs/JsModal.web.js +7 -4
- package/lib/commonjs/dataViewer/DataTreeActionDock.js +4 -2
- package/lib/commonjs/dataViewer/LiveExplorer.js +930 -0
- package/lib/commonjs/dataViewer/ValueEditModal.js +385 -0
- package/lib/commonjs/dataViewer/index.js +47 -0
- package/lib/commonjs/dataViewer/nestedPath.js +115 -0
- package/lib/commonjs/dataViewer/treeActions.js +3 -2
- package/lib/commonjs/dataViewer/useTreeDraft.js +125 -0
- package/lib/commonjs/dataViewer/useTreeEditor.js +105 -0
- package/lib/commonjs/env/EnvironmentIndicator.js +7 -1
- package/lib/commonjs/hooks/safe-area-impl.js +1 -1
- package/lib/commonjs/index.js +24 -0
- package/lib/commonjs/license/tierLimits.js +14 -0
- package/lib/commonjs/storage/devToolsStorageKeys.js +36 -0
- package/lib/commonjs/sync/toolActionRegistry.js +166 -0
- package/lib/commonjs/sync/toolUiBridge.js +74 -0
- package/lib/commonjs/ui/components/CompactRow.js +4 -0
- package/lib/commonjs/ui/components/EventHistoryViewer/DiffModeTabs.js +9 -1
- package/lib/commonjs/ui/components/ExpandedInfoRow.js +3 -1
- package/lib/commonjs/ui/components/ModalHeader.js +12 -4
- package/lib/commonjs/ui/components/SearchBar.js +5 -109
- package/lib/commonjs/ui/components/ToolButton.js +5 -2
- package/lib/commonjs/ui/components/index.js +13 -0
- package/lib/commonjs/ui/components/windowDrag.js +45 -0
- package/lib/module/JsModal.js +18 -2
- package/lib/module/JsModal.web.js +7 -4
- package/lib/module/dataViewer/DataTreeActionDock.js +4 -2
- package/lib/module/dataViewer/LiveExplorer.js +925 -0
- package/lib/module/dataViewer/ValueEditModal.js +381 -0
- package/lib/module/dataViewer/index.js +10 -1
- package/lib/module/dataViewer/nestedPath.js +109 -0
- package/lib/module/dataViewer/treeActions.js +3 -2
- package/lib/module/dataViewer/useTreeDraft.js +121 -0
- package/lib/module/dataViewer/useTreeEditor.js +101 -0
- package/lib/module/env/EnvironmentIndicator.js +7 -1
- package/lib/module/hooks/safe-area-impl.js +1 -1
- package/lib/module/index.js +2 -0
- package/lib/module/license/tierLimits.js +14 -0
- package/lib/module/storage/devToolsStorageKeys.js +36 -0
- package/lib/module/sync/toolActionRegistry.js +154 -0
- package/lib/module/sync/toolUiBridge.js +68 -0
- package/lib/module/ui/components/CompactRow.js +4 -0
- package/lib/module/ui/components/EventHistoryViewer/DiffModeTabs.js +9 -1
- package/lib/module/ui/components/ExpandedInfoRow.js +3 -1
- package/lib/module/ui/components/ModalHeader.js +12 -4
- package/lib/module/ui/components/SearchBar.js +8 -112
- package/lib/module/ui/components/ToolButton.js +5 -2
- package/lib/module/ui/components/index.js +1 -0
- package/lib/module/ui/components/windowDrag.js +41 -0
- package/lib/typescript/commonjs/JsModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/JsModal.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/dataViewer/DataTreeActionDock.d.ts +6 -1
- package/lib/typescript/commonjs/dataViewer/DataTreeActionDock.d.ts.map +1 -1
- package/lib/typescript/commonjs/dataViewer/LiveExplorer.d.ts +73 -0
- package/lib/typescript/commonjs/dataViewer/LiveExplorer.d.ts.map +1 -0
- package/lib/typescript/commonjs/dataViewer/ValueEditModal.d.ts +40 -0
- package/lib/typescript/commonjs/dataViewer/ValueEditModal.d.ts.map +1 -0
- package/lib/typescript/commonjs/dataViewer/index.d.ts +5 -0
- package/lib/typescript/commonjs/dataViewer/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/dataViewer/nestedPath.d.ts +20 -0
- package/lib/typescript/commonjs/dataViewer/nestedPath.d.ts.map +1 -0
- package/lib/typescript/commonjs/dataViewer/treeActions.d.ts +10 -0
- package/lib/typescript/commonjs/dataViewer/treeActions.d.ts.map +1 -1
- package/lib/typescript/commonjs/dataViewer/useTreeDraft.d.ts +81 -0
- package/lib/typescript/commonjs/dataViewer/useTreeDraft.d.ts.map +1 -0
- package/lib/typescript/commonjs/dataViewer/useTreeEditor.d.ts +52 -0
- package/lib/typescript/commonjs/dataViewer/useTreeEditor.d.ts.map +1 -0
- package/lib/typescript/commonjs/env/EnvironmentIndicator.d.ts.map +1 -1
- package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/commonjs/index.d.ts +2 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/license/tierLimits.d.ts +10 -0
- package/lib/typescript/commonjs/license/tierLimits.d.ts.map +1 -1
- package/lib/typescript/commonjs/storage/devToolsStorageKeys.d.ts +36 -0
- package/lib/typescript/commonjs/storage/devToolsStorageKeys.d.ts.map +1 -1
- package/lib/typescript/commonjs/sync/toolActionRegistry.d.ts +85 -0
- package/lib/typescript/commonjs/sync/toolActionRegistry.d.ts.map +1 -0
- package/lib/typescript/commonjs/sync/toolUiBridge.d.ts +39 -0
- package/lib/typescript/commonjs/sync/toolUiBridge.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/CompactRow.d.ts +5 -1
- package/lib/typescript/commonjs/ui/components/CompactRow.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/EventHistoryViewer/DiffModeTabs.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/EventHistoryViewer/types.d.ts +6 -0
- package/lib/typescript/commonjs/ui/components/EventHistoryViewer/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ExpandedInfoRow.d.ts +7 -1
- package/lib/typescript/commonjs/ui/components/ExpandedInfoRow.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ModalHeader.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/SearchBar.d.ts +1 -3
- package/lib/typescript/commonjs/ui/components/SearchBar.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ToolButton.d.ts +5 -1
- package/lib/typescript/commonjs/ui/components/ToolButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/index.d.ts +1 -0
- package/lib/typescript/commonjs/ui/components/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/windowDrag.d.ts +39 -0
- package/lib/typescript/commonjs/ui/components/windowDrag.d.ts.map +1 -0
- package/lib/typescript/module/JsModal.d.ts.map +1 -1
- package/lib/typescript/module/JsModal.web.d.ts.map +1 -1
- package/lib/typescript/module/dataViewer/DataTreeActionDock.d.ts +6 -1
- package/lib/typescript/module/dataViewer/DataTreeActionDock.d.ts.map +1 -1
- package/lib/typescript/module/dataViewer/LiveExplorer.d.ts +73 -0
- package/lib/typescript/module/dataViewer/LiveExplorer.d.ts.map +1 -0
- package/lib/typescript/module/dataViewer/ValueEditModal.d.ts +40 -0
- package/lib/typescript/module/dataViewer/ValueEditModal.d.ts.map +1 -0
- package/lib/typescript/module/dataViewer/index.d.ts +5 -0
- package/lib/typescript/module/dataViewer/index.d.ts.map +1 -1
- package/lib/typescript/module/dataViewer/nestedPath.d.ts +20 -0
- package/lib/typescript/module/dataViewer/nestedPath.d.ts.map +1 -0
- package/lib/typescript/module/dataViewer/treeActions.d.ts +10 -0
- package/lib/typescript/module/dataViewer/treeActions.d.ts.map +1 -1
- package/lib/typescript/module/dataViewer/useTreeDraft.d.ts +81 -0
- package/lib/typescript/module/dataViewer/useTreeDraft.d.ts.map +1 -0
- package/lib/typescript/module/dataViewer/useTreeEditor.d.ts +52 -0
- package/lib/typescript/module/dataViewer/useTreeEditor.d.ts.map +1 -0
- package/lib/typescript/module/env/EnvironmentIndicator.d.ts.map +1 -1
- package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/module/index.d.ts +2 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/license/tierLimits.d.ts +10 -0
- package/lib/typescript/module/license/tierLimits.d.ts.map +1 -1
- package/lib/typescript/module/storage/devToolsStorageKeys.d.ts +36 -0
- package/lib/typescript/module/storage/devToolsStorageKeys.d.ts.map +1 -1
- package/lib/typescript/module/sync/toolActionRegistry.d.ts +85 -0
- package/lib/typescript/module/sync/toolActionRegistry.d.ts.map +1 -0
- package/lib/typescript/module/sync/toolUiBridge.d.ts +39 -0
- package/lib/typescript/module/sync/toolUiBridge.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/CompactRow.d.ts +5 -1
- package/lib/typescript/module/ui/components/CompactRow.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/EventHistoryViewer/DiffModeTabs.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/EventHistoryViewer/types.d.ts +6 -0
- package/lib/typescript/module/ui/components/EventHistoryViewer/types.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ExpandedInfoRow.d.ts +7 -1
- package/lib/typescript/module/ui/components/ExpandedInfoRow.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ModalHeader.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/SearchBar.d.ts +1 -3
- package/lib/typescript/module/ui/components/SearchBar.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ToolButton.d.ts +5 -1
- package/lib/typescript/module/ui/components/ToolButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/index.d.ts +1 -0
- package/lib/typescript/module/ui/components/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/windowDrag.d.ts +39 -0
- package/lib/typescript/module/ui/components/windowDrag.d.ts.map +1 -0
- package/package.json +4 -4
|
@@ -12,6 +12,7 @@ var _reactNative = require("react-native");
|
|
|
12
12
|
var _react = require("react");
|
|
13
13
|
var _index = require("../../icons/index.js");
|
|
14
14
|
var _nightTheme = require("../night/nightTheme.js");
|
|
15
|
+
var _windowDrag = require("./windowDrag.js");
|
|
15
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
17
|
// Base ModalHeader container component
|
|
17
18
|
// Note: onClose and onMinimize are now handled by WindowControls in JsModal
|
|
@@ -19,8 +20,12 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
19
20
|
function ModalHeader({
|
|
20
21
|
children
|
|
21
22
|
}) {
|
|
23
|
+
// Tagged as a window-drag region for Buoy Desktop (see ./windowDrag): on
|
|
24
|
+
// the desktop dashboard this header is the top edge of a frameless window,
|
|
25
|
+
// so it moves the app like a title bar. Inert everywhere else.
|
|
22
26
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
23
27
|
style: styles.headerContainer,
|
|
28
|
+
..._windowDrag.windowDragProps,
|
|
24
29
|
children: children
|
|
25
30
|
});
|
|
26
31
|
}
|
|
@@ -190,10 +195,13 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
190
195
|
flex: 1,
|
|
191
196
|
gap: 8,
|
|
192
197
|
minHeight: 32,
|
|
193
|
-
paddingLeft: 4
|
|
194
|
-
//
|
|
195
|
-
//
|
|
196
|
-
|
|
198
|
+
paddingLeft: 4
|
|
199
|
+
// No right inset: the traffic-light window controls are cleared
|
|
200
|
+
// VERTICALLY — JsModal's drag-indicator strip owns their band (see
|
|
201
|
+
// WINDOW_CONTROLS_BAND) — so nothing here has to be pushed sideways to
|
|
202
|
+
// stay out from under them. `headerActions` already ends 4pt off the
|
|
203
|
+
// edge, matching the left, and hosts that render this header with no
|
|
204
|
+
// window controls at all (the desktop inline panels) get no phantom gap.
|
|
197
205
|
},
|
|
198
206
|
navigationButton: {
|
|
199
207
|
padding: 4
|
|
@@ -14,8 +14,6 @@ function SearchBar({
|
|
|
14
14
|
onChange,
|
|
15
15
|
onClear,
|
|
16
16
|
placeholder = "Search...",
|
|
17
|
-
suggestions = [],
|
|
18
|
-
recentSearches = [],
|
|
19
17
|
showFilters = false,
|
|
20
18
|
onFilterPress,
|
|
21
19
|
style,
|
|
@@ -26,30 +24,13 @@ function SearchBar({
|
|
|
26
24
|
returnKeyType
|
|
27
25
|
}) {
|
|
28
26
|
const [isFocused, setIsFocused] = (0, _react.useState)(false);
|
|
29
|
-
const [showSuggestions, setShowSuggestions] = (0, _react.useState)(false);
|
|
30
|
-
const blurTimeoutRef = (0, _react.useRef)(null);
|
|
31
|
-
|
|
32
|
-
// Cleanup timeout on unmount
|
|
33
|
-
(0, _react.useEffect)(() => {
|
|
34
|
-
return () => {
|
|
35
|
-
if (blurTimeoutRef.current) {
|
|
36
|
-
clearTimeout(blurTimeoutRef.current);
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
}, []);
|
|
40
27
|
const handleClear = () => {
|
|
41
28
|
onChange("");
|
|
42
29
|
onClear?.();
|
|
43
30
|
};
|
|
44
|
-
|
|
45
|
-
onChange(suggestion);
|
|
46
|
-
setShowSuggestions(false);
|
|
47
|
-
};
|
|
48
|
-
const filteredSuggestions = suggestions.filter(s => s.toLowerCase().includes(value.toLowerCase()));
|
|
49
|
-
const shouldShowSuggestions = isFocused && (filteredSuggestions.length > 0 || value === "" && recentSearches.length > 0);
|
|
50
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
31
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
51
32
|
style: [styles.container, containerStyle],
|
|
52
|
-
children:
|
|
33
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
53
34
|
style: [styles.searchBar, isFocused && styles.searchBarFocused],
|
|
54
35
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index.Search, {
|
|
55
36
|
size: 16,
|
|
@@ -60,22 +41,8 @@ function SearchBar({
|
|
|
60
41
|
placeholderTextColor: _index2.gameUIColors.tertiary,
|
|
61
42
|
value: value,
|
|
62
43
|
onChangeText: onChange,
|
|
63
|
-
onFocus: () =>
|
|
64
|
-
|
|
65
|
-
setShowSuggestions(true);
|
|
66
|
-
},
|
|
67
|
-
onBlur: () => {
|
|
68
|
-
setIsFocused(false);
|
|
69
|
-
// Clear any existing timeout
|
|
70
|
-
if (blurTimeoutRef.current) {
|
|
71
|
-
clearTimeout(blurTimeoutRef.current);
|
|
72
|
-
}
|
|
73
|
-
// Set new timeout with proper cleanup
|
|
74
|
-
blurTimeoutRef.current = setTimeout(() => {
|
|
75
|
-
setShowSuggestions(false);
|
|
76
|
-
blurTimeoutRef.current = null;
|
|
77
|
-
}, 200);
|
|
78
|
-
},
|
|
44
|
+
onFocus: () => setIsFocused(true),
|
|
45
|
+
onBlur: () => setIsFocused(false),
|
|
79
46
|
autoFocus: autoFocus,
|
|
80
47
|
autoCapitalize: "none",
|
|
81
48
|
autoCorrect: false,
|
|
@@ -100,40 +67,7 @@ function SearchBar({
|
|
|
100
67
|
color: _index2.gameUIColors.primary
|
|
101
68
|
})
|
|
102
69
|
})]
|
|
103
|
-
})
|
|
104
|
-
style: styles.suggestionsContainer,
|
|
105
|
-
children: [value === "" && recentSearches.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
106
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
107
|
-
style: styles.suggestionsTitle,
|
|
108
|
-
children: "Recent"
|
|
109
|
-
}), recentSearches.slice(0, 5).map((search, index) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
|
|
110
|
-
style: styles.suggestionItem,
|
|
111
|
-
onPress: () => handleSuggestionPress(search),
|
|
112
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index.Clock, {
|
|
113
|
-
size: 12,
|
|
114
|
-
color: _index2.gameUIColors.tertiary
|
|
115
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
116
|
-
style: styles.suggestionText,
|
|
117
|
-
children: search
|
|
118
|
-
})]
|
|
119
|
-
}, index))]
|
|
120
|
-
}), filteredSuggestions.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
121
|
-
children: [value !== "" && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
122
|
-
style: styles.suggestionsTitle,
|
|
123
|
-
children: "Suggestions"
|
|
124
|
-
}), filteredSuggestions.slice(0, 5).map((suggestion, index) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
|
|
125
|
-
style: styles.suggestionItem,
|
|
126
|
-
onPress: () => handleSuggestionPress(suggestion),
|
|
127
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index.Search, {
|
|
128
|
-
size: 12,
|
|
129
|
-
color: _index2.gameUIColors.tertiary
|
|
130
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
131
|
-
style: styles.suggestionText,
|
|
132
|
-
children: suggestion
|
|
133
|
-
})]
|
|
134
|
-
}, index))]
|
|
135
|
-
})]
|
|
136
|
-
})]
|
|
70
|
+
})
|
|
137
71
|
});
|
|
138
72
|
}
|
|
139
73
|
SearchBar.Quick = function QuickSearch({
|
|
@@ -208,44 +142,6 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
208
142
|
borderRadius: 4,
|
|
209
143
|
backgroundColor: _index2.gameUIColors.primary + "20"
|
|
210
144
|
},
|
|
211
|
-
suggestionsContainer: {
|
|
212
|
-
position: "absolute",
|
|
213
|
-
top: "100%",
|
|
214
|
-
left: 0,
|
|
215
|
-
right: 0,
|
|
216
|
-
backgroundColor: _index2.gameUIColors.panel,
|
|
217
|
-
borderRadius: 8,
|
|
218
|
-
marginTop: 4,
|
|
219
|
-
paddingVertical: 4,
|
|
220
|
-
maxHeight: 200,
|
|
221
|
-
shadowColor: "#000",
|
|
222
|
-
shadowOffset: {
|
|
223
|
-
width: 0,
|
|
224
|
-
height: 2
|
|
225
|
-
},
|
|
226
|
-
shadowOpacity: 0.1,
|
|
227
|
-
shadowRadius: 4,
|
|
228
|
-
elevation: 3
|
|
229
|
-
},
|
|
230
|
-
suggestionsTitle: {
|
|
231
|
-
fontSize: 10,
|
|
232
|
-
fontWeight: "600",
|
|
233
|
-
color: _index2.gameUIColors.secondary,
|
|
234
|
-
textTransform: "uppercase",
|
|
235
|
-
paddingHorizontal: 12,
|
|
236
|
-
paddingVertical: 4
|
|
237
|
-
},
|
|
238
|
-
suggestionItem: {
|
|
239
|
-
flexDirection: "row",
|
|
240
|
-
alignItems: "center",
|
|
241
|
-
paddingHorizontal: 12,
|
|
242
|
-
paddingVertical: 8,
|
|
243
|
-
gap: 8
|
|
244
|
-
},
|
|
245
|
-
suggestionText: {
|
|
246
|
-
fontSize: 13,
|
|
247
|
-
color: _index2.gameUIColors.text
|
|
248
|
-
},
|
|
249
145
|
withFiltersContainer: {
|
|
250
146
|
position: "relative"
|
|
251
147
|
},
|
|
@@ -18,12 +18,15 @@ function ToolButton({
|
|
|
18
18
|
size = "medium",
|
|
19
19
|
disabled = false,
|
|
20
20
|
icon,
|
|
21
|
-
style
|
|
21
|
+
style,
|
|
22
|
+
testID,
|
|
23
|
+
accessibilityLabel
|
|
22
24
|
}) {
|
|
23
25
|
const palette = VARIANTS[variant];
|
|
24
26
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
|
|
25
27
|
accessibilityRole: "button",
|
|
26
|
-
accessibilityLabel: label,
|
|
28
|
+
accessibilityLabel: accessibilityLabel ?? label,
|
|
29
|
+
testID: testID,
|
|
27
30
|
onPress: onPress,
|
|
28
31
|
disabled: disabled,
|
|
29
32
|
style: [styles.base, size === "small" ? styles.small : styles.medium, {
|
|
@@ -339,17 +339,30 @@ Object.defineProperty(exports, "WindowControls", {
|
|
|
339
339
|
return _WindowControls.WindowControls;
|
|
340
340
|
}
|
|
341
341
|
});
|
|
342
|
+
Object.defineProperty(exports, "noWindowDragProps", {
|
|
343
|
+
enumerable: true,
|
|
344
|
+
get: function () {
|
|
345
|
+
return _windowDrag.noWindowDragProps;
|
|
346
|
+
}
|
|
347
|
+
});
|
|
342
348
|
Object.defineProperty(exports, "setExpandableWindowControls", {
|
|
343
349
|
enumerable: true,
|
|
344
350
|
get: function () {
|
|
345
351
|
return _WindowControls.setExpandableWindowControls;
|
|
346
352
|
}
|
|
347
353
|
});
|
|
354
|
+
Object.defineProperty(exports, "windowDragProps", {
|
|
355
|
+
enumerable: true,
|
|
356
|
+
get: function () {
|
|
357
|
+
return _windowDrag.windowDragProps;
|
|
358
|
+
}
|
|
359
|
+
});
|
|
348
360
|
var _BackButton = require("./BackButton.js");
|
|
349
361
|
var _ValueTypeBadge = require("./ValueTypeBadge.js");
|
|
350
362
|
var _StorageTypeBadge = require("./StorageTypeBadge.js");
|
|
351
363
|
var _CopyButton = require("./CopyButton.js");
|
|
352
364
|
var _ModalHeader = require("./ModalHeader.js");
|
|
365
|
+
var _windowDrag = require("./windowDrag.js");
|
|
353
366
|
var _ModalHintBanner = require("./ModalHintBanner.js");
|
|
354
367
|
var _ClipboardHintBanner = require("./ClipboardHintBanner.js");
|
|
355
368
|
var _SectionHeader = require("./SectionHeader.js");
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.windowDragProps = exports.noWindowDragProps = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Desktop window-drag tagging for tool headers.
|
|
9
|
+
*
|
|
10
|
+
* Buoy Desktop runs a FRAMELESS Electron window: nothing but a
|
|
11
|
+
* `-webkit-app-region: drag` region moves it. The sidebar's own header carries
|
|
12
|
+
* that duty, but with the sidebar open the content column has no strip of its
|
|
13
|
+
* own — the TOOL's header is the top edge of the window there, so grabbing it
|
|
14
|
+
* looked like it should move the app and didn't.
|
|
15
|
+
*
|
|
16
|
+
* These spread onto a `View` and mark the region for the desktop stylesheet
|
|
17
|
+
* (`apps/desktop/src/index.css`, `[data-buoy-window-drag]`). react-native-web
|
|
18
|
+
* turns `dataSet` into `data-*` attributes; React Native drops the prop on
|
|
19
|
+
* device, so this is INERT on mobile — the styling that gives it meaning only
|
|
20
|
+
* exists in the desktop app.
|
|
21
|
+
*
|
|
22
|
+
* `dataSet` is a react-native-web extension that RN's own prop types don't
|
|
23
|
+
* declare; spreading it (rather than passing it inline) is what keeps
|
|
24
|
+
* TypeScript quiet, and puts the explanation here once instead of a
|
|
25
|
+
* `@ts-ignore` at every header.
|
|
26
|
+
*
|
|
27
|
+
* A drag region SWALLOWS mouse events, so every control inside one has to opt
|
|
28
|
+
* back out or it stops being clickable. The desktop app does that for itself:
|
|
29
|
+
* react-native-web renders touchables as featureless `<div>`s, so it finds
|
|
30
|
+
* them at runtime by their `cursor: pointer` rather than by any selector —
|
|
31
|
+
* see apps/desktop/src/windowDragRegions.ts. `noWindowDragProps` is here for
|
|
32
|
+
* a region that must opt out regardless of how it looks.
|
|
33
|
+
*/
|
|
34
|
+
const windowDragProps = exports.windowDragProps = {
|
|
35
|
+
dataSet: {
|
|
36
|
+
buoyWindowDrag: "1"
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** Opt a subtree back out of an enclosing {@link windowDragProps} region. */
|
|
41
|
+
const noWindowDragProps = exports.noWindowDragProps = {
|
|
42
|
+
dataSet: {
|
|
43
|
+
buoyNoDrag: "1"
|
|
44
|
+
}
|
|
45
|
+
};
|
package/lib/module/JsModal.js
CHANGED
|
@@ -50,6 +50,16 @@ const FLOATING_HEIGHT = 500;
|
|
|
50
50
|
const FLOATING_MIN_WIDTH = SCREEN.width * 0.25; // 1/4 of screen width
|
|
51
51
|
const FLOATING_MIN_HEIGHT = 80; // Just a bit more than header height (60px header + 20px content)
|
|
52
52
|
|
|
53
|
+
/**
|
|
54
|
+
* Vertical band the absolutely-positioned window controls occupy at the top
|
|
55
|
+
* right of the chrome: `windowControlsContainer` top 4 + the expandable
|
|
56
|
+
* trigger's 2pt padding + a 12pt dot + 2 = 20. The drag-indicator strip above
|
|
57
|
+
* custom header content reserves exactly this, which is what lets a tool's
|
|
58
|
+
* header row below run the FULL width instead of buying its clearance with a
|
|
59
|
+
* right inset (that inset read as a hole on the right of every tool's nav).
|
|
60
|
+
*/
|
|
61
|
+
const WINDOW_CONTROLS_BAND = 20;
|
|
62
|
+
|
|
53
63
|
// ============================================================================
|
|
54
64
|
// STORAGE - Modal state persistence with AsyncStorage
|
|
55
65
|
// ============================================================================
|
|
@@ -1572,9 +1582,15 @@ const styles = StyleSheet.create({
|
|
|
1572
1582
|
paddingVertical: 8,
|
|
1573
1583
|
backgroundColor: "transparent"
|
|
1574
1584
|
},
|
|
1585
|
+
/**
|
|
1586
|
+
* With custom header content the pill shares the top band with the window
|
|
1587
|
+
* controls, so the strip claims that band (and centres the pill in it)
|
|
1588
|
+
* rather than the header row below paying for the clearance sideways.
|
|
1589
|
+
*/
|
|
1575
1590
|
dragIndicatorContainerCustom: {
|
|
1576
|
-
|
|
1577
|
-
|
|
1591
|
+
minHeight: WINDOW_CONTROLS_BAND,
|
|
1592
|
+
justifyContent: "center",
|
|
1593
|
+
paddingVertical: 0,
|
|
1578
1594
|
backgroundColor: "transparent"
|
|
1579
1595
|
},
|
|
1580
1596
|
dragIndicator: {
|
|
@@ -485,10 +485,13 @@ const DragIndicator = /*#__PURE__*/memo(function DragIndicator({
|
|
|
485
485
|
flexDirection: "column",
|
|
486
486
|
alignItems: "center",
|
|
487
487
|
position: "relative",
|
|
488
|
-
// native dragIndicatorContainer: paddingVertical 8;
|
|
489
|
-
//
|
|
490
|
-
|
|
491
|
-
|
|
488
|
+
// native dragIndicatorContainer: paddingVertical 8; custom variant
|
|
489
|
+
// claims the 20pt window-controls band (native WINDOW_CONTROLS_BAND)
|
|
490
|
+
// so the header row below can run the full width.
|
|
491
|
+
justifyContent: hasCustomContent ? "center" : undefined,
|
|
492
|
+
minHeight: hasCustomContent ? 20 : undefined,
|
|
493
|
+
paddingTop: hasCustomContent ? 0 : 8,
|
|
494
|
+
paddingBottom: hasCustomContent ? 0 : 8,
|
|
492
495
|
backgroundColor: "transparent"
|
|
493
496
|
},
|
|
494
497
|
children: [/*#__PURE__*/_jsx("div", {
|
|
@@ -107,10 +107,12 @@ export function DataTreeActionDock({
|
|
|
107
107
|
onEdit,
|
|
108
108
|
onSelectPath,
|
|
109
109
|
onEditValue,
|
|
110
|
-
containersEditable = true
|
|
110
|
+
containersEditable = true,
|
|
111
|
+
rootEntriesLocked = false
|
|
111
112
|
}) {
|
|
112
113
|
const actions = treeActionsFor(root, selection, {
|
|
113
|
-
containersEditable
|
|
114
|
+
containersEditable,
|
|
115
|
+
rootEntriesLocked
|
|
114
116
|
});
|
|
115
117
|
const has = selection != null;
|
|
116
118
|
const run = action => {
|