{"version":3,"file":"index.mjs","names":[],"sources":["../src/events/global.ts","../src/events/layer.ts","../src/events/map.ts","../src/events/reference.ts","../src/GeomanControls.ts"],"sourcesContent":["import type { Map as LeafletMap } from 'leaflet';\n\nimport type { HandlersWithDebug, Method } from '../types';\n\nexport function globalEvents(map: LeafletMap, handlers: HandlersWithDebug, method: Method) {\n  // Cut Mode\n  if (handlers.onGlobalCutModeToggled) {\n    map[method]('pm:globalcutmodetoggled', handlers.onGlobalCutModeToggled);\n  }\n\n  // Drag Mode\n  if (handlers.onGlobalDragModeToggled) {\n    map[method]('pm:globaldragmodetoggled', handlers.onGlobalDragModeToggled);\n  }\n\n  // Draw Mode\n  if (handlers.onGlobalDrawModeToggled) {\n    map[method]('pm:globaldrawmodetoggled', handlers.onGlobalDrawModeToggled);\n  }\n\n  // Edit Mode\n  if (handlers.onGlobalEditModeToggled) {\n    map[method]('pm:globaleditmodetoggled', handlers.onGlobalEditModeToggled);\n  }\n\n  // Misc Actions\n  if (handlers.onButtonClick) {\n    map[method]('pm:buttonclick', handlers.onButtonClick);\n  }\n  if (handlers.onActionClick) {\n    map[method]('pm:actionclick', handlers.onActionClick);\n  }\n  if (handlers.onKeyEvent) {\n    map[method]('pm:keyevent', handlers.onKeyEvent);\n  }\n  if (handlers.onLangChange) {\n    map[method]('pm:langchange', handlers.onLangChange);\n  }\n\n  // Remove Mode\n  if (handlers.onGlobalRemovalModeToggled) {\n    map[method]('pm:globalremovalmodetoggled', handlers.onGlobalRemovalModeToggled);\n  }\n\n  // Rotate Mode\n  if (handlers.onGlobalRotateModeToggled) {\n    map[method]('pm:globalrotatemodetoggled', handlers.onGlobalRotateModeToggled);\n  }\n}\n","import type { Layer } from 'leaflet';\n\nimport type { HandlersWithDebug, Method } from '../types';\n\nexport function layerEvents(layer: Layer, handlers: HandlersWithDebug, method: Method) {\n  // Drawing Mode\n  if (handlers.onVertexAdded) {\n    layer[method]('pm:vertexadded', handlers.onVertexAdded);\n  }\n  if (handlers.onSnapDrag) {\n    layer[method]('pm:snapdrag', handlers.onSnapDrag);\n  }\n  if (handlers.onSnap) {\n    layer[method]('pm:snap', handlers.onSnap);\n  }\n  if (handlers.onUnsnap) {\n    layer[method]('pm:unsnap', handlers.onUnsnap);\n  }\n  if (handlers.onCenterPlaced) {\n    layer[method]('pm:centerplaced', handlers.onCenterPlaced);\n  }\n  if (handlers.onChange) {\n    layer[method]('pm:change', handlers.onChange);\n  }\n\n  // Edit Mode\n  if (handlers.onEdit) {\n    layer[method]('pm:edit', handlers.onEdit);\n  }\n  if (handlers.onUpdate) {\n    layer[method]('pm:update', handlers.onUpdate);\n  }\n  if (handlers.onEnable) {\n    layer[method]('pm:enable', handlers.onEnable);\n  }\n  if (handlers.onDisable) {\n    layer[method]('pm:disable', handlers.onDisable);\n  }\n  if (handlers.onVertexRemoved) {\n    layer[method]('pm:vertexremoved', handlers.onVertexRemoved);\n  }\n  if (handlers.onVertexClick) {\n    layer[method]('pm:vertexclick', handlers.onVertexClick);\n  }\n  if (handlers.onMarkerDragStart) {\n    layer[method]('pm:markerdragstart', handlers.onMarkerDragStart);\n  }\n  if (handlers.onMarkerDrag) {\n    layer[method]('pm:markerdrag', handlers.onMarkerDrag);\n  }\n  if (handlers.onMarkerDragEnd) {\n    layer[method]('pm:markerdragend', handlers.onMarkerDragEnd);\n  }\n  if (handlers.onLayerReset) {\n    layer[method]('pm:layerreset', handlers.onLayerReset);\n  }\n  if (handlers.onIntersect) {\n    layer[method]('pm:intersect', handlers.onIntersect);\n  }\n\n  // Drag Mode\n  if (handlers.onDragStart) {\n    layer[method]('pm:dragstart', handlers.onDragStart);\n  }\n  if (handlers.onDrag) {\n    layer[method]('pm:drag', handlers.onDrag);\n  }\n  if (handlers.onDragEnd) {\n    layer[method]('pm:dragend', handlers.onDragEnd);\n  }\n  if (handlers.onDragEnable) {\n    layer[method]('pm:dragenable', handlers.onDragEnable);\n  }\n  if (handlers.onDragDisable) {\n    layer[method]('pm:dragdisable', handlers.onDragDisable);\n  }\n\n  // Remove Mode\n  if (handlers.onLayerRemove) {\n    layer[method]('pm:remove', handlers.onLayerRemove);\n  }\n\n  // Cut Mode\n  if (handlers.onLayerCut) {\n    layer[method]('pm:cut', handlers.onLayerCut);\n  }\n\n  // Rotate Mode\n  if (handlers.onLayerRotateEnable) {\n    layer[method]('pm:rotateenable', handlers.onLayerRotateEnable);\n  }\n  if (handlers.onLayerRotateDisable) {\n    layer[method]('pm:rotatedisable', handlers.onLayerRotateDisable);\n  }\n  if (handlers.onLayerRotateStart) {\n    layer[method]('pm:rotatestart', handlers.onLayerRotateStart);\n  }\n  if (handlers.onLayerRotate) {\n    layer[method]('pm:rotate', handlers.onLayerRotate);\n  }\n  if (handlers.onLayerRotateEnd) {\n    layer[method]('pm:rotateend', handlers.onLayerRotateEnd);\n  }\n\n  // Text Mode\n  if (handlers.onTextChange) {\n    layer[method]('pm:textchange', handlers.onTextChange);\n  }\n}\n","import type { Map as LeafletMap } from 'leaflet';\n\nimport type { HandlersWithDebug, Method } from '../types';\nimport { layerEvents } from './layer';\n\nexport function mapEvents(map: LeafletMap, handlers: HandlersWithDebug, method: Method) {\n  // Cut\n  if (handlers.onMapCut) {\n    map[method]('pm:cut', (e) => {\n      layerEvents(e.layer, handlers, 'off');\n      layerEvents(e.layer, handlers, 'on');\n      if (handlers.onMapCut) handlers.onMapCut(e);\n    });\n  }\n\n  // Draw\n  if (handlers.onCreate) {\n    map[method]('pm:create', (e) => {\n      layerEvents(e.layer, handlers, 'off');\n      layerEvents(e.layer, handlers, 'on');\n      if (handlers.onCreate) handlers.onCreate(e);\n    });\n  }\n  if (handlers.onDrawStart) {\n    map[method]('pm:drawstart', handlers.onDrawStart);\n  }\n  if (handlers.onDrawEnd) {\n    map[method]('pm:drawend', handlers.onDrawEnd);\n  }\n\n  // Remove\n  if (handlers.onMapRemove) {\n    map[method]('pm:remove', handlers.onMapRemove);\n  }\n\n  // Rotate\n  if (handlers.onMapRotateEnable) {\n    map[method]('pm:rotateenable', handlers.onMapRotateEnable);\n  }\n  if (handlers.onMapRotateDisable) {\n    map[method]('pm:rotatedisable', handlers.onMapRotateDisable);\n  }\n  if (handlers.onMapRotate) {\n    map[method]('pm:rotate', handlers.onMapRotate);\n  }\n  if (handlers.onMapRotateStart) {\n    map[method]('pm:rotatestart', handlers.onMapRotateStart);\n  }\n  if (handlers.onMapRotateEnd) {\n    map[method]('pm:rotateend', handlers.onMapRotateEnd);\n  }\n}\n","import type { GeomanHandlers } from '../types';\n\nexport const reference = [\n  'onMapRemove',\n  'onLayerRemove',\n  'onMapCut',\n  'onLayerCut',\n  'onMapRotateEnable',\n  'onLayerRotateEnable',\n  'onMapRotateDisable',\n  'onLayerRotateDisable',\n  'onMapRotateStart',\n  'onLayerRotateStart',\n  'onMapRotate',\n  'onLayerRotate',\n  'onMapRotateEnd',\n  'onLayerRotateEnd',\n  'onGlobalDrawModeToggled',\n  'onDrawStart',\n  'onDrawEnd',\n  'onCreate',\n  'onGlobalEditModeToggled',\n  'onGlobalDragModeToggled',\n  'onGlobalRemovalModeToggled',\n  'onGlobalCutModeToggled',\n  'onGlobalRotateModeToggled',\n  'onLangChange',\n  'onButtonClick',\n  'onActionClick',\n  'onKeyEvent',\n  'onSnapDrag',\n  'onSnap',\n  'onUnsnap',\n  'onCenterPlaced',\n  'onEdit',\n  'onUpdate',\n  'onEnable',\n  'onDisable',\n  'onVertexAdded',\n  'onVertexRemoved',\n  'onVertexClick',\n  'onMarkerDragStart',\n  'onMarkerDrag',\n  'onMarkerDragEnd',\n  'onLayerReset',\n  'onIntersect',\n  'onChange',\n  'onTextChange',\n  'onDragStart',\n  'onDrag',\n  'onDragEnd',\n  'onDragEnable',\n  'onDragDisable',\n] as (keyof GeomanHandlers)[];\n","import '@geoman-io/leaflet-geoman-free';\nimport { useLeafletContext } from '@react-leaflet/core';\nimport type { Layer, LayerGroup, PathOptions, PM } from 'leaflet';\nimport { useEffect, useLayoutEffect, useRef } from 'react';\n\nimport { globalEvents, layerEvents, mapEvents, reference } from './events';\nimport type { EventDebugFn, GeomanHandlers, GeomanProps, HandlersWithDebug } from './types';\n\nconst EMPTY_OPTIONS: PM.ToolbarOptions = {};\nconst EMPTY_GLOBAL_OPTIONS: PM.GlobalOptions = {};\nconst EMPTY_PATH_OPTIONS: PathOptions = {};\n\nexport default function GeomanControls({\n  options = EMPTY_OPTIONS,\n  globalOptions = EMPTY_GLOBAL_OPTIONS,\n  pathOptions = EMPTY_PATH_OPTIONS,\n  lang = 'en',\n  eventDebugFn,\n  onMount,\n  onUnmount,\n  ...handlers\n}: GeomanProps): null {\n  const { map, layerContainer } = useLeafletContext();\n  const container = (layerContainer as LayerGroup) || map;\n\n  // Hold the latest props in refs so registered listeners always invoke the\n  // freshest user handler without needing to detach/re-attach on each change.\n  const handlersRef = useRef<GeomanHandlers>(handlers);\n  const eventDebugFnRef = useRef<EventDebugFn | undefined>(eventDebugFn);\n  const onMountRef = useRef(onMount);\n  const onUnmountRef = useRef(onUnmount);\n  handlersRef.current = handlers;\n  eventDebugFnRef.current = eventDebugFn;\n  onMountRef.current = onMount;\n  onUnmountRef.current = onUnmount;\n\n  // biome-ignore lint/correctness/useExhaustiveDependencies: setup is keyed to container; prop updates flow through refs\n  useLayoutEffect(() => {\n    if (!container || !map?.pm) {\n      if (!container) console.warn('[GEOMAN-CONTROLS] No map or container instance found');\n      return;\n    }\n\n    // Only the instance that adds the toolbar owns its lifecycle. A second\n    // GeomanControls mounted on the same map registers its own event handlers\n    // but must not call onMount/onUnmount or addControls/removeControls,\n    // otherwise it would tear down the first instance's toolbar on unmount.\n    const ownsControls = !map.pm.controlsVisible();\n    if (ownsControls) {\n      map.pm.addControls(options);\n      onMountRef.current?.();\n    }\n\n    // Stable proxy: each Geoman event name forwards to the latest handler via\n    // handlersRef, falling back to eventDebugFn. Registered once per setup;\n    // never needs to detach/re-attach when user handlers change identity.\n    const proxy = Object.fromEntries(\n      reference.map((name) => [\n        name,\n        (e: unknown) => {\n          const handler = handlersRef.current[name] as ((arg: unknown) => void) | undefined;\n          if (handler) handler(e);\n          else eventDebugFnRef.current?.(e);\n        },\n      ])\n    ) as HandlersWithDebug;\n\n    const setupLayers = layerContainer ? container.getLayers() : map.pm.getGeomanLayers();\n    for (const layer of setupLayers) layerEvents(layer as Layer, proxy, 'on');\n    globalEvents(map, proxy, 'on');\n    mapEvents(map, proxy, 'on');\n\n    return () => {\n      if (!map?.pm) return;\n\n      // Snapshot layers at teardown time so we also detach from any layer\n      // created after setup (e.g. drawn via pm:create wrapper).\n      const teardownLayers = layerContainer ? container.getLayers() : map.pm.getGeomanLayers();\n      for (const layer of teardownLayers) layerEvents(layer as Layer, proxy, 'off');\n      globalEvents(map, proxy, 'off');\n      mapEvents(map, proxy, 'off');\n\n      if (ownsControls) {\n        map.pm.disableDraw();\n        map.pm.disableGlobalEditMode();\n        map.pm.disableGlobalRemovalMode();\n        map.pm.disableGlobalDragMode();\n        map.pm.disableGlobalCutMode();\n        map.pm.disableGlobalRotateMode();\n        onUnmountRef.current?.();\n        map.pm.removeControls();\n      }\n    };\n  }, [container]);\n\n  useEffect(() => {\n    if (!container || !map?.pm) return;\n    map.pm.setPathOptions(pathOptions);\n  }, [pathOptions, container, map]);\n\n  useEffect(() => {\n    if (!container || !map?.pm) return;\n    map.pm.setGlobalOptions({ layerGroup: container, ...globalOptions });\n  }, [globalOptions, container, map]);\n\n  useEffect(() => {\n    if (!container || !map?.pm) return;\n    map.pm.setLang(lang);\n  }, [lang, container, map]);\n\n  return null;\n}\n"],"mappings":";;;;AAIA,SAAgB,aAAa,KAAiB,UAA6B,QAAgB;CAEzF,IAAI,SAAS,wBACX,IAAI,QAAQ,2BAA2B,SAAS,sBAAsB;CAIxE,IAAI,SAAS,yBACX,IAAI,QAAQ,4BAA4B,SAAS,uBAAuB;CAI1E,IAAI,SAAS,yBACX,IAAI,QAAQ,4BAA4B,SAAS,uBAAuB;CAI1E,IAAI,SAAS,yBACX,IAAI,QAAQ,4BAA4B,SAAS,uBAAuB;CAI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