@buoy-gg/network 7.0.15 → 7.0.16

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.
Files changed (107) hide show
  1. package/lib/commonjs/index.web.js +395 -0
  2. package/lib/commonjs/network/components/DataViewer.web.js +879 -0
  3. package/lib/commonjs/network/components/NetworkCopyScreen.web.js +48 -0
  4. package/lib/commonjs/network/components/NetworkCopySettingsView.web.js +1242 -0
  5. package/lib/commonjs/network/components/NetworkDetailScreen.web.js +101 -0
  6. package/lib/commonjs/network/components/NetworkDetailStepper.web.js +296 -0
  7. package/lib/commonjs/network/components/NetworkEventDetailView.web.js +1498 -0
  8. package/lib/commonjs/network/components/NetworkEventItemCompact.web.js +802 -0
  9. package/lib/commonjs/network/components/NetworkFilterScreen.web.js +55 -0
  10. package/lib/commonjs/network/components/NetworkFilterViewV3.web.js +1310 -0
  11. package/lib/commonjs/network/components/NetworkHeaderLive.web.js +604 -0
  12. package/lib/commonjs/network/components/NetworkListScreen.js +2 -1
  13. package/lib/commonjs/network/components/NetworkListScreen.web.js +607 -0
  14. package/lib/commonjs/network/components/NetworkModal.js +12 -3
  15. package/lib/commonjs/network/components/NetworkNumberPrompt.web.js +232 -0
  16. package/lib/commonjs/network/components/NetworkOverrideEditor.web.js +942 -0
  17. package/lib/commonjs/network/components/NetworkOverrideHeaderButton.web.js +133 -0
  18. package/lib/commonjs/network/components/NetworkOverridesButton.web.js +143 -0
  19. package/lib/commonjs/network/components/NetworkOverridesScreen.js +160 -126
  20. package/lib/commonjs/network/components/NetworkOverridesScreen.web.js +830 -0
  21. package/lib/commonjs/network/components/NetworkSavedScreen.web.js +459 -0
  22. package/lib/commonjs/network/components/response-editor/Explorer.web.js +1136 -0
  23. package/lib/commonjs/network/hooks/useNetworkEventList.js +12 -2
  24. package/lib/commonjs/network/overrides/applyToXhr.js +276 -15
  25. package/lib/commonjs/network/utils/generateNetworkCopyText.js +32 -5
  26. package/lib/commonjs/network/utils/networkEventStore.js +12 -4
  27. package/lib/commonjs/network/utils/networkListener.js +1 -16
  28. package/lib/module/index.web.js +81 -0
  29. package/lib/module/network/components/DataViewer.web.js +875 -0
  30. package/lib/module/network/components/NetworkCopyScreen.web.js +44 -0
  31. package/lib/module/network/components/NetworkCopySettingsView.web.js +1237 -0
  32. package/lib/module/network/components/NetworkDetailScreen.web.js +97 -0
  33. package/lib/module/network/components/NetworkDetailStepper.web.js +294 -0
  34. package/lib/module/network/components/NetworkEventDetailView.web.js +1496 -0
  35. package/lib/module/network/components/NetworkEventItemCompact.web.js +800 -0
  36. package/lib/module/network/components/NetworkFilterScreen.web.js +51 -0
  37. package/lib/module/network/components/NetworkFilterViewV3.web.js +1306 -0
  38. package/lib/module/network/components/NetworkHeaderLive.web.js +598 -0
  39. package/lib/module/network/components/NetworkListScreen.js +2 -1
  40. package/lib/module/network/components/NetworkListScreen.web.js +605 -0
  41. package/lib/module/network/components/NetworkModal.js +12 -3
  42. package/lib/module/network/components/NetworkNumberPrompt.web.js +230 -0
  43. package/lib/module/network/components/NetworkOverrideEditor.web.js +939 -0
  44. package/lib/module/network/components/NetworkOverrideHeaderButton.web.js +131 -0
  45. package/lib/module/network/components/NetworkOverridesButton.web.js +141 -0
  46. package/lib/module/network/components/NetworkOverridesScreen.js +161 -127
  47. package/lib/module/network/components/NetworkOverridesScreen.web.js +826 -0
  48. package/lib/module/network/components/NetworkSavedScreen.web.js +457 -0
  49. package/lib/module/network/components/response-editor/Explorer.web.js +1133 -0
  50. package/lib/module/network/hooks/useNetworkEventList.js +12 -2
  51. package/lib/module/network/overrides/applyToXhr.js +275 -15
  52. package/lib/module/network/utils/generateNetworkCopyText.js +28 -1
  53. package/lib/module/network/utils/networkEventStore.js +12 -4
  54. package/lib/module/network/utils/networkListener.js +1 -16
  55. package/lib/typescript/index.web.d.ts +56 -0
  56. package/lib/typescript/index.web.d.ts.map +1 -0
  57. package/lib/typescript/network/components/DataViewer.web.d.ts +78 -0
  58. package/lib/typescript/network/components/DataViewer.web.d.ts.map +1 -0
  59. package/lib/typescript/network/components/NetworkCopyScreen.web.d.ts +27 -0
  60. package/lib/typescript/network/components/NetworkCopyScreen.web.d.ts.map +1 -0
  61. package/lib/typescript/network/components/NetworkCopySettingsView.web.d.ts +68 -0
  62. package/lib/typescript/network/components/NetworkCopySettingsView.web.d.ts.map +1 -0
  63. package/lib/typescript/network/components/NetworkDetailScreen.web.d.ts +45 -0
  64. package/lib/typescript/network/components/NetworkDetailScreen.web.d.ts.map +1 -0
  65. package/lib/typescript/network/components/NetworkDetailStepper.web.d.ts +40 -0
  66. package/lib/typescript/network/components/NetworkDetailStepper.web.d.ts.map +1 -0
  67. package/lib/typescript/network/components/NetworkEventDetailView.web.d.ts +67 -0
  68. package/lib/typescript/network/components/NetworkEventDetailView.web.d.ts.map +1 -0
  69. package/lib/typescript/network/components/NetworkEventItemCompact.web.d.ts +58 -0
  70. package/lib/typescript/network/components/NetworkEventItemCompact.web.d.ts.map +1 -0
  71. package/lib/typescript/network/components/NetworkFilterScreen.web.d.ts +28 -0
  72. package/lib/typescript/network/components/NetworkFilterScreen.web.d.ts.map +1 -0
  73. package/lib/typescript/network/components/NetworkFilterViewV3.web.d.ts +74 -0
  74. package/lib/typescript/network/components/NetworkFilterViewV3.web.d.ts.map +1 -0
  75. package/lib/typescript/network/components/NetworkHeaderLive.web.d.ts +112 -0
  76. package/lib/typescript/network/components/NetworkHeaderLive.web.d.ts.map +1 -0
  77. package/lib/typescript/network/components/NetworkListScreen.d.ts.map +1 -1
  78. package/lib/typescript/network/components/NetworkListScreen.web.d.ts +63 -0
  79. package/lib/typescript/network/components/NetworkListScreen.web.d.ts.map +1 -0
  80. package/lib/typescript/network/components/NetworkModal.d.ts.map +1 -1
  81. package/lib/typescript/network/components/NetworkNumberPrompt.web.d.ts +38 -0
  82. package/lib/typescript/network/components/NetworkNumberPrompt.web.d.ts.map +1 -0
  83. package/lib/typescript/network/components/NetworkOverrideEditor.web.d.ts +43 -0
  84. package/lib/typescript/network/components/NetworkOverrideEditor.web.d.ts.map +1 -0
  85. package/lib/typescript/network/components/NetworkOverrideHeaderButton.web.d.ts +32 -0
  86. package/lib/typescript/network/components/NetworkOverrideHeaderButton.web.d.ts.map +1 -0
  87. package/lib/typescript/network/components/NetworkOverridesButton.web.d.ts +26 -0
  88. package/lib/typescript/network/components/NetworkOverridesButton.web.d.ts.map +1 -0
  89. package/lib/typescript/network/components/NetworkOverridesScreen.d.ts +9 -0
  90. package/lib/typescript/network/components/NetworkOverridesScreen.d.ts.map +1 -1
  91. package/lib/typescript/network/components/NetworkOverridesScreen.web.d.ts +69 -0
  92. package/lib/typescript/network/components/NetworkOverridesScreen.web.d.ts.map +1 -0
  93. package/lib/typescript/network/components/NetworkSavedScreen.web.d.ts +67 -0
  94. package/lib/typescript/network/components/NetworkSavedScreen.web.d.ts.map +1 -0
  95. package/lib/typescript/network/components/response-editor/Explorer.web.d.ts +56 -0
  96. package/lib/typescript/network/components/response-editor/Explorer.web.d.ts.map +1 -0
  97. package/lib/typescript/network/hooks/useNetworkEventList.d.ts +10 -0
  98. package/lib/typescript/network/hooks/useNetworkEventList.d.ts.map +1 -1
  99. package/lib/typescript/network/overrides/__tests__/applyToXhr.test.d.ts.map +1 -1
  100. package/lib/typescript/network/overrides/applyToXhr.d.ts +40 -14
  101. package/lib/typescript/network/overrides/applyToXhr.d.ts.map +1 -1
  102. package/lib/typescript/network/utils/generateNetworkCopyText.d.ts +34 -1
  103. package/lib/typescript/network/utils/generateNetworkCopyText.d.ts.map +1 -1
  104. package/lib/typescript/network/utils/networkEventStore.d.ts.map +1 -1
  105. package/lib/typescript/network/utils/networkListener.d.ts +0 -1
  106. package/lib/typescript/network/utils/networkListener.d.ts.map +1 -1
  107. package/package.json +2 -2
@@ -0,0 +1,1136 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = Explorer;
7
+ var _react = require("react");
8
+ var _DataViewer = require("../DataViewer.web");
9
+ var _updateNestedDataByPath = require("./updateNestedDataByPath");
10
+ var _deleteNestedDataByPath = require("./deleteNestedDataByPath");
11
+ var _editorContext = require("./editorContext");
12
+ var _jsxRuntime = require("react/jsx-runtime");
13
+ /**
14
+ * Explorer.web — DOM twin of response-editor/Explorer.tsx (the response-body
15
+ * tree: preview and editor as ONE surface, ported from the React Query tool's
16
+ * Explorer). Same recursion, same chunked pages (CHUNK_SIZE 100), same
17
+ * local-input-state race guard, and the same landing spot for edits: the
18
+ * `onChange` from `ResponseEditorContext`.
19
+ *
20
+ * REUSED, not forked (all platform-free):
21
+ * - `updateNestedDataByPath` / `deleteNestedDataByPath` — the pure tree ops.
22
+ * - `editorContext` (`ResponseEditorContext` / `useResponseEditor`) — the
23
+ * root-document + onChange seam.
24
+ * - `CopyButton` — the DOM twin already ported in DataViewer.web (F3), the
25
+ * same way native Explorer reuses shared-ui's CopyButton.
26
+ *
27
+ * NOTE on DataViewer.web: native Explorer and native VirtualizedDataExplorer
28
+ * are SEPARATE trees (different lineage — this one is the React Query port,
29
+ * the viewer is the flat-row virtualized explorer) sharing only the copy
30
+ * button and `displayValue`. The web twins mirror that exact relationship:
31
+ * this file recurses like native Explorer, and shares DataViewer.web's
32
+ * CopyButton rather than its flatten pipeline.
33
+ *
34
+ * shared-ui RN chrome is replicated as DOM with provenance (web consumers
35
+ * resolve `@buoy-gg/shared-ui` to a minimal shim):
36
+ * - `buoyColors` — inlined verbatim subset from
37
+ * shared/src/ui/gameUI/constants/gameUIColors.ts.
38
+ * - Icons — inline lucide SVGs (shared-ui's icons are lucide re-exports).
39
+ * - `CyberpunkInput` — inlined DOM twin below, values from
40
+ * shared/src/dataViewer/CyberpunkInput.tsx.
41
+ *
42
+ * Intentional deviations (all logged):
43
+ * - CyberpunkInput's RN `Animated` glitch loops (flicker overlay, x/y jitter,
44
+ * scale pulse) are not ported — focus still swaps the border/label/corner
45
+ * accents to the primary color, which is the state the animation decorates.
46
+ * - `displayValue`'s minimal-SuperJSON serialization → JSON.stringify (same
47
+ * deviation DataViewer.web logs; identical output for JSON payloads).
48
+ * - `hitSlop` has no DOM equivalent — buttons keep their natural hit areas.
49
+ *
50
+ * @platform React DOM Web
51
+ */
52
+
53
+ // Stable constants to prevent re-renders — native Explorer, verbatim.
54
+ const CHUNK_SIZE = 100;
55
+ const EXPANDER_SIZE = 12;
56
+
57
+ // =============================
58
+ // Native palette (provenance)
59
+ // =============================
60
+
61
+ /** buoyColors subset — shared/src/ui/gameUI/constants/gameUIColors.ts, verbatim. */
62
+ const buoyColors = {
63
+ card: "#1A1A1A",
64
+ text: "#E0E0E0",
65
+ textSecondary: "#A0A0A0",
66
+ textMuted: "#888888",
67
+ primary: "#20C997",
68
+ warning: "#FFA94D",
69
+ error: "#EF4444"
70
+ };
71
+
72
+ // =============================
73
+ // Inline lucide icons (shared-ui icons are lucide re-exports)
74
+ // =============================
75
+
76
+ function Svg({
77
+ size = 14,
78
+ color = "currentColor",
79
+ strokeWidth = 2,
80
+ children
81
+ }) {
82
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", {
83
+ width: size,
84
+ height: size,
85
+ viewBox: "0 0 24 24",
86
+ fill: "none",
87
+ stroke: color,
88
+ strokeWidth: strokeWidth,
89
+ strokeLinecap: "round",
90
+ strokeLinejoin: "round",
91
+ style: {
92
+ flexShrink: 0,
93
+ display: "block"
94
+ },
95
+ children: children
96
+ });
97
+ }
98
+ const ChevronRight = p => /*#__PURE__*/(0, _jsxRuntime.jsx)(Svg, {
99
+ ...p,
100
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
101
+ d: "m9 18 6-6-6-6"
102
+ })
103
+ });
104
+ const ChevronDown = p => /*#__PURE__*/(0, _jsxRuntime.jsx)(Svg, {
105
+ ...p,
106
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
107
+ d: "m6 9 6 6 6-6"
108
+ })
109
+ });
110
+ const ChevronUp = p => /*#__PURE__*/(0, _jsxRuntime.jsx)(Svg, {
111
+ ...p,
112
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
113
+ d: "m18 15-6-6-6 6"
114
+ })
115
+ });
116
+ const Trash = p => /*#__PURE__*/(0, _jsxRuntime.jsxs)(Svg, {
117
+ ...p,
118
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
119
+ d: "M3 6h18"
120
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
121
+ d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"
122
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
123
+ d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"
124
+ })]
125
+ });
126
+
127
+ /** displayValue twin — JSON.stringify-based, see the deviations log. */
128
+ function displayValue(value) {
129
+ if (value === undefined) return "undefined";
130
+ if (typeof value === "bigint") return `${value}n`;
131
+ if (typeof value === "function") return String(value).slice(0, 50);
132
+ if (typeof value === "symbol") return String(value);
133
+ try {
134
+ return JSON.stringify(value) ?? String(value);
135
+ } catch {
136
+ return String(value);
137
+ }
138
+ }
139
+
140
+ // Optimized chunking function moved to module scope — native, verbatim.
141
+ const chunkArray = (array, size = CHUNK_SIZE) => {
142
+ if (size < 1 || array.length === 0) return [];
143
+ const result = [];
144
+ for (let i = 0; i < array.length; i += size) {
145
+ result.push(array.slice(i, i + size));
146
+ }
147
+ return result;
148
+ };
149
+
150
+ // Memoized Expander component — native styles.expanderIcon(+Main).
151
+ const Expander = /*#__PURE__*/(0, _react.memo)(({
152
+ expanded,
153
+ isFocused = false,
154
+ isMain = false
155
+ }) => {
156
+ const color = isFocused ? buoyColors.primary : isMain ? buoyColors.text : buoyColors.textSecondary;
157
+ const Chevron = expanded ? ChevronDown : ChevronRight;
158
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
159
+ style: {
160
+ ...styles.expanderIcon,
161
+ ...(isMain ? styles.expanderIconMain : null)
162
+ },
163
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Chevron, {
164
+ size: isMain ? 14 : EXPANDER_SIZE,
165
+ color: color,
166
+ strokeWidth: 2.5
167
+ })
168
+ });
169
+ });
170
+ Expander.displayName = "Expander";
171
+
172
+ // Local wrapper for the shared CopyButton — same backward-compat shim as
173
+ // native (28×28 card-fill box; focused = primary ring + tint).
174
+ const CopyButton = /*#__PURE__*/(0, _react.memo)(({
175
+ value,
176
+ isFocused = false
177
+ }) => {
178
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_DataViewer.CopyButton, {
179
+ value: value,
180
+ size: 14,
181
+ buttonStyle: isFocused ? {
182
+ ...styles.buttonStyle,
183
+ ...styles.buttonStyleFocused
184
+ } : styles.buttonStyle
185
+ });
186
+ });
187
+ CopyButton.displayName = "CopyButton";
188
+
189
+ // Memoized DeleteItemButton component — native, verbatim behavior.
190
+ const DeleteItemButton = /*#__PURE__*/(0, _react.memo)(({
191
+ dataPath,
192
+ isFocused = false
193
+ }) => {
194
+ const editor = (0, _editorContext.useResponseEditor)();
195
+ const handleDelete = (0, _react.useCallback)(() => {
196
+ if (!editor) return;
197
+ editor.onChange((0, _deleteNestedDataByPath.deleteNestedDataByPath)(editor.root, dataPath));
198
+ }, [editor, dataPath]);
199
+ if (!editor) return null;
200
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
201
+ type: "button",
202
+ onClick: handleDelete,
203
+ style: {
204
+ ...styles.deleteButton,
205
+ ...(isFocused ? styles.deleteButtonFocused : null)
206
+ },
207
+ "aria-label": "Delete item",
208
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Trash, {
209
+ size: 14,
210
+ strokeWidth: 2,
211
+ color: isFocused ? buoyColors.error : buoyColors.error + "CC"
212
+ })
213
+ });
214
+ });
215
+ DeleteItemButton.displayName = "DeleteItemButton";
216
+
217
+ // Memoized ClearArrayButton component — native, verbatim behavior.
218
+ const ClearArrayButton = /*#__PURE__*/(0, _react.memo)(({
219
+ dataPath,
220
+ isFocused = false
221
+ }) => {
222
+ const editor = (0, _editorContext.useResponseEditor)();
223
+ const handleClear = (0, _react.useCallback)(() => {
224
+ if (!editor) return;
225
+ editor.onChange((0, _updateNestedDataByPath.updateNestedDataByPath)(editor.root, dataPath, []));
226
+ }, [editor, dataPath]);
227
+ if (!editor) return null;
228
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
229
+ type: "button",
230
+ style: {
231
+ ...styles.clearButton,
232
+ ...(isFocused ? styles.clearButtonFocused : null)
233
+ },
234
+ "aria-label": "Remove all items",
235
+ onClick: handleClear,
236
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
237
+ style: {
238
+ ...styles.clearButtonText,
239
+ color: isFocused ? buoyColors.warning : buoyColors.warning + "CC"
240
+ },
241
+ children: "[]"
242
+ })
243
+ });
244
+ });
245
+ ClearArrayButton.displayName = "ClearArrayButton";
246
+
247
+ // ToggleValueButton — not memoized (same reasoning as native: the parent
248
+ // passes a fresh dataPath array each render, which defeats memo anyway).
249
+ function ToggleValueButton({
250
+ dataPath,
251
+ value,
252
+ itemsDeletable
253
+ }) {
254
+ const editor = (0, _editorContext.useResponseEditor)();
255
+ const handleClick = (0, _react.useCallback)(() => {
256
+ if (!editor) return;
257
+ const currentValue = typeof value === "boolean" ? value : false;
258
+ editor.onChange((0, _updateNestedDataByPath.updateNestedDataByPath)(editor.root, dataPath, !currentValue));
259
+ }, [editor, dataPath, value]);
260
+ const handleDelete = (0, _react.useCallback)(() => {
261
+ if (!editor) return;
262
+ editor.onChange((0, _deleteNestedDataByPath.deleteNestedDataByPath)(editor.root, dataPath));
263
+ }, [editor, dataPath]);
264
+ if (!editor) return null;
265
+
266
+ // Pre-compute styles based on value state — native, verbatim.
267
+ const badgeStyle = value ? styles.toggleBadgeTrue : styles.toggleBadgeFalse;
268
+ const textStyle = value ? styles.toggleTextTrue : styles.toggleTextFalse;
269
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
270
+ role: "button",
271
+ tabIndex: 0,
272
+ style: styles.modernToggleButton,
273
+ onClick: handleClick,
274
+ onKeyDown: e => {
275
+ if (e.key === "Enter" || e.key === " ") handleClick();
276
+ },
277
+ "aria-label": value ? "Set to false" : "Set to true",
278
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
279
+ style: {
280
+ ...styles.toggleBadge,
281
+ ...badgeStyle
282
+ },
283
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
284
+ style: {
285
+ ...styles.toggleBadgeText,
286
+ ...textStyle
287
+ },
288
+ children: value ? "TRUE" : "FALSE"
289
+ })
290
+ }), itemsDeletable && /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
291
+ type: "button",
292
+ onClick: e => {
293
+ // The delete button nests inside the toggle's press target on
294
+ // native too; stop the toggle from also firing.
295
+ e.stopPropagation();
296
+ handleDelete();
297
+ },
298
+ style: styles.deleteButtonInToggle,
299
+ "aria-label": "Delete item",
300
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Trash, {
301
+ size: 14,
302
+ strokeWidth: 2,
303
+ color: buoyColors.error + "CC"
304
+ })
305
+ })]
306
+ });
307
+ }
308
+
309
+ // =============================
310
+ // CyberpunkInput twin (shared/src/dataViewer/CyberpunkInput.tsx)
311
+ // =============================
312
+
313
+ /**
314
+ * The inline value input: uppercase mono label, bordered field, optional
315
+ * number steppers and delete button, corner accents. Focus swaps everything to
316
+ * the primary color — the RN glitch animation is not ported (see the
317
+ * deviations log).
318
+ */
319
+ function CyberpunkInputWeb({
320
+ label,
321
+ value,
322
+ isNumber,
323
+ onChangeText,
324
+ onFocus,
325
+ onBlur,
326
+ showNumberControls = false,
327
+ onIncrement,
328
+ onDecrement,
329
+ showDeleteButton = false,
330
+ onDelete,
331
+ "aria-label": ariaLabel
332
+ }) {
333
+ const [isFocused, setIsFocused] = (0, _react.useState)(false);
334
+ const cornerStyle = corner => ({
335
+ ...styles.cornerAccent,
336
+ ...corner,
337
+ ...(isFocused ? styles.cornerAccentFocused : null)
338
+ });
339
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
340
+ style: styles.cyberContainer,
341
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
342
+ style: styles.cyberRow,
343
+ children: [label ? /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
344
+ style: {
345
+ ...styles.cyberLabel,
346
+ ...(isFocused ? styles.cyberLabelFocused : null)
347
+ },
348
+ children: label.toUpperCase()
349
+ }) : null, /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
350
+ style: {
351
+ ...styles.cyberInputContainer,
352
+ opacity: isFocused ? 1 : 0.6,
353
+ borderColor: isFocused ? buoyColors.primary : buoyColors.textMuted + "4D"
354
+ },
355
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
356
+ value: value,
357
+ onChange: e => onChangeText(e.target.value),
358
+ onFocus: () => {
359
+ setIsFocused(true);
360
+ onFocus?.();
361
+ },
362
+ onBlur: () => {
363
+ setIsFocused(false);
364
+ onBlur?.();
365
+ },
366
+ inputMode: isNumber ? "decimal" : undefined,
367
+ autoComplete: "off",
368
+ autoCorrect: "off",
369
+ autoCapitalize: "none",
370
+ spellCheck: false,
371
+ "aria-label": ariaLabel ?? "Data input field for editing values",
372
+ style: {
373
+ ...styles.cyberInput,
374
+ ...(isNumber ? styles.textNumber : styles.textString)
375
+ }
376
+ }), showNumberControls && /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
377
+ style: styles.numberControls,
378
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
379
+ type: "button",
380
+ style: {
381
+ ...styles.controlButton,
382
+ ...(isFocused ? styles.controlButtonFocused : null)
383
+ },
384
+ onClick: onIncrement,
385
+ "aria-label": "Increment value",
386
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ChevronUp, {
387
+ size: 14,
388
+ strokeWidth: 2.5,
389
+ color: isFocused ? buoyColors.primary : buoyColors.textMuted
390
+ })
391
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
392
+ type: "button",
393
+ style: {
394
+ ...styles.controlButton,
395
+ ...(isFocused ? styles.controlButtonFocused : null)
396
+ },
397
+ onClick: onDecrement,
398
+ "aria-label": "Decrement value",
399
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ChevronDown, {
400
+ size: 14,
401
+ strokeWidth: 2.5,
402
+ color: isFocused ? buoyColors.primary : buoyColors.textMuted
403
+ })
404
+ })]
405
+ }), showDeleteButton && /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
406
+ type: "button",
407
+ style: {
408
+ ...styles.cyberDeleteButton,
409
+ ...(isFocused ? styles.cyberDeleteButtonFocused : null)
410
+ },
411
+ onClick: onDelete,
412
+ "aria-label": "Delete item",
413
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Trash, {
414
+ size: 14,
415
+ strokeWidth: 2,
416
+ color: isFocused ? buoyColors.error : buoyColors.error + "CC"
417
+ })
418
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
419
+ style: cornerStyle({
420
+ top: -1,
421
+ left: 5
422
+ })
423
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
424
+ style: cornerStyle({
425
+ top: -1,
426
+ right: 5
427
+ })
428
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
429
+ style: cornerStyle({
430
+ bottom: -1,
431
+ left: 5
432
+ })
433
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
434
+ style: cornerStyle({
435
+ bottom: -1,
436
+ right: 5
437
+ })
438
+ })]
439
+ })]
440
+ })
441
+ });
442
+ }
443
+ /**
444
+ * Recursive data explorer — the editable JSON tree. Same prop contract,
445
+ * derivation order and edit semantics as the native file.
446
+ */
447
+ function Explorer({
448
+ editable,
449
+ label,
450
+ value,
451
+ defaultExpanded,
452
+ dataPath,
453
+ itemsDeletable,
454
+ dataVersion = 0
455
+ }) {
456
+ const editor = (0, _editorContext.useResponseEditor)();
457
+ const [isRowFocused, setIsRowFocused] = (0, _react.useState)(false);
458
+
459
+ // Local state for input value to handle typing properly
460
+ const [localInputValue, setLocalInputValue] = (0, _react.useState)("");
461
+
462
+ // Sync local state with prop value
463
+ // ⚠️ CRITICAL: Do NOT add localInputValue to the dependency array!
464
+ // Adding localInputValue causes a race condition where user edits get
465
+ // reverted (type "5101" → store updates → effect fires while the prop is
466
+ // still 5100 → syncs back to 5100). Only sync when EXTERNAL changes happen
467
+ // (value, label, dataVersion) — carried over from native unchanged.
468
+ (0, _react.useEffect)(() => {
469
+ if (value !== null && value !== undefined && (typeof value === "string" || typeof value === "number")) {
470
+ const newValue = value.toString();
471
+ setLocalInputValue(newValue);
472
+ }
473
+ }, [value, label, dataVersion]); // ⚠️ DO NOT add localInputValue here!
474
+
475
+ // Determine if this is a main section — native, verbatim.
476
+ const isMainSection = (0, _react.useMemo)(() => {
477
+ const upperLabel = label.toUpperCase();
478
+ return ["DATA", "QUERY", "QUERYKEY", "TYPES", "STATS", "OPTIONS", "OBSERVERS"].includes(upperLabel);
479
+ }, [label]);
480
+
481
+ // Explorer's section is expanded or collapsed
482
+ const [isExpanded, setIsExpanded] = (0, _react.useState)((defaultExpanded || []).includes(label));
483
+ const toggleExpanded = () => setIsExpanded(old => !old);
484
+ const [expandedPages, setExpandedPages] = (0, _react.useState)([]);
485
+
486
+ // Optimized subEntries computation — native, verbatim (1000-entry cap).
487
+ const subEntries = (0, _react.useMemo)(() => {
488
+ if (value === null || value === undefined || typeof value !== "object") {
489
+ return [];
490
+ }
491
+ if (Array.isArray(value)) {
492
+ const limitedValue = value.length > 1000 ? value.slice(0, 1000) : value;
493
+ return limitedValue.map((d, i) => ({
494
+ label: i.toString(),
495
+ value: d
496
+ }));
497
+ }
498
+ if (value instanceof Map) {
499
+ const entries = Array.from(value.entries()).slice(0, 1000);
500
+ return entries.map(([key, val]) => ({
501
+ label: String(key),
502
+ value: val
503
+ }));
504
+ }
505
+ if (value instanceof Set) {
506
+ const entries = Array.from(value).slice(0, 1000);
507
+ return entries.map((val, i) => ({
508
+ label: i.toString(),
509
+ value: val
510
+ }));
511
+ }
512
+ const entries = Object.entries(value).slice(0, 1000);
513
+ return entries.map(([key, val]) => ({
514
+ label: key,
515
+ value: val
516
+ }));
517
+ }, [value]);
518
+
519
+ // Optimized valueType computation — native, verbatim.
520
+ const valueType = (0, _react.useMemo)(() => {
521
+ if (Array.isArray(value)) return "array";
522
+ if (value === null || typeof value !== "object") return typeof value;
523
+ if (value instanceof Map || value instanceof Set) return "Iterable";
524
+ return "object";
525
+ }, [value]);
526
+ const subEntryPages = (0, _react.useMemo)(() => {
527
+ return chunkArray(subEntries, CHUNK_SIZE);
528
+ }, [subEntries]);
529
+ const currentDataPath = dataPath ?? [];
530
+
531
+ // Optimize handleChange using refs to avoid dependency arrays — native.
532
+ const editorRef = (0, _react.useRef)(editor);
533
+ const dataPathRef = (0, _react.useRef)(currentDataPath);
534
+ const valueTypeRef = (0, _react.useRef)(valueType);
535
+ editorRef.current = editor;
536
+ dataPathRef.current = currentDataPath;
537
+ valueTypeRef.current = valueType;
538
+ const handleChange = (0, _react.useCallback)((isNumber, newValue) => {
539
+ // Update local state immediately for responsive typing
540
+ setLocalInputValue(newValue);
541
+ const current = editorRef.current;
542
+ if (!current) return;
543
+ if (isNumber && isNaN(Number(newValue))) return;
544
+ const updatedValue = valueTypeRef.current === "number" ? Number(newValue) : newValue;
545
+ current.onChange((0, _updateNestedDataByPath.updateNestedDataByPath)(current.root, dataPathRef.current, updatedValue));
546
+ }, [setLocalInputValue]);
547
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
548
+ style: styles.minWidthWrapper,
549
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
550
+ style: styles.fullWidthMarginRight,
551
+ children: [subEntryPages.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
552
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
553
+ style: {
554
+ ...styles.flexRowItemsCenterGap,
555
+ ...(isMainSection ? styles.flexRowItemsCenterGapMain : null)
556
+ },
557
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
558
+ type: "button",
559
+ style: styles.expanderButton,
560
+ onClick: toggleExpanded,
561
+ "aria-expanded": isExpanded,
562
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Expander, {
563
+ expanded: isExpanded,
564
+ isFocused: isRowFocused,
565
+ isMain: isMainSection
566
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
567
+ style: {
568
+ ...styles.labelText,
569
+ ...(isRowFocused ? styles.labelTextFocused : null),
570
+ ...(isMainSection ? styles.labelTextMain : null)
571
+ },
572
+ children: label
573
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
574
+ style: styles.textGray500,
575
+ children: `${String(valueType).toLowerCase() === "iterable" ? "(Iterable) " : ""}${subEntries.length} ${subEntries.length > 1 ? `items` : `item`}`
576
+ })]
577
+ }), editable && /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
578
+ style: styles.flexRowGapItemsCenter,
579
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(CopyButton, {
580
+ value: value,
581
+ isFocused: isRowFocused
582
+ }), itemsDeletable && editor !== null && /*#__PURE__*/(0, _jsxRuntime.jsx)(DeleteItemButton, {
583
+ dataPath: currentDataPath,
584
+ isFocused: isRowFocused
585
+ }), valueType === "array" && editor !== null && /*#__PURE__*/(0, _jsxRuntime.jsx)(ClearArrayButton, {
586
+ dataPath: currentDataPath,
587
+ isFocused: isRowFocused
588
+ })]
589
+ })]
590
+ }), isExpanded && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
591
+ children: [subEntryPages.length === 1 && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
592
+ style: {
593
+ ...styles.singleEntryContainer,
594
+ ...(isMainSection ? styles.singleEntryContainerMain : null)
595
+ },
596
+ children: subEntries.map((entry, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(Explorer, {
597
+ defaultExpanded: defaultExpanded,
598
+ label: entry.label,
599
+ value: entry.value,
600
+ editable: editable,
601
+ dataPath: [...currentDataPath, entry.label],
602
+ itemsDeletable: valueType === "array" || valueType === "Iterable" || valueType === "object",
603
+ dataVersion: dataVersion
604
+ }, entry.label + index))
605
+ }), subEntryPages.length > 1 && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
606
+ style: styles.multiEntryContainer,
607
+ children: subEntryPages.map((entries, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
608
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
609
+ style: styles.relativeOutlineNone,
610
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
611
+ type: "button",
612
+ onClick: () => setExpandedPages(old => old.includes(index) ? old.filter(d => d !== index) : [...old, index]),
613
+ style: styles.pageExpanderButton,
614
+ "aria-expanded": expandedPages.includes(index),
615
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Expander, {
616
+ expanded: expandedPages.includes(index)
617
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
618
+ style: styles.pageRangeText,
619
+ children: ["[", index * CHUNK_SIZE, "...", index * CHUNK_SIZE + CHUNK_SIZE - 1, "]"]
620
+ })]
621
+ }), expandedPages.includes(index) && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
622
+ style: styles.entriesContainer,
623
+ children: entries.map(entry => /*#__PURE__*/(0, _jsxRuntime.jsx)(Explorer, {
624
+ defaultExpanded: defaultExpanded,
625
+ label: entry.label,
626
+ value: entry.value,
627
+ editable: editable,
628
+ dataPath: [...currentDataPath, entry.label],
629
+ dataVersion: dataVersion
630
+ }, entry.label))
631
+ })]
632
+ })
633
+ }, index))
634
+ })]
635
+ })]
636
+ }), subEntryPages.length === 0 && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
637
+ style: styles.flexRowGapFullWidth,
638
+ children: [editable && editor !== null && (valueType === "string" || valueType === "number" || valueType === "boolean") ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
639
+ children: [editable && editor && (valueType === "string" || valueType === "number") && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
640
+ style: styles.nebulaInputWrapper,
641
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(CyberpunkInputWeb, {
642
+ label: label,
643
+ value: localInputValue,
644
+ isNumber: valueType === "number",
645
+ onChangeText: newValue => handleChange(valueType === "number", newValue),
646
+ onFocus: () => setIsRowFocused(true),
647
+ onBlur: () => setIsRowFocused(false),
648
+ showNumberControls: valueType === "number",
649
+ onIncrement: () => {
650
+ const currentNum = Number(localInputValue) || 0;
651
+ handleChange(true, String(currentNum + 1));
652
+ },
653
+ onDecrement: () => {
654
+ const currentNum = Number(localInputValue) || 0;
655
+ handleChange(true, String(currentNum - 1));
656
+ },
657
+ showDeleteButton: itemsDeletable,
658
+ onDelete: () => {
659
+ editor.onChange((0, _deleteNestedDataByPath.deleteNestedDataByPath)(editor.root, currentDataPath));
660
+ }
661
+ })
662
+ }), valueType === "boolean" && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
663
+ style: styles.booleanRowContainer,
664
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
665
+ style: styles.booleanLabel,
666
+ children: label
667
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
668
+ style: styles.booleanToggleWrapper,
669
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ToggleValueButton, {
670
+ dataPath: currentDataPath,
671
+ value: value,
672
+ itemsDeletable: itemsDeletable
673
+ })
674
+ })]
675
+ })]
676
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
677
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
678
+ style: styles.text344054,
679
+ children: label
680
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
681
+ style: styles.displayValueText,
682
+ children: displayValue(value)
683
+ })]
684
+ }), editable && itemsDeletable && editor !== null && valueType !== "string" && valueType !== "number" && valueType !== "boolean" && /*#__PURE__*/(0, _jsxRuntime.jsx)(DeleteItemButton, {
685
+ dataPath: currentDataPath,
686
+ isFocused: isRowFocused
687
+ })]
688
+ })]
689
+ })
690
+ });
691
+ }
692
+
693
+ // Values mirror the native StyleSheet blocks 1:1 (Explorer.tsx +
694
+ // CyberpunkInput.tsx).
695
+ const styles = {
696
+ buttonStyle: {
697
+ backgroundColor: buoyColors.card + "E6",
698
+ border: `1px solid ${buoyColors.textSecondary}33`,
699
+ borderRadius: 6,
700
+ display: "inline-flex",
701
+ flexDirection: "row",
702
+ alignItems: "center",
703
+ justifyContent: "center",
704
+ width: 28,
705
+ height: 28,
706
+ boxSizing: "border-box",
707
+ position: "relative",
708
+ padding: 0
709
+ },
710
+ buttonStyleFocused: {
711
+ border: `1px solid ${buoyColors.primary}CC`,
712
+ backgroundColor: buoyColors.primary + "26"
713
+ },
714
+ deleteButton: {
715
+ backgroundColor: buoyColors.error + "1A",
716
+ border: `1px solid ${buoyColors.error}4D`,
717
+ borderRadius: 6,
718
+ padding: 0,
719
+ display: "inline-flex",
720
+ alignItems: "center",
721
+ justifyContent: "center",
722
+ width: 28,
723
+ height: 28,
724
+ boxSizing: "border-box",
725
+ position: "relative",
726
+ cursor: "pointer",
727
+ margin: 0,
728
+ flexShrink: 0
729
+ },
730
+ deleteButtonFocused: {
731
+ border: `1px solid ${buoyColors.error}CC`,
732
+ backgroundColor: buoyColors.error + "33"
733
+ },
734
+ deleteButtonInToggle: {
735
+ backgroundColor: buoyColors.error + "1A",
736
+ border: `1px solid ${buoyColors.error}4D`,
737
+ borderRadius: 6,
738
+ padding: 0,
739
+ display: "inline-flex",
740
+ alignItems: "center",
741
+ justifyContent: "center",
742
+ width: 28,
743
+ height: 28,
744
+ boxSizing: "border-box",
745
+ cursor: "pointer",
746
+ margin: 0
747
+ },
748
+ clearButton: {
749
+ backgroundColor: buoyColors.warning + "1A",
750
+ border: `1px solid ${buoyColors.warning}4D`,
751
+ borderRadius: 6,
752
+ display: "inline-flex",
753
+ flexDirection: "row",
754
+ padding: 0,
755
+ alignItems: "center",
756
+ justifyContent: "center",
757
+ width: 28,
758
+ height: 28,
759
+ boxSizing: "border-box",
760
+ position: "relative",
761
+ zIndex: 10,
762
+ cursor: "pointer",
763
+ margin: 0,
764
+ flexShrink: 0
765
+ },
766
+ clearButtonFocused: {
767
+ border: `1px solid ${buoyColors.warning}CC`,
768
+ backgroundColor: buoyColors.warning + "33"
769
+ },
770
+ clearButtonText: {
771
+ fontSize: 12,
772
+ fontWeight: 700,
773
+ fontFamily: "ui-monospace, Menlo, monospace"
774
+ },
775
+ expanderIcon: {
776
+ width: 18,
777
+ height: 18,
778
+ display: "inline-flex",
779
+ alignItems: "center",
780
+ justifyContent: "center",
781
+ marginRight: 1,
782
+ backgroundColor: buoyColors.textSecondary + "14",
783
+ borderRadius: 3,
784
+ boxSizing: "border-box",
785
+ flexShrink: 0
786
+ },
787
+ expanderIconMain: {
788
+ backgroundColor: buoyColors.textSecondary + "1A",
789
+ width: 20,
790
+ height: 20,
791
+ borderRadius: 4,
792
+ border: `0.5px solid ${buoyColors.textSecondary}33`
793
+ },
794
+ minWidthWrapper: {
795
+ minWidth: 180,
796
+ fontSize: 11,
797
+ display: "flex",
798
+ flexDirection: "row",
799
+ flexWrap: "wrap",
800
+ width: "100%",
801
+ margin: "0.5px 0"
802
+ },
803
+ fullWidthMarginRight: {
804
+ position: "relative",
805
+ width: "100%",
806
+ marginRight: 1
807
+ },
808
+ flexRowItemsCenterGap: {
809
+ display: "flex",
810
+ flexDirection: "row",
811
+ alignItems: "center",
812
+ justifyContent: "space-between",
813
+ padding: "3px 6px",
814
+ margin: "1px 0",
815
+ borderRadius: 4,
816
+ backgroundColor: buoyColors.card + "66",
817
+ border: `0.5px solid ${buoyColors.textSecondary}1A`,
818
+ boxSizing: "border-box"
819
+ },
820
+ flexRowItemsCenterGapMain: {
821
+ backgroundColor: buoyColors.card + "E6",
822
+ border: `1px solid ${buoyColors.textSecondary}26`,
823
+ borderLeft: `2.5px solid ${buoyColors.textSecondary}80`,
824
+ padding: "5px 8px",
825
+ marginBottom: 3
826
+ },
827
+ expanderButton: {
828
+ display: "flex",
829
+ flexDirection: "row",
830
+ alignItems: "center",
831
+ backgroundColor: "transparent",
832
+ padding: "1px 2px",
833
+ gap: 6,
834
+ border: "none",
835
+ minHeight: 24,
836
+ flex: 1,
837
+ minWidth: 0,
838
+ cursor: "pointer",
839
+ margin: 0,
840
+ textAlign: "left",
841
+ font: "inherit"
842
+ },
843
+ labelText: {
844
+ color: buoyColors.textSecondary,
845
+ fontSize: 10,
846
+ fontWeight: 600,
847
+ marginRight: 4,
848
+ fontFamily: "ui-monospace, Menlo, monospace",
849
+ letterSpacing: 0.4
850
+ },
851
+ labelTextFocused: {
852
+ color: buoyColors.text
853
+ },
854
+ labelTextMain: {
855
+ color: buoyColors.text,
856
+ fontSize: 11,
857
+ fontWeight: 700,
858
+ letterSpacing: 0.6
859
+ },
860
+ textGray500: {
861
+ color: buoyColors.textMuted,
862
+ fontSize: 10,
863
+ fontWeight: 400,
864
+ fontFamily: "ui-monospace, Menlo, monospace",
865
+ opacity: 0.7
866
+ },
867
+ pageRangeText: {
868
+ color: buoyColors.textSecondary,
869
+ fontSize: 10,
870
+ fontWeight: 600,
871
+ fontFamily: "ui-monospace, Menlo, monospace"
872
+ },
873
+ flexRowGapItemsCenter: {
874
+ display: "flex",
875
+ flexDirection: "row",
876
+ alignItems: "center",
877
+ gap: 4,
878
+ paddingLeft: 2
879
+ },
880
+ singleEntryContainer: {
881
+ marginLeft: 2,
882
+ marginTop: 2,
883
+ paddingLeft: 8,
884
+ borderLeft: `1.5px solid ${buoyColors.textSecondary}40`
885
+ },
886
+ singleEntryContainerMain: {
887
+ borderLeft: `1.5px solid ${buoyColors.textSecondary}4D`,
888
+ marginLeft: 4,
889
+ paddingLeft: 10
890
+ },
891
+ multiEntryContainer: {
892
+ marginLeft: 2,
893
+ marginTop: 2,
894
+ paddingLeft: 8,
895
+ borderLeft: `1.5px solid ${buoyColors.textSecondary}40`
896
+ },
897
+ relativeOutlineNone: {
898
+ position: "relative"
899
+ },
900
+ pageExpanderButton: {
901
+ display: "flex",
902
+ flexDirection: "row",
903
+ alignItems: "center",
904
+ backgroundColor: buoyColors.card + "66",
905
+ padding: "3px 6px",
906
+ gap: 6,
907
+ borderRadius: 4,
908
+ border: `0.5px solid ${buoyColors.textSecondary}1A`,
909
+ marginBottom: 2,
910
+ minHeight: 24,
911
+ cursor: "pointer",
912
+ margin: "0 0 2px 0",
913
+ width: "100%",
914
+ boxSizing: "border-box",
915
+ textAlign: "left",
916
+ font: "inherit"
917
+ },
918
+ entriesContainer: {
919
+ marginLeft: 2,
920
+ paddingLeft: 8,
921
+ marginTop: 2,
922
+ borderLeft: `1.5px solid ${buoyColors.textSecondary}40`
923
+ },
924
+ textNumber: {
925
+ color: buoyColors.text,
926
+ fontWeight: 600,
927
+ fontFamily: "ui-monospace, Menlo, monospace"
928
+ },
929
+ textString: {
930
+ color: buoyColors.text,
931
+ fontFamily: "ui-monospace, Menlo, monospace"
932
+ },
933
+ flexRowGapFullWidth: {
934
+ display: "flex",
935
+ flexDirection: "row",
936
+ width: "100%",
937
+ alignItems: "center",
938
+ margin: "1px 0",
939
+ gap: 6,
940
+ padding: "2px 4px",
941
+ borderRadius: 3,
942
+ boxSizing: "border-box"
943
+ },
944
+ text344054: {
945
+ color: buoyColors.textSecondary,
946
+ fontWeight: 600,
947
+ fontSize: 9,
948
+ minWidth: 50,
949
+ fontFamily: "ui-monospace, Menlo, monospace",
950
+ letterSpacing: 0.4,
951
+ opacity: 0.8,
952
+ flexShrink: 0
953
+ },
954
+ nebulaInputWrapper: {
955
+ flex: 1,
956
+ width: "100%",
957
+ position: "relative",
958
+ minWidth: 0
959
+ },
960
+ displayValueText: {
961
+ flex: 1,
962
+ minWidth: 0,
963
+ color: buoyColors.text,
964
+ fontWeight: 400,
965
+ fontFamily: "ui-monospace, Menlo, monospace",
966
+ fontSize: 12,
967
+ padding: "6px 10px",
968
+ borderRadius: 6,
969
+ border: `1px solid ${buoyColors.textMuted}66`,
970
+ minHeight: 34,
971
+ boxSizing: "border-box",
972
+ overflowWrap: "anywhere"
973
+ },
974
+ modernToggleButton: {
975
+ display: "flex",
976
+ flexDirection: "row",
977
+ alignItems: "center",
978
+ justifyContent: "space-between",
979
+ borderRadius: 6,
980
+ border: `1px solid ${buoyColors.textMuted}99`,
981
+ padding: "6px 8px",
982
+ margin: "2px 0",
983
+ minHeight: 34,
984
+ gap: 8,
985
+ boxSizing: "border-box",
986
+ cursor: "pointer"
987
+ },
988
+ toggleBadge: {
989
+ marginLeft: 6,
990
+ padding: "3px 6px",
991
+ borderRadius: 4,
992
+ display: "inline-flex"
993
+ },
994
+ toggleBadgeText: {
995
+ fontSize: 9,
996
+ fontWeight: 700,
997
+ textTransform: "uppercase",
998
+ letterSpacing: 0.8,
999
+ fontFamily: "ui-monospace, Menlo, monospace"
1000
+ },
1001
+ toggleBadgeTrue: {
1002
+ backgroundColor: buoyColors.primary + "1A",
1003
+ border: `1px solid ${buoyColors.primary}4D`
1004
+ },
1005
+ toggleBadgeFalse: {
1006
+ backgroundColor: buoyColors.textMuted + "1A",
1007
+ border: `1px solid ${buoyColors.textMuted}4D`
1008
+ },
1009
+ toggleTextTrue: {
1010
+ color: buoyColors.primary,
1011
+ fontWeight: 600
1012
+ },
1013
+ toggleTextFalse: {
1014
+ color: buoyColors.textSecondary,
1015
+ fontWeight: 500
1016
+ },
1017
+ booleanRowContainer: {
1018
+ display: "flex",
1019
+ flexDirection: "row",
1020
+ alignItems: "center",
1021
+ width: "100%",
1022
+ gap: 8,
1023
+ padding: "2px 0"
1024
+ },
1025
+ booleanLabel: {
1026
+ color: buoyColors.textSecondary,
1027
+ fontSize: 10,
1028
+ fontWeight: 600,
1029
+ fontFamily: "ui-monospace, Menlo, monospace",
1030
+ letterSpacing: 0.4,
1031
+ minWidth: 60,
1032
+ flexShrink: 0
1033
+ },
1034
+ booleanToggleWrapper: {
1035
+ flex: 1,
1036
+ minWidth: 0
1037
+ },
1038
+ // CyberpunkInput.tsx styles, verbatim.
1039
+ cyberContainer: {
1040
+ width: "100%",
1041
+ margin: "3px 0"
1042
+ },
1043
+ cyberRow: {
1044
+ display: "flex",
1045
+ flexDirection: "row",
1046
+ alignItems: "center",
1047
+ gap: 8
1048
+ },
1049
+ cyberLabel: {
1050
+ fontSize: 10,
1051
+ fontWeight: 600,
1052
+ fontFamily: "ui-monospace, Menlo, monospace",
1053
+ color: buoyColors.textMuted,
1054
+ letterSpacing: 0.5,
1055
+ minWidth: 60,
1056
+ flexShrink: 0
1057
+ },
1058
+ cyberLabelFocused: {
1059
+ color: buoyColors.primary
1060
+ },
1061
+ cyberInputContainer: {
1062
+ flex: 1,
1063
+ minWidth: 0,
1064
+ borderWidth: 1,
1065
+ borderStyle: "solid",
1066
+ borderRadius: 6,
1067
+ position: "relative",
1068
+ minHeight: 34,
1069
+ display: "flex",
1070
+ flexDirection: "row",
1071
+ alignItems: "center",
1072
+ boxSizing: "border-box"
1073
+ },
1074
+ cyberInput: {
1075
+ flex: 1,
1076
+ minWidth: 0,
1077
+ padding: "6px 10px",
1078
+ fontSize: 12,
1079
+ backgroundColor: "transparent",
1080
+ zIndex: 1,
1081
+ border: "none",
1082
+ outline: "none"
1083
+ },
1084
+ numberControls: {
1085
+ display: "inline-flex",
1086
+ flexDirection: "row",
1087
+ gap: 2,
1088
+ paddingRight: 4,
1089
+ zIndex: 2
1090
+ },
1091
+ controlButton: {
1092
+ width: 28,
1093
+ height: 28,
1094
+ borderRadius: 6,
1095
+ border: `1px solid ${buoyColors.textMuted}33`,
1096
+ display: "inline-flex",
1097
+ alignItems: "center",
1098
+ justifyContent: "center",
1099
+ boxSizing: "border-box",
1100
+ background: "none",
1101
+ cursor: "pointer",
1102
+ padding: 0,
1103
+ margin: 0
1104
+ },
1105
+ controlButtonFocused: {
1106
+ border: `1px solid ${buoyColors.primary}CC`
1107
+ },
1108
+ cyberDeleteButton: {
1109
+ width: 28,
1110
+ height: 28,
1111
+ borderRadius: 6,
1112
+ border: `1px solid ${buoyColors.error}4D`,
1113
+ display: "inline-flex",
1114
+ alignItems: "center",
1115
+ justifyContent: "center",
1116
+ boxSizing: "border-box",
1117
+ background: "none",
1118
+ cursor: "pointer",
1119
+ padding: 0,
1120
+ marginRight: 4,
1121
+ zIndex: 2
1122
+ },
1123
+ cyberDeleteButtonFocused: {
1124
+ border: `1px solid ${buoyColors.error}CC`
1125
+ },
1126
+ cornerAccent: {
1127
+ position: "absolute",
1128
+ width: 6,
1129
+ height: 1.2,
1130
+ backgroundColor: buoyColors.textMuted + "CC",
1131
+ zIndex: 0
1132
+ },
1133
+ cornerAccentFocused: {
1134
+ backgroundColor: buoyColors.primary
1135
+ }
1136
+ };