@brandlab-digital/site-core 3.5.0 → 3.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,3 +1,51 @@
1
1
  # `@brandlab-digital/site-core`
2
2
 
3
3
  Proprietary software © Brandlab Digital Marketing. All rights reserved. Published for Brandlab client sites.
4
+
5
+ ## Service-area maps (`./area-map`, from 3.6.0)
6
+
7
+ Shared boundary data and the map engine: behaviour, never appearance. Server
8
+ data (`browser: null`), like `./geography`: build models on the server and pass
9
+ plain values to components. Each site draws the models in its own style.
10
+
11
+ Data: `areaMapBoundaries` (NSW Spatial Services suburb boundaries for the
12
+ Sydney and Central Coast registries, simplified with shared borders kept
13
+ shared; method in `standards/registry/README.md`), `AREA_MAP_ATTRIBUTION` (the
14
+ CC BY 4.0 credit every map shows in its caption), `suburbOutline(slug)`,
15
+ `regionOutline(slug)` (regions and sub-regions), `councilOutline(slug)`,
16
+ `landOutline()` (water is everything else), `placeOutline(document, slug)` and
17
+ `areaMapBoundaryProblems(document)` for a site's own towns.
18
+
19
+ Geometry: `areaMapBounds`, `fitAreaMapFrame(bounds, { width, padding, aspect,
20
+ minSpanKm })` (latitude-corrected equirectangular), `projectAreaMapPoint`,
21
+ `areaMapPath(frame, rings)` (simplified to the frame, clipped, whole numbers,
22
+ relative commands) and `areaMapLabelPoint(rings)` (the pole of
23
+ inaccessibility, with `room` to the nearest edge, so labels sit inside without
24
+ hand nudges).
25
+
26
+ Models: `defineAreaMapSite({ registry, estate, decisions, href,
27
+ siteOwnedPlaces?, siteOwnedBoundaries? })` binds the site's estate and indexing
28
+ decisions (only `index` pages are ever linked; a published place without a
29
+ boundary throws). Then:
30
+
31
+ - `overviewMap(site, options)`: home and locations hub. Served regions
32
+ (linked when the region page is indexable), others muted, towns, the base and
33
+ job places, a label point per region.
34
+ - `regionMap(site, regionSlug, options)`: a region's localities: indexed
35
+ linked, served-but-noindex served and unlinked, the rest muted; job places.
36
+ - `suburbLocator(site, slug, { neighbours, jobs })`: the place, its nearest
37
+ neighbours in the order given (the page's own nearby list) and job places;
38
+ undefined when there is nothing to show.
39
+
40
+ Each model is plain data: `id` (`overview`, `region-<slug>`, `suburb-<slug>`),
41
+ `viewBox`, `shapes` (the inline overlay: linked shapes with `href` and `d`),
42
+ `labels` (`x`, `y`, `room`, `state`), `markers` (base and jobs, one per place
43
+ with a count), `crop` (the phone crop) and `layers`. `renderAreaMapBaseSvg(site,
44
+ model)` draws the static base layer (`land`, `focus`, `served`, `outline`
45
+ groups with no colours) for a cached static route; the page draws each group
46
+ with `<use href="<file>#<id>">` (`areaMapLayerIds(model)`) and styles the
47
+ `<use>` with its own tokens.
48
+
49
+ `./area-map/encode` (Node tools): `encodeAreaMapBoundaries` builds a document
50
+ in the shared format (topology, per-arc Douglas-Peucker, dissolves, base64url
51
+ arcs); the registry generator and `brandlab-area-map places` use it.