@buoy-gg/jotai 7.0.31 → 7.0.33
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/jotai/components/JotaiAtomBrowser.js +20 -41
- package/lib/commonjs/jotai/components/JotaiModal.js +66 -42
- package/lib/module/jotai/components/JotaiAtomBrowser.js +21 -42
- package/lib/module/jotai/components/JotaiModal.js +67 -43
- package/lib/typescript/jotai/components/JotaiAtomBrowser.d.ts.map +1 -1
- package/lib/typescript/jotai/components/JotaiModal.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -53,20 +53,14 @@ function getWriteKindLabel(atom) {
|
|
|
53
53
|
return atom.setValue ? "writable" : "derived";
|
|
54
54
|
}
|
|
55
55
|
function EmptyBrowserState() {
|
|
56
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
testID: `${_testIDs.JOTAI_TEST_ID}-atoms-empty-title`,
|
|
65
|
-
children: "No atoms registered"
|
|
66
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
67
|
-
style: styles.emptyText,
|
|
68
|
-
children: "Use watchAtoms(store, { atomName }) to register your Jotai atoms.\nThey will appear here with their current value."
|
|
69
|
-
})]
|
|
56
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ToolEmptyState, {
|
|
57
|
+
testID: `${_testIDs.JOTAI_TEST_ID}-atoms-empty`
|
|
58
|
+
// scanning = "scanning for targets… and finding none". The registry is
|
|
59
|
+
// discovered, not configured, so an empty one is a scan result.
|
|
60
|
+
,
|
|
61
|
+
otto: "scanning",
|
|
62
|
+
title: "No atoms registered",
|
|
63
|
+
message: "Use watchAtoms(store, { atomName }) to register your Jotai atoms.\nThey will appear here with their current value."
|
|
70
64
|
});
|
|
71
65
|
}
|
|
72
66
|
function JotaiAtomBrowser({
|
|
@@ -83,17 +77,19 @@ function JotaiAtomBrowser({
|
|
|
83
77
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(EmptyBrowserState, {});
|
|
84
78
|
}
|
|
85
79
|
if (filteredAtoms.length === 0 && searchQuery) {
|
|
86
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
87
|
-
style: styles.emptyState,
|
|
80
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ToolEmptyState, {
|
|
88
81
|
testID: `${_testIDs.JOTAI_TEST_ID}-atoms-no-match`,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
82
|
+
...(0, _sharedUi.resolveListEmptyState)({
|
|
83
|
+
subject: "atoms",
|
|
84
|
+
verb: "registered",
|
|
85
|
+
search: searchQuery,
|
|
86
|
+
total: atoms.length,
|
|
87
|
+
waiting: {
|
|
88
|
+
otto: "scanning",
|
|
89
|
+
title: "No atoms registered",
|
|
90
|
+
message: "Use watchAtoms() to register your Jotai atoms."
|
|
91
|
+
}
|
|
92
|
+
})
|
|
97
93
|
});
|
|
98
94
|
}
|
|
99
95
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.ScrollView, {
|
|
@@ -199,22 +195,5 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
199
195
|
fontWeight: "700",
|
|
200
196
|
color: _sharedUi.night.color.accent,
|
|
201
197
|
fontFamily: "monospace"
|
|
202
|
-
},
|
|
203
|
-
emptyState: {
|
|
204
|
-
alignItems: "center",
|
|
205
|
-
paddingVertical: 40
|
|
206
|
-
},
|
|
207
|
-
emptyTitle: {
|
|
208
|
-
color: _sharedUi.night.color.text,
|
|
209
|
-
fontSize: 14,
|
|
210
|
-
fontWeight: "600",
|
|
211
|
-
marginTop: 12,
|
|
212
|
-
marginBottom: 6
|
|
213
|
-
},
|
|
214
|
-
emptyText: {
|
|
215
|
-
color: _sharedUi.night.color.textTertiary,
|
|
216
|
-
fontSize: 12,
|
|
217
|
-
textAlign: "center",
|
|
218
|
-
lineHeight: 18
|
|
219
198
|
}
|
|
220
199
|
});
|
|
@@ -35,24 +35,34 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
35
35
|
* production behaviour exactly as it was.
|
|
36
36
|
*/
|
|
37
37
|
const CLIP_OFFSCREEN_CELLS = !(typeof process !== "undefined" && process.env?.EXPO_PUBLIC_E2E);
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* The change log's "nothing here". Everything but the nouns is the shared
|
|
41
|
+
* precedence — see `ToolEmptyState` in shared-ui for why it lives there.
|
|
42
|
+
*/
|
|
38
43
|
function EventsEmptyState({
|
|
39
|
-
isEnabled
|
|
44
|
+
isEnabled,
|
|
45
|
+
searchText,
|
|
46
|
+
totalChanges
|
|
40
47
|
}) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
48
|
+
const content = (0, _sharedUi.resolveListEmptyState)({
|
|
49
|
+
subject: "changes",
|
|
50
|
+
search: searchText,
|
|
51
|
+
total: totalChanges,
|
|
52
|
+
capturing: isEnabled,
|
|
53
|
+
waiting: {
|
|
54
|
+
otto: "waiting",
|
|
55
|
+
title: "No atom changes",
|
|
56
|
+
message: "Atom changes will appear here as values update."
|
|
57
|
+
},
|
|
58
|
+
paused: {
|
|
59
|
+
title: "No atom changes",
|
|
60
|
+
message: "Enable capture to start recording atom changes"
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ToolEmptyState, {
|
|
64
|
+
...content,
|
|
65
|
+
testID: `${_testIDs.JOTAI_TEST_ID}-empty`
|
|
56
66
|
});
|
|
57
67
|
}
|
|
58
68
|
function JotaiModal({
|
|
@@ -79,7 +89,9 @@ function JotaiModal({
|
|
|
79
89
|
const [showFilters, setShowFilters] = (0, _react.useState)(false);
|
|
80
90
|
const [ignoredPatterns, setIgnoredPatterns] = (0, _react.useState)(new Set());
|
|
81
91
|
const {
|
|
92
|
+
atomChanges,
|
|
82
93
|
filteredChanges,
|
|
94
|
+
stats,
|
|
83
95
|
filter,
|
|
84
96
|
setFilter,
|
|
85
97
|
atoms,
|
|
@@ -102,6 +114,15 @@ function JotaiModal({
|
|
|
102
114
|
|
|
103
115
|
// Pro is Infinity here, so slice() returns everything and the locked count
|
|
104
116
|
// floors at 0 — no tier branching needed at the call site.
|
|
117
|
+
/**
|
|
118
|
+
* How many changes this atom has captured, before the search — the
|
|
119
|
+
* denominator the scoped empty state needs so "clear the search" is only
|
|
120
|
+
* offered when clearing it would actually show something.
|
|
121
|
+
*/
|
|
122
|
+
const scopedTotalForAtom = (0, _react.useMemo)(() => {
|
|
123
|
+
if (!selectedHistoryAtom) return 0;
|
|
124
|
+
return atomChanges.filter(c => c.atomLabel === selectedHistoryAtom).length;
|
|
125
|
+
}, [atomChanges, selectedHistoryAtom]);
|
|
105
126
|
const visibleChanges = (0, _react.useMemo)(() => displayedChanges.slice(0, changeLimit), [displayedChanges, changeLimit]);
|
|
106
127
|
const lockedChangeCount = (0, _react.useMemo)(() => Math.max(0, displayedChanges.length - changeLimit), [displayedChanges.length, changeLimit]);
|
|
107
128
|
const hasLockedChanges = lockedChangeCount > 0;
|
|
@@ -474,19 +495,24 @@ function JotaiModal({
|
|
|
474
495
|
maxToRenderPerBatch: 8,
|
|
475
496
|
windowSize: 5,
|
|
476
497
|
updateCellsBatchingPeriod: 50
|
|
477
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.
|
|
478
|
-
style: styles.emptyState,
|
|
498
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ToolEmptyState, {
|
|
479
499
|
testID: `${_testIDs.JOTAI_TEST_ID}-history-empty`,
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
500
|
+
...(0, _sharedUi.resolveListEmptyState)({
|
|
501
|
+
subject: "changes",
|
|
502
|
+
search: searchText,
|
|
503
|
+
// Scoped to one atom, so the count is this atom's, not the log's.
|
|
504
|
+
total: searchText.trim() ? scopedTotalForAtom : 0,
|
|
505
|
+
capturing: isEnabled,
|
|
506
|
+
waiting: {
|
|
507
|
+
otto: "waiting",
|
|
508
|
+
title: "No history yet",
|
|
509
|
+
message: `Changes for ${selectedHistoryAtom} will appear here.`
|
|
510
|
+
},
|
|
511
|
+
paused: {
|
|
512
|
+
title: "No history yet",
|
|
513
|
+
message: `Capture is off, so nothing is being recorded for ${selectedHistoryAtom}.`
|
|
514
|
+
}
|
|
515
|
+
})
|
|
490
516
|
});
|
|
491
517
|
}
|
|
492
518
|
|
|
@@ -502,19 +528,14 @@ function JotaiModal({
|
|
|
502
528
|
/*#__PURE__*/
|
|
503
529
|
// The atom fell out of the registry mid-look (a remote mirror
|
|
504
530
|
// rebuilding, a dev reload). Say so rather than rendering nothing.
|
|
505
|
-
(0, _jsxRuntime.
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
children: "Atom no longer registered"
|
|
514
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
515
|
-
style: styles.emptyText,
|
|
516
|
-
children: [selectedAtomLabel, " is not in the registry any more."]
|
|
517
|
-
})]
|
|
531
|
+
(0, _jsxRuntime.jsx)(_sharedUi.ToolEmptyState, {
|
|
532
|
+
testID: `${_testIDs.JOTAI_TEST_ID}-atom-detail-gone`
|
|
533
|
+
// ghost = "stale or detached: an unmounted component, an old
|
|
534
|
+
// snapshot" — exactly what the atom you are looking at has become.
|
|
535
|
+
,
|
|
536
|
+
otto: "ghost",
|
|
537
|
+
title: "Atom no longer registered",
|
|
538
|
+
message: `${selectedAtomLabel} is not in the registry any more.`
|
|
518
539
|
});
|
|
519
540
|
}
|
|
520
541
|
if (activeTab === "atoms") {
|
|
@@ -568,7 +589,9 @@ function JotaiModal({
|
|
|
568
589
|
windowSize: 5,
|
|
569
590
|
updateCellsBatchingPeriod: 50
|
|
570
591
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(EventsEmptyState, {
|
|
571
|
-
isEnabled: isEnabled
|
|
592
|
+
isEnabled: isEnabled,
|
|
593
|
+
searchText: searchText,
|
|
594
|
+
totalChanges: stats.totalChanges
|
|
572
595
|
})]
|
|
573
596
|
});
|
|
574
597
|
};
|
|
@@ -614,6 +637,7 @@ function JotaiModal({
|
|
|
614
637
|
style: styles.inlineRoot,
|
|
615
638
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
616
639
|
style: styles.inlineHeader,
|
|
640
|
+
..._sharedUi.windowDragProps,
|
|
617
641
|
children: renderHeaderContent()
|
|
618
642
|
}), body, footerNode]
|
|
619
643
|
}), upgradeModal]
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
import { useMemo } from "react";
|
|
13
13
|
import { View, Text, StyleSheet, ScrollView } from "react-native";
|
|
14
|
-
import { CompactRow, night,
|
|
14
|
+
import { CompactRow, night, ToolEmptyState, resolveListEmptyState } from "@buoy-gg/shared-ui";
|
|
15
15
|
import { jotaiStateStore } from "../utils/jotaiStateStore";
|
|
16
16
|
import { JOTAI_TEST_ID, atomRowTestID } from "../utils/testIDs";
|
|
17
17
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -49,20 +49,14 @@ function getWriteKindLabel(atom) {
|
|
|
49
49
|
return atom.setValue ? "writable" : "derived";
|
|
50
50
|
}
|
|
51
51
|
function EmptyBrowserState() {
|
|
52
|
-
return /*#__PURE__*/
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
testID: `${JOTAI_TEST_ID}-atoms-empty-title`,
|
|
61
|
-
children: "No atoms registered"
|
|
62
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
63
|
-
style: styles.emptyText,
|
|
64
|
-
children: "Use watchAtoms(store, { atomName }) to register your Jotai atoms.\nThey will appear here with their current value."
|
|
65
|
-
})]
|
|
52
|
+
return /*#__PURE__*/_jsx(ToolEmptyState, {
|
|
53
|
+
testID: `${JOTAI_TEST_ID}-atoms-empty`
|
|
54
|
+
// scanning = "scanning for targets… and finding none". The registry is
|
|
55
|
+
// discovered, not configured, so an empty one is a scan result.
|
|
56
|
+
,
|
|
57
|
+
otto: "scanning",
|
|
58
|
+
title: "No atoms registered",
|
|
59
|
+
message: "Use watchAtoms(store, { atomName }) to register your Jotai atoms.\nThey will appear here with their current value."
|
|
66
60
|
});
|
|
67
61
|
}
|
|
68
62
|
export function JotaiAtomBrowser({
|
|
@@ -79,17 +73,19 @@ export function JotaiAtomBrowser({
|
|
|
79
73
|
return /*#__PURE__*/_jsx(EmptyBrowserState, {});
|
|
80
74
|
}
|
|
81
75
|
if (filteredAtoms.length === 0 && searchQuery) {
|
|
82
|
-
return /*#__PURE__*/
|
|
83
|
-
style: styles.emptyState,
|
|
76
|
+
return /*#__PURE__*/_jsx(ToolEmptyState, {
|
|
84
77
|
testID: `${JOTAI_TEST_ID}-atoms-no-match`,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
78
|
+
...resolveListEmptyState({
|
|
79
|
+
subject: "atoms",
|
|
80
|
+
verb: "registered",
|
|
81
|
+
search: searchQuery,
|
|
82
|
+
total: atoms.length,
|
|
83
|
+
waiting: {
|
|
84
|
+
otto: "scanning",
|
|
85
|
+
title: "No atoms registered",
|
|
86
|
+
message: "Use watchAtoms() to register your Jotai atoms."
|
|
87
|
+
}
|
|
88
|
+
})
|
|
93
89
|
});
|
|
94
90
|
}
|
|
95
91
|
return /*#__PURE__*/_jsxs(ScrollView, {
|
|
@@ -195,22 +191,5 @@ const styles = StyleSheet.create({
|
|
|
195
191
|
fontWeight: "700",
|
|
196
192
|
color: night.color.accent,
|
|
197
193
|
fontFamily: "monospace"
|
|
198
|
-
},
|
|
199
|
-
emptyState: {
|
|
200
|
-
alignItems: "center",
|
|
201
|
-
paddingVertical: 40
|
|
202
|
-
},
|
|
203
|
-
emptyTitle: {
|
|
204
|
-
color: night.color.text,
|
|
205
|
-
fontSize: 14,
|
|
206
|
-
fontWeight: "600",
|
|
207
|
-
marginTop: 12,
|
|
208
|
-
marginBottom: 6
|
|
209
|
-
},
|
|
210
|
-
emptyText: {
|
|
211
|
-
color: night.color.textTertiary,
|
|
212
|
-
fontSize: 12,
|
|
213
|
-
textAlign: "center",
|
|
214
|
-
lineHeight: 18
|
|
215
194
|
}
|
|
216
195
|
});
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
import { useState, useMemo, useRef, useCallback, useEffect } from "react";
|
|
12
12
|
import { View, Text, StyleSheet, FlatList, TextInput, TouchableOpacity } from "react-native";
|
|
13
|
-
import { JsModal, ModalHeader, TabSelector, macOSColors, night, Search, Filter, Power, X,
|
|
13
|
+
import { JsModal, ModalHeader, TabSelector, macOSColors, night, Search, Filter, Power, X, ToolEmptyState, resolveListEmptyState, devToolsStorageKeys, ProUpgradeModal, PowerToggleButton, ToolbarCopyButton, ToolbarClearButton, truncatePayload, TickProvider, useLimit, windowDragProps } from "@buoy-gg/shared-ui";
|
|
14
14
|
import { useIsPro } from "@buoy-gg/license";
|
|
15
15
|
import { useJotaiAtomChanges } from "../hooks/useJotaiAtomChanges";
|
|
16
16
|
import { JotaiAtomChangeItem } from "./JotaiAtomChangeItem";
|
|
@@ -30,24 +30,34 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
30
30
|
* production behaviour exactly as it was.
|
|
31
31
|
*/
|
|
32
32
|
const CLIP_OFFSCREEN_CELLS = !(typeof process !== "undefined" && process.env?.EXPO_PUBLIC_E2E);
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The change log's "nothing here". Everything but the nouns is the shared
|
|
36
|
+
* precedence — see `ToolEmptyState` in shared-ui for why it lives there.
|
|
37
|
+
*/
|
|
33
38
|
function EventsEmptyState({
|
|
34
|
-
isEnabled
|
|
39
|
+
isEnabled,
|
|
40
|
+
searchText,
|
|
41
|
+
totalChanges
|
|
35
42
|
}) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
43
|
+
const content = resolveListEmptyState({
|
|
44
|
+
subject: "changes",
|
|
45
|
+
search: searchText,
|
|
46
|
+
total: totalChanges,
|
|
47
|
+
capturing: isEnabled,
|
|
48
|
+
waiting: {
|
|
49
|
+
otto: "waiting",
|
|
50
|
+
title: "No atom changes",
|
|
51
|
+
message: "Atom changes will appear here as values update."
|
|
52
|
+
},
|
|
53
|
+
paused: {
|
|
54
|
+
title: "No atom changes",
|
|
55
|
+
message: "Enable capture to start recording atom changes"
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
return /*#__PURE__*/_jsx(ToolEmptyState, {
|
|
59
|
+
...content,
|
|
60
|
+
testID: `${JOTAI_TEST_ID}-empty`
|
|
51
61
|
});
|
|
52
62
|
}
|
|
53
63
|
export function JotaiModal({
|
|
@@ -74,7 +84,9 @@ export function JotaiModal({
|
|
|
74
84
|
const [showFilters, setShowFilters] = useState(false);
|
|
75
85
|
const [ignoredPatterns, setIgnoredPatterns] = useState(new Set());
|
|
76
86
|
const {
|
|
87
|
+
atomChanges,
|
|
77
88
|
filteredChanges,
|
|
89
|
+
stats,
|
|
78
90
|
filter,
|
|
79
91
|
setFilter,
|
|
80
92
|
atoms,
|
|
@@ -97,6 +109,15 @@ export function JotaiModal({
|
|
|
97
109
|
|
|
98
110
|
// Pro is Infinity here, so slice() returns everything and the locked count
|
|
99
111
|
// floors at 0 — no tier branching needed at the call site.
|
|
112
|
+
/**
|
|
113
|
+
* How many changes this atom has captured, before the search — the
|
|
114
|
+
* denominator the scoped empty state needs so "clear the search" is only
|
|
115
|
+
* offered when clearing it would actually show something.
|
|
116
|
+
*/
|
|
117
|
+
const scopedTotalForAtom = useMemo(() => {
|
|
118
|
+
if (!selectedHistoryAtom) return 0;
|
|
119
|
+
return atomChanges.filter(c => c.atomLabel === selectedHistoryAtom).length;
|
|
120
|
+
}, [atomChanges, selectedHistoryAtom]);
|
|
100
121
|
const visibleChanges = useMemo(() => displayedChanges.slice(0, changeLimit), [displayedChanges, changeLimit]);
|
|
101
122
|
const lockedChangeCount = useMemo(() => Math.max(0, displayedChanges.length - changeLimit), [displayedChanges.length, changeLimit]);
|
|
102
123
|
const hasLockedChanges = lockedChangeCount > 0;
|
|
@@ -469,19 +490,24 @@ export function JotaiModal({
|
|
|
469
490
|
maxToRenderPerBatch: 8,
|
|
470
491
|
windowSize: 5,
|
|
471
492
|
updateCellsBatchingPeriod: 50
|
|
472
|
-
}) : /*#__PURE__*/
|
|
473
|
-
style: styles.emptyState,
|
|
493
|
+
}) : /*#__PURE__*/_jsx(ToolEmptyState, {
|
|
474
494
|
testID: `${JOTAI_TEST_ID}-history-empty`,
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
495
|
+
...resolveListEmptyState({
|
|
496
|
+
subject: "changes",
|
|
497
|
+
search: searchText,
|
|
498
|
+
// Scoped to one atom, so the count is this atom's, not the log's.
|
|
499
|
+
total: searchText.trim() ? scopedTotalForAtom : 0,
|
|
500
|
+
capturing: isEnabled,
|
|
501
|
+
waiting: {
|
|
502
|
+
otto: "waiting",
|
|
503
|
+
title: "No history yet",
|
|
504
|
+
message: `Changes for ${selectedHistoryAtom} will appear here.`
|
|
505
|
+
},
|
|
506
|
+
paused: {
|
|
507
|
+
title: "No history yet",
|
|
508
|
+
message: `Capture is off, so nothing is being recorded for ${selectedHistoryAtom}.`
|
|
509
|
+
}
|
|
510
|
+
})
|
|
485
511
|
});
|
|
486
512
|
}
|
|
487
513
|
|
|
@@ -497,19 +523,14 @@ export function JotaiModal({
|
|
|
497
523
|
/*#__PURE__*/
|
|
498
524
|
// The atom fell out of the registry mid-look (a remote mirror
|
|
499
525
|
// rebuilding, a dev reload). Say so rather than rendering nothing.
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
children: "Atom no longer registered"
|
|
509
|
-
}), /*#__PURE__*/_jsxs(Text, {
|
|
510
|
-
style: styles.emptyText,
|
|
511
|
-
children: [selectedAtomLabel, " is not in the registry any more."]
|
|
512
|
-
})]
|
|
526
|
+
_jsx(ToolEmptyState, {
|
|
527
|
+
testID: `${JOTAI_TEST_ID}-atom-detail-gone`
|
|
528
|
+
// ghost = "stale or detached: an unmounted component, an old
|
|
529
|
+
// snapshot" — exactly what the atom you are looking at has become.
|
|
530
|
+
,
|
|
531
|
+
otto: "ghost",
|
|
532
|
+
title: "Atom no longer registered",
|
|
533
|
+
message: `${selectedAtomLabel} is not in the registry any more.`
|
|
513
534
|
});
|
|
514
535
|
}
|
|
515
536
|
if (activeTab === "atoms") {
|
|
@@ -563,7 +584,9 @@ export function JotaiModal({
|
|
|
563
584
|
windowSize: 5,
|
|
564
585
|
updateCellsBatchingPeriod: 50
|
|
565
586
|
}) : /*#__PURE__*/_jsx(EventsEmptyState, {
|
|
566
|
-
isEnabled: isEnabled
|
|
587
|
+
isEnabled: isEnabled,
|
|
588
|
+
searchText: searchText,
|
|
589
|
+
totalChanges: stats.totalChanges
|
|
567
590
|
})]
|
|
568
591
|
});
|
|
569
592
|
};
|
|
@@ -609,6 +632,7 @@ export function JotaiModal({
|
|
|
609
632
|
style: styles.inlineRoot,
|
|
610
633
|
children: [/*#__PURE__*/_jsx(View, {
|
|
611
634
|
style: styles.inlineHeader,
|
|
635
|
+
...windowDragProps,
|
|
612
636
|
children: renderHeaderContent()
|
|
613
637
|
}), body, footerNode]
|
|
614
638
|
}), upgradeModal]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JotaiAtomBrowser.d.ts","sourceRoot":"","sources":["../../../../src/jotai/components/JotaiAtomBrowser.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"JotaiAtomBrowser.d.ts","sourceRoot":"","sources":["../../../../src/jotai/components/JotaiAtomBrowser.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAeH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAI9C,UAAU,qBAAqB;IAC7B,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,kDAAkD;IAClD,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAuDD,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,WAAW,EACX,UAAU,GACX,EAAE,qBAAqB,+BA4FvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JotaiModal.d.ts","sourceRoot":"","sources":["../../../../src/jotai/components/JotaiModal.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"JotaiModal.d.ts","sourceRoot":"","sources":["../../../../src/jotai/components/JotaiModal.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA6CH,OAAO,KAAK,EAAE,eAAe,EAAmB,MAAM,UAAU,CAAC;AAkDjE,wBAAgB,UAAU,CAAC,EACzB,OAAO,EACP,OAAO,EACP,MAAM,EACN,UAAU,EACV,2BAAmC,EACnC,MAAc,EACd,UAAU,EACV,uBAAuB,EACvB,iBAAiB,EACjB,cAAc,EACd,YAAY,GACb,EAAE,eAAe,sCAwsBjB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,KAAK,GAAE,IAAI,CAAC,eAAe,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAM,+BAGpE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buoy-gg/jotai",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.33",
|
|
4
4
|
"description": "Jotai devtools inside your React Native app — every atom write shows prev → next, with per-atom history & live values. Part of Buoy devtools.",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"**/snapshotProvider.ts"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@buoy-gg/
|
|
33
|
-
"@buoy-gg/
|
|
32
|
+
"@buoy-gg/shared-ui": "^7.0.33",
|
|
33
|
+
"@buoy-gg/license": "^7.0.33"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"jotai": ">=2.0.0",
|