hedron-maps 0.1.0__tar.gz

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.
@@ -0,0 +1,36 @@
1
+ .DS_Store
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.egg-info/
6
+ .eggs/
7
+ dist/
8
+ /build/
9
+ # Artifact/output build trees only — never ignore package source such as
10
+ # packages/hedron/src/hedron/build (Hatchling respects gitignore and would
11
+ # omit it from sdists/wheels; see #32).
12
+ **/.hedron/build/
13
+ packages/hedron-runtime-java/build/
14
+ target/
15
+ .venv*/
16
+ .bounds-venv*
17
+ venv*/
18
+ .env
19
+ .coverage
20
+ htmlcov/
21
+ .pytest_cache/
22
+ .mypy_cache/
23
+ .ruff_cache/
24
+ .hypothesis/
25
+ .tox/
26
+ .nox/
27
+ .audit-build-proj/
28
+ examples/reference-app/.hedron/
29
+ *.html.gz
30
+ /site/
31
+ *.so
32
+ *.dylib
33
+ *.pyd
34
+ .devcontainer/
35
+ # Local SQLite demos (e.g. examples/notes-sqlalchemy)
36
+ *.db
@@ -0,0 +1,18 @@
1
+ # Changelog
2
+
3
+ ## [0.1.0] — 2026-08-17
4
+
5
+ ### Added
6
+
7
+ - Independent Beta `hedron-maps` `0.1.0`: typed `MapSpec` / `MapPlan`, `compile_map`,
8
+ `hedron_maps.Map`, OSM preset, custom/offline sources, `hedron-map` host, and
9
+ `MapInteraction` (D-078 / D-082 / RFC-0074).
10
+
11
+ ### Fixed
12
+
13
+ - Custom ``OpenStreetMap.tile_url`` hosts must pass the same origin allowlist as raster
14
+ tiles (#351).
15
+ - ``Map(tiles=)`` uses exact-origin allowlisting instead of empty or host-prefix bypass
16
+ (#352).
17
+ - MapStyle source ``data`` / ``urls`` close through origin policy (#353).
18
+ - ``MapInteraction`` POSTs typed events to the registered command path with CSRF (#357).
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Odos Matthews
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,56 @@
1
+ Metadata-Version: 2.5
2
+ Name: hedron-maps
3
+ Version: 0.1.0
4
+ Summary: First-class maps, offline geospatial presentation, and typed map interactions for Hedron
5
+ Project-URL: Homepage, https://github.com/eddiethedean/hedron
6
+ Project-URL: Repository, https://github.com/eddiethedean/hedron
7
+ Project-URL: Issues, https://github.com/eddiethedean/hedron/issues
8
+ Project-URL: Changelog, https://github.com/eddiethedean/hedron/blob/main/packages/hedron-maps/CHANGELOG.md
9
+ Project-URL: Documentation, https://hedron.readthedocs.io/en/latest/
10
+ Author-email: Odos Matthews <odosmatthews@gmail.com>
11
+ Maintainer-email: Odos Matthews <odosmatthews@gmail.com>
12
+ License-Expression: MIT
13
+ License-File: LICENSE
14
+ Keywords: geojson,hedron,maplibre,maps,mbtiles,osm,pmtiles
15
+ Classifier: Development Status :: 4 - Beta
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: License :: OSI Approved :: MIT License
18
+ Classifier: Programming Language :: Python
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3 :: Only
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Programming Language :: Python :: 3.13
24
+ Classifier: Programming Language :: Python :: 3.14
25
+ Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
26
+ Classifier: Topic :: Scientific/Engineering :: GIS
27
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
28
+ Classifier: Typing :: Typed
29
+ Requires-Python: <3.15,>=3.11
30
+ Requires-Dist: hedron-core<0.48,>=0.47.0
31
+ Description-Content-Type: text/markdown
32
+
33
+ # hedron-maps
34
+
35
+ Typed first-class maps, offline geospatial presentation, and `MapInteraction` for Hedron.
36
+
37
+ **Package maturity:** Beta · **Package version:** `0.1.0`
38
+
39
+ Install with the 0.47 train extra `hedron[maps]` or independently:
40
+
41
+ ```bash
42
+ pip install "hedron-maps>=0.1.0,<0.2"
43
+ ```
44
+
45
+ ```python
46
+ from hedron_maps import Map
47
+
48
+ Map(center=(37.7749, -122.4194), zoom=11, title="Bay Area", description="OSM raster map")
49
+ ```
50
+
51
+ The default is `OpenStreetMap.standard()` on `hedron_maps.Map` only. Core `hedron.Map`
52
+ keeps no OSM default. Enhanced rendering uses a pinned MapLibre GL JS **5.6.1** strict-CSP
53
+ build (not the experimental charts 4.5.0 pin). Semantic `.hedron-map-alternative` tables
54
+ remain when JavaScript, WebGL, workers, or tiles are absent.
55
+
56
+ See [Maps API](https://hedron.readthedocs.io/en/latest/api/MAPS/).
@@ -0,0 +1,24 @@
1
+ # hedron-maps
2
+
3
+ Typed first-class maps, offline geospatial presentation, and `MapInteraction` for Hedron.
4
+
5
+ **Package maturity:** Beta · **Package version:** `0.1.0`
6
+
7
+ Install with the 0.47 train extra `hedron[maps]` or independently:
8
+
9
+ ```bash
10
+ pip install "hedron-maps>=0.1.0,<0.2"
11
+ ```
12
+
13
+ ```python
14
+ from hedron_maps import Map
15
+
16
+ Map(center=(37.7749, -122.4194), zoom=11, title="Bay Area", description="OSM raster map")
17
+ ```
18
+
19
+ The default is `OpenStreetMap.standard()` on `hedron_maps.Map` only. Core `hedron.Map`
20
+ keeps no OSM default. Enhanced rendering uses a pinned MapLibre GL JS **5.6.1** strict-CSP
21
+ build (not the experimental charts 4.5.0 pin). Semantic `.hedron-map-alternative` tables
22
+ remain when JavaScript, WebGL, workers, or tiles are absent.
23
+
24
+ See [Maps API](https://hedron.readthedocs.io/en/latest/api/MAPS/).
@@ -0,0 +1,68 @@
1
+ [project]
2
+ name = "hedron-maps"
3
+ version = "0.1.0"
4
+ description = "First-class maps, offline geospatial presentation, and typed map interactions for Hedron"
5
+ readme = "README.md"
6
+ requires-python = ">=3.11,<3.15"
7
+ license = "MIT"
8
+ license-files = ["LICENSE"]
9
+ authors = [
10
+ { name = "Odos Matthews", email = "odosmatthews@gmail.com" },
11
+ ]
12
+ maintainers = [
13
+ { name = "Odos Matthews", email = "odosmatthews@gmail.com" },
14
+ ]
15
+ keywords = [
16
+ "geojson",
17
+ "hedron",
18
+ "maplibre",
19
+ "maps",
20
+ "mbtiles",
21
+ "osm",
22
+ "pmtiles",
23
+ ]
24
+ classifiers = [
25
+ "Development Status :: 4 - Beta",
26
+ "Intended Audience :: Developers",
27
+ "License :: OSI Approved :: MIT License",
28
+ "Programming Language :: Python",
29
+ "Programming Language :: Python :: 3",
30
+ "Programming Language :: Python :: 3 :: Only",
31
+ "Programming Language :: Python :: 3.11",
32
+ "Programming Language :: Python :: 3.12",
33
+ "Programming Language :: Python :: 3.13",
34
+ "Programming Language :: Python :: 3.14",
35
+ "Topic :: Internet :: WWW/HTTP :: Dynamic Content",
36
+ "Topic :: Scientific/Engineering :: GIS",
37
+ "Topic :: Software Development :: Libraries :: Python Modules",
38
+ "Typing :: Typed",
39
+ ]
40
+ dependencies = [
41
+ "hedron-core>=0.47.0,<0.48",
42
+ ]
43
+
44
+ [project.entry-points."hedron.plugins"]
45
+ hedron_maps = "hedron_maps.plugin:register"
46
+
47
+ [project.urls]
48
+ Homepage = "https://github.com/eddiethedean/hedron"
49
+ Repository = "https://github.com/eddiethedean/hedron"
50
+ Issues = "https://github.com/eddiethedean/hedron/issues"
51
+ Changelog = "https://github.com/eddiethedean/hedron/blob/main/packages/hedron-maps/CHANGELOG.md"
52
+ Documentation = "https://hedron.readthedocs.io/en/latest/"
53
+
54
+ [build-system]
55
+ requires = ["hatchling"]
56
+ build-backend = "hatchling.build"
57
+
58
+ [tool.hatch.build.targets.wheel]
59
+ packages = ["src/hedron_maps"]
60
+
61
+ [tool.hatch.build.targets.sdist]
62
+ only-include = [
63
+ "src/hedron_maps",
64
+ "README.md",
65
+ "CHANGELOG.md",
66
+ "LICENSE",
67
+ "pyproject.toml",
68
+ ]
@@ -0,0 +1,89 @@
1
+ """hedron-maps: first-class maps, offline geospatial presentation, and typed events."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from hedron_maps.compile import compile_map, parse_map_spec
6
+ from hedron_maps.element import TAG_NAME, Map
7
+ from hedron_maps.interaction import (
8
+ FeatureActivated,
9
+ FeatureSelected,
10
+ LayerVisibilityChanged,
11
+ MapFailed,
12
+ MapInteraction,
13
+ MapLoaded,
14
+ ViewportChanged,
15
+ )
16
+ from hedron_maps.mbtiles import MBTilesArchive
17
+ from hedron_maps.offline import SYNTHETIC_ARCHIVE, bundle_from_paths
18
+ from hedron_maps.pins import MAPLIBRE_VERSION, RUNTIME_PINS, assert_pins_present, verify_pin
19
+ from hedron_maps.spec import (
20
+ Bounds,
21
+ CircleLayer,
22
+ GeoJSONLayer,
23
+ LineLayer,
24
+ MapPlan,
25
+ MapPolicy,
26
+ MapSpec,
27
+ MapStyle,
28
+ MapTheme,
29
+ MarkerLayer,
30
+ MBTiles,
31
+ NoBasemap,
32
+ OfflineMapBundle,
33
+ OpenStreetMap,
34
+ PMTiles,
35
+ PolygonLayer,
36
+ RasterLayer,
37
+ RasterTiles,
38
+ StaticImage,
39
+ TileJSON,
40
+ VectorTiles,
41
+ ViewState,
42
+ )
43
+
44
+ __version__ = "0.1.0"
45
+
46
+ __all__ = [
47
+ "MAPLIBRE_VERSION",
48
+ "RUNTIME_PINS",
49
+ "SYNTHETIC_ARCHIVE",
50
+ "TAG_NAME",
51
+ "Bounds",
52
+ "CircleLayer",
53
+ "FeatureActivated",
54
+ "FeatureSelected",
55
+ "GeoJSONLayer",
56
+ "LayerVisibilityChanged",
57
+ "LineLayer",
58
+ "MBTiles",
59
+ "MBTilesArchive",
60
+ "Map",
61
+ "MapFailed",
62
+ "MapInteraction",
63
+ "MapLoaded",
64
+ "MapPlan",
65
+ "MapPolicy",
66
+ "MapSpec",
67
+ "MapStyle",
68
+ "MapTheme",
69
+ "MarkerLayer",
70
+ "NoBasemap",
71
+ "OfflineMapBundle",
72
+ "OpenStreetMap",
73
+ "PMTiles",
74
+ "PolygonLayer",
75
+ "RasterLayer",
76
+ "RasterTiles",
77
+ "StaticImage",
78
+ "TAG_NAME",
79
+ "TileJSON",
80
+ "VectorTiles",
81
+ "ViewState",
82
+ "ViewportChanged",
83
+ "__version__",
84
+ "assert_pins_present",
85
+ "bundle_from_paths",
86
+ "compile_map",
87
+ "parse_map_spec",
88
+ "verify_pin",
89
+ ]
@@ -0,0 +1,116 @@
1
+ Copyright (c) 2023, MapLibre contributors
2
+
3
+ All rights reserved.
4
+
5
+ Redistribution and use in source and binary forms, with or without modification,
6
+ are permitted provided that the following conditions are met:
7
+
8
+ * Redistributions of source code must retain the above copyright notice,
9
+ this list of conditions and the following disclaimer.
10
+ * Redistributions in binary form must reproduce the above copyright notice,
11
+ this list of conditions and the following disclaimer in the documentation
12
+ and/or other materials provided with the distribution.
13
+ * Neither the name of MapLibre GL JS nor the names of its contributors
14
+ may be used to endorse or promote products derived from this software
15
+ without specific prior written permission.
16
+
17
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
21
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
22
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
23
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
24
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
25
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
+
29
+
30
+ -------------------------------------------------------------------------------
31
+
32
+ Contains code from mapbox-gl-js v1.13 and earlier
33
+
34
+ Version v1.13 of mapbox-gl-js and earlier are licensed under a BSD-3-Clause license
35
+
36
+ Copyright (c) 2020, Mapbox
37
+ Redistribution and use in source and binary forms, with or without modification,
38
+ are permitted provided that the following conditions are met:
39
+
40
+ * Redistributions of source code must retain the above copyright notice,
41
+ this list of conditions and the following disclaimer.
42
+ * Redistributions in binary form must reproduce the above copyright notice,
43
+ this list of conditions and the following disclaimer in the documentation
44
+ and/or other materials provided with the distribution.
45
+ * Neither the name of Mapbox GL JS nor the names of its contributors
46
+ may be used to endorse or promote products derived from this software
47
+ without specific prior written permission.
48
+
49
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
50
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
51
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
52
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
53
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
54
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
55
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
56
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
57
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
58
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
59
+ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
60
+
61
+
62
+ -------------------------------------------------------------------------------
63
+
64
+ Contains code from glfx.js
65
+
66
+ Copyright (C) 2011 by Evan Wallace
67
+
68
+ Permission is hereby granted, free of charge, to any person obtaining a copy
69
+ of this software and associated documentation files (the "Software"), to deal
70
+ in the Software without restriction, including without limitation the rights
71
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
72
+ copies of the Software, and to permit persons to whom the Software is
73
+ furnished to do so, subject to the following conditions:
74
+
75
+ The above copyright notice and this permission notice shall be included in
76
+ all copies or substantial portions of the Software.
77
+
78
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
79
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
80
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
81
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
82
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
83
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
84
+ THE SOFTWARE.
85
+
86
+ --------------------------------------------------------------------------------
87
+
88
+ Contains a portion of d3-color https://github.com/d3/d3-color
89
+
90
+ Copyright 2010-2016 Mike Bostock
91
+ All rights reserved.
92
+
93
+ Redistribution and use in source and binary forms, with or without modification,
94
+ are permitted provided that the following conditions are met:
95
+
96
+ * Redistributions of source code must retain the above copyright notice, this
97
+ list of conditions and the following disclaimer.
98
+
99
+ * Redistributions in binary form must reproduce the above copyright notice,
100
+ this list of conditions and the following disclaimer in the documentation
101
+ and/or other materials provided with the distribution.
102
+
103
+ * Neither the name of the author nor the names of contributors may be used to
104
+ endorse or promote products derived from this software without specific prior
105
+ written permission.
106
+
107
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
108
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
109
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
110
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
111
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
112
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
113
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
114
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
115
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
116
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.