Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

548 B
Raw Blame
import type { FerrataBbox } from '@trek/shared';
import { create } from 'zustand';

/**
 * The area the tour planner's map shows, as it last reported it, for the rails
 * beside it that look for something "in this view" (HOR-01's horse routes).
 * The map stage writes it; null while no planner map is on screen.
 */
export const useTourMapViewportStore = create<{ bounds: FerrataBbox | null }>(() => ({ bounds: null }));

export function publishTourMapViewport(bounds: FerrataBbox | null): void {
  useTourMapViewportStore.setState({ bounds });
}