Commit Graph

202 Commits

Author SHA1 Message Date
Brandon Liu
d16faa2658 update all github pages URLs. (#406) 2024-06-08 10:22:27 -06:00
Brandon Liu
5ae66c2144 js 3.0.6 (#399)
* js 3.0.6

* add CommonJS fallback for NodeJS projects not using ESM.
2024-05-30 14:11:09 +08:00
Brandon Liu
35c31e437c Remove old basemap examples from app, replace with source.coop mirror [#49] (#382)
* fix js changelog
2024-04-06 16:41:22 -07:00
Brandon Liu
2422839816 JS: add missing files to package.json, v3.0.5 [#375] (#376)
* Needed for cases that do not use pre-bundled module in dist
2024-03-08 16:08:54 +08:00
Brandon Liu
9a07db9e51 link to typedoc (#371) 2024-02-25 18:39:22 +08:00
Brandon Liu
3451540a3a js 3.0.4 (#370)
* export DecompressFunc type
* add typedoc comments
2024-02-25 18:29:48 +08:00
Brandon Liu
b229c1a8c7 Remove prefetch boolean from JS sources - no reason to ever not use i… (#353)
* Remove prefetch boolean from JS sources - no reason to ever not use it

* JS optimization for header fetches on etag invalidation [#90]

* If promises are shared between requests, only the first invalidation makes the header request.
* If promises are not shared, simply delete the key.

* JS 3.0.3 [#90]

* update CHANGELOG
2024-02-05 15:57:30 +08:00
Brandon Liu
c43e73a813 fix JS IIFE readme [#347] (#349)
* fix JS IIFE readme [#347]

* js 3.0.2 - fix package.json and IIFE README
2024-02-03 23:06:41 +08:00
Brandon Liu
a9977e3385 js 3.0.01: fix 3.0.0 packaging [#347] (#348)
* js 3.0.1; fix 3.0.0 packaging [#347]

* We can't have a .mjs alongside a .js, so rename the IIFE to pmtiles.js and the ES6 module to index.js.
2024-02-03 23:01:46 +08:00
Brandon Liu
067347cebb JS v3.0.0 (#346) 2024-02-02 17:54:46 +08:00
Brandon Liu
61ed024d21 add typedoc [#287] (#343) 2024-02-01 14:59:01 +08:00
Brandon Liu
3320353da6 JS 3.0.0-alpha.2 (#342) 2024-01-31 23:09:16 +08:00
Brandon Liu
179b1590b1 JS: ETags logic as part of Sources [#90] (#341)
* Simplifies ETag logic into Source, making if-match conditional requests possible.
* Avoid if-match in FetchSource for latency reasons - use cache buster on ETag change
* handle weak ETags correctly
* add mock fetch server for testing ETags [#90]
2024-01-31 23:00:24 +08:00
Brandon Liu
a0ee7c4906 JS 3.0.0-alpha.1 (#340) 2024-01-31 14:28:25 +08:00
Brandon Liu
84fb7a8671 Support for both maplibre v3 and v4 addProtocol. (#339)
Adds support for MapLibre v4.x, which changed the addProtocol interface. This remains backwards-compatible with MapLibre v3.x and earlier.
2024-01-31 12:38:34 +08:00
Brandon Liu
6638d040a5 linting and typing improvements [#287] (#337)
* Typing improvements [#287]

* rename FileApiSource to FileSource
* In a few cases we need to use any and biome-ignore. Deferring any restructuring here to js v4.
* replace prettier with biome
2024-01-31 12:22:25 +08:00
Brandon Liu
6bb1c68ead JS: make an ESM-only package, remove CommonJS [#287] (#336) 2024-01-30 13:00:34 +08:00
Brandon Liu
d7e24d046e Type safety improvements [#287] (#335)
* Work through linter issues related to non-null checks and any.
2024-01-29 22:46:08 +08:00
Brandon Liu
9a29c5a78a JS v3.0.0-alpha.0 (#334)
* JS v3.0.0-alpha.0

* Alpha package of new major version with ES6 modules as default in package.json. [#317, #248]

* bump JS examples to 3.0.0-alpha.0
2024-01-29 18:03:00 +08:00
Brandon Liu
22d7a58f36 replace esbuild runner with tsx (#333)
* also bump esbuild to latest version in all package.jsons
2024-01-29 17:51:42 +08:00
Brandon Liu
a6cbc1961e Continue linting fixes [#287] (#332)
* make use of ===, if branches, let/const, string templates, var names consistent style.
2024-01-29 17:41:12 +08:00
Brandon Liu
3b61cc8b49 apply automated linting fixes (#331) 2024-01-29 16:04:41 +08:00
Brandon Liu
5e41bd65ef Make package.json main es6 module instead of cjs [#317, #248] (#330)
* Make package.json main es6 module instead of cjs [#317, #248]

* remove use of package.json main, instead use exports for dual es6/cjs modules [#317, #248]

* replace esbuild-runner with tsx [#477]
2024-01-29 15:31:51 +08:00
Brandon Liu
8c282b90da js v2.11 (#260)
* js 2.11.0

* update examples
2023-09-28 15:14:50 +08:00
Brandon Liu
b815bab09c js: FetchSource takes optional custom headers (#112)
* js: FetchSource takes optional custom headers
2023-09-28 15:07:25 +08:00
Brandon Liu
1f30e1a9b9 rename protomaps.js -> protomaps-leaflet 2023-08-08 16:29:49 +08:00
Brandon Liu
0528e12ec9 fix maplibre example 2023-08-01 11:47:20 +08:00
Brandon Liu
77c956d381 Replace compression polyfill ("Worker" related errors) (#222)
* replace compression-streams-polyfill with globalThis check [#167]

* work around web worker issue with decompression polyfill.

* js 2.10.0-beta.0

* js 2.10.0; update examples
2023-07-31 22:20:42 +08:00
Brandon Liu
181c9efb7e js 2.9; pass header bounds through maplibre protocol 2023-06-22 14:32:11 +08:00
Brandon Liu
10021809dc add AVIF enum in JS client [#116] 2023-06-22 10:08:34 +08:00
Brandon Liu
6052ca2d57 js 2.8.0 2023-06-17 10:44:57 +08:00
Brandon Liu
0ec589ad18 Merge pull request #199 from protomaps/maplibre-error-reporting
surface exceptions to MapLibre protocol API [fixes #196]
2023-06-17 10:41:59 +08:00
Brandon Liu
7f4691d11f Merge pull request #181 from protomaps/decompressionstream-polyfill
use compression-stream-polyfill for faster, native gzip decompression
2023-06-17 10:38:49 +08:00
Brandon Liu
2bd776820f surface exceptions to MapLibre protocol API [fixes #196] 2023-06-17 09:36:27 +08:00
Brandon Liu
af6cc00c0f fix CI; update type of RequestParameters from maplibre util/ajax.ts 2023-05-29 11:18:54 +08:00
Brandon Liu
db7ed668bb js 2.8.0-beta.0 2023-05-24 13:05:34 +08:00
Brandon Liu
b2aa3164fb use compression-stream-polyfill for faster, native gzip decompression [#97, #167] 2023-05-22 10:49:16 +08:00
Brandon Liu
efb2f8c14c renames: master > main 2023-05-10 20:28:21 +08:00
Brandon Liu
089a732c54 openlayers: add copy of code for script includes; migrate examples [#3] 2023-05-10 20:20:37 +08:00
Brandon Liu
9b0e473d30 checking of tile types in openlayers [#3] 2023-04-26 19:54:24 +02:00
Brandon Liu
fb0ea53ea2 open layers example: set raster tile size to 512x512 [#3] 2023-04-26 16:33:34 +02:00
Brandon Liu
d15e9a5760 improve openlayers snippets; read header min/maxzoom [#3] 2023-04-26 16:19:58 +02:00
Brandon Liu
ae51557f62 update js examples 2023-04-11 10:51:16 +02:00
Brandon Liu
21cb8b32bd js 2.7.2 2023-04-11 10:49:54 +02:00
Bryan McBride
4627b96c1d set blob type for leafletRasterLayer
Setting the mime type helps with previewing network requests.
2023-04-06 22:36:59 -04:00
Johannes Weskamm
f3c31d022b Fix tile loading 2023-03-22 16:23:07 +01:00
Brandon Liu
30856d951c bump example versions 2023-03-13 14:39:02 +08:00
Brandon Liu
1fe4545e85 js 2.7.1; update changelog 2023-03-13 14:34:15 +08:00
Logan Houp
bf35ff4829 pre-compute tzValues 2023-03-12 01:42:40 -05:00
Brandon Liu
802f6aea4e run prettier on js/test; add prettier check to CI 2023-03-12 13:30:57 +08:00