Beautiful map components. 100% Free, Zero config, one command setup.
TypeScript
docs: clarify onViewportChange standalone usage in API docs
Anmoldeep Singh44b3a93c560d
diff --git a/src/app/docs/api-reference/page.tsx b/src/app/docs/api-reference/page.tsxindex 225f7c5..141d27d 100644--- a/src/app/docs/api-reference/page.tsx+++ b/src/app/docs/api-reference/page.tsx@@ -140,7 +140,7 @@ export default function ApiReferencePage() {name: "onViewportChange",type: "(viewport: MapViewport) => void",description:- "Callback fired continuously as the viewport changes (during pan, zoom, rotate). When used with viewport prop, enables controlled mode where viewport is driven by your state.",+ "Callback fired continuously as the viewport changes (during pan, zoom, rotate). Can be used alone to observe changes, or with viewport prop to enable controlled mode.",},]}/>diff --git a/src/registry/map.tsx b/src/registry/map.tsxindex c8b2f7f..e787305 100644--- a/src/registry/map.tsx+++ b/src/registry/map.tsx@@ -146,8 +146,8 @@ type MapProps = {viewport?: Partial<MapViewport>;/*** Callback fired continuously as the viewport changes (pan, zoom, rotate, pitch).- * When used with `viewport` prop, enables controlled mode.- * Receives the new viewport state to update your state.+ * Can be used standalone to observe changes, or with `viewport` prop+ * to enable controlled mode where the map viewport is driven by your state.*/onViewportChange?: (viewport: MapViewport) => void;} & Omit<MapLibreGL.MapOptions, "container" | "style">;