{"id":28646797,"url":"https://github.com/iodesystems/hl-leaflet","last_synced_at":"2025-07-04T00:05:28.414Z","repository":{"id":213404352,"uuid":"733794326","full_name":"IodeSystems/hl-leaflet","owner":"IodeSystems","description":"Htmx Compatible Hypermedia Leaflet Engine","archived":false,"fork":false,"pushed_at":"2025-06-22T03:48:25.000Z","size":67,"stargazers_count":7,"open_issues_count":15,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-22T04:26:41.558Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IodeSystems.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-12-20T06:24:12.000Z","updated_at":"2025-04-08T19:38:27.000Z","dependencies_parsed_at":"2023-12-20T20:23:13.893Z","dependency_job_id":"dd6a3eb9-da93-4c0c-9677-91bc1b9fbaf7","html_url":"https://github.com/IodeSystems/hl-leaflet","commit_stats":null,"previous_names":["iodesystems/hl-leaflet"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/IodeSystems/hl-leaflet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IodeSystems%2Fhl-leaflet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IodeSystems%2Fhl-leaflet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IodeSystems%2Fhl-leaflet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IodeSystems%2Fhl-leaflet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IodeSystems","download_url":"https://codeload.github.com/IodeSystems/hl-leaflet/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IodeSystems%2Fhl-leaflet/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263421911,"owners_count":23464047,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-13T02:07:03.471Z","updated_at":"2025-07-04T00:05:28.302Z","avatar_url":"https://github.com/IodeSystems.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hl-leaflet\n\nA [Leaflet](http://leafletjs.com/) plugin for `htmx` and `hypermedia` inspired\nby [hyperleaflet](https://github.com/cemrehancavdar/hyperleaflet).\n\n## Usage\n\nWhen including the script, the library will automatically search for\nall root `.hl-map` elements and configure and render them on document load.\n\nMaps generated by the library cannot survive a full `htmx` `hx-swap`,\nso it is advisable to put your `data-hl-render` target outside, and ensure it is\ntagged with `hx-preserve`.\n\n```html\n\n\u003cscript src=\"https://unpkg.com/hl-leaflet@0.0.1/dist/hl-leaflet.js\"\u003e\u003c/script\u003e\n```\n\nWhen triggering `hx-swap`, you should take care to not re-render the map.\n\n```html\n\n\u003cdiv id=\"map-render\" hx-preserve/\u003e\n\u003cdiv\n        id=\"map-config\"\n        class=\"hl-map\"\n        data-hl-render=\"#map-render\"\n        data-hl-center=\"[39.73, 39.99]\"\n        data-hl-zoom=\"5\"\n\u003e\n    \u003cdiv\n            class=\"hl-marker\"\n            data-hl-center=\"[-33.8650, 151.2094]\"\n            data-hl-popup=\"Sydney\"\n    \u003e\u003c/div\u003e\n\u003c/div\u003e\n```\n\n## Tested With\n\n- [Leaflet](http://leafletjs.com/) 1.4.4\n- [htmx](https://htmx.org/) 1.9.9\n\n## Development\n\n```shell\nnpm install\nnpm run dev # Watches for changes and rebuilds dist\nnpm run build # Builds final dist\nnpm run test # Runs tests\n```\n\n## Publishing\n\n```shell\nnpm login\nnpm publish\n```\n\n## Advanced htmx usage\n\nSee the [tests](https://github.com/IodeSystems/hl-leaflet/blob/main/src/hl-leaflet.test.ts) for advanced `hx-on`\nand `hx-swap` usage.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiodesystems%2Fhl-leaflet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiodesystems%2Fhl-leaflet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiodesystems%2Fhl-leaflet/lists"}