Vanilla DOM adapter: plain <a class="alap"> anchors,
driven by new AlapUI(config). No framework, no build step
required. Personalized around the vanilla-JS ecosystem — the async
queries here search HN for vanilla javascript, and the static
links are MDN / TC39 / WHATWG references.
Click any direction; every .alap trigger on the page
gets that data-alap-placement. Click the active
direction again to clear and fall back to the trigger's own default.
Quick confirm — Static DOM links (no async, opens instantly at the compass direction).
:slow: mockClick opens a menu with "Loading…" centered over the trigger. Two seconds later the item rows fade in and the menu FLIPs into its final placement.
:hn:search:$vanilla_js: — Algolia full-text search,
live off the wire. Alias defined in the config so the multi-word
query survives the tokenizer.
| slow protocolstatic mock (async) HN (async)
The static items render instantly; the async items fall in when the
:slow: timer fires. Provenance is shown by the left
border on each row (see source_mock /
source_hn classes).
:flaky: for deterministic error / empty states
Placeholder rows are marked with
[data-alap-placeholder="error" | "empty"]. A CSS rule
colors errors red and empties green; the default "Loading…" row is
italic gray.
The lens is activated by class="alap-lens". Same
expression grammar as the menu; the renderer picks lens-style fields
(image, title, author, summary).
class="alap-lightbox" switches renderers. The lightbox
pre-loads its first item while the slow protocol is still in flight;
once the second item arrives it becomes the next slide.
Both triggers below use :slow:2500:4:. Open one menu,
then (while it's still loading) open the other — the second
trigger subscribes to the existing in-flight request and both resolve
together, with a single network-style delay.