Renderer configuration; every field falls back to its built-in
default (see constants.ts).
true when the container was found and the system is ready, false
otherwise — nothing is rendered until a successful init().
Displays a notification toast. Two call signatures are supported:
show(message, type, duration) — positionalshow(message, options) — options objectText to display.
Notification type ("success" | "error" | "warning" | "info")
or an options object.
Optionalduration: numberAuto-dismiss duration (ms); ignored when typeOrOptions is an object.
The toast element, null when the queue rejected it, or undefined when
the system is not initialised.
Shared body of the four type shortcuts: resolves their
number | NotifyOptions | undefined second argument onto show.
Notification type forced by the calling shortcut.
Text to display.
OptionaldurationOrOptions: number | NotifyOptionsDuration (ms) or an options object.
Displays a success toast (default duration: 3 s).
Text to display.
OptionaldurationOrOptions: number | NotifyOptionsDuration (ms) or an options object.
Displays an error toast (highest priority, longest default duration: 5 s).
Text to display.
OptionaldurationOrOptions: number | NotifyOptionsDuration (ms) or an options object.
Displays a warning toast (default duration: 4 s).
Text to display.
OptionaldurationOrOptions: number | NotifyOptionsDuration (ms) or an options object.
Displays an informational toast (default duration: 3 s).
Text to display.
OptionaldurationOrOptions: number | NotifyOptionsDuration (ms) or an options object.
Adds a notification to the priority queue, evicting a lower-priority entry when the queue is full, then processes the queue.
Text to display.
Partially resolved display options.
The toast element, or null when the entry was rejected.
Evicts one visible temporary toast to make room for a pending error.
Only a toast that is not already being removed frees a slot: _remove() is a
no-op on one that is, and the actual DOM removal is deferred by the exit
animation. temporaryToasts — the live counter _processQueue loops on — is
therefore updated here, so a burst of errors handled in a single pass cannot
re-target the same toast over and over and overflow maxVisible.
true only when a slot was genuinely freed.
Drains as much of the queue as the visible-toast budget allows.
The last toast displayed by this pass, or null when none was.
Renders one notification straight away — called by the queue once a slot is free.
Text to display.
Fully resolved display options.
The toast element appended to the container.
Builds the toast's dismiss button and registers its click on the renderer's
OWN listener manager, recording the id on the toast so _remove can release it.
⚠️ Deliberately not createElement({ onClick }). That prop is not a plain
addEventListener: dom-helpers routes it to GeoLeaf.Utils.events whenever
that global exists — and in production it always does, pointing at the GLOBAL
manager. Every toast therefore left a permanent entry there, holding a strong
reference to a button detached seconds later, while _eventManager (created by
init() for precisely this, destroyed by destroy()) stayed empty
(CAPACITÉS backlog B.35d).
Drops the toast's close-button entry from the manager. Idempotent — the dataset key is cleared first, so a second call is a no-op.
Removes a notification: marks it, plays the exit animation, then detaches it and re-processes the queue. A no-op on a toast already being removed.
The toast element to remove.
true when the toast is evicted to free a slot rather
than dismissed on its own terms (plays a different animation).
Dismisses every visible toast and empties the pending queue.
Dismisses one specific notification by its DOM reference.
Toast element returned by show / info / success / etc.
Temporarily suspends rendering — queued items wait for enable.
Resumes rendering and flushes anything that piled up while disabled.
Tears the system down: releases every timer and listener, detaches all toasts, empties the queue and marks the renderer disabled.
A subsequent init brings it back enabled on its own (B.19) — the recreate
path needs no enable() of its own.
Snapshot of the current renderer state (visible counts, queue depth, budgets).
Read-only and computed on call — it counts the toasts actually in the DOM rather than a tally kept alongside, so it cannot drift from what the user sees.
The counts, the two budgets (maxVisible, maxPersistent) and the enabled /
initialised flags.
(Re-)initialises the notification system against a container element.
init()is a full re-initialisation, not a merge (B.19). Every option is resolved fromconfigalone, falling back to its built-in default when omitted, and the renderer always comes back enabled. Callinginit(x)therefore lands on the same state whatever ran before it — including after adestroy().It used to be neither:
position/animations/durationsmerged over the current state whilemaxVisible/maxPersistentfell back to the defaults, so a second partialinit()silently reset two budgets and kept three other settings. Worse,enabledwas never restored, anddestroy()clears it — every recreate path came back mute unless the caller knew toenable()by hand. Per-field overrides (durations: { success: 4000 }) keep working: the config is layered over the defaults, not over the previous call.