@openweather/maps-ui-core
Framework-agnostic view-models for the SDK's simple UI kit — no DOM, no React, no MapLibre.
Isolation is checked in CI the same way @openweather/maps-core is. Both @openweather/maps-ui (DOM) and
@openweather/maps-react/ui (React) render these same modules, which is what keeps the two renderers from
drifting.
This is a deliberately small package: a thin, plain-styled layer over headless view-models, not the
data model for a designed product surface. mock, onecall, and icons/* — the One Call
fetch/mock source and the weather-condition icon assets that used to live here — were removed along
with the designed UI that consumed them; that fuller UI now lives in a separate weather-maps
website repo instead.
parts — the data-owm-part registry
PART — the full map of role → data-owm-part string, shared by both renderers and
styles/simple.css. See each page under Simple UI Kit for which parts a given control stamps.
Never repurpose an existing value for a new role; simple.css selectors key off exact string
match. The registry is deliberately small: mapRoot; legendRoot/legendBar/legendUnit/
legendTicks/legendTick; timelineRoot/timelinePlay/timelineRange/timelineLabel;
layerPanelRoot/layerPanelItem; searchRoot/searchInputWrap/searchSubmit/searchInput/
searchLocate/searchResults/searchItem; overlayToggle; queryRoot/queryRow;
statusText/errorBox;
roundButton/zoomRoot/zoomIn/zoomOut; pinSearch/pinClick.
visuals — layer glyphs
layerVisual(code, fallbackLabel?) → LayerVisual (icon id + label) — resolves a layer code to a
CSS-drawn default glyph and caption. Not currently rendered by any simple-kit control (the layer
panel renders plain text buttons), but still exported for a consumer building their own layer
picker.
units — unit cycling
getUnitCycleModel(...), applyUnitCycle(category, prefs) — the click-to-switch-unit behavior
shared by the legend bar and point-query box.
legend
getLegendModel(metadata, unitPrefs) → LegendModel (range, ticks, gradient stops, switchable
flag). equalStepTicks(min, max, count?), legendUnitCategory(metadata).
layout
createChromeLayoutStore() / ChromeLayoutStore — chrome layout snapshot state.
overlays
createOverlayStore(engine) → OverlaysSnapshot-backed store — visibility/checked state for
particles/cyclone/contours/lightning, read by both createOverlayToggles and <OverlayToggles>.
query
getPointQueryModel(result) → PointQueryModel (coords label, rows, empty state) for the
point-query box. placeFloating(options) → FloatingPlacement — clamped floating-element
positioning shared by the DOM and React point-query box.
rail
resolvePopularCategories(), categoryForLayer(), POPULAR_CATEGORIES — grouping used by the flat
layer panel. createLayerRailModel(options) and fitRail(measurements) (hover-fan slot promotion
and the responsive vertical/horizontal/folded layout math) are also still exported here for a
consumer building the fuller fan-out UI themselves, but neither createLayerPanel nor
<LayerPanel> uses them — see Layer Panel.
timeline
createTimelineModel(controller) → TimelineModel (an ExternalStore<TimelineViewModel>) — window
resolution (resolveTimelineWindow, rangeForWindow), frame rounding/labeling (roundToFrame,
formatFrameLabel). This one model backs both createTimelineSlider and <TimelineSlider>.
buildTimelineAxis (tick/day-label building) and TIMELINE_SPEED_OPTIONS remain exported for a
day-axis/speed-menu UI built on top, but the simple kit's plain range control uses neither.
pins
pinGeometry(variant) ('search' | 'click') → PinGeometry — dot-in-ring marker sizing.
hitTestPins(pins, point) → nearest-hit resolution, used by both renderers' pin click handling.
query-flow
createPointFlowStore(options) → PointFlowStore — a "what happens when the user clicks the map,
clicks a pin, or picks a search result" state machine. createSimpleMapUI/<SimpleMapUI> wire map
clicks straight to the point-query box without going through this store; it remains available for a
consumer building a richer click/detail flow of their own.
Styles
@openweather/maps-ui-core/styles/tokens.css— design tokens (--owm-*custom properties), scoped to.owm-root@openweather/maps-ui-core/styles/simple.css— plain styling for everydata-owm-partvalue the simple kit stamps
styles/parts.css and styles/shell.css — the fuller designed UI's stylesheets, including its
responsive breakpoints and shell region layout — were removed along with that UI.