mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-18 09:12:18 +00:00
Keep Context inside the package boundaries
The shell passes the ground picker to the click bridge, so the UI shell no longer pulls in the annotation and search stack. Context's new modules are owned by the packages that import them and formatted with the rest. Co-authored-by: Manjunath Paparaju <[email protected]>
This commit is contained in:
1 parent
c351e66af9
commit
902689da8a
11 files changed
+426
-122
No files matched your search
@@ -9,13 +9,20 @@ export const contextSearchOpen = ref(false);
|
||||
/** The text as typed. */
|
||||
export const contextSearchText = ref('');
|
||||
/** The text to match against: trimmed, lower case, '' when not searching. */
|
||||
export const contextNeedle = computed(() => (contextSearchOpen.value ? contextSearchText.value.trim().toLowerCase() : ''));
|
||||
export const contextNeedle = computed(() =>
|
||||
contextSearchOpen.value ? contextSearchText.value.trim().toLowerCase() : '',
|
||||
);
|
||||
|
||||
/** Whether any of the given strings holds the searched text (true when not searching). */
|
||||
export function matchesContextSearch(...parts) {
|
||||
const needle = contextNeedle.value;
|
||||
if (!needle) return true;
|
||||
return parts.some((part) => part !== null && part !== undefined && String(part).toLowerCase().includes(needle));
|
||||
return parts.some(
|
||||
(part) =>
|
||||
part !== null &&
|
||||
part !== undefined &&
|
||||
String(part).toLowerCase().includes(needle),
|
||||
);
|
||||
}
|
||||
|
||||
export function closeContextSearch() {
|
||||
|
||||
Reference in new issue
Block a user