@buoy-gg/jotai 7.0.25 → 7.0.27
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 +10 -9
- package/lib/commonjs/jotai/components/JotaiAtomChangeItem.js +1 -1
- package/lib/commonjs/jotai/components/JotaiAtomDetailContent.js +44 -41
- package/lib/commonjs/jotai/components/JotaiEventFilterView.js +24 -23
- package/lib/commonjs/jotai/components/JotaiModal.js +32 -27
- package/lib/module/jotai/components/JotaiAtomBrowser.js +11 -10
- package/lib/module/jotai/components/JotaiAtomChangeItem.js +2 -2
- package/lib/module/jotai/components/JotaiAtomDetailContent.js +45 -42
- package/lib/module/jotai/components/JotaiEventFilterView.js +25 -24
- package/lib/module/jotai/components/JotaiModal.js +33 -28
- package/lib/typescript/jotai/components/JotaiEventFilterView.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
import { useState } from "react";
|
|
11
11
|
import { View, Text, TextInput, StyleSheet, ScrollView, TouchableOpacity } from "react-native";
|
|
12
|
-
import { SectionHeader,
|
|
12
|
+
import { SectionHeader, night, Filter, X } from "@buoy-gg/shared-ui";
|
|
13
13
|
import { jotaiStateStore } from "../utils/jotaiStateStore";
|
|
14
14
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
15
|
function getAtomColorForPattern(pattern, atoms) {
|
|
@@ -40,7 +40,7 @@ export function JotaiEventFilterView({
|
|
|
40
40
|
children: [/*#__PURE__*/_jsxs(SectionHeader, {
|
|
41
41
|
children: [/*#__PURE__*/_jsx(SectionHeader.Icon, {
|
|
42
42
|
icon: Filter,
|
|
43
|
-
color:
|
|
43
|
+
color: night.color.textSecondary,
|
|
44
44
|
size: 12
|
|
45
45
|
}), /*#__PURE__*/_jsx(SectionHeader.Title, {
|
|
46
46
|
children: "REGISTERED ATOMS"
|
|
@@ -87,7 +87,7 @@ export function JotaiEventFilterView({
|
|
|
87
87
|
onChangeText: setNewPattern,
|
|
88
88
|
onSubmitEditing: handleAddPattern,
|
|
89
89
|
placeholder: "Type a pattern and press Enter...",
|
|
90
|
-
placeholderTextColor:
|
|
90
|
+
placeholderTextColor: night.color.placeholder,
|
|
91
91
|
returnKeyType: "done",
|
|
92
92
|
autoCapitalize: "none",
|
|
93
93
|
autoCorrect: false,
|
|
@@ -99,7 +99,7 @@ export function JotaiEventFilterView({
|
|
|
99
99
|
children: [/*#__PURE__*/_jsxs(SectionHeader, {
|
|
100
100
|
children: [/*#__PURE__*/_jsx(SectionHeader.Icon, {
|
|
101
101
|
icon: Filter,
|
|
102
|
-
color:
|
|
102
|
+
color: night.color.textSecondary,
|
|
103
103
|
size: 12
|
|
104
104
|
}), /*#__PURE__*/_jsx(SectionHeader.Title, {
|
|
105
105
|
children: "ACTIVE FILTERS"
|
|
@@ -124,7 +124,7 @@ export function JotaiEventFilterView({
|
|
|
124
124
|
children: pattern
|
|
125
125
|
}), /*#__PURE__*/_jsx(X, {
|
|
126
126
|
size: 12,
|
|
127
|
-
color:
|
|
127
|
+
color: night.color.accent + "80"
|
|
128
128
|
})]
|
|
129
129
|
}, pattern);
|
|
130
130
|
})
|
|
@@ -134,7 +134,7 @@ export function JotaiEventFilterView({
|
|
|
134
134
|
children: [/*#__PURE__*/_jsxs(SectionHeader, {
|
|
135
135
|
children: [/*#__PURE__*/_jsx(SectionHeader.Icon, {
|
|
136
136
|
icon: Filter,
|
|
137
|
-
color:
|
|
137
|
+
color: night.color.textSecondary,
|
|
138
138
|
size: 12
|
|
139
139
|
}), /*#__PURE__*/_jsx(SectionHeader.Title, {
|
|
140
140
|
children: "HOW ATOM FILTERS WORK"
|
|
@@ -158,7 +158,8 @@ export function JotaiEventFilterView({
|
|
|
158
158
|
const styles = StyleSheet.create({
|
|
159
159
|
container: {
|
|
160
160
|
flex: 1,
|
|
161
|
-
|
|
161
|
+
// Transparent so the night sheet's star field shows through.
|
|
162
|
+
backgroundColor: "transparent"
|
|
162
163
|
},
|
|
163
164
|
scrollContent: {
|
|
164
165
|
paddingTop: 16,
|
|
@@ -167,10 +168,10 @@ const styles = StyleSheet.create({
|
|
|
167
168
|
gap: 16
|
|
168
169
|
},
|
|
169
170
|
section: {
|
|
170
|
-
backgroundColor:
|
|
171
|
+
backgroundColor: night.color.surface,
|
|
171
172
|
borderRadius: 16,
|
|
172
173
|
borderWidth: 1,
|
|
173
|
-
borderColor:
|
|
174
|
+
borderColor: night.color.border,
|
|
174
175
|
overflow: "hidden"
|
|
175
176
|
},
|
|
176
177
|
atomList: {
|
|
@@ -188,10 +189,10 @@ const styles = StyleSheet.create({
|
|
|
188
189
|
gap: 10,
|
|
189
190
|
paddingVertical: 10,
|
|
190
191
|
paddingHorizontal: 12,
|
|
191
|
-
backgroundColor:
|
|
192
|
+
backgroundColor: night.color.surfaceElevated,
|
|
192
193
|
borderRadius: 8,
|
|
193
194
|
borderWidth: 1,
|
|
194
|
-
borderColor:
|
|
195
|
+
borderColor: night.color.border
|
|
195
196
|
},
|
|
196
197
|
atomRowFiltered: {
|
|
197
198
|
opacity: 0.45
|
|
@@ -208,13 +209,13 @@ const styles = StyleSheet.create({
|
|
|
208
209
|
fontFamily: "monospace"
|
|
209
210
|
},
|
|
210
211
|
atomRowTextFiltered: {
|
|
211
|
-
color:
|
|
212
|
+
color: night.color.textTertiary,
|
|
212
213
|
textDecorationLine: "line-through"
|
|
213
214
|
},
|
|
214
215
|
filteredLabel: {
|
|
215
216
|
fontSize: 10,
|
|
216
217
|
fontWeight: "500",
|
|
217
|
-
color:
|
|
218
|
+
color: night.color.textTertiary,
|
|
218
219
|
fontFamily: "monospace"
|
|
219
220
|
},
|
|
220
221
|
addLabel: {
|
|
@@ -238,21 +239,21 @@ const styles = StyleSheet.create({
|
|
|
238
239
|
justifyContent: "space-between",
|
|
239
240
|
paddingVertical: 10,
|
|
240
241
|
paddingHorizontal: 12,
|
|
241
|
-
backgroundColor:
|
|
242
|
+
backgroundColor: night.color.surfaceElevated,
|
|
242
243
|
borderRadius: 8,
|
|
243
244
|
borderWidth: 1,
|
|
244
|
-
borderColor:
|
|
245
|
+
borderColor: night.color.border,
|
|
245
246
|
gap: 8
|
|
246
247
|
},
|
|
247
248
|
patternText: {
|
|
248
249
|
flex: 1,
|
|
249
250
|
fontSize: 12,
|
|
250
251
|
fontFamily: "monospace",
|
|
251
|
-
color:
|
|
252
|
+
color: night.color.text
|
|
252
253
|
},
|
|
253
254
|
howItWorksText: {
|
|
254
255
|
fontSize: 11,
|
|
255
|
-
color:
|
|
256
|
+
color: night.color.textSecondary,
|
|
256
257
|
lineHeight: 16,
|
|
257
258
|
marginTop: 8,
|
|
258
259
|
paddingHorizontal: 16,
|
|
@@ -263,39 +264,39 @@ const styles = StyleSheet.create({
|
|
|
263
264
|
paddingHorizontal: 16,
|
|
264
265
|
paddingBottom: 16,
|
|
265
266
|
borderTopWidth: 1,
|
|
266
|
-
borderTopColor:
|
|
267
|
+
borderTopColor: night.color.border,
|
|
267
268
|
marginTop: 12
|
|
268
269
|
},
|
|
269
270
|
examplesTitle: {
|
|
270
271
|
fontSize: 10,
|
|
271
272
|
fontWeight: "600",
|
|
272
|
-
color:
|
|
273
|
+
color: night.color.textTertiary,
|
|
273
274
|
fontFamily: "monospace",
|
|
274
275
|
letterSpacing: 0.5,
|
|
275
276
|
marginBottom: 6
|
|
276
277
|
},
|
|
277
278
|
exampleItem: {
|
|
278
279
|
fontSize: 10,
|
|
279
|
-
color:
|
|
280
|
+
color: night.color.textTertiary,
|
|
280
281
|
fontFamily: "monospace",
|
|
281
282
|
lineHeight: 16
|
|
282
283
|
},
|
|
283
284
|
emptyText: {
|
|
284
285
|
fontSize: 11,
|
|
285
|
-
color:
|
|
286
|
+
color: night.color.textTertiary,
|
|
286
287
|
paddingHorizontal: 16,
|
|
287
288
|
paddingVertical: 12,
|
|
288
289
|
fontFamily: "monospace"
|
|
289
290
|
},
|
|
290
291
|
patternInput: {
|
|
291
292
|
borderWidth: 1,
|
|
292
|
-
borderColor:
|
|
293
|
+
borderColor: night.color.accentBorder,
|
|
293
294
|
borderRadius: 8,
|
|
294
295
|
paddingHorizontal: 12,
|
|
295
296
|
paddingVertical: 8,
|
|
296
297
|
fontSize: 12,
|
|
297
|
-
color:
|
|
298
|
+
color: night.color.text,
|
|
298
299
|
fontFamily: "monospace",
|
|
299
|
-
backgroundColor:
|
|
300
|
+
backgroundColor: night.color.surfaceElevated
|
|
300
301
|
}
|
|
301
302
|
});
|
|
@@ -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,
|
|
13
|
+
import { JsModal, ModalHeader, TabSelector, macOSColors, night, Search, Filter, Power, X, Box, devToolsStorageKeys, ProUpgradeModal, PowerToggleButton, ToolbarCopyButton, ToolbarClearButton, truncatePayload, TickProvider, useLimit } 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";
|
|
@@ -25,7 +25,7 @@ function EventsEmptyState({
|
|
|
25
25
|
style: styles.emptyState,
|
|
26
26
|
children: [/*#__PURE__*/_jsx(Box, {
|
|
27
27
|
size: 32,
|
|
28
|
-
color:
|
|
28
|
+
color: night.color.textTertiary
|
|
29
29
|
}), /*#__PURE__*/_jsx(Text, {
|
|
30
30
|
style: styles.emptyTitle,
|
|
31
31
|
children: "No atom changes"
|
|
@@ -272,12 +272,12 @@ export function JotaiModal({
|
|
|
272
272
|
style: styles.headerSearchContainer,
|
|
273
273
|
children: [/*#__PURE__*/_jsx(Search, {
|
|
274
274
|
size: 14,
|
|
275
|
-
color:
|
|
275
|
+
color: night.color.textSecondary
|
|
276
276
|
}), /*#__PURE__*/_jsx(TextInput, {
|
|
277
277
|
ref: searchInputRef,
|
|
278
278
|
style: styles.headerSearchInput,
|
|
279
279
|
placeholder: activeTab === "atoms" ? "Search atoms..." : "Search events...",
|
|
280
|
-
placeholderTextColor:
|
|
280
|
+
placeholderTextColor: night.color.placeholder,
|
|
281
281
|
value: searchText,
|
|
282
282
|
onChangeText: handleSearch,
|
|
283
283
|
onSubmitEditing: () => setIsSearchActive(false),
|
|
@@ -293,7 +293,7 @@ export function JotaiModal({
|
|
|
293
293
|
style: styles.headerSearchClear,
|
|
294
294
|
children: /*#__PURE__*/_jsx(X, {
|
|
295
295
|
size: 14,
|
|
296
|
-
color:
|
|
296
|
+
color: night.color.textSecondary
|
|
297
297
|
})
|
|
298
298
|
})]
|
|
299
299
|
}) : /*#__PURE__*/_jsx(TabSelector, {
|
|
@@ -313,14 +313,14 @@ export function JotaiModal({
|
|
|
313
313
|
style: styles.headerActionButton,
|
|
314
314
|
children: /*#__PURE__*/_jsx(Search, {
|
|
315
315
|
size: 14,
|
|
316
|
-
color:
|
|
316
|
+
color: night.color.textSecondary
|
|
317
317
|
})
|
|
318
318
|
}), /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
319
319
|
onPress: () => setShowFilters(true),
|
|
320
320
|
style: [styles.headerActionButton, hasActiveFilters && styles.headerActionButtonActive],
|
|
321
321
|
children: /*#__PURE__*/_jsx(Filter, {
|
|
322
322
|
size: 14,
|
|
323
|
-
color: hasActiveFilters ?
|
|
323
|
+
color: hasActiveFilters ? night.color.accent : night.color.textSecondary
|
|
324
324
|
})
|
|
325
325
|
}), activeTab === "atoms" && /*#__PURE__*/_jsx(ToolbarCopyButton, {
|
|
326
326
|
value: getAtomsSnapshot,
|
|
@@ -382,7 +382,7 @@ export function JotaiModal({
|
|
|
382
382
|
style: styles.emptyState,
|
|
383
383
|
children: [/*#__PURE__*/_jsx(Box, {
|
|
384
384
|
size: 32,
|
|
385
|
-
color:
|
|
385
|
+
color: night.color.textTertiary
|
|
386
386
|
}), /*#__PURE__*/_jsx(Text, {
|
|
387
387
|
style: styles.emptyTitle,
|
|
388
388
|
children: "No history yet"
|
|
@@ -407,7 +407,7 @@ export function JotaiModal({
|
|
|
407
407
|
style: styles.disabledBanner,
|
|
408
408
|
children: [/*#__PURE__*/_jsx(Power, {
|
|
409
409
|
size: 14,
|
|
410
|
-
color:
|
|
410
|
+
color: night.color.warning
|
|
411
411
|
}), /*#__PURE__*/_jsx(Text, {
|
|
412
412
|
style: styles.disabledText,
|
|
413
413
|
children: "Atom capture is disabled"
|
|
@@ -520,7 +520,9 @@ const styles = StyleSheet.create({
|
|
|
520
520
|
inlineRoot: {
|
|
521
521
|
flex: 1,
|
|
522
522
|
minHeight: 0,
|
|
523
|
-
|
|
523
|
+
// Transparent so the desktop workbench's hoisted sky (one field spanning
|
|
524
|
+
// sidebar + panel) shows through — the shell paints its base beneath it.
|
|
525
|
+
backgroundColor: "transparent"
|
|
524
526
|
},
|
|
525
527
|
inlineHeader: {
|
|
526
528
|
paddingHorizontal: 12,
|
|
@@ -531,21 +533,22 @@ const styles = StyleSheet.create({
|
|
|
531
533
|
},
|
|
532
534
|
container: {
|
|
533
535
|
flex: 1,
|
|
534
|
-
|
|
536
|
+
// Transparent so JsModal's ToolBackground shows through (the modal paints opaque base beneath it).
|
|
537
|
+
backgroundColor: "transparent"
|
|
535
538
|
},
|
|
536
539
|
headerSearchContainer: {
|
|
537
540
|
flexDirection: "row",
|
|
538
541
|
alignItems: "center",
|
|
539
|
-
backgroundColor:
|
|
540
|
-
borderRadius:
|
|
542
|
+
backgroundColor: night.color.surfaceElevated,
|
|
543
|
+
borderRadius: night.radius.row,
|
|
541
544
|
borderWidth: 1,
|
|
542
|
-
borderColor:
|
|
545
|
+
borderColor: night.color.border,
|
|
543
546
|
paddingHorizontal: 12,
|
|
544
547
|
paddingVertical: 5
|
|
545
548
|
},
|
|
546
549
|
headerSearchInput: {
|
|
547
550
|
flex: 1,
|
|
548
|
-
color:
|
|
551
|
+
color: night.color.text,
|
|
549
552
|
fontSize: 13,
|
|
550
553
|
marginLeft: 6,
|
|
551
554
|
paddingVertical: 2
|
|
@@ -558,14 +561,15 @@ const styles = StyleSheet.create({
|
|
|
558
561
|
width: 32,
|
|
559
562
|
height: 32,
|
|
560
563
|
borderRadius: 8,
|
|
561
|
-
backgroundColor:
|
|
564
|
+
backgroundColor: night.color.buttonSurface,
|
|
562
565
|
borderWidth: 1,
|
|
563
|
-
borderColor:
|
|
566
|
+
borderColor: night.color.border,
|
|
564
567
|
alignItems: "center",
|
|
565
568
|
justifyContent: "center"
|
|
566
569
|
},
|
|
567
570
|
headerActionButtonActive: {
|
|
568
|
-
backgroundColor:
|
|
571
|
+
backgroundColor: night.color.accentSoft,
|
|
572
|
+
borderColor: night.color.accentBorderStrong
|
|
569
573
|
},
|
|
570
574
|
disabledBanner: {
|
|
571
575
|
flexDirection: "row",
|
|
@@ -574,13 +578,13 @@ const styles = StyleSheet.create({
|
|
|
574
578
|
padding: 10,
|
|
575
579
|
marginHorizontal: 12,
|
|
576
580
|
marginTop: 8,
|
|
577
|
-
backgroundColor:
|
|
581
|
+
backgroundColor: night.color.warningSoft,
|
|
578
582
|
borderRadius: 8,
|
|
579
583
|
borderWidth: 1,
|
|
580
|
-
borderColor:
|
|
584
|
+
borderColor: night.color.warning + "20"
|
|
581
585
|
},
|
|
582
586
|
disabledText: {
|
|
583
|
-
color:
|
|
587
|
+
color: night.color.warning,
|
|
584
588
|
fontSize: 11,
|
|
585
589
|
flex: 1
|
|
586
590
|
},
|
|
@@ -593,14 +597,14 @@ const styles = StyleSheet.create({
|
|
|
593
597
|
paddingVertical: 40
|
|
594
598
|
},
|
|
595
599
|
emptyTitle: {
|
|
596
|
-
color:
|
|
600
|
+
color: night.color.text,
|
|
597
601
|
fontSize: 14,
|
|
598
602
|
fontWeight: "600",
|
|
599
603
|
marginTop: 12,
|
|
600
604
|
marginBottom: 6
|
|
601
605
|
},
|
|
602
606
|
emptyText: {
|
|
603
|
-
color:
|
|
607
|
+
color: night.color.textTertiary,
|
|
604
608
|
fontSize: 12,
|
|
605
609
|
textAlign: "center",
|
|
606
610
|
lineHeight: 18
|
|
@@ -612,25 +616,26 @@ const styles = StyleSheet.create({
|
|
|
612
616
|
padding: 10,
|
|
613
617
|
marginHorizontal: 12,
|
|
614
618
|
marginTop: 8,
|
|
615
|
-
backgroundColor:
|
|
619
|
+
backgroundColor: night.color.accentSoft,
|
|
616
620
|
borderRadius: 8,
|
|
617
621
|
borderWidth: 1,
|
|
618
|
-
borderColor:
|
|
622
|
+
borderColor: night.color.accentBorder
|
|
619
623
|
},
|
|
620
624
|
lockedText: {
|
|
621
|
-
color:
|
|
625
|
+
color: night.color.accent,
|
|
622
626
|
fontSize: 11,
|
|
623
627
|
fontWeight: "500",
|
|
624
628
|
flex: 1
|
|
625
629
|
},
|
|
626
630
|
upgradeBadge: {
|
|
627
|
-
backgroundColor:
|
|
631
|
+
backgroundColor: night.color.accent,
|
|
628
632
|
paddingHorizontal: 8,
|
|
629
633
|
paddingVertical: 3,
|
|
630
634
|
borderRadius: 4
|
|
631
635
|
},
|
|
632
636
|
upgradeBadgeText: {
|
|
633
|
-
|
|
637
|
+
// Ink on a filled accent surface — the night accent takes dark ink.
|
|
638
|
+
color: night.color.onAccent,
|
|
634
639
|
fontSize: 9,
|
|
635
640
|
fontWeight: "700",
|
|
636
641
|
letterSpacing: 0.5
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JotaiEventFilterView.d.ts","sourceRoot":"","sources":["../../../../src/jotai/components/JotaiEventFilterView.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"JotaiEventFilterView.d.ts","sourceRoot":"","sources":["../../../../src/jotai/components/JotaiEventFilterView.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAiBH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAG9C,UAAU,yBAAyB;IACjC,eAAe,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC7B,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,KAAK,EAAE,aAAa,EAAE,CAAC;CACxB;AAYD,wBAAgB,oBAAoB,CAAC,EACnC,eAAe,EACf,eAAe,EACf,YAAY,EACZ,KAAK,GACN,EAAE,yBAAyB,+BAwJ3B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buoy-gg/jotai",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.27",
|
|
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/shared-ui": "^7.0.
|
|
33
|
-
"@buoy-gg/license": "^7.0.
|
|
32
|
+
"@buoy-gg/shared-ui": "^7.0.27",
|
|
33
|
+
"@buoy-gg/license": "^7.0.27"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"jotai": ">=2.0.0",
|