@buoy-gg/zustand 2.1.12 → 2.1.13
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/index.js +1 -91
- package/lib/commonjs/preset.js +1 -102
- package/lib/commonjs/zustand/components/ZustandActionButton.js +1 -116
- package/lib/commonjs/zustand/components/ZustandDetailViewToggle.js +1 -134
- package/lib/commonjs/zustand/components/ZustandEventFilterView.js +1 -291
- package/lib/commonjs/zustand/components/ZustandIcon.js +1 -35
- package/lib/commonjs/zustand/components/ZustandModal.js +1 -603
- package/lib/commonjs/zustand/components/ZustandStateChangeItem.js +1 -165
- package/lib/commonjs/zustand/components/ZustandStateDetailContent.js +1 -352
- package/lib/commonjs/zustand/components/ZustandStateInfoView.js +1 -508
- package/lib/commonjs/zustand/components/ZustandStoreBrowser.js +1 -307
- package/lib/commonjs/zustand/components/index.js +1 -73
- package/lib/commonjs/zustand/hooks/index.js +1 -12
- package/lib/commonjs/zustand/hooks/useZustandStateChanges.js +1 -92
- package/lib/commonjs/zustand/index.js +1 -99
- package/lib/commonjs/zustand/utils/buoyZustandMiddleware.js +1 -220
- package/lib/commonjs/zustand/utils/index.js +1 -31
- package/lib/commonjs/zustand/utils/zustandStateStore.js +1 -361
- package/lib/module/index.js +1 -80
- package/lib/module/preset.js +1 -98
- package/lib/module/zustand/components/ZustandActionButton.js +1 -112
- package/lib/module/zustand/components/ZustandDetailViewToggle.js +1 -129
- package/lib/module/zustand/components/ZustandEventFilterView.js +1 -287
- package/lib/module/zustand/components/ZustandIcon.js +1 -32
- package/lib/module/zustand/components/ZustandModal.js +1 -599
- package/lib/module/zustand/components/ZustandStateChangeItem.js +1 -161
- package/lib/module/zustand/components/ZustandStateDetailContent.js +1 -348
- package/lib/module/zustand/components/ZustandStateInfoView.js +1 -503
- package/lib/module/zustand/components/ZustandStoreBrowser.js +1 -303
- package/lib/module/zustand/components/index.js +1 -10
- package/lib/module/zustand/hooks/index.js +1 -3
- package/lib/module/zustand/hooks/useZustandStateChanges.js +1 -88
- package/lib/module/zustand/index.js +1 -12
- package/lib/module/zustand/utils/buoyZustandMiddleware.js +1 -214
- package/lib/module/zustand/utils/index.js +1 -4
- package/lib/module/zustand/utils/zustandStateStore.js +1 -357
- package/package.json +3 -3
- package/lib/typescript/index.d.ts.map +0 -1
- package/lib/typescript/preset.d.ts.map +0 -1
- package/lib/typescript/zustand/components/ZustandActionButton.d.ts.map +0 -1
- package/lib/typescript/zustand/components/ZustandDetailViewToggle.d.ts.map +0 -1
- package/lib/typescript/zustand/components/ZustandEventFilterView.d.ts.map +0 -1
- package/lib/typescript/zustand/components/ZustandIcon.d.ts.map +0 -1
- package/lib/typescript/zustand/components/ZustandModal.d.ts.map +0 -1
- package/lib/typescript/zustand/components/ZustandStateChangeItem.d.ts.map +0 -1
- package/lib/typescript/zustand/components/ZustandStateDetailContent.d.ts.map +0 -1
- package/lib/typescript/zustand/components/ZustandStateInfoView.d.ts.map +0 -1
- package/lib/typescript/zustand/components/ZustandStoreBrowser.d.ts.map +0 -1
- package/lib/typescript/zustand/components/index.d.ts.map +0 -1
- package/lib/typescript/zustand/hooks/index.d.ts.map +0 -1
- package/lib/typescript/zustand/hooks/useZustandStateChanges.d.ts.map +0 -1
- package/lib/typescript/zustand/index.d.ts.map +0 -1
- package/lib/typescript/zustand/types/index.d.ts.map +0 -1
- package/lib/typescript/zustand/utils/buoyZustandMiddleware.d.ts.map +0 -1
- package/lib/typescript/zustand/utils/index.d.ts.map +0 -1
- package/lib/typescript/zustand/utils/zustandStateStore.d.ts.map +0 -1
|
@@ -1,291 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.ZustandEventFilterView = ZustandEventFilterView;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
10
|
-
var _zustandStateStore = require("../utils/zustandStateStore");
|
|
11
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
-
/** Returns the store color for a given pattern if it exactly matches a registered store name */
|
|
13
|
-
function getStoreColorForPattern(pattern, stores) {
|
|
14
|
-
const match = stores.find(s => s.name.toLowerCase() === pattern.toLowerCase());
|
|
15
|
-
return match ? _zustandStateStore.zustandStateStore.getStoreColor(match.name) : null;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/** True if any active pattern filters out this store */
|
|
19
|
-
function isStoreFiltered(store, ignoredPatterns) {
|
|
20
|
-
return Array.from(ignoredPatterns).some(p => store.name.toLowerCase().includes(p.toLowerCase()));
|
|
21
|
-
}
|
|
22
|
-
function ZustandEventFilterView({
|
|
23
|
-
ignoredPatterns,
|
|
24
|
-
onTogglePattern,
|
|
25
|
-
onAddPattern,
|
|
26
|
-
stores
|
|
27
|
-
}) {
|
|
28
|
-
const [showAddInput, setShowAddInput] = (0, _react.useState)(false);
|
|
29
|
-
const [inputValue, setInputValue] = (0, _react.useState)("");
|
|
30
|
-
const handleAddPattern = () => {
|
|
31
|
-
const trimmed = inputValue.trim();
|
|
32
|
-
if (trimmed) {
|
|
33
|
-
onAddPattern(trimmed);
|
|
34
|
-
setInputValue("");
|
|
35
|
-
setShowAddInput(false);
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.ScrollView, {
|
|
39
|
-
style: styles.container,
|
|
40
|
-
contentContainerStyle: styles.scrollContent,
|
|
41
|
-
showsVerticalScrollIndicator: false,
|
|
42
|
-
children: [stores.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
43
|
-
style: styles.section,
|
|
44
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_sharedUi.SectionHeader, {
|
|
45
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.SectionHeader.Title, {
|
|
46
|
-
children: "REGISTERED STORES"
|
|
47
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.SectionHeader.Badge, {
|
|
48
|
-
count: stores.length,
|
|
49
|
-
color: _sharedUi.buoyColors.primary
|
|
50
|
-
})]
|
|
51
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
|
|
52
|
-
style: styles.storeList,
|
|
53
|
-
contentContainerStyle: styles.storeListContent,
|
|
54
|
-
showsVerticalScrollIndicator: true,
|
|
55
|
-
nestedScrollEnabled: true,
|
|
56
|
-
children: stores.map(store => {
|
|
57
|
-
const storeColor = _zustandStateStore.zustandStateStore.getStoreColor(store.name);
|
|
58
|
-
const filtered = isStoreFiltered(store, ignoredPatterns);
|
|
59
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
|
|
60
|
-
style: [styles.storeRow, filtered && styles.storeRowFiltered],
|
|
61
|
-
onPress: () => onAddPattern(store.name),
|
|
62
|
-
disabled: filtered,
|
|
63
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
64
|
-
style: [styles.storeDot, {
|
|
65
|
-
backgroundColor: filtered ? _sharedUi.macOSColors.text.disabled : storeColor
|
|
66
|
-
}]
|
|
67
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
68
|
-
style: [styles.storeRowText, filtered && styles.storeRowTextFiltered, !filtered && {
|
|
69
|
-
color: storeColor
|
|
70
|
-
}],
|
|
71
|
-
numberOfLines: 1,
|
|
72
|
-
children: store.name
|
|
73
|
-
}), filtered ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
74
|
-
style: styles.filteredLabel,
|
|
75
|
-
children: "hidden"
|
|
76
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
77
|
-
style: [styles.addLabel, {
|
|
78
|
-
color: storeColor + "99"
|
|
79
|
-
}],
|
|
80
|
-
children: "+ hide"
|
|
81
|
-
})]
|
|
82
|
-
}, store.name);
|
|
83
|
-
})
|
|
84
|
-
})]
|
|
85
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
86
|
-
style: styles.section,
|
|
87
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_sharedUi.SectionHeader, {
|
|
88
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.SectionHeader.Icon, {
|
|
89
|
-
icon: _sharedUi.Filter,
|
|
90
|
-
color: _sharedUi.buoyColors.primary,
|
|
91
|
-
size: 12
|
|
92
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.SectionHeader.Title, {
|
|
93
|
-
children: "STORE NAME FILTERS"
|
|
94
|
-
}), ignoredPatterns.size > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.SectionHeader.Badge, {
|
|
95
|
-
count: ignoredPatterns.size,
|
|
96
|
-
color: _sharedUi.buoyColors.primary
|
|
97
|
-
})]
|
|
98
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
99
|
-
style: styles.addInputWrapper,
|
|
100
|
-
children: !showAddInput ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.AddFilterButton, {
|
|
101
|
-
onPress: () => setShowAddInput(true),
|
|
102
|
-
color: _sharedUi.buoyColors.primary,
|
|
103
|
-
label: "Add store name pattern"
|
|
104
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.AddFilterInput, {
|
|
105
|
-
value: inputValue,
|
|
106
|
-
onChange: setInputValue,
|
|
107
|
-
onSubmit: handleAddPattern,
|
|
108
|
-
onCancel: () => {
|
|
109
|
-
setShowAddInput(false);
|
|
110
|
-
setInputValue("");
|
|
111
|
-
},
|
|
112
|
-
placeholder: "Enter store name pattern to hide...",
|
|
113
|
-
color: _sharedUi.buoyColors.primary
|
|
114
|
-
})
|
|
115
|
-
}), ignoredPatterns.size > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
116
|
-
style: styles.patternList,
|
|
117
|
-
children: Array.from(ignoredPatterns).map(pattern => {
|
|
118
|
-
const storeColor = getStoreColorForPattern(pattern, stores);
|
|
119
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
|
|
120
|
-
style: styles.patternRow,
|
|
121
|
-
onPress: () => onTogglePattern(pattern),
|
|
122
|
-
activeOpacity: 0.8,
|
|
123
|
-
children: [storeColor ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
124
|
-
style: [styles.storeDot, {
|
|
125
|
-
backgroundColor: storeColor
|
|
126
|
-
}]
|
|
127
|
-
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
128
|
-
style: [styles.patternText, storeColor ? {
|
|
129
|
-
color: storeColor
|
|
130
|
-
} : null],
|
|
131
|
-
numberOfLines: 1,
|
|
132
|
-
children: pattern
|
|
133
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.X, {
|
|
134
|
-
size: 12,
|
|
135
|
-
color: _sharedUi.buoyColors.primary + "80"
|
|
136
|
-
})]
|
|
137
|
-
}, pattern);
|
|
138
|
-
})
|
|
139
|
-
})]
|
|
140
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
141
|
-
style: styles.section,
|
|
142
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_sharedUi.SectionHeader, {
|
|
143
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.SectionHeader.Icon, {
|
|
144
|
-
icon: _sharedUi.Filter,
|
|
145
|
-
color: _sharedUi.buoyColors.textSecondary,
|
|
146
|
-
size: 12
|
|
147
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.SectionHeader.Title, {
|
|
148
|
-
children: "HOW EVENT FILTERS WORK"
|
|
149
|
-
})]
|
|
150
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
151
|
-
style: styles.howItWorksText,
|
|
152
|
-
children: "Patterns hide matching stores from both the Stores tab and the Events tab. Tap a store above to quickly add it as a filter."
|
|
153
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
154
|
-
style: styles.examplesContainer,
|
|
155
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
156
|
-
style: styles.examplesTitle,
|
|
157
|
-
children: "EXAMPLES:"
|
|
158
|
-
}), ["• auth → hides authStore from stores & events", "• temp → hides tempStore, tempUserStore", "• cart → hides cartStore from both tabs"].map(ex => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
159
|
-
style: styles.exampleItem,
|
|
160
|
-
children: ex
|
|
161
|
-
}, ex))]
|
|
162
|
-
})]
|
|
163
|
-
})]
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
const styles = _reactNative.StyleSheet.create({
|
|
167
|
-
container: {
|
|
168
|
-
flex: 1,
|
|
169
|
-
backgroundColor: _sharedUi.buoyColors.base
|
|
170
|
-
},
|
|
171
|
-
scrollContent: {
|
|
172
|
-
paddingTop: 16,
|
|
173
|
-
paddingHorizontal: 16,
|
|
174
|
-
paddingBottom: 24,
|
|
175
|
-
gap: 16
|
|
176
|
-
},
|
|
177
|
-
section: {
|
|
178
|
-
backgroundColor: _sharedUi.buoyColors.card,
|
|
179
|
-
borderRadius: 16,
|
|
180
|
-
borderWidth: 1,
|
|
181
|
-
borderColor: _sharedUi.buoyColors.border,
|
|
182
|
-
overflow: "hidden"
|
|
183
|
-
},
|
|
184
|
-
storeList: {
|
|
185
|
-
maxHeight: 180
|
|
186
|
-
},
|
|
187
|
-
storeListContent: {
|
|
188
|
-
paddingHorizontal: 16,
|
|
189
|
-
paddingTop: 8,
|
|
190
|
-
paddingBottom: 16,
|
|
191
|
-
gap: 10
|
|
192
|
-
},
|
|
193
|
-
storeRow: {
|
|
194
|
-
flexDirection: "row",
|
|
195
|
-
alignItems: "center",
|
|
196
|
-
gap: 10,
|
|
197
|
-
paddingVertical: 10,
|
|
198
|
-
paddingHorizontal: 12,
|
|
199
|
-
backgroundColor: _sharedUi.buoyColors.hover,
|
|
200
|
-
borderRadius: 8,
|
|
201
|
-
borderWidth: 1,
|
|
202
|
-
borderColor: _sharedUi.buoyColors.border
|
|
203
|
-
},
|
|
204
|
-
storeRowFiltered: {
|
|
205
|
-
opacity: 0.45
|
|
206
|
-
},
|
|
207
|
-
storeDot: {
|
|
208
|
-
width: 7,
|
|
209
|
-
height: 7,
|
|
210
|
-
borderRadius: 3.5
|
|
211
|
-
},
|
|
212
|
-
storeRowText: {
|
|
213
|
-
flex: 1,
|
|
214
|
-
fontSize: 12,
|
|
215
|
-
fontWeight: "600",
|
|
216
|
-
fontFamily: "monospace"
|
|
217
|
-
},
|
|
218
|
-
storeRowTextFiltered: {
|
|
219
|
-
color: _sharedUi.macOSColors.text.muted,
|
|
220
|
-
textDecorationLine: "line-through"
|
|
221
|
-
},
|
|
222
|
-
filteredLabel: {
|
|
223
|
-
fontSize: 10,
|
|
224
|
-
fontWeight: "500",
|
|
225
|
-
color: _sharedUi.macOSColors.text.disabled,
|
|
226
|
-
fontFamily: "monospace"
|
|
227
|
-
},
|
|
228
|
-
addLabel: {
|
|
229
|
-
fontSize: 10,
|
|
230
|
-
fontWeight: "600",
|
|
231
|
-
fontFamily: "monospace"
|
|
232
|
-
},
|
|
233
|
-
addInputWrapper: {
|
|
234
|
-
paddingHorizontal: 16,
|
|
235
|
-
paddingTop: 8,
|
|
236
|
-
paddingBottom: 8
|
|
237
|
-
},
|
|
238
|
-
patternList: {
|
|
239
|
-
paddingHorizontal: 16,
|
|
240
|
-
paddingBottom: 16,
|
|
241
|
-
gap: 8
|
|
242
|
-
},
|
|
243
|
-
patternRow: {
|
|
244
|
-
flexDirection: "row",
|
|
245
|
-
alignItems: "center",
|
|
246
|
-
justifyContent: "space-between",
|
|
247
|
-
paddingVertical: 10,
|
|
248
|
-
paddingHorizontal: 12,
|
|
249
|
-
backgroundColor: _sharedUi.buoyColors.hover,
|
|
250
|
-
borderRadius: 8,
|
|
251
|
-
borderWidth: 1,
|
|
252
|
-
borderColor: _sharedUi.buoyColors.border,
|
|
253
|
-
gap: 8
|
|
254
|
-
},
|
|
255
|
-
patternText: {
|
|
256
|
-
flex: 1,
|
|
257
|
-
fontSize: 12,
|
|
258
|
-
fontFamily: "monospace",
|
|
259
|
-
color: _sharedUi.buoyColors.text
|
|
260
|
-
},
|
|
261
|
-
howItWorksText: {
|
|
262
|
-
fontSize: 11,
|
|
263
|
-
color: _sharedUi.buoyColors.textSecondary,
|
|
264
|
-
lineHeight: 16,
|
|
265
|
-
marginTop: 8,
|
|
266
|
-
paddingHorizontal: 16,
|
|
267
|
-
fontFamily: "monospace"
|
|
268
|
-
},
|
|
269
|
-
examplesContainer: {
|
|
270
|
-
paddingTop: 8,
|
|
271
|
-
paddingHorizontal: 16,
|
|
272
|
-
paddingBottom: 16,
|
|
273
|
-
borderTopWidth: 1,
|
|
274
|
-
borderTopColor: _sharedUi.buoyColors.border,
|
|
275
|
-
marginTop: 12
|
|
276
|
-
},
|
|
277
|
-
examplesTitle: {
|
|
278
|
-
fontSize: 10,
|
|
279
|
-
fontWeight: "600",
|
|
280
|
-
color: _sharedUi.buoyColors.textMuted,
|
|
281
|
-
fontFamily: "monospace",
|
|
282
|
-
letterSpacing: 0.5,
|
|
283
|
-
marginBottom: 6
|
|
284
|
-
},
|
|
285
|
-
exampleItem: {
|
|
286
|
-
fontSize: 10,
|
|
287
|
-
color: _sharedUi.buoyColors.textMuted,
|
|
288
|
-
fontFamily: "monospace",
|
|
289
|
-
lineHeight: 16
|
|
290
|
-
}
|
|
291
|
-
});
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ZustandEventFilterView=ZustandEventFilterView;var _react=require("react"),_reactNative=require("react-native"),_sharedUi=require("@buoy-gg/shared-ui"),_zustandStateStore=require("../utils/zustandStateStore"),_jsxRuntime=require("react/jsx-runtime");function getStoreColorForPattern(e,t){const o=t.find(t=>t.name.toLowerCase()===e.toLowerCase());return o?_zustandStateStore.zustandStateStore.getStoreColor(o.name):null}function isStoreFiltered(e,t){return Array.from(t).some(t=>e.name.toLowerCase().includes(t.toLowerCase()))}function ZustandEventFilterView({ignoredPatterns:e,onTogglePattern:t,onAddPattern:o,stores:r}){const[s,i]=(0,_react.useState)(!1),[a,n]=(0,_react.useState)("");return(0,_jsxRuntime.jsxs)(_reactNative.ScrollView,{style:styles.container,contentContainerStyle:styles.scrollContent,showsVerticalScrollIndicator:!1,children:[r.length>0&&(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.section,children:[(0,_jsxRuntime.jsxs)(_sharedUi.SectionHeader,{children:[(0,_jsxRuntime.jsx)(_sharedUi.SectionHeader.Title,{children:"REGISTERED STORES"}),(0,_jsxRuntime.jsx)(_sharedUi.SectionHeader.Badge,{count:r.length,color:_sharedUi.buoyColors.primary})]}),(0,_jsxRuntime.jsx)(_reactNative.ScrollView,{style:styles.storeList,contentContainerStyle:styles.storeListContent,showsVerticalScrollIndicator:!0,nestedScrollEnabled:!0,children:r.map(t=>{const r=_zustandStateStore.zustandStateStore.getStoreColor(t.name),s=isStoreFiltered(t,e);return(0,_jsxRuntime.jsxs)(_reactNative.TouchableOpacity,{style:[styles.storeRow,s&&styles.storeRowFiltered],onPress:()=>o(t.name),disabled:s,children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.storeDot,{backgroundColor:s?_sharedUi.macOSColors.text.disabled:r}]}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.storeRowText,s&&styles.storeRowTextFiltered,!s&&{color:r}],numberOfLines:1,children:t.name}),s?(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.filteredLabel,children:"hidden"}):(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.addLabel,{color:r+"99"}],children:"+ hide"})]},t.name)})})]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.section,children:[(0,_jsxRuntime.jsxs)(_sharedUi.SectionHeader,{children:[(0,_jsxRuntime.jsx)(_sharedUi.SectionHeader.Icon,{icon:_sharedUi.Filter,color:_sharedUi.buoyColors.primary,size:12}),(0,_jsxRuntime.jsx)(_sharedUi.SectionHeader.Title,{children:"STORE NAME FILTERS"}),e.size>0&&(0,_jsxRuntime.jsx)(_sharedUi.SectionHeader.Badge,{count:e.size,color:_sharedUi.buoyColors.primary})]}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.addInputWrapper,children:s?(0,_jsxRuntime.jsx)(_sharedUi.AddFilterInput,{value:a,onChange:n,onSubmit:()=>{const e=a.trim();e&&(o(e),n(""),i(!1))},onCancel:()=>{i(!1),n("")},placeholder:"Enter store name pattern to hide...",color:_sharedUi.buoyColors.primary}):(0,_jsxRuntime.jsx)(_sharedUi.AddFilterButton,{onPress:()=>i(!0),color:_sharedUi.buoyColors.primary,label:"Add store name pattern"})}),e.size>0&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.patternList,children:Array.from(e).map(e=>{const o=getStoreColorForPattern(e,r);return(0,_jsxRuntime.jsxs)(_reactNative.TouchableOpacity,{style:styles.patternRow,onPress:()=>t(e),activeOpacity:.8,children:[o?(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.storeDot,{backgroundColor:o}]}):null,(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.patternText,o?{color:o}:null],numberOfLines:1,children:e}),(0,_jsxRuntime.jsx)(_sharedUi.X,{size:12,color:_sharedUi.buoyColors.primary+"80"})]},e)})})]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.section,children:[(0,_jsxRuntime.jsxs)(_sharedUi.SectionHeader,{children:[(0,_jsxRuntime.jsx)(_sharedUi.SectionHeader.Icon,{icon:_sharedUi.Filter,color:_sharedUi.buoyColors.textSecondary,size:12}),(0,_jsxRuntime.jsx)(_sharedUi.SectionHeader.Title,{children:"HOW EVENT FILTERS WORK"})]}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.howItWorksText,children:"Patterns hide matching stores from both the Stores tab and the Events tab. Tap a store above to quickly add it as a filter."}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.examplesContainer,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.examplesTitle,children:"EXAMPLES:"}),["• auth → hides authStore from stores & events","• temp → hides tempStore, tempUserStore","• cart → hides cartStore from both tabs"].map(e=>(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.exampleItem,children:e},e))]})]})]})}const styles=_reactNative.StyleSheet.create({container:{flex:1,backgroundColor:_sharedUi.buoyColors.base},scrollContent:{paddingTop:16,paddingHorizontal:16,paddingBottom:24,gap:16},section:{backgroundColor:_sharedUi.buoyColors.card,borderRadius:16,borderWidth:1,borderColor:_sharedUi.buoyColors.border,overflow:"hidden"},storeList:{maxHeight:180},storeListContent:{paddingHorizontal:16,paddingTop:8,paddingBottom:16,gap:10},storeRow:{flexDirection:"row",alignItems:"center",gap:10,paddingVertical:10,paddingHorizontal:12,backgroundColor:_sharedUi.buoyColors.hover,borderRadius:8,borderWidth:1,borderColor:_sharedUi.buoyColors.border},storeRowFiltered:{opacity:.45},storeDot:{width:7,height:7,borderRadius:3.5},storeRowText:{flex:1,fontSize:12,fontWeight:"600",fontFamily:"monospace"},storeRowTextFiltered:{color:_sharedUi.macOSColors.text.muted,textDecorationLine:"line-through"},filteredLabel:{fontSize:10,fontWeight:"500",color:_sharedUi.macOSColors.text.disabled,fontFamily:"monospace"},addLabel:{fontSize:10,fontWeight:"600",fontFamily:"monospace"},addInputWrapper:{paddingHorizontal:16,paddingTop:8,paddingBottom:8},patternList:{paddingHorizontal:16,paddingBottom:16,gap:8},patternRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingVertical:10,paddingHorizontal:12,backgroundColor:_sharedUi.buoyColors.hover,borderRadius:8,borderWidth:1,borderColor:_sharedUi.buoyColors.border,gap:8},patternText:{flex:1,fontSize:12,fontFamily:"monospace",color:_sharedUi.buoyColors.text},howItWorksText:{fontSize:11,color:_sharedUi.buoyColors.textSecondary,lineHeight:16,marginTop:8,paddingHorizontal:16,fontFamily:"monospace"},examplesContainer:{paddingTop:8,paddingHorizontal:16,paddingBottom:16,borderTopWidth:1,borderTopColor:_sharedUi.buoyColors.border,marginTop:12},examplesTitle:{fontSize:10,fontWeight:"600",color:_sharedUi.buoyColors.textMuted,fontFamily:"monospace",letterSpacing:.5,marginBottom:6},exampleItem:{fontSize:10,color:_sharedUi.buoyColors.textMuted,fontFamily:"monospace",lineHeight:16}});
|
|
@@ -1,35 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.ZUSTAND_ICON_COLOR = void 0;
|
|
7
|
-
exports.ZustandIcon = ZustandIcon;
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
-
/**
|
|
11
|
-
* Zustand DevTools icon
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
const ZUSTAND_ICON_COLOR = exports.ZUSTAND_ICON_COLOR = "#463B3F";
|
|
15
|
-
function ZustandIcon({
|
|
16
|
-
size,
|
|
17
|
-
color
|
|
18
|
-
}) {
|
|
19
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
20
|
-
style: {
|
|
21
|
-
width: size,
|
|
22
|
-
height: size,
|
|
23
|
-
justifyContent: "center",
|
|
24
|
-
alignItems: "center"
|
|
25
|
-
},
|
|
26
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
27
|
-
style: {
|
|
28
|
-
fontSize: size * 0.75,
|
|
29
|
-
color: color || ZUSTAND_ICON_COLOR,
|
|
30
|
-
fontWeight: "700"
|
|
31
|
-
},
|
|
32
|
-
children: "Z"
|
|
33
|
-
})
|
|
34
|
-
});
|
|
35
|
-
}
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ZUSTAND_ICON_COLOR=void 0,exports.ZustandIcon=ZustandIcon;var _reactNative=require("react-native"),_jsxRuntime=require("react/jsx-runtime");const ZUSTAND_ICON_COLOR=exports.ZUSTAND_ICON_COLOR="#463B3F";function ZustandIcon({size:e,color:t}){return(0,_jsxRuntime.jsx)(_reactNative.View,{style:{width:e,height:e,justifyContent:"center",alignItems:"center"},children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{fontSize:.75*e,color:t||ZUSTAND_ICON_COLOR,fontWeight:"700"},children:"Z"})})}
|