@trailstash/ultra 3.0.0-dev

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 (415) hide show
  1. package/.gitlab-ci.yml +15 -0
  2. package/Examples/alt-bbox-format.ultra +9 -0
  3. package/Examples/atp-usps-dropboxes.ultra +68 -0
  4. package/Examples/bike-infra.ultra +111 -0
  5. package/Examples/contribution-heatmap.ultra +17 -0
  6. package/Examples/custom-style.ultra +114 -0
  7. package/Examples/glow-effect.ultra +27 -0
  8. package/Examples/index.md +7 -0
  9. package/Examples/landmarks-prototype.ultra +68 -0
  10. package/Examples/minimalist-ski-map.ultra +55 -0
  11. package/Examples/opentrailstash-3d.ultra +40 -0
  12. package/Examples/overture-landcover-plus-hillshade.ultra +45 -0
  13. package/Examples/overture-places-and-osm.ultra +29 -0
  14. package/Examples/trees.ultra +60 -0
  15. package/Examples/wikidata-photo.ultra +28 -0
  16. package/Examples/within-bounds.ultra +12 -0
  17. package/LICENSE +23 -0
  18. package/MapLibre-Examples/3d-buildings.ultra +43 -0
  19. package/MapLibre-Examples/3d-extrusion-floorplan.ultra +28 -0
  20. package/MapLibre-Examples/3d-terrain.ultra +39 -0
  21. package/MapLibre-Examples/add-image.ultra +26 -0
  22. package/MapLibre-Examples/attribution-position.ultra +12 -0
  23. package/MapLibre-Examples/change-case-of-labels.ultra +26 -0
  24. package/MapLibre-Examples/cluster.ultra +59 -0
  25. package/MapLibre-Examples/cooperative-gestures.ultra +11 -0
  26. package/MapLibre-Examples/custom-marker-icons.ultra +65 -0
  27. package/MapLibre-Examples/data-driven-lines.ultra +169 -0
  28. package/MapLibre-Examples/disable-rotation.ultra +11 -0
  29. package/MapLibre-Examples/disable-scroll-zoom.ultra +9 -0
  30. package/MapLibre-Examples/display-and-style-rich-text-labels.ultra +22 -0
  31. package/MapLibre-Examples/fill-pattern.ultra +43 -0
  32. package/MapLibre-Examples/fullscreen.ultra +10 -0
  33. package/MapLibre-Examples/geojson-layer-in-stack.ultra +23 -0
  34. package/MapLibre-Examples/geojson-line.ultra +114 -0
  35. package/MapLibre-Examples/geojson-markers.ultra +217 -0
  36. package/MapLibre-Examples/geojson-polygon.ultra +104 -0
  37. package/MapLibre-Examples/heatmap-layer.ultra +111 -0
  38. package/MapLibre-Examples/index.md +4 -0
  39. package/MapLibre-Examples/locate-user.ultra +14 -0
  40. package/MapLibre-Examples/map-tiles.ultra +9 -0
  41. package/MapLibre-Examples/pmtiles.ultra +25 -0
  42. package/MapLibre-Examples/wms.ultra +14 -0
  43. package/README.md +46 -0
  44. package/bin/dev.cmd +3 -0
  45. package/bin/dev.js +6 -0
  46. package/bin/run.cmd +3 -0
  47. package/bin/run.js +5 -0
  48. package/build-examples-docs.js +104 -0
  49. package/build-examples-images.js +87 -0
  50. package/build-sprites.sh +30 -0
  51. package/cli/build.js +53 -0
  52. package/cli/serve.js +34 -0
  53. package/components/button-modal.js +111 -0
  54. package/components/button.css +22 -0
  55. package/components/button.js +6 -0
  56. package/components/code-editor.js +87 -0
  57. package/components/download-button.js +69 -0
  58. package/components/fontawesome-icon.js +80 -0
  59. package/components/fs-button.js +52 -0
  60. package/components/help-modal.js +98 -0
  61. package/components/map-popup.js +57 -0
  62. package/components/nav-bar.js +76 -0
  63. package/components/run-button.js +78 -0
  64. package/components/share-button.js +35 -0
  65. package/components/share-modal.js +139 -0
  66. package/components/style-picker.js +47 -0
  67. package/components/ultra-ide.js +298 -0
  68. package/components/ultra-loader.js +60 -0
  69. package/components/ultra-map.js +312 -0
  70. package/configs/minimal.js +9 -0
  71. package/configs/overpass-ultra.js +185 -0
  72. package/docs/assets/Examples/alt-bbox-format.png +0 -0
  73. package/docs/assets/Examples/atp-usps-dropboxes.png +0 -0
  74. package/docs/assets/Examples/bike-infra.png +0 -0
  75. package/docs/assets/Examples/contribution-heatmap.png +0 -0
  76. package/docs/assets/Examples/custom-style.png +0 -0
  77. package/docs/assets/Examples/glow-effect.png +0 -0
  78. package/docs/assets/Examples/landmarks-prototype.png +0 -0
  79. package/docs/assets/Examples/minimalist-ski-map.png +0 -0
  80. package/docs/assets/Examples/opentrailstash-3d.png +0 -0
  81. package/docs/assets/Examples/overture-landcover-plus-hillshade.png +0 -0
  82. package/docs/assets/Examples/overture-places-and-osm.png +0 -0
  83. package/docs/assets/Examples/trees.png +0 -0
  84. package/docs/assets/Examples/wikidata-photo.png +0 -0
  85. package/docs/assets/Examples/within-bounds.png +0 -0
  86. package/docs/assets/MapLibre-Examples/3d-buildings.png +0 -0
  87. package/docs/assets/MapLibre-Examples/3d-extrusion-floorplan.png +0 -0
  88. package/docs/assets/MapLibre-Examples/3d-terrain.png +0 -0
  89. package/docs/assets/MapLibre-Examples/add-image.png +0 -0
  90. package/docs/assets/MapLibre-Examples/attribution-position.png +0 -0
  91. package/docs/assets/MapLibre-Examples/change-case-of-labels.png +0 -0
  92. package/docs/assets/MapLibre-Examples/cluster.png +0 -0
  93. package/docs/assets/MapLibre-Examples/cooperative-gestures.png +0 -0
  94. package/docs/assets/MapLibre-Examples/custom-marker-icons.png +0 -0
  95. package/docs/assets/MapLibre-Examples/data-driven-lines.png +0 -0
  96. package/docs/assets/MapLibre-Examples/disable-rotation.png +0 -0
  97. package/docs/assets/MapLibre-Examples/disable-scroll-zoom.png +0 -0
  98. package/docs/assets/MapLibre-Examples/display-and-style-rich-text-labels.png +0 -0
  99. package/docs/assets/MapLibre-Examples/fill-pattern.png +0 -0
  100. package/docs/assets/MapLibre-Examples/fullscreen.png +0 -0
  101. package/docs/assets/MapLibre-Examples/geojson-layer-in-stack.png +0 -0
  102. package/docs/assets/MapLibre-Examples/geojson-line.png +0 -0
  103. package/docs/assets/MapLibre-Examples/geojson-markers.png +0 -0
  104. package/docs/assets/MapLibre-Examples/geojson-polygon.png +0 -0
  105. package/docs/assets/MapLibre-Examples/heatmap-layer.png +0 -0
  106. package/docs/assets/MapLibre-Examples/locate-user.png +0 -0
  107. package/docs/assets/MapLibre-Examples/map-tiles.png +0 -0
  108. package/docs/assets/MapLibre-Examples/pmtiles.png +0 -0
  109. package/docs/assets/MapLibre-Examples/wms.png +0 -0
  110. package/docs/assets/data/Examples/atp_usps_collection_boxes.geojson +1 -0
  111. package/docs/further-reading.md +15 -0
  112. package/docs/index.md +55 -0
  113. package/docs/overrides/partials/integrations/analytics/custom.html +11 -0
  114. package/docs/query-shortcuts.md +21 -0
  115. package/docs/style.md +120 -0
  116. package/docs/url-parameters.md +45 -0
  117. package/docs/yaml.md +117 -0
  118. package/index.js +53 -0
  119. package/lib/base.css +12 -0
  120. package/lib/bounds.js +8 -0
  121. package/lib/dom.js +21 -0
  122. package/lib/glyphFallback.js +31 -0
  123. package/lib/localStorage.js +34 -0
  124. package/lib/normalize.js +5 -0
  125. package/lib/queryMap.js +50 -0
  126. package/lib/queryParams.js +142 -0
  127. package/lib/queryProviders/auto.js +47 -0
  128. package/lib/queryProviders/geojson.js +134 -0
  129. package/lib/queryProviders/gpx.js +101 -0
  130. package/lib/queryProviders/index.js +22 -0
  131. package/lib/queryProviders/kml.js +132 -0
  132. package/lib/queryProviders/osm.js +199 -0
  133. package/lib/queryProviders/overpass.js +162 -0
  134. package/lib/queryProviders/raster.js +23 -0
  135. package/lib/queryProviders/tcx.js +105 -0
  136. package/lib/queryProviders/vector.js +13 -0
  137. package/lib/settings.js +72 -0
  138. package/lib/sprites.js +18 -0
  139. package/lib/style.js +222 -0
  140. package/mkdocs.yml +26 -0
  141. package/package.json +80 -0
  142. package/screenshot.png +0 -0
  143. package/static/embed.js +18 -0
  144. package/static/font/0-255.pbf +0 -0
  145. package/static/font/1024-1279.pbf +0 -0
  146. package/static/font/10240-10495.pbf +3 -0
  147. package/static/font/10496-10751.pbf +0 -0
  148. package/static/font/10752-11007.pbf +3 -0
  149. package/static/font/11008-11263.pbf +0 -0
  150. package/static/font/11264-11519.pbf +0 -0
  151. package/static/font/11520-11775.pbf +0 -0
  152. package/static/font/11776-12031.pbf +0 -0
  153. package/static/font/12032-12287.pbf +0 -0
  154. package/static/font/12288-12543.pbf +0 -0
  155. package/static/font/12544-12799.pbf +0 -0
  156. package/static/font/1280-1535.pbf +0 -0
  157. package/static/font/12800-13055.pbf +0 -0
  158. package/static/font/13056-13311.pbf +0 -0
  159. package/static/font/13312-13567.pbf +0 -0
  160. package/static/font/13568-13823.pbf +0 -0
  161. package/static/font/13824-14079.pbf +0 -0
  162. package/static/font/14080-14335.pbf +0 -0
  163. package/static/font/14336-14591.pbf +0 -0
  164. package/static/font/14592-14847.pbf +0 -0
  165. package/static/font/14848-15103.pbf +0 -0
  166. package/static/font/15104-15359.pbf +0 -0
  167. package/static/font/1536-1791.pbf +0 -0
  168. package/static/font/15360-15615.pbf +0 -0
  169. package/static/font/15616-15871.pbf +0 -0
  170. package/static/font/15872-16127.pbf +0 -0
  171. package/static/font/16128-16383.pbf +0 -0
  172. package/static/font/16384-16639.pbf +0 -0
  173. package/static/font/16640-16895.pbf +0 -0
  174. package/static/font/16896-17151.pbf +0 -0
  175. package/static/font/17152-17407.pbf +0 -0
  176. package/static/font/17408-17663.pbf +0 -0
  177. package/static/font/17664-17919.pbf +0 -0
  178. package/static/font/1792-2047.pbf +0 -0
  179. package/static/font/17920-18175.pbf +0 -0
  180. package/static/font/18176-18431.pbf +0 -0
  181. package/static/font/18432-18687.pbf +0 -0
  182. package/static/font/18688-18943.pbf +0 -0
  183. package/static/font/18944-19199.pbf +0 -0
  184. package/static/font/19200-19455.pbf +0 -0
  185. package/static/font/19456-19711.pbf +0 -0
  186. package/static/font/19712-19967.pbf +0 -0
  187. package/static/font/19968-20223.pbf +0 -0
  188. package/static/font/20224-20479.pbf +0 -0
  189. package/static/font/2048-2303.pbf +0 -0
  190. package/static/font/20480-20735.pbf +0 -0
  191. package/static/font/20736-20991.pbf +0 -0
  192. package/static/font/20992-21247.pbf +0 -0
  193. package/static/font/21248-21503.pbf +0 -0
  194. package/static/font/21504-21759.pbf +0 -0
  195. package/static/font/21760-22015.pbf +0 -0
  196. package/static/font/22016-22271.pbf +0 -0
  197. package/static/font/22272-22527.pbf +192 -26
  198. package/static/font/22528-22783.pbf +0 -0
  199. package/static/font/22784-23039.pbf +0 -0
  200. package/static/font/2304-2559.pbf +0 -0
  201. package/static/font/23040-23295.pbf +0 -0
  202. package/static/font/23296-23551.pbf +0 -0
  203. package/static/font/23552-23807.pbf +0 -0
  204. package/static/font/23808-24063.pbf +0 -0
  205. package/static/font/24064-24319.pbf +0 -0
  206. package/static/font/24320-24575.pbf +0 -0
  207. package/static/font/24576-24831.pbf +0 -0
  208. package/static/font/24832-25087.pbf +0 -0
  209. package/static/font/25088-25343.pbf +0 -0
  210. package/static/font/25344-25599.pbf +0 -0
  211. package/static/font/256-511.pbf +0 -0
  212. package/static/font/2560-2815.pbf +0 -0
  213. package/static/font/25600-25855.pbf +0 -0
  214. package/static/font/25856-26111.pbf +0 -0
  215. package/static/font/26112-26367.pbf +0 -0
  216. package/static/font/26368-26623.pbf +0 -0
  217. package/static/font/26624-26879.pbf +0 -0
  218. package/static/font/26880-27135.pbf +0 -0
  219. package/static/font/27136-27391.pbf +0 -0
  220. package/static/font/27392-27647.pbf +0 -0
  221. package/static/font/27648-27903.pbf +0 -0
  222. package/static/font/27904-28159.pbf +0 -0
  223. package/static/font/2816-3071.pbf +0 -0
  224. package/static/font/28160-28415.pbf +0 -0
  225. package/static/font/28416-28671.pbf +0 -0
  226. package/static/font/28672-28927.pbf +0 -0
  227. package/static/font/28928-29183.pbf +0 -0
  228. package/static/font/29184-29439.pbf +0 -0
  229. package/static/font/29440-29695.pbf +0 -0
  230. package/static/font/29696-29951.pbf +0 -0
  231. package/static/font/29952-30207.pbf +0 -0
  232. package/static/font/30208-30463.pbf +0 -0
  233. package/static/font/30464-30719.pbf +0 -0
  234. package/static/font/3072-3327.pbf +0 -0
  235. package/static/font/30720-30975.pbf +0 -0
  236. package/static/font/30976-31231.pbf +0 -0
  237. package/static/font/31232-31487.pbf +0 -0
  238. package/static/font/31488-31743.pbf +0 -0
  239. package/static/font/31744-31999.pbf +0 -0
  240. package/static/font/32000-32255.pbf +0 -0
  241. package/static/font/32256-32511.pbf +0 -0
  242. package/static/font/32512-32767.pbf +0 -0
  243. package/static/font/32768-33023.pbf +0 -0
  244. package/static/font/33024-33279.pbf +0 -0
  245. package/static/font/3328-3583.pbf +0 -0
  246. package/static/font/33280-33535.pbf +0 -0
  247. package/static/font/33536-33791.pbf +0 -0
  248. package/static/font/33792-34047.pbf +0 -0
  249. package/static/font/34048-34303.pbf +0 -0
  250. package/static/font/34304-34559.pbf +0 -0
  251. package/static/font/34560-34815.pbf +0 -0
  252. package/static/font/34816-35071.pbf +0 -0
  253. package/static/font/35072-35327.pbf +0 -0
  254. package/static/font/35328-35583.pbf +0 -0
  255. package/static/font/35584-35839.pbf +0 -0
  256. package/static/font/3584-3839.pbf +0 -0
  257. package/static/font/35840-36095.pbf +0 -0
  258. package/static/font/36096-36351.pbf +0 -0
  259. package/static/font/36352-36607.pbf +0 -0
  260. package/static/font/36608-36863.pbf +0 -0
  261. package/static/font/36864-37119.pbf +0 -0
  262. package/static/font/37120-37375.pbf +0 -0
  263. package/static/font/37376-37631.pbf +0 -0
  264. package/static/font/37632-37887.pbf +0 -0
  265. package/static/font/37888-38143.pbf +0 -0
  266. package/static/font/38144-38399.pbf +0 -0
  267. package/static/font/3840-4095.pbf +0 -0
  268. package/static/font/38400-38655.pbf +45 -4
  269. package/static/font/38656-38911.pbf +0 -0
  270. package/static/font/38912-39167.pbf +0 -0
  271. package/static/font/39168-39423.pbf +0 -0
  272. package/static/font/39424-39679.pbf +0 -0
  273. package/static/font/39680-39935.pbf +0 -0
  274. package/static/font/39936-40191.pbf +0 -0
  275. package/static/font/40192-40447.pbf +0 -0
  276. package/static/font/40448-40703.pbf +0 -0
  277. package/static/font/40704-40959.pbf +0 -0
  278. package/static/font/4096-4351.pbf +0 -0
  279. package/static/font/40960-41215.pbf +3 -0
  280. package/static/font/41216-41471.pbf +3 -0
  281. package/static/font/41472-41727.pbf +3 -0
  282. package/static/font/41728-41983.pbf +3 -0
  283. package/static/font/41984-42239.pbf +3 -0
  284. package/static/font/42240-42495.pbf +3 -0
  285. package/static/font/42496-42751.pbf +3 -0
  286. package/static/font/42752-43007.pbf +0 -0
  287. package/static/font/43008-43263.pbf +0 -0
  288. package/static/font/43264-43519.pbf +0 -0
  289. package/static/font/4352-4607.pbf +0 -0
  290. package/static/font/43520-43775.pbf +0 -0
  291. package/static/font/43776-44031.pbf +0 -0
  292. package/static/font/44032-44287.pbf +0 -0
  293. package/static/font/44288-44543.pbf +0 -0
  294. package/static/font/44544-44799.pbf +0 -0
  295. package/static/font/44800-45055.pbf +0 -0
  296. package/static/font/45056-45311.pbf +0 -0
  297. package/static/font/45312-45567.pbf +0 -0
  298. package/static/font/45568-45823.pbf +0 -0
  299. package/static/font/45824-46079.pbf +0 -0
  300. package/static/font/4608-4863.pbf +0 -0
  301. package/static/font/46080-46335.pbf +0 -0
  302. package/static/font/46336-46591.pbf +0 -0
  303. package/static/font/46592-46847.pbf +0 -0
  304. package/static/font/46848-47103.pbf +0 -0
  305. package/static/font/47104-47359.pbf +0 -0
  306. package/static/font/47360-47615.pbf +0 -0
  307. package/static/font/47616-47871.pbf +0 -0
  308. package/static/font/47872-48127.pbf +0 -0
  309. package/static/font/48128-48383.pbf +0 -0
  310. package/static/font/48384-48639.pbf +0 -0
  311. package/static/font/4864-5119.pbf +0 -0
  312. package/static/font/48640-48895.pbf +0 -0
  313. package/static/font/48896-49151.pbf +0 -0
  314. package/static/font/49152-49407.pbf +0 -0
  315. package/static/font/49408-49663.pbf +0 -0
  316. package/static/font/49664-49919.pbf +0 -0
  317. package/static/font/49920-50175.pbf +0 -0
  318. package/static/font/50176-50431.pbf +0 -0
  319. package/static/font/50432-50687.pbf +0 -0
  320. package/static/font/50688-50943.pbf +0 -0
  321. package/static/font/50944-51199.pbf +0 -0
  322. package/static/font/512-767.pbf +0 -0
  323. package/static/font/5120-5375.pbf +3 -0
  324. package/static/font/51200-51455.pbf +0 -0
  325. package/static/font/51456-51711.pbf +0 -0
  326. package/static/font/51712-51967.pbf +0 -0
  327. package/static/font/51968-52223.pbf +0 -0
  328. package/static/font/52224-52479.pbf +0 -0
  329. package/static/font/52480-52735.pbf +0 -0
  330. package/static/font/52736-52991.pbf +0 -0
  331. package/static/font/52992-53247.pbf +0 -0
  332. package/static/font/53248-53503.pbf +0 -0
  333. package/static/font/53504-53759.pbf +0 -0
  334. package/static/font/5376-5631.pbf +3 -0
  335. package/static/font/53760-54015.pbf +0 -0
  336. package/static/font/54016-54271.pbf +0 -0
  337. package/static/font/54272-54527.pbf +0 -0
  338. package/static/font/54528-54783.pbf +0 -0
  339. package/static/font/54784-55039.pbf +0 -0
  340. package/static/font/55040-55295.pbf +0 -0
  341. package/static/font/55296-55551.pbf +3 -0
  342. package/static/font/55552-55807.pbf +3 -0
  343. package/static/font/55808-56063.pbf +3 -0
  344. package/static/font/56064-56319.pbf +3 -0
  345. package/static/font/5632-5887.pbf +3 -0
  346. package/static/font/56320-56575.pbf +3 -0
  347. package/static/font/56576-56831.pbf +3 -0
  348. package/static/font/56832-57087.pbf +3 -0
  349. package/static/font/57088-57343.pbf +3 -0
  350. package/static/font/57344-57599.pbf +3 -0
  351. package/static/font/57600-57855.pbf +3 -0
  352. package/static/font/57856-58111.pbf +3 -0
  353. package/static/font/58112-58367.pbf +3 -0
  354. package/static/font/58368-58623.pbf +3 -0
  355. package/static/font/58624-58879.pbf +3 -0
  356. package/static/font/5888-6143.pbf +0 -0
  357. package/static/font/58880-59135.pbf +3 -0
  358. package/static/font/59136-59391.pbf +3 -0
  359. package/static/font/59392-59647.pbf +3 -0
  360. package/static/font/59648-59903.pbf +3 -0
  361. package/static/font/59904-60159.pbf +3 -0
  362. package/static/font/60160-60415.pbf +3 -0
  363. package/static/font/60416-60671.pbf +3 -0
  364. package/static/font/60672-60927.pbf +3 -0
  365. package/static/font/60928-61183.pbf +3 -0
  366. package/static/font/61184-61439.pbf +3 -0
  367. package/static/font/6144-6399.pbf +0 -0
  368. package/static/font/61440-61695.pbf +3 -0
  369. package/static/font/61696-61951.pbf +3 -0
  370. package/static/font/61952-62207.pbf +3 -0
  371. package/static/font/62208-62463.pbf +3 -0
  372. package/static/font/62464-62719.pbf +3 -0
  373. package/static/font/62720-62975.pbf +3 -0
  374. package/static/font/62976-63231.pbf +3 -0
  375. package/static/font/63232-63487.pbf +3 -0
  376. package/static/font/63488-63743.pbf +3 -0
  377. package/static/font/63744-63999.pbf +0 -0
  378. package/static/font/6400-6655.pbf +0 -0
  379. package/static/font/64000-64255.pbf +0 -0
  380. package/static/font/64256-64511.pbf +0 -0
  381. package/static/font/64512-64767.pbf +0 -0
  382. package/static/font/64768-65023.pbf +0 -0
  383. package/static/font/65024-65279.pbf +0 -0
  384. package/static/font/65280-65535.pbf +0 -0
  385. package/static/font/6656-6911.pbf +3 -0
  386. package/static/font/6912-7167.pbf +0 -0
  387. package/static/font/7168-7423.pbf +0 -0
  388. package/static/font/7424-7679.pbf +0 -0
  389. package/static/font/768-1023.pbf +0 -0
  390. package/static/font/7680-7935.pbf +0 -0
  391. package/static/font/7936-8191.pbf +0 -0
  392. package/static/font/8192-8447.pbf +0 -0
  393. package/static/font/8448-8703.pbf +0 -0
  394. package/static/font/8704-8959.pbf +0 -0
  395. package/static/font/8960-9215.pbf +0 -0
  396. package/static/font/9216-9471.pbf +0 -0
  397. package/static/font/9472-9727.pbf +0 -0
  398. package/static/font/9728-9983.pbf +0 -0
  399. package/static/font/9984-10239.pbf +0 -0
  400. package/static/index.html +59 -0
  401. package/static/logo.png +0 -0
  402. package/static/logo.svg +78 -0
  403. package/static/mapbox-gl-rtl-text@0.2.3.js +9851 -0
  404. package/static/minimal.js +9 -0
  405. package/static/minimal.json +7 -0
  406. package/static/sprites/maki.json +1706 -0
  407. package/static/sprites/maki.license +116 -0
  408. package/static/sprites/maki.png +0 -0
  409. package/static/sprites/maki@2x.json +1706 -0
  410. package/static/sprites/maki@2x.png +0 -0
  411. package/static/sprites/temaki.json +4306 -0
  412. package/static/sprites/temaki.license +118 -0
  413. package/static/sprites/temaki.png +0 -0
  414. package/static/sprites/temaki@2x.json +4306 -0
  415. package/static/sprites/temaki@2x.png +0 -0
@@ -0,0 +1,52 @@
1
+ import { icon } from "@fortawesome/fontawesome-svg-core";
2
+ import {
3
+ faUpRightAndDownLeftFromCenter as faMaximize,
4
+ faDownLeftAndUpRightToCenter as faMinimize,
5
+ } from "@fortawesome/free-solid-svg-icons";
6
+
7
+ const faMaximizeIcon = icon(faMaximize);
8
+ const faMinimizeIcon = icon(faMinimize);
9
+
10
+ import { h } from "../lib/dom.js";
11
+ import { normalizeCSS } from "../lib/normalize.js";
12
+ import { style as buttonCSS } from "./button.js";
13
+
14
+ const style = new CSSStyleSheet();
15
+ style.replaceSync(`
16
+ :host {
17
+ }
18
+ button {
19
+ background: white;
20
+ }
21
+ `);
22
+
23
+ export class FSButton extends HTMLElement {
24
+ constructor() {
25
+ super();
26
+ }
27
+
28
+ connectedCallback() {
29
+ const shadow = this.attachShadow({ mode: "open" });
30
+
31
+ shadow.adoptedStyleSheets.push(normalizeCSS);
32
+ shadow.adoptedStyleSheets.push(buttonCSS);
33
+ shadow.adoptedStyleSheets.push(style);
34
+
35
+ const icon = h("fa-icon", { icon: "up-right-and-down-left-from-center" });
36
+ const button = h("button", {}, icon);
37
+ this.refs = { button, icon };
38
+
39
+ button.addEventListener("click", (e) => {
40
+ if (this.classList.contains("fs")) {
41
+ this.refs.icon.icon = "up-right-and-down-left-from-center";
42
+ this.dispatchEvent(new Event("exit-fullscreen"));
43
+ } else {
44
+ this.refs.icon.icon = "down-left-and-up-right-to-center";
45
+ this.dispatchEvent(new Event("enter-fullscreen"));
46
+ }
47
+ this.classList.toggle("fs");
48
+ });
49
+
50
+ shadow.appendChild(button);
51
+ }
52
+ }
@@ -0,0 +1,98 @@
1
+ import { marked } from "marked";
2
+ import { h, t } from "../lib/dom.js";
3
+ import { style as buttonCSS } from "./button.js";
4
+ import { normalizeCSS } from "../lib/normalize.js";
5
+ import { toQueryParams } from "../lib/queryParams.js";
6
+ import { version as maplibreVersion } from "maplibre-gl/package.json";
7
+ import { version as osmtogeojsonVersion } from "osmtogeojson/package.json";
8
+ import { version as togeojsonVersion } from "../node_modules/@tmcw/togeojson/package.json";
9
+ import readme from "../README.md";
10
+
11
+ export class HelpModal extends HTMLElement {
12
+ constructor() {
13
+ super();
14
+ this.help = readme;
15
+ }
16
+
17
+ connectedCallback() {
18
+ const shadow = this.attachShadow({ mode: "open" });
19
+
20
+ const readmeHTML = marked
21
+ .parse(this.help)
22
+ .replace(/<\/h3>/g, "</h5>")
23
+ .replace(/<h3>/g, "<h5>")
24
+ .replace(/<\/h2>/g, "</h4>")
25
+ .replace(/<h2>/g, "<h4>")
26
+ .replace(/<\/h1>/g, "</h3>")
27
+ .replace(/<h1>/g, "<h3>");
28
+
29
+ const div = h(
30
+ "div",
31
+ { style: "padding: 0 8px 8px;max-width:800px;", slot: "modal-content" },
32
+ `
33
+ ${readmeHTML}
34
+ <div>
35
+ <h4>Data Sources</h4>
36
+ <ul>
37
+ <li>
38
+ Data ©
39
+ <a target="_blank" href="http://openstreetmap.org/">OpenStreetMap</a>
40
+ contributors,
41
+ <span style="font-size: smaller">
42
+ <a target="_blank" href="http://opendatacommons.org/licenses/odbl/1-0/"
43
+ >ODbL</a
44
+ >
45
+ (<a target="_blank" href="http://www.openstreetmap.org/copyright">Terms</a>)
46
+ </span>
47
+ </li>
48
+ <li>
49
+ Data mining by
50
+ <a target="_blank" href="http://overpass-api.de/">Overpass API</a>
51
+ </li>
52
+ <li>
53
+ <a target="_blank" href="https://www.openmaptiles.org/"
54
+ >OpenMapTiles
55
+ </a>
56
+ hosted by the
57
+ <a target="_blank" href="http://tile.ourmap.us/">
58
+ OSM Americana Community Vector Tile Server</a
59
+ >
60
+ </li>
61
+ <li>
62
+ <a target="_blank" href="https://www.protomaps.com/"
63
+ >Protomaps
64
+ </a>
65
+ hosted by the Protomaps API
66
+ </li>
67
+ </ul>
68
+ <h4>Software &amp; Libraries</h4>
69
+ <ul>
70
+ <li>
71
+ Map powered by
72
+ <a target="_blank" href="https://maplibre.org/projects/maplibre-gl-js/"
73
+ >MapLibre GL JS</a
74
+ > <code>${maplibreVersion}</code>
75
+ </li>
76
+ <li>
77
+ OSM to GeoJSON conversion powered by
78
+ <a target="_blank" href="https://github.com/tyrasd/osmtogeojson"
79
+ >osmtogeojson</a
80
+ > <code>${osmtogeojsonVersion}</code>
81
+ </li>
82
+ <li>
83
+ KML/GPX/TCX to GeoJSON conversion powered by
84
+ <a target="_blank" href="https://github.com/placemark/togeojson"
85
+ >@tmcw/togeojson</a
86
+ > <code>${togeojsonVersion}</code>
87
+ </li>
88
+ </ul>
89
+ </div>
90
+ `,
91
+ );
92
+ div.addEventListener("click", (e) => e.stopPropagation());
93
+ const button = h("button-modal", { text: "Help", icon: "question" }, div);
94
+ this.refs = { button, div };
95
+
96
+ shadow.appendChild(button);
97
+ }
98
+ }
@@ -0,0 +1,57 @@
1
+ import { Liquid } from "liquidjs";
2
+ import { h, t } from "../lib/dom.js";
3
+ import { normalizeCSS } from "../lib/normalize.js";
4
+
5
+ const engine = new Liquid();
6
+
7
+ const style = new CSSStyleSheet();
8
+ style.replaceSync(`
9
+ a {
10
+ text-decoration: none;
11
+ }
12
+ h1,h2,h3,h4,h5,h6 {
13
+ margin: .5em 0;
14
+ }
15
+ `);
16
+
17
+ const defaultTemplate = `
18
+ <h3>Properties</h3>
19
+ {%- for prop in properties %}
20
+ <code>{{ prop[0] }} = {{ prop[1] }}</code>
21
+ <br>
22
+ {%- endfor %}
23
+ `;
24
+ const defaultContextBuilder = ({ properties }) => ({ properties });
25
+
26
+ export class MapPopup extends HTMLElement {
27
+ constructor() {
28
+ super();
29
+ this.template = defaultTemplate;
30
+ this.contextBuilder = defaultContextBuilder;
31
+ }
32
+
33
+ connectedCallback() {
34
+ const shadow = this.attachShadow({ mode: "open" });
35
+
36
+ shadow.adoptedStyleSheets.push(normalizeCSS);
37
+ shadow.adoptedStyleSheets.push(style);
38
+
39
+ const div = h("div");
40
+ div.style.maxHeight = "1000px";
41
+ div.style.overflowY = "auto";
42
+ let first = true;
43
+ for (const f of Object.values(this.features)) {
44
+ if (first) {
45
+ first = false;
46
+ } else {
47
+ div.appendChild(h("hr"));
48
+ }
49
+ const html = engine.parseAndRenderSync(
50
+ this.template,
51
+ this.contextBuilder(f),
52
+ );
53
+ div.appendChild(h("div", {}, html));
54
+ }
55
+ shadow.appendChild(div);
56
+ }
57
+ }
@@ -0,0 +1,76 @@
1
+ import { h, t } from "../lib/dom.js";
2
+
3
+ const style = new CSSStyleSheet();
4
+ style.replaceSync(`
5
+ :host {
6
+ display: block;
7
+ }
8
+ nav {
9
+ background: white;
10
+ border-bottom: 1px solid #8f8f9d;
11
+ padding: 4px;
12
+ }
13
+ :host(.fs) nav {
14
+ background: none;
15
+ border: none;
16
+ padding: 0;
17
+ }
18
+ a {
19
+ color: black;
20
+ text-decoration: none;
21
+ }
22
+ b, img {
23
+ margin: 0 0 0 10px;
24
+ }
25
+ img {
26
+ vertical-align: middle;
27
+ height: 22px;
28
+ }
29
+ nav > * {
30
+ margin-right: 4px;
31
+ }
32
+ slot {
33
+ padding: 100px;
34
+ }
35
+ ::slotted(fs-button) {
36
+ z-index: 1;
37
+ position: fixed;
38
+ top: 4px;
39
+ right: 4px;
40
+ }
41
+ :host(.fs) nav > a {
42
+ display: none;
43
+ }
44
+ @media (max-width: 900px) {
45
+ b {
46
+ display: none;
47
+ }
48
+ }
49
+ `);
50
+
51
+ export class NavBar extends HTMLElement {
52
+ title;
53
+ icon;
54
+
55
+ constructor() {
56
+ super();
57
+ }
58
+
59
+ connectedCallback() {
60
+ const shadow = this.attachShadow({ mode: "open" });
61
+ shadow.adoptedStyleSheets.push(style);
62
+ const nav = h(
63
+ "nav",
64
+ {},
65
+ h("slot", { name: "fs-button" }),
66
+ h("slot", { name: "buttons" }),
67
+ h(
68
+ "a",
69
+ { href: "." },
70
+ h("b", {}, t(this.title)),
71
+ h("img", { src: this.icon }),
72
+ ),
73
+ );
74
+ shadow.appendChild(nav);
75
+ }
76
+ }
@@ -0,0 +1,78 @@
1
+ import { h } from "../lib/dom.js";
2
+ import { normalizeCSS } from "../lib/normalize.js";
3
+ import { style as buttonCSS } from "./button.js";
4
+
5
+ const style = new CSSStyleSheet();
6
+ style.replaceSync(`
7
+ :host {
8
+ }
9
+ button {
10
+ background: #2ecc40;
11
+ width: 100px;
12
+ color: white;
13
+ }
14
+ button:after {
15
+ content: " Run";
16
+ }
17
+ button.loading {
18
+ background: #ff4136;
19
+ }
20
+ button.loading:after {
21
+ content: " Cancel";
22
+ }
23
+ `);
24
+
25
+ export class RunButton extends HTMLElement {
26
+ static observedAttributes = ["loading"];
27
+
28
+ get loading() {
29
+ return this.hasAttribute("loading");
30
+ }
31
+ set loading(value) {
32
+ if (value) {
33
+ return this.setAttribute("loading", "");
34
+ } else {
35
+ return this.removeAttribute("loading");
36
+ }
37
+ }
38
+
39
+ constructor() {
40
+ super();
41
+ }
42
+
43
+ connectedCallback() {
44
+ const shadow = this.attachShadow({ mode: "open" });
45
+
46
+ shadow.adoptedStyleSheets.push(normalizeCSS);
47
+ shadow.adoptedStyleSheets.push(buttonCSS);
48
+ shadow.adoptedStyleSheets.push(style);
49
+
50
+ const button = h("button", {}, h("fa-icon", { icon: "play" }));
51
+ this.refs = { button };
52
+
53
+ button.addEventListener("auxclick", (e) => {
54
+ this.dispatchEvent(new Event("auxclick"));
55
+ });
56
+ button.addEventListener("click", (e) => {
57
+ if (this.loading) {
58
+ this.refs.button.children[0].icon = "play";
59
+ this.dispatchEvent(new Event("abort"));
60
+ } else {
61
+ this.refs.button.children[0].icon = "xmark";
62
+ this.dispatchEvent(new Event("run"));
63
+ }
64
+ });
65
+
66
+ shadow.appendChild(button);
67
+ }
68
+
69
+ attributeChangedCallback(name, oldValue, newValue) {
70
+ if (newValue === "") {
71
+ this.refs.button.classList.add("loading");
72
+ this.refs.button.children[0].icon = "xmark";
73
+ } else {
74
+ this.refs.button.classList.remove("loading");
75
+ this.refs.button.children[0].icon = "play";
76
+ }
77
+ }
78
+ }
@@ -0,0 +1,35 @@
1
+ import { h } from "../lib/dom.js";
2
+ import buttonStyle from "./button.css";
3
+ import { style as buttonCSS } from "./button.js";
4
+ import { normalizeCSS } from "../lib/normalize.js";
5
+
6
+ export const css = new CSSStyleSheet();
7
+ css.replaceSync(`
8
+ button:after {
9
+ content: " Share";
10
+ }
11
+ @media (max-width: 900px) {
12
+ button:after {
13
+ content: "";
14
+ }
15
+ }
16
+ `);
17
+
18
+ export class ShareButton extends HTMLElement {
19
+ constructor() {
20
+ super();
21
+ }
22
+
23
+ connectedCallback() {
24
+ const shadow = this.attachShadow({ mode: "open" });
25
+
26
+ shadow.adoptedStyleSheets.push(normalizeCSS);
27
+ shadow.adoptedStyleSheets.push(buttonCSS);
28
+ shadow.adoptedStyleSheets.push(css);
29
+
30
+ const button = h("button", {}, h("fa-icon", { icon: "link" }));
31
+ this.refs = { button };
32
+
33
+ shadow.appendChild(button);
34
+ }
35
+ }
@@ -0,0 +1,139 @@
1
+ import { h, t } from "../lib/dom.js";
2
+ import { style as buttonCSS } from "./button.js";
3
+ import { normalizeCSS } from "../lib/normalize.js";
4
+ import { toQueryParams } from "../lib/queryParams.js";
5
+
6
+ export class ShareModal extends HTMLElement {
7
+ #center;
8
+ #zoom;
9
+ #query;
10
+
11
+ constructor() {
12
+ super();
13
+ }
14
+
15
+ get center() {
16
+ return this.#center;
17
+ }
18
+ set center(value) {
19
+ this.#center = value;
20
+ this.update();
21
+ }
22
+
23
+ get zoom() {
24
+ return this.#zoom;
25
+ }
26
+ set zoom(value) {
27
+ this.#zoom = value;
28
+ this.update();
29
+ }
30
+
31
+ get query() {
32
+ return this.#query;
33
+ }
34
+ set query(value) {
35
+ this.#query = value;
36
+ this.update();
37
+ }
38
+
39
+ connectedCallback() {
40
+ const shadow = this.attachShadow({ mode: "open" });
41
+
42
+ const queryInput = h("input", { type: "text" });
43
+ const mapInput = h("input", { type: "text" });
44
+ const mapViewCheckBox = h("input", { type: "checkbox", checked: true });
45
+ mapViewCheckBox.addEventListener("click", (e) => {
46
+ e.stopPropagation();
47
+ this.update();
48
+ });
49
+ const mapViewLabel = h(
50
+ "label",
51
+ {},
52
+ mapViewCheckBox,
53
+ t(" include current map state"),
54
+ );
55
+ mapViewLabel.addEventListener("click", (e) => {
56
+ e.stopPropagation();
57
+ });
58
+ const autoRunCheckBox = h("input", { type: "checkbox" });
59
+ autoRunCheckBox.addEventListener("click", (e) => {
60
+ e.stopPropagation();
61
+ this.update();
62
+ });
63
+ const autoRunLabel = h(
64
+ "label",
65
+ {},
66
+ autoRunCheckBox,
67
+ t(" run this query immediately after loading"),
68
+ );
69
+ autoRunLabel.addEventListener("click", (e) => {
70
+ e.stopPropagation();
71
+ });
72
+ const div = h(
73
+ "div",
74
+ { style: "", slot: "modal-content" },
75
+ h(
76
+ "style",
77
+ {},
78
+ `
79
+ div {
80
+ padding: 0 8px 8px;
81
+ }
82
+ h3, h5 {
83
+ margin-bottom: 0;
84
+ }
85
+ input[type=text] {
86
+ width: 100%;
87
+ padding: 0;
88
+ margin: 0;
89
+ }
90
+ label {
91
+ display: block;
92
+ }
93
+ `,
94
+ ),
95
+ h("h3", {}, "Query"),
96
+ h("p", {}, "Copy this link to share the current code:"),
97
+ queryInput,
98
+ h("h5", {}, "Options"),
99
+ mapViewLabel,
100
+ autoRunLabel,
101
+ h("h3", {}, "Map"),
102
+ h("p", {}, "Copy this link to share the an interactive map:"),
103
+ mapInput,
104
+ );
105
+ const button = h(
106
+ "button-modal",
107
+ { text: "Share", icon: "share-nodes" },
108
+ div,
109
+ );
110
+ this.refs = {
111
+ button,
112
+ div,
113
+ mapInput,
114
+ queryInput,
115
+ autoRunCheckBox,
116
+ mapViewCheckBox,
117
+ };
118
+
119
+ queryInput.addEventListener("focus", () => queryInput.select());
120
+ mapInput.addEventListener("focus", () => mapInput.select());
121
+
122
+ shadow.appendChild(button);
123
+ }
124
+
125
+ update() {
126
+ const opts = { query: this.query, mode: "ide" };
127
+ if (this.refs.mapViewCheckBox.checked) {
128
+ opts.center = this.center;
129
+ opts.zoom = this.zoom;
130
+ }
131
+ opts.autoRun = this.refs.autoRunCheckBox.checked;
132
+ this.refs.queryInput.value = toQueryParams(opts);
133
+ delete opts.autoRun;
134
+ opts.center = this.center;
135
+ opts.zoom = this.zoom;
136
+ opts.mode = "map";
137
+ this.refs.mapInput.value = toQueryParams(opts);
138
+ }
139
+ }
@@ -0,0 +1,47 @@
1
+ import { h, t } from "../lib/dom.js";
2
+ import { style as buttonCSS } from "./button.js";
3
+ import { normalizeCSS } from "../lib/normalize.js";
4
+
5
+ const style = `margin: 10px 0; display: block; width: 100%; text-align: left;`;
6
+
7
+ export class StylePicker extends HTMLElement {
8
+ constructor() {
9
+ super();
10
+ this.styles = [];
11
+ }
12
+
13
+ connectedCallback() {
14
+ const shadow = this.attachShadow({ mode: "open" });
15
+
16
+ if (!this.styles || this.styles.length === 0) {
17
+ return;
18
+ }
19
+
20
+ const div = h("div", { slot: "modal-content" });
21
+ const button = h(
22
+ "button-modal",
23
+ { text: "Pick Style", icon: "paintbrush" },
24
+ div,
25
+ );
26
+ this.refs = { button, div };
27
+
28
+ for (const [name, value, tiles] of this.styles) {
29
+ const styleButton = h(
30
+ "button",
31
+ { style },
32
+ t(name),
33
+ // h("br"),
34
+ // h("small", {}, `Tiles: ${tiles}`),
35
+ );
36
+ styleButton.addEventListener("click", (e) => {
37
+ button.toggle();
38
+ this.dispatchEvent(
39
+ new CustomEvent("change", { detail: { value: value } }),
40
+ );
41
+ });
42
+ div.appendChild(styleButton);
43
+ }
44
+
45
+ shadow.appendChild(button);
46
+ }
47
+ }