@nika-js/onlymap 0.5.3 → 0.5.6

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.
@@ -10,11 +10,20 @@ Use `OmMap.validate(htmlString)` before finalizing agent-written maps.
10
10
  import { OmMap } from "@nika-js/onlymap";
11
11
 
12
12
  const result = OmMap.validate(html);
13
- if (!result.valid) {
14
- console.log(result.errors);
13
+ // `valid` reflects ERRORS ONLY. Warnings (e.g. `Unknown attribute "get-radius"
14
+ // on GeoJsonLayer — likely a typo`) mean a prop is being silently dropped and
15
+ // the layer renders wrong-but-"valid", so act on BOTH lists — never stop at
16
+ // `valid: true`.
17
+ for (const entry of [...result.errors, ...result.warnings]) {
18
+ console.log(entry.severity, entry.attribute, entry.message, "→", entry.fix);
15
19
  }
16
20
  ```
17
21
 
22
+ An `Unknown attribute` warning is usually a wrong-for-this-layer prop — check
23
+ `onlymapjs.html-data.json` for the layer's real attributes (e.g. `GeoJsonLayer`
24
+ points use `get-point-radius`/`point-radius-units`, not `ScatterplotLayer`'s
25
+ `get-radius`/`radius-units`).
26
+
18
27
  Errors and warnings have:
19
28
 
20
29
  ```ts