Skip to content

Commit

Permalink
export MapLifecycleListenerOptions subtype `LeafletMapLifecycleEven…
Browse files Browse the repository at this point in the history
…t` & `fullscreen.state.get: UseBooleanGet` integration
  • Loading branch information
Stassi committed Nov 15, 2024
1 parent 88aca59 commit 1f28504
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions src/leaf/map/fullscreen/map/map-lifecycle-listener.ts
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
import { DomEvent, DomUtil, type Map } from 'leaflet'

import { type AnchorAssign } from '../state/use-anchor'
import { type UseBoolean } from '../state/use-boolean'
import {
setControlAnchorTitle,
type SetControlAnchorTitleOptions,
type ControlAnchorTitleStates,
} from '../control/set-control-anchor-title'
import { type UseAnchor } from '../state/use-anchor'

export type LeafletMapLifecycleEvent = 'ready' | 'unload'
export type MapLifecycleListenerOptions = {
document: {
map: {
control: {
anchor: {
assign: UseAnchor['assign']
titleStates: SetControlAnchorTitleOptions['anchor']['titleStates']
assign: AnchorAssign
titleStates: ControlAnchorTitleStates
}
}
fullscreen: {
classNames: string
state: {
get: () => boolean
toggle: () => void
}
state: UseBoolean
}
lifecycleEvent: 'ready' | 'unload'
lifecycleEvent: LeafletMapLifecycleEvent
map: Map
}
}
Expand Down Expand Up @@ -58,7 +57,7 @@ export function mapLifecycleListener({
toggleFullscreenState()
setControlAnchorTitle({
anchor: { assign: anchorAssign, titleStates: anchorTitleStates },
fullscreen: getFullscreenState(),
fullscreen: { state: { get: getFullscreenState } },
})
},
)
Expand Down

0 comments on commit 1f28504

Please sign in to comment.