@nika-js/onlymap 0.9.0 → 0.10.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.
Files changed (93) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +50 -3
  3. package/dist/{LercDecode.es-BMcxSLhD.js → LercDecode.es-IEPCRZOv.js} +1 -1
  4. package/dist/{basemap-m98j2wxG.js → basemap-9lXclX9H.js} +3882 -3980
  5. package/dist/cartograph/elements/om-frame.d.ts +67 -1
  6. package/dist/cartograph/georef.d.ts +18 -4
  7. package/dist/cartograph/schema.d.ts +11 -0
  8. package/dist/cartograph.js +1480 -1311
  9. package/dist/cartograph.standalone.js +1808 -1615
  10. package/dist/{cityjson-D_V5GY8b.js → cityjson-k-z1r6c0.js} +1 -1
  11. package/dist/{crs-DsDQ4Q4i.js → crs-BzE_KP4M.js} +25 -2
  12. package/dist/{crs-Ciu7Xs7a.js → crs-ChglCB3O.js} +39 -16
  13. package/dist/dem-decode.d.ts +58 -0
  14. package/dist/elements/om-map.d.ts +12 -0
  15. package/dist/{geoparquet-XOwOmChh.js → geoparquet-DFDZDBun.js} +10 -10
  16. package/dist/globe-view-D9wjfL0T.js +104 -0
  17. package/dist/hillshade-C2BQr6pd.js +298 -0
  18. package/dist/hillshade-apron-Bem3DWyJ.js +40 -0
  19. package/dist/hillshade-apron.d.ts +54 -0
  20. package/dist/hillshade-shader-DI2uLSNU.js +165 -0
  21. package/dist/hillshade-shader.d.ts +168 -0
  22. package/dist/hillshade.d.ts +163 -0
  23. package/dist/html-data.d.ts +1 -1
  24. package/dist/{ifc-Dc-TdSJr.js → ifc-DXwePQRv.js} +131 -131
  25. package/dist/{index-DzOvV-O7.js → index-4Tvlt0iO.js} +57 -57
  26. package/dist/{index-HZWdgtm4.js → index-Bn66l3KG.js} +1 -1
  27. package/dist/index-BuXrMq5D.js +322 -0
  28. package/dist/index-CNRbZHkK.js +459 -0
  29. package/dist/{index-DDNElBTs.js → index-CkovmN47.js} +1 -1
  30. package/dist/index-CmuOizAF.js +641 -0
  31. package/dist/index-CvT5QHBS.js +65 -0
  32. package/dist/{index-BMbpftvm.js → index-DnVHKI61.js} +1 -1
  33. package/dist/{index-BSAY6CWm.js → index-JjyDEqAS.js} +18911 -17456
  34. package/dist/index.d.ts +4 -0
  35. package/dist/layer-registry.d.ts +27 -0
  36. package/dist/lerc-C1mQ_Kqq.js +22 -0
  37. package/dist/onlymap.standalone.js +49075 -45717
  38. package/dist/onlymapjs.js +73 -70
  39. package/dist/parse-manifest.d.ts +6 -0
  40. package/dist/plane-camera.d.ts +59 -0
  41. package/dist/plane-layers.d.ts +56 -0
  42. package/dist/plane-tiles.d.ts +99 -0
  43. package/dist/plane-tileset.d.ts +31 -0
  44. package/dist/plane-warp.d.ts +91 -0
  45. package/dist/post-process-effect-DfslKPM6.js +197 -0
  46. package/dist/programmatic.d.ts +16 -1
  47. package/dist/projection.d.ts +118 -0
  48. package/dist/{raster-Dg5p_99H.js → raster-D2NzdjZE.js} +609 -499
  49. package/dist/raster-hillshade.d.ts +119 -0
  50. package/dist/{raster-pipeline-DhjkqDYd.js → raster-pipeline-qnD1icOv.js} +511 -484
  51. package/dist/raster-pipeline.d.ts +10 -0
  52. package/dist/raster.d.ts +5 -0
  53. package/dist/runtime-core.d.ts +140 -1
  54. package/dist/serialize/clip.d.ts +50 -0
  55. package/dist/serialize/declutter.d.ts +44 -0
  56. package/dist/serialize/emit.d.ts +60 -0
  57. package/dist/serialize/index.d.ts +64 -0
  58. package/dist/serialize/strategy.d.ts +30 -0
  59. package/dist/serialize/style.d.ts +77 -0
  60. package/dist/snapshot.d.ts +46 -0
  61. package/dist/surface-anchor.d.ts +6 -0
  62. package/dist/terrain-heightfield.d.ts +0 -16
  63. package/dist/terrain-sample.d.ts +0 -13
  64. package/dist/text-on-path-Dm7vtNqt.js +146 -0
  65. package/dist/text-on-path.d.ts +157 -0
  66. package/dist/transform/buffer.d.ts +63 -0
  67. package/dist/transform/contour.d.ts +37 -0
  68. package/dist/transform/dot-density.d.ts +19 -0
  69. package/dist/transform/field.d.ts +80 -0
  70. package/dist/transform/geometry.d.ts +20 -0
  71. package/dist/transform/index.d.ts +29 -0
  72. package/dist/transform/simplify.d.ts +10 -0
  73. package/dist/transform/smooth.d.ts +12 -0
  74. package/dist/transform-stage.d.ts +92 -0
  75. package/dist/version.d.ts +1 -1
  76. package/dist/volumetrics.d.ts +7 -0
  77. package/dist/{zarr-D3CzK1Zm.js → zarr-D5e5agMG.js} +2 -2
  78. package/docs/cartograph.md +12 -4
  79. package/docs/cartography.md +328 -0
  80. package/docs/design/arrows.md +182 -0
  81. package/docs/design/carto-substrate.md +1055 -0
  82. package/docs/design/extensions.md +250 -0
  83. package/docs/design/hillshade.md +290 -0
  84. package/docs/effects.md +11 -0
  85. package/docs/hillshade.md +203 -0
  86. package/llms.txt +4 -2
  87. package/onlymapjs.attributes.json +45 -2
  88. package/onlymapjs.html-data.json +213 -25
  89. package/package.json +13 -9
  90. package/skills/onlymapjs/SKILL.md +7 -2
  91. package/skills/onlymapjs/references/syntax.md +31 -3
  92. package/dist/index-CfPbQUqO.js +0 -511
  93. package/dist/lerc-qK-nhCaB.js +0 -30
@@ -29,6 +29,10 @@
29
29
  "name": "min-zoom",
30
30
  "description": "Floor how far the user can zoom OUT. Applied to the controller, so a zoom-out past it is refused rather than clamped back. Absent = the renderer's default (0)."
31
31
  },
32
+ {
33
+ "name": "reference-scale",
34
+ "description": "The scale millimetre-authored <om-transform> knobs resolve against — \"1:50000\", or the ground metres one millimetre of paper stands for (\"50m\"). A cartograph frame supplies its own; a live map has no sheet to ask, so millimetre knobs are a validation error without this."
35
+ },
32
36
  {
33
37
  "name": "basemap",
34
38
  "description": "Basemap: a registered preset name, \"maplibre\" (demo style), a style URL, or \"none\" (standalone canvas).",
@@ -126,6 +130,10 @@
126
130
  }
127
131
  ]
128
132
  },
133
+ {
134
+ "name": "effects",
135
+ "description": "Print-finish switcher — preset radios over the map's own <om-effect>, written through the set-effect action so the choice is undoable and saved."
136
+ },
129
137
  {
130
138
  "name": "lighting-ambient",
131
139
  "description": "Ambient light intensity (always-on fill), e.g. 0.9."
@@ -518,6 +526,9 @@
518
526
  {
519
527
  "name": "HexagonLayer"
520
528
  },
529
+ {
530
+ "name": "HillshadeLayer"
531
+ },
521
532
  {
522
533
  "name": "IconLayer"
523
534
  },
@@ -572,6 +583,9 @@
572
583
  {
573
584
  "name": "TextLayer"
574
585
  },
586
+ {
587
+ "name": "TextOnPathLayer"
588
+ },
575
589
  {
576
590
  "name": "Tile3DLayer"
577
591
  },
@@ -1049,7 +1063,7 @@
1049
1063
  },
1050
1064
  {
1051
1065
  "name": "get-text",
1052
- "description": "Accessor for deck.gl getText — expression language: $field, scale(), formatDate(), arithmetic. Valid on: GeoJsonLayer, MVTLayer, PopupLayer, TextLayer."
1066
+ "description": "Accessor for deck.gl getText — expression language: $field, scale(), formatDate(), arithmetic. Valid on: GeoJsonLayer, MVTLayer, PopupLayer, TextLayer, TextOnPathLayer."
1053
1067
  },
1054
1068
  {
1055
1069
  "name": "get-text-angle",
@@ -1129,11 +1143,11 @@
1129
1143
  },
1130
1144
  {
1131
1145
  "name": "get-color",
1132
- "description": "Accessor for deck.gl getColor — expression language: $field, scale(), formatDate(), arithmetic. Valid on: IconLayer, LineLayer, PathLayer, PointCloudLayer, PopupLayer, ScenegraphLayer, SimpleMeshLayer, TextLayer, TripsLayer."
1146
+ "description": "Accessor for deck.gl getColor — expression language: $field, scale(), formatDate(), arithmetic. Valid on: IconLayer, LineLayer, PathLayer, PointCloudLayer, PopupLayer, ScenegraphLayer, SimpleMeshLayer, TextLayer, TextOnPathLayer, TripsLayer."
1133
1147
  },
1134
1148
  {
1135
1149
  "name": "get-size",
1136
- "description": "Accessor for deck.gl getSize — expression language: $field, scale(), formatDate(), arithmetic. Valid on: IconLayer, PopupLayer, TextLayer."
1150
+ "description": "Accessor for deck.gl getSize — expression language: $field, scale(), formatDate(), arithmetic. Valid on: IconLayer, PopupLayer, TextLayer, TextOnPathLayer."
1137
1151
  },
1138
1152
  {
1139
1153
  "name": "layout",
@@ -1145,7 +1159,7 @@
1145
1159
  },
1146
1160
  {
1147
1161
  "name": "max-zoom",
1148
- "description": "deck.gl maxZoom. Valid on: MVTLayer, PopupLayer, TerrainLayer, TileLayer."
1162
+ "description": "deck.gl maxZoom. Valid on: HillshadeLayer, MVTLayer, PopupLayer, TerrainLayer, TileLayer."
1149
1163
  },
1150
1164
  {
1151
1165
  "name": "scenegraph",
@@ -1261,7 +1275,7 @@
1261
1275
  },
1262
1276
  {
1263
1277
  "name": "src",
1264
- "description": "deck.gl src. Valid on: BIMLayer, COGLayer, ImageOverlay, ZarrLayer."
1278
+ "description": "deck.gl src. Valid on: BIMLayer, COGLayer, HillshadeLayer, ImageOverlay, ZarrLayer."
1265
1279
  },
1266
1280
  {
1267
1281
  "name": "geometry",
@@ -1411,6 +1425,26 @@
1411
1425
  "name": "nodata",
1412
1426
  "description": "deck.gl nodataOverride. Valid on: COGLayer, ZarrLayer."
1413
1427
  },
1428
+ {
1429
+ "name": "shading",
1430
+ "description": "deck.gl shading. Valid on: COGLayer, ZarrLayer."
1431
+ },
1432
+ {
1433
+ "name": "sun-azimuth",
1434
+ "description": "deck.gl sunAzimuth. Valid on: COGLayer, HillshadeLayer, ZarrLayer."
1435
+ },
1436
+ {
1437
+ "name": "sun-weight",
1438
+ "description": "deck.gl sunWeight. Valid on: COGLayer, HillshadeLayer, ZarrLayer."
1439
+ },
1440
+ {
1441
+ "name": "sun-elevation",
1442
+ "description": "deck.gl sunElevation. Valid on: COGLayer, HillshadeLayer, ZarrLayer."
1443
+ },
1444
+ {
1445
+ "name": "z-factor",
1446
+ "description": "deck.gl zFactor. Valid on: COGLayer, HillshadeLayer, ZarrLayer."
1447
+ },
1414
1448
  {
1415
1449
  "name": "variable",
1416
1450
  "description": "deck.gl variable. Valid on: ZarrLayer."
@@ -1427,6 +1461,50 @@
1427
1461
  "name": "spatial-dims",
1428
1462
  "description": "deck.gl spatialDims. Valid on: ZarrLayer."
1429
1463
  },
1464
+ {
1465
+ "name": "decoder",
1466
+ "description": "deck.gl decoder. Valid on: HillshadeLayer."
1467
+ },
1468
+ {
1469
+ "name": "sun-datum",
1470
+ "description": "deck.gl sunDatum. Valid on: HillshadeLayer."
1471
+ },
1472
+ {
1473
+ "name": "blend",
1474
+ "description": "deck.gl blend. Valid on: HillshadeLayer."
1475
+ },
1476
+ {
1477
+ "name": "zoom-offset",
1478
+ "description": "deck.gl zoomOffset. Valid on: HillshadeLayer, MVTLayer, TerrainLayer, TileLayer."
1479
+ },
1480
+ {
1481
+ "name": "get-path",
1482
+ "description": "Accessor for deck.gl getPath — expression language: $field, scale(), formatDate(), arithmetic. Valid on: PathLayer, TextOnPathLayer, TripsLayer."
1483
+ },
1484
+ {
1485
+ "name": "font-family",
1486
+ "description": "deck.gl fontFamily. Valid on: TextLayer, TextOnPathLayer."
1487
+ },
1488
+ {
1489
+ "name": "font-weight",
1490
+ "description": "deck.gl fontWeight. Valid on: TextLayer, TextOnPathLayer."
1491
+ },
1492
+ {
1493
+ "name": "letter-spacing",
1494
+ "description": "deck.gl letterSpacing. Valid on: TextOnPathLayer."
1495
+ },
1496
+ {
1497
+ "name": "offset",
1498
+ "description": "deck.gl offset. Valid on: ColumnLayer, GridCellLayer, TextOnPathLayer."
1499
+ },
1500
+ {
1501
+ "name": "placement",
1502
+ "description": "deck.gl placement. Valid on: TextOnPathLayer."
1503
+ },
1504
+ {
1505
+ "name": "max-labels",
1506
+ "description": "deck.gl maxLabels. Valid on: TextOnPathLayer."
1507
+ },
1430
1508
  {
1431
1509
  "name": "get-source-position",
1432
1510
  "description": "Accessor for deck.gl getSourcePosition — expression language: $field, scale(), formatDate(), arithmetic. Valid on: ArcLayer, GreatCircleLayer, LineLayer."
@@ -1495,10 +1573,6 @@
1495
1573
  "name": "angle",
1496
1574
  "description": "deck.gl angle. Valid on: ColumnLayer, GridCellLayer."
1497
1575
  },
1498
- {
1499
- "name": "offset",
1500
- "description": "deck.gl offset. Valid on: ColumnLayer, GridCellLayer."
1501
- },
1502
1576
  {
1503
1577
  "name": "coverage",
1504
1578
  "description": "deck.gl coverage. Valid on: ColumnLayer, GridCellLayer, GridLayer, H3HexagonLayer, HexagonLayer."
@@ -1543,10 +1617,6 @@
1543
1617
  "name": "_path-type",
1544
1618
  "description": "deck.gl _pathType. Valid on: PathLayer, TripsLayer."
1545
1619
  },
1546
- {
1547
- "name": "get-path",
1548
- "description": "Accessor for deck.gl getPath — expression language: $field, scale(), formatDate(), arithmetic. Valid on: PathLayer, TripsLayer."
1549
- },
1550
1620
  {
1551
1621
  "name": "get-normal",
1552
1622
  "description": "Accessor for deck.gl getNormal — expression language: $field, scale(), formatDate(), arithmetic. Valid on: PointCloudLayer."
@@ -1587,14 +1657,6 @@
1587
1657
  "name": "character-set",
1588
1658
  "description": "deck.gl characterSet. Valid on: TextLayer."
1589
1659
  },
1590
- {
1591
- "name": "font-family",
1592
- "description": "deck.gl fontFamily. Valid on: TextLayer."
1593
- },
1594
- {
1595
- "name": "font-weight",
1596
- "description": "deck.gl fontWeight. Valid on: TextLayer."
1597
- },
1598
1660
  {
1599
1661
  "name": "line-height",
1600
1662
  "description": "deck.gl lineHeight. Valid on: TextLayer."
@@ -1695,10 +1757,6 @@
1695
1757
  "name": "debounce-time",
1696
1758
  "description": "deck.gl debounceTime. Valid on: MVTLayer, TerrainLayer, TileLayer."
1697
1759
  },
1698
- {
1699
- "name": "zoom-offset",
1700
- "description": "deck.gl zoomOffset. Valid on: MVTLayer, TerrainLayer, TileLayer."
1701
- },
1702
1760
  {
1703
1761
  "name": "visible-min-zoom",
1704
1762
  "description": "deck.gl visibleMinZoom. Valid on: MVTLayer, TerrainLayer, TileLayer."
@@ -1893,6 +1951,133 @@
1893
1951
  }
1894
1952
  ]
1895
1953
  },
1954
+ {
1955
+ "name": "om-transform",
1956
+ "description": "A geometry transform on its parent <om-layer>'s line or polygon data — geometry the source doesn't contain. Runs in the data stage, so deck, anchor=\"surface\", the legend and the vector export all see the same shape. Document order is chain order. Spatial knobs are millimetres on paper, resolved against <om-map reference-scale>; ground units (m, km, ft) need no scale.",
1957
+ "attributes": [
1958
+ {
1959
+ "name": "type",
1960
+ "description": "Which transform.",
1961
+ "values": [
1962
+ {
1963
+ "name": "simplify"
1964
+ },
1965
+ {
1966
+ "name": "smooth"
1967
+ },
1968
+ {
1969
+ "name": "dot-density"
1970
+ },
1971
+ {
1972
+ "name": "buffer"
1973
+ },
1974
+ {
1975
+ "name": "contour"
1976
+ }
1977
+ ]
1978
+ },
1979
+ {
1980
+ "name": "tolerance",
1981
+ "description": "simplify: Douglas-Peucker tolerance, e.g. \"0.15mm\" (paper) or \"50m\" (ground). No vertex moves further than this."
1982
+ },
1983
+ {
1984
+ "name": "iterations",
1985
+ "description": "smooth: Chaikin corner-cutting passes, 0-6. One removes the straight-segment look; past three the shape stops being the shape.",
1986
+ "values": [
1987
+ {
1988
+ "name": "1"
1989
+ },
1990
+ {
1991
+ "name": "2"
1992
+ },
1993
+ {
1994
+ "name": "3"
1995
+ }
1996
+ ]
1997
+ },
1998
+ {
1999
+ "name": "distance",
2000
+ "description": "buffer: band width, e.g. \"1.2mm\" (paper) or \"500m\" (ground). Negative buffers inward. A cartographic ornament — grid-accurate, not an exact setback."
2001
+ },
2002
+ {
2003
+ "name": "repeat",
2004
+ "description": "buffer: how many bands, 1-12. Each is another threshold of ONE distance field, so five bands cost no more than one. Five with fade is the engraved shoreline of an old chart."
2005
+ },
2006
+ {
2007
+ "name": "fade",
2008
+ "description": "buffer: fade the bands' opacity outward, as a _bandOpacity property each feature carries. Needs repeat> 1."
2009
+ },
2010
+ {
2011
+ "name": "quality",
2012
+ "description": "buffer: cells across one band width (default 8). The whole error budget is one cell; raising it costs memory quadratically for accuracy linearly."
2013
+ },
2014
+ {
2015
+ "name": "letter-spacing",
2016
+ "description": "TextOnPathLayer: extra tracking between glyphs, in pixels. Letter-spaced names are a cartographic convention — an ocean or a range is conventionally tracked out across its own extent."
2017
+ },
2018
+ {
2019
+ "name": "placement",
2020
+ "description": "TextOnPathLayer: where along the line the label sits.",
2021
+ "values": [
2022
+ {
2023
+ "name": "start"
2024
+ },
2025
+ {
2026
+ "name": "middle"
2027
+ },
2028
+ {
2029
+ "name": "end"
2030
+ }
2031
+ ]
2032
+ },
2033
+ {
2034
+ "name": "max-labels",
2035
+ "description": "TextOnPathLayer: ceiling on emitted glyphs, so one enormous label set cannot wedge a frame."
2036
+ },
2037
+ {
2038
+ "name": "src",
2039
+ "description": "contour: DEM source — a terrain preset (\"terrarium\") or a {z}/{x}/{y} template."
2040
+ },
2041
+ {
2042
+ "name": "bounds",
2043
+ "description": "contour: the extent to contour, \"[west,south,east,north]\". DECLARED, not taken from the camera — a transform runs once at ingest, and a camera changes on every pan."
2044
+ },
2045
+ {
2046
+ "name": "interval",
2047
+ "description": "contour: vertical spacing between lines, e.g. \"100m\". A ground height, never paper millimetres — an elevation is not on the page."
2048
+ },
2049
+ {
2050
+ "name": "zoom",
2051
+ "description": "contour: DEM tile zoom (default 10). Higher is sharper and quadratically more tiles."
2052
+ },
2053
+ {
2054
+ "name": "decoder",
2055
+ "description": "contour: elevation encoding for a raw tile URL — \"terrarium\" or \"mapbox-rgb\". Implied by a preset."
2056
+ },
2057
+ {
2058
+ "name": "field",
2059
+ "description": "dot-density: the row property holding the count to scatter."
2060
+ },
2061
+ {
2062
+ "name": "per",
2063
+ "description": "dot-density: units of that field per dot, e.g. per=\"1000\" for one dot per thousand people."
2064
+ },
2065
+ {
2066
+ "name": "seed",
2067
+ "description": "dot-density: scatter seed. Fixed by default, so a recorded story and a live map place the same dots."
2068
+ },
2069
+ {
2070
+ "name": "max",
2071
+ "description": "dot-density: ceiling on dots per feature (default 20000), so one bad row cannot emit a million points."
2072
+ }
2073
+ ],
2074
+ "references": [
2075
+ {
2076
+ "name": "README",
2077
+ "url": "https://github.com/NikaGeospatial/onlymapjs/blob/main/README.md"
2078
+ }
2079
+ ]
2080
+ },
1896
2081
  {
1897
2082
  "name": "om-overlay",
1898
2083
  "description": "Rich HTML anchored to the map: a static coordinate, the current selection, or a feature's own geometry.",
@@ -2218,6 +2403,9 @@
2218
2403
  {
2219
2404
  "name": "lighting"
2220
2405
  },
2406
+ {
2407
+ "name": "effects"
2408
+ },
2221
2409
  {
2222
2410
  "name": "clip-box"
2223
2411
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nika-js/onlymap",
3
- "version": "0.9.0",
4
- "description": "Declarative deck.gl maps for HTML and React \u2014 interactive WebGL mapping with GeoJSON/CSV/Arrow data, MapLibre basemaps, widgets, popups, and live streams from a custom-element manifest or typed React components. TypeScript, no build step.",
3
+ "version": "0.10.0",
4
+ "description": "Declarative deck.gl maps for HTML and React — interactive WebGL mapping with GeoJSON/CSV/Arrow data, MapLibre basemaps, widgets, popups, and live streams from a custom-element manifest or typed React components. TypeScript, no build step.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -119,14 +119,14 @@
119
119
  ],
120
120
  "scripts": {
121
121
  "dev": "vite",
122
- "build": "npm run typecheck && npm run gen:licenses && vite build && vite build --config vite.react.config.ts && vite build --config vite.deck.config.ts && vite build --config vite.standalone.config.ts && vite build --config vite.cartograph.config.ts && vite build --config vite.cartograph-standalone.config.ts && node dev/assert-bundle-cdn-safe.mjs && npm run build:types",
122
+ "build": "npm run typecheck:src && npm run gen:licenses && vite build && vite build --config vite.react.config.ts && vite build --config vite.deck.config.ts && vite build --config vite.standalone.config.ts && vite build --config vite.cartograph.config.ts && vite build --config vite.cartograph-standalone.config.ts && node dev/assert-bundle-cdn-safe.mjs && npm run build:types",
123
123
  "build:types": "tsc -p tsconfig.build.json --emitDeclarationOnly",
124
124
  "typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.e2e.json --noEmit && tsc -p cloud/workers/telemetry/tsconfig.json && tsc -p cloud/workers/examples/tsconfig.json",
125
125
  "test": "vitest run",
126
- "comment:e2e-smoke": "Release gate for rendered-pixel guarantees the unit suite can't see: the license-condition badge chrome (a red badge e2e shipped across 0.6.24 AND 0.6.25 because only vitest gated publish) frame determinism, a cartograph frame's camera limits on the REAL renderers, and that a generated post-process shader actually compiles and keeps its millimetre knobs at print resolution (0.8.1 and 0.8.2 both shipped a tilt cap that unit tests passed and MapLibre never received). Deliberately tiny \u2014 the full e2e suite stays a manual/CI concern.",
127
- "test:e2e:smoke": "playwright test e2e/deterministic-frames.spec.ts && playwright test e2e/examples.spec.ts -g \"attribution badge\" && playwright test e2e/cartograph-limits.spec.ts && playwright test e2e/effects.spec.ts",
126
+ "comment:e2e-smoke": "Release gate for rendered-pixel guarantees the unit suite cannot see. Selection is BY TAG, not by file: add ` @smoke` to a test title and it joins the gate. The rule for earning the tag is one test per ESCAPE THAT ACTUALLY HAPPENED — the red badge that shipped across 0.6.24 and 0.6.25, frame determinism, the 0.8.1/0.8.2 tilt cap MapLibre never received, a post-process shader that compiles and keeps its millimetre knobs at print DPI, and the 0.9.0 rebuild that kept the stale shader. Adding a whole spec is how this grew from 2 tests to 13 and from 20s to 63s; the full suite (`test:e2e`) stays the manual/CI concern.",
127
+ "test:e2e:smoke": "playwright test --grep \"@smoke\"",
128
128
  "prepublishOnly": "node dev/tools/announce-release.mjs --check && npm run build && npm run test:e2e:smoke",
129
- "postpublish": "node dev/tools/announce-release.mjs",
129
+ "postpublish": "node dev/tools/wait-for-publish.mjs && node dev/tools/announce-release.mjs",
130
130
  "try": "vite-node dev/expr-repl.mjs",
131
131
  "test:e2e": "playwright test",
132
132
  "check-layout": "playwright test e2e/layout-audit.spec.ts",
@@ -140,9 +140,13 @@
140
140
  "dev:telemetry": "wrangler dev --config cloud/workers/telemetry/wrangler.toml",
141
141
  "deploy:examples": "wrangler deploy --config cloud/workers/examples/wrangler.toml",
142
142
  "dev:examples": "wrangler dev --config cloud/workers/examples/wrangler.toml",
143
- "gen:licenses": "node dev/gen-third-party-licenses.mjs"
143
+ "gen:licenses": "node dev/gen-third-party-licenses.mjs",
144
+ "typecheck:src": "tsc -p tsconfig.json --noEmit",
145
+ "comment:typecheck": "`typecheck` is the full sweep (src + e2e + both cloud workers) for dev and CI; `build` runs only `typecheck:src`, because the e2e suite and the workers are not in the published tarball.",
146
+ "wait-for-publish": "node dev/tools/wait-for-publish.mjs",
147
+ "comment:postpublish": "`npm publish` returns before the version is readable: the packument is CDN-cached for 300s, which is why `npm view` kept reporting the old version and looked like a failed publish. wait-for-publish polls the version-specific endpoint (a different cache key, ~8KB vs ~476KB) and blocks until it answers 200 — so the announce fires against a release that is actually fetchable."
144
148
  },
145
- "comment:deps": "This library ships a fully self-contained bundle in dist/ (verified: zero external bare imports), so it has NO runtime dependencies \u2014 deck.gl, loaders.gl, MapLibre, Arrow, d3, acorn, etc. are build-time-only and get bundled by Vite. Keeping them here (not in dependencies) is what stops every consumer install from pulling ~250 MB it never uses.",
149
+ "comment:deps": "This library ships a fully self-contained bundle in dist/ (verified: zero external bare imports), so it has NO runtime dependencies — deck.gl, loaders.gl, MapLibre, Arrow, d3, acorn, etc. are build-time-only and get bundled by Vite. Keeping them here (not in dependencies) is what stops every consumer install from pulling ~250 MB it never uses.",
146
150
  "devDependencies": {
147
151
  "@deck.gl/aggregation-layers": "9.3.5",
148
152
  "@deck.gl/core": "9.3.5",
@@ -195,5 +199,5 @@
195
199
  "ws": "^8.21.0",
196
200
  "zustand": "^5.0.14"
197
201
  },
198
- "comment:deck-pin": "deck.gl/luma.gl devDeps are EXACT pins: they get BUNDLED into dist, and both libraries hard-throw on duplicate-version detection \u2014 consumers that also ship their own deck.gl (nika-agent) must match these versions exactly. CONTRACT: the bundled deck.gl/luma.gl version is part of the release surface and only changes at the SemVer boundary a caret does NOT cross \u2014 a MAJOR onlymap release (a 0.x MINOR while pre-1.0). Anything a caret floats (minor+patch once >=1.0; patch while 0.x) must NEVER move deck.gl, so a consumer can caret onlymap safely. Bumping deck is a breaking-coordination event, never a side effect of a minor/patch release or a reinstall."
202
+ "comment:deck-pin": "deck.gl/luma.gl devDeps are EXACT pins: they get BUNDLED into dist, and both libraries hard-throw on duplicate-version detection — consumers that also ship their own deck.gl (nika-agent) must match these versions exactly. CONTRACT: the bundled deck.gl/luma.gl version is part of the release surface and only changes at the SemVer boundary a caret does NOT cross — a MAJOR onlymap release (a 0.x MINOR while pre-1.0). Anything a caret floats (minor+patch once >=1.0; patch while 0.x) must NEVER move deck.gl, so a consumer can caret onlymap safely. Bumping deck is a breaking-coordination event, never a side effect of a minor/patch release or a reinstall."
199
203
  }
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: onlymapjs
3
- description: Build, edit, debug, or review OnlyMapJS declarative HTML maps and dashboards, or React maps via the @nika-js/onlymap/react adapter. Use when a user asks for an interactive map, deck.gl-style visualization, geospatial dashboard, live fleet/telemetry map, choropleth, popup/tooltip map, map story/tour, manual drawing/sketch map, 3D map assets, a React map component, a map page shared as a single HTML file (incl. no-JS fallbacks for chat/email previews), a print-ready map sheet / PDF map / atlas (the cartograph entry: mm-based pages, frames, derived legends, scale bars, graticules), a styled/post-processed map look (film grain, halftone, duotone, vintage or printed finish, bloom-style passes — the <om-effect> pipeline), a responsive/mobile map whose controls auto-fold on narrow screens, auditing a map's widget layout with the check-layout tool, syncing OnlyMapJS map/camera state into an app state store (Redux, MobX, Zustand, Jotai — the getStore contract), BIM/IFC models (loading .ifc files in the browser, 3D Tiles per-element picking, isolate/hide/ghost, clash detection, model federation), routes and directions (a styled A-to-B route line, OSRM or another routing engine, click-to-route), live vehicle/rider/delivery tracking (a moving marker gliding between GPS fixes with a follow camera), a Remotion map video or programmatic map flyover with overlays (route to the separate @nika-js/onlymap-remotion package), a React Native or Expo mobile map (route to the separate @nika-js/onlymap-native package), or help with OnlyMapJS syntax, validation, widgets, data formats, testing, or publishing examples.
3
+ description: Build, edit, debug, or review OnlyMapJS declarative HTML maps and dashboards, or React maps via the @nika-js/onlymap/react adapter. Use when a user asks for an interactive map, deck.gl-style visualization, geospatial dashboard, live fleet/telemetry map, choropleth, popup/tooltip map, map story/tour, manual drawing/sketch map, 3D map assets, a React map component, a map page shared as a single HTML file (incl. no-JS fallbacks for chat/email previews), a print-ready map sheet / PDF map / atlas (the cartograph entry: mm-based pages, frames, derived legends, scale bars, graticules), a styled/post-processed map look (film grain, halftone, duotone, vintage or printed finish, bloom-style passes — the <om-effect> pipeline), shaded relief / hillshade / terrain shading on a flat cartographic map (the HillshadeLayer), a map in a REAL PROJECTION (Albers, state plane, British National Grid, UTM, Lambert — the crs attribute), a label that FOLLOWS A LINE / curved text / text along a path (a river's name down the river — the TextOnPathLayer), generalizing or ornamenting geometry (simplify, smooth, dot density, a coastal vignette/buffer band, contour lines from a DEM — the <om-transform> pipeline), or EXPORTING A MAP AS SVG / editable vector for Illustrator or a print shop (incl. freezing a cartograph frame to inline vector), a responsive/mobile map whose controls auto-fold on narrow screens, auditing a map's widget layout with the check-layout tool, syncing OnlyMapJS map/camera state into an app state store (Redux, MobX, Zustand, Jotai — the getStore contract), BIM/IFC models (loading .ifc files in the browser, 3D Tiles per-element picking, isolate/hide/ghost, clash detection, model federation), routes and directions (a styled A-to-B route line, OSRM or another routing engine, click-to-route), live vehicle/rider/delivery tracking (a moving marker gliding between GPS fixes with a follow camera), a Remotion map video or programmatic map flyover with overlays (route to the separate @nika-js/onlymap-remotion package), a React Native or Expo mobile map (route to the separate @nika-js/onlymap-native package), or help with OnlyMapJS syntax, validation, widgets, data formats, testing, or publishing examples.
4
4
  ---
5
5
 
6
6
  # OnlyMapJS
@@ -23,7 +23,7 @@ Use OnlyMapJS as a declarative HTML map library. Write custom elements such as `
23
23
  </script>
24
24
  ```
25
25
 
26
- For no-build CDN pages, use the single-file standalone bundle from a raw-file CDN — `https://unpkg.com/@nika-js/onlymap@0.9.0` (the bare package URL serves `dist/onlymap.standalone.js`) — plus `<link rel="stylesheet" href="https://unpkg.com/@nika-js/onlymap@0.9.0/dist/onlymapjs.css">`. Never a rebundling CDN (esm.sh, skypack): re-bundling duplicates the deck.gl/luma.gl runtime and every layer fails shader compilation.
26
+ For no-build CDN pages, use the single-file standalone bundle from a raw-file CDN — `https://unpkg.com/@nika-js/onlymap@0.10.0` (the bare package URL serves `dist/onlymap.standalone.js`) — plus `<link rel="stylesheet" href="https://unpkg.com/@nika-js/onlymap@0.10.0/dist/onlymapjs.css">`. Never a rebundling CDN (esm.sh, skypack): re-bundling duplicates the deck.gl/luma.gl runtime and every layer fails shader compilation.
27
27
 
28
28
  ## React Projects
29
29
 
@@ -78,6 +78,11 @@ Load the smallest reference needed for the task:
78
78
  - Hide all map chrome (a clean/cinematic frame, a screenshot, a story beat) -> `widgets-hidden` attribute on `<om-map>`, the `set-widgets-visible` action, or a `<om-widget type="widgets-toggle">` button. State survives (not destroyed); attribution never hides. Do NOT hand-roll `display:none`.
79
79
  - Keep mobile chrome usable -> rely on the default map-width auto-fold into per-side drawers; mark only essential controls `fold="never"`. Use `widgets-fold="off"` only when the user explicitly wants fixed wide-layout chrome.
80
80
  - Group adjacent map buttons (zoom + undo + toggle into one control group) -> just place compact button widgets in the same `position` slot; they auto-cluster. `cluster="false"` opts one out. Do NOT build a wrapper widget.
81
+ - Shaded relief / hillshade / terrain shading on a FLAT map (a cartographic relief base, Swiss-style multi-directional relief) -> `<om-layer type="HillshadeLayer" src="terrarium">`, NOT `terrain=` (that raises a 3D surface and means nothing at pitch 0). `sun-azimuth` takes a LIST of one to four azimuths (`"315 45 135"`) — there is no `multi-directional` boolean. `src` is required even though `terrarium` is keyless. See references/syntax.md and docs/hillshade.md.
82
+ - A map in a REAL PROJECTION (an Albers or state-plane sheet, a national grid, "not Web Mercator") -> `crs="EPSG:5070"` on `<om-map>`, with `basemap="none"`. The authored camera STAYS geographic (`center` is lng/lat, `zoom` unchanged), so stories and `seek()` keep working. A projected map cannot carry a MapLibre basemap, `terrain`, `pitch`/`bearing`, or H3/S2/geohash/quadkey layers — each is a validation error with a fix. Relief DOES work. See docs/cartography.md.
83
+ - Generalizing or ornamenting geometry (smooth a jagged coastline, thin a dense one, scatter dots for population, an engraved coastal vignette, contour lines) -> `<om-transform type="simplify|smooth|dot-density|buffer|contour">` as a CHILD of the `<om-layer>`. Spatial knobs are millimetres on paper and need `reference-scale` on `<om-map>`; ground units (`tolerance="50m"`) need none. `buffer` is a cartographic ORNAMENT with a measured half-cell bound — for a setback somebody will act on, say so and point at PostGIS/turf. See docs/cartography.md.
84
+ - A label that FOLLOWS a line (curved text, text on a path, "the river's name should run along the river") -> `<om-layer type="TextOnPathLayer" get-path="$path" get-text="$name">`. deck has no such layer; this is a composite emitting one text instance per glyph. `letter-spacing` tracks names out (the convention for oceans and ranges), `offset` moves it off the line, `placement="start|middle|end"` picks where. It reads left-to-right whichever way the line was digitised, and a name that does not fit is DROPPED rather than squeezed. Exports as one `<textPath>`. See docs/cartography.md.
85
+ - Exporting a map as EDITABLE VECTOR (SVG for Illustrator, a print shop, "not a screenshot") -> `await map.snapshot({ format: "svg" })`, which returns SVG text. Labels come out as real `<text>`; rasters and 3D come out as placed `<image>` bands. A `<om-effect>` print finish forces the whole frame to one raster band — say that BEFORE the user builds a sheet around both. `frame.freeze({format: "svg"})` does the same inside a cartograph frame. See docs/cartography.md.
81
86
  - GeoTIFF/COG raster (DEM, satellite imagery, NDVI) -> `<om-layer type="COGLayer" src="…tif">` with `min`/`max`/`colormap` for single-band data (see syntax.md — `src`, not `data`).
82
87
  - Zarr / GeoZarr raster (chunked N-D arrays — climate/weather grids, datacubes) -> `<om-layer type="ZarrLayer" src="…​.zarr" variable="…" select="time=0">` with `min`/`max`/`colormap` (same raster styling as COGLayer). Pick the `variable` and pin every non-spatial dim in `select`. A GeoZarr store georeferences itself; a plain Zarr needs manual `bounds` + `crs` + `spatial-dims`. `src`, not `data` — and it can be any absolute URL to a remote store, which needs no server setup but must be CORS-enabled (fetched in the browser) and public (authenticated stores are a follow-up). See syntax.md.
83
88
  - BIM model / .ifc file / 3D Tiles with per-element picking -> `<om-layer type="BIMLayer" src="…​.ifc" pickable>` (parses the IFC in-browser; web-ifc WASM is CDN-fetched on first use) or `type="Tile3DLayer" tileset="…" pick-features` for a pre-built tileset. Author `terrain` explicitly (`terrain="mapterhorn"`, or `terrain="off"` for flat ground) — a model that resolves real elevation (IfcMapConversion + OrthogonalHeight) on a terrain-less map raises an error through the validation channel at load time, and the library never writes attributes for you. Style by property with `feature-color-by`/`feature-color-scale` (+ `feature-palette`); isolate/hide/ghost elements declaratively with `feature-filter-field` + `isolate-features`/`hide-features`/`ghost-features` (undoable, story-steppable). See syntax.md.
@@ -16,8 +16,8 @@ Vite/npm project:
16
16
  Static CDN page (raw-file CDNs only — unpkg/jsDelivr; never esm.sh or another rebundling CDN, which duplicates the WebGL runtime and breaks layer shaders):
17
17
 
18
18
  ```html
19
- <link rel="stylesheet" href="https://unpkg.com/@nika-js/onlymap@0.9.0/dist/onlymapjs.css">
20
- <script type="module" src="https://unpkg.com/@nika-js/onlymap@0.9.0"></script>
19
+ <link rel="stylesheet" href="https://unpkg.com/@nika-js/onlymap@0.10.0/dist/onlymapjs.css">
20
+ <script type="module" src="https://unpkg.com/@nika-js/onlymap@0.10.0"></script>
21
21
  ```
22
22
 
23
23
  Always include `onlymapjs.css` — it carries the MapLibre basemap styles and the no-JS fallback rules (`<om-fallback>` / default banner). For the fallback to work in script-disabled previews it must load without JavaScript: a real `<link rel="stylesheet">` or inlined `<style>` on no-build pages (a bundler-emitted stylesheet is fine in npm projects).
@@ -48,7 +48,35 @@ Common attributes:
48
48
  - `preset="vintage|engraved|night|blueprint|riso|newsprint|muted"` — a named look. Override one knob with `<op>-<param>` (`grain-amount="0.02"`); get the preset as editable markup with `OmMap.expandPreset(name)`.
49
49
  - `op="tint|levels|saturation|posterize|vignette|grain|edges|blur|sharpen|halftone"` — one operation, its knobs as attributes.
50
50
  - an inline `<script type="application/json">` luma ShaderModule — raw GLSL, multi-pass, passed to deck untouched.
51
- Spatial knobs are MILLIMETRES (`size="0.12mm"`): they resolve against the live pixel density so a look keeps its physical size at print DPI, and a pixel value is a validation error. A preset is literally a saved op list. `set-effect {preset}` swaps it live and writes the document. With a MapLibre basemap the basemap is composited underneath and stays untreated — the validator warns.
51
+ Spatial knobs are MILLIMETRES (`size="0.12mm"`): they resolve against the live pixel density so a look keeps its physical size at print DPI, and a pixel value is a validation error. A preset is literally a saved op list. `set-effect {preset}` swaps it live and writes the document; `<om-widget type="effects">` renders that as preset radios (plus Off) and mirrors the document rather than holding state. With a MapLibre basemap the basemap is composited underneath and stays untreated — the validator warns.
52
+ - A REAL PROJECTION is `crs` on `<om-map>`: `<om-map crs="EPSG:5070" basemap="none" center="[-98,39]" zoom="4">`. The whole renderer draws in that plane — parallels curve, an equal-area projection is genuinely equal-area. Web Mercator and plate carrée need nothing; national grids and UTM zones resolve through proj4, loaded only when a map asks; anything else takes `crs-def="+proj=…"` or `OmMap.registerCrs(code, defOrFunctions)`.
53
+ - THE AUTHORED CAMERA STAYS GEOGRAPHIC. `center` is lng/lat and `zoom` means what it always meant, so stories, `seek()`, `getCamera()` and state bridges are unchanged. Clicks report lng/lat, not plane metres.
54
+ - Limits, each a validation ERROR with a fix, never a silent no-op: no MapLibre basemap (`basemap="none"`), no `terrain`, no `pitch`/`bearing` (the view is planimetric), no H3/S2/geohash/quadkey layers (deck builds their geometry from a token inside the layer — convert the cells to polygons), and the CRS is fixed for the map's life.
55
+ - Relief DOES work on a projected sheet, both routes. `sun-datum="sheet"` (default) keeps the apparent light constant across the plate; `"geographic"` is physically true. The swing is 34° across a CONUS sheet; the attribute is inert in Mercator and the validator says so.
56
+ - `reference-scale="1:50000"` (or `"50m"`) is what millimetre-authored `<om-transform>` knobs resolve against.
57
+ - GEOMETRY TRANSFORMS are `<om-transform>` CHILDREN of an `<om-layer>`, applied in document order, in the DATA stage — so deck, `anchor="surface"`, the legend and the vector exporter all see the same geometry.
58
+ - `type="simplify" tolerance="0.15mm"` — Douglas–Peucker, measured on the GROUND rather than in degrees (a longitude degree is 111 km at the equator and 56 km at 60°N).
59
+ - `type="smooth" iterations="2"` — Chaikin, 1–6. One pass removes the straight-segment look, which is the loudest "web map" tell there is.
60
+ - `type="dot-density" field="population" per="1000"` — seeded (`seed=`, `max=`), so a recorded story and a live map place the same dots. Replaces the row set with points carrying the source row's properties.
61
+ - `type="buffer" distance="0.9mm" repeat="5" fade` — bands around a shape, outermost first, each carrying `_band` and `_bandOpacity` (read it: `get-fill-color="[125,155,173, $_bandOpacity * 165]"`). N bands are N thresholds of ONE signed distance field, so five cost what one costs and the output cannot self-intersect. An ORNAMENT with a measured half-cell bound (0.042 mm at 300 dpi), NOT an analytic setback — for a distance somebody will act on, point at PostGIS/turf.
62
+ - `type="contour" src="terrarium" bounds="[w,s,e,n]" interval="100m" zoom="10"` — isolines marched off a DEM (not deck's `ContourLayer`, which contours point DENSITY). It SOURCES geometry onto a layer with no data; its extent is DECLARED rather than taken from the camera, because a transform runs once at ingest. Each line carries `elevation` and `index` (true every fifth line — the cartographer's heavier contour). The interval is a ground height; `interval="2mm"` is an error.
63
+ - Millimetre knobs need `reference-scale` on the map (or a cartograph frame, which supplies its own); without one they are a validation error naming the fix. Ground units need none. Columnar layers are out of scope and say so.
64
+ - A LABEL THAT FOLLOWS ITS LINE is `<om-layer type="TextOnPathLayer" get-path="$path" get-text="$name">` — a river's name along the river, a range's along the range. deck has no such layer; this is a composite over `TextLayer` emitting one instance per glyph, each rotated to the local tangent.
65
+ - `get-path` and `get-text` are both REQUIRED — either alone is silently inert, and the validator says so.
66
+ - `letter-spacing="1.5"` tracks the glyphs out (pixels). A convention for oceans and ranges, not a flourish. `offset="5"` moves the label perpendicular; POSITIVE is to the LEFT of the line's direction. `placement="start|middle|end"` picks where along the line it sits (default `middle`). `max-labels` caps the glyphs emitted.
67
+ - It READS LEFT TO RIGHT whichever way the line was digitised — a path's direction is an accident of the data, and a label following a right-to-left line would come out upside down, so the layer flips the path (and `start`/`end` flip with it, because they mean a place on the line rather than a direction).
68
+ - A name that does NOT FIT its line is dropped, not compressed and not run off the end.
69
+ - Placement is computed in SCREEN PIXELS and re-done when the camera moves, because a glyph advance is pixels while a path is world distance. On a print sheet the camera is fixed, so it resolves once.
70
+ - The SVG export emits ONE `<textPath>` per label rather than per-glyph `<text>` — the one place the exporter produces better output than the screen.
71
+ - VECTOR EXPORT is `await map.snapshot({ format: "svg" })`, returning SVG TEXT (`as: "blob"` for a file, `effectDpi` for the raster bands, `onNotice` for dev notices). Polygons and paths become `<path>`, labels become real `<text>` after a deterministic CPU decluttering pass, and anything whose appearance is pixels becomes a placed `<image>` band. Consecutive raster layers merge into one band; a vector layer between them keeps them apart. A `<om-effect>` print finish treats the FINISHED frame, so a sheet carrying one exports as a single raster band at `effectDpi` (default 600) and says so — tell the user that before they build a sheet around both. A decluttering layer does NOT trigger it. `await frame.freeze({format: "svg"})` stores that SVG inline in a cartograph frame, placed by the same `crs` + `corners`; the frozen sheet opens with no runtime and nothing defining its custom elements.
72
+ - SHADED RELIEF is a LAYER, not a mode of `terrain=`: `<om-layer id="relief" type="HillshadeLayer" src="terrarium">`. Reach for it whenever the map is FLAT (pitch 0, a print sheet) and wants terrain texture; reach for `terrain=` only when you want a real 3D surface the camera can tilt over. Being a layer is what puts relief inside deck's framebuffer, so `snapshot()` captures it and `<om-effect>` treats it (a MapLibre basemap composites underneath and would not be).
73
+ - `src` (REQUIRED) — a registered terrain preset (`terrarium`, `mapterhorn`; both keyless and global) or a raw `{z}/{x}/{y}` DEM template. Keyless means no key, not no attribute — name it the way `basemap="positron"` is named.
74
+ - `decoder="terrarium|mapbox-rgb"` or `{rScaler,gScaler,bScaler,offset}` JSON — REQUIRED with a raw template. Omitting it warns, because mapbox-encoded heights read as terrarium give smooth plausible relief that is ~25x wrong.
75
+ - `sun-azimuth="315 45 135"` — ONE TO FOUR azimuths, ° clockwise from north (the `lighting-sun-azimuth` convention, but not coupled to it). A list, never a `multi-directional` boolean: a shorthand must not reach a look the tier below cannot write, and the azimuths want choosing for the terrain. `sun-weight="3 1 1"` weights them (normalized; equal if omitted).
76
+ - `sun-elevation="45"` (strictly between 0 and 90), `z-factor="1.4"` (vertical exaggeration), `opacity`, `max-zoom`, `zoom-offset`.
77
+ - `blend="normal|multiply"` — `multiply` lets relief read UNDER the fills above it instead of greying them; it needs something beneath it, so `normal` is the default and is what makes relief usable as the base of a sheet.
78
+ SECOND ENTRY POINT: `shading="hillshade"` on a `COGLayer`/`ZarrLayer` shades the author's OWN raster with the same `sun-*`/`z-factor` attributes. Relief runs LAST in the styling chain, so it multiplies onto a `colormap` rather than replacing it — `colormap="terrain" shading="hillshade"` is a hypsometric tint with relief through it, one layer not two. Reads ONE band as elevation. Ground scale comes from the file's geotransform + CRS units (a geographic source is anisotropic and is corrected per fragment). `identify="off"` cannot free memory while shading is on — the apron reads neighbouring pixels on the CPU, and the validator flags the combination.
79
+ Every illumination knob is a UNIFORM — moving the sun refetches nothing. Tile edges are seamless (one-pixel apron from the eight neighbours; clamping would draw a pale grid), latitude is corrected per fragment, and tile zoom follows the capture pixel ratio so a 300 dpi plate is not upscaled screen relief. DEM tiles must be PNG or LOSSLESS WebP — heights are the RGB bytes, so a lossy codec invents terrain. Lazy chunk: a map without relief downloads none of it. NOT YET: `shading="hillshade"` on COGLayer/ZarrLayer. Slope/aspect as queryable VALUES is deliberately out of scope — rendered texture only, never an analytic product. Deep reference: docs/hillshade.md.
52
80
  - `clip-box-min="[lng, lat, elevation]"` + `clip-box-max="[lng, lat, elevation]"` (issue #34) — a real axis-aligned 3D box clipping the whole scene: geometry outside it is discarded (order of the two corners doesn't matter). Every layer is clipped once a box is configured; opt a specific layer out with `clip="off"` on its `<om-layer>`. `clip-box-invert` shows what's OUTSIDE the box instead; `clip-box-highlight` dims clipped-out geometry instead of discarding it (non-destructive preview — nothing disappears). Works on ANY layer type, including georeferenced `Tile3DLayer`/`BIMLayer` content, so a dense BIM scene can be cut open to see what's inside — not just flat `GeoJsonLayer` extrusions. Attribute-backed (undoable, story-steppable) via `set-clip-box {min, max, invert?, highlight?}` (`{clear: true}` removes the box) and `<om-widget type="clip-box">` (six number inputs + invert/highlight checkboxes + clear button). v1 is axis-aligned only — rotated boxes are a documented follow-up.
53
81
  - `snap="vertex edge midpoint"` + `snap-tolerance="12"` (issue #34 Part A) — XY snapping for draw/measure vertex capture: refines whatever deck already picked under the cursor to the nearest vertex, edge, or edge midpoint of THAT feature's own geometry, within `snap-tolerance` pixels (default 12) — not a spatial index, only the already-picked feature is searched. Applies to every layer by default; `snap="off"` on any `<om-layer>` opts it out, mirroring `clip="off"`. Also snaps to a `BIMLayer`'s own edge/crease overlay (its real wall corners/edges, converted from local mesh coordinates automatically) — the raw triangle mesh itself is not a snap target. Vertex beats midpoint beats edge on range conflicts. Hold Space to place a point nearby without snapping. No action/attribute-backed toggle beyond the attribute itself; live-reactive like `terrain`/`clip-box-*`.
54
82
  - `widgets-dim="off"` disables collision-dim — by default a widget slot dims (`--om-widget-opacity-dimmed`, 0.35) while an open `<om-overlay>` popup covers it, rather than the popup dodging (attribution/toggle slots never dim).