@geolonia/embed 5.0.3 → 5.2.1

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 (66) hide show
  1. package/.github/workflows/build.yml +9 -4
  2. package/.vscode/settings.json +27 -0
  3. package/CHANGELOG.md +9 -0
  4. package/README.md +71 -2
  5. package/dist/embed +1 -1
  6. package/dist/embed-chunks/12cbd0d1cb4cf744c32f.js +2 -0
  7. package/dist/embed-chunks/1492645e3d07fd3de940.js +1 -0
  8. package/dist/embed-chunks/8a521e8312a5b4da123d.js +2 -0
  9. package/dist/embed-chunks/8a521e8312a5b4da123d.js.LICENSE.txt +6 -0
  10. package/dist/embed-core.d.ts +14 -0
  11. package/dist/embed-core.js +2 -0
  12. package/dist/embed-core.js.LICENSE.txt +4 -0
  13. package/dist/{src/embed.d.ts → embed.d.ts} +2 -37
  14. package/dist/embed.js +1 -1
  15. package/dist/embed.js.LICENSE.txt +1 -1
  16. package/dist/lib/keyring.d.ts +45 -0
  17. package/dist/{src/lib → lib}/parse-atts.d.ts +1 -1
  18. package/dist/{src/lib → lib}/simplestyle.d.ts +2 -0
  19. package/dist/{src/lib → lib}/util.d.ts +3 -3
  20. package/dist/types.d.ts +38 -0
  21. package/dist/version.d.ts +1 -0
  22. package/e2e/basic.spec.ts +6 -1
  23. package/e2e/external-style.spec.ts +25 -0
  24. package/e2e/map.spec.ts +12 -12
  25. package/package.json +15 -8
  26. package/src/embed-core.ts +22 -0
  27. package/src/embed.ts +2 -42
  28. package/src/lib/geolonia-map.ts +4 -3
  29. package/src/lib/geolonia-marker.ts +1 -1
  30. package/src/lib/keyring.test.ts +58 -15
  31. package/src/lib/keyring.ts +53 -1
  32. package/src/lib/parse-atts.test.ts +2 -2
  33. package/src/lib/parse-atts.ts +5 -1
  34. package/src/lib/render.ts +1 -1
  35. package/src/lib/simplestyle.test.ts +94 -56
  36. package/src/lib/simplestyle.ts +75 -17
  37. package/src/lib/util.test.ts +136 -96
  38. package/src/lib/util.ts +55 -10
  39. package/src/testability.test.ts +13 -10
  40. package/src/types.ts +44 -0
  41. package/tsconfig.build.json +9 -0
  42. package/tsconfig.json +1 -0
  43. package/vitest.config.ts +8 -0
  44. package/webpack.config.js +45 -14
  45. package/.mocharc.js +0 -9
  46. package/dist/e2e/basic.spec.d.ts +0 -8
  47. package/dist/e2e/helper.d.ts +0 -4
  48. package/dist/e2e/map.spec.d.ts +0 -1
  49. package/dist/embed-chunks/2489af4328c51b71e92d.js +0 -2
  50. package/dist/playwright.config.d.ts +0 -9
  51. package/dist/src/lib/keyring.d.ts +0 -29
  52. package/dist/src/lib/keyring.test.d.ts +0 -1
  53. package/dist/src/lib/parse-atts.test.d.ts +0 -1
  54. package/dist/src/lib/simplestyle.test.d.ts +0 -1
  55. package/dist/src/lib/util.test.d.ts +0 -1
  56. package/dist/src/testability.test.d.ts +0 -1
  57. package/dist/src/version.d.ts +0 -1
  58. /package/dist/embed-chunks/{2489af4328c51b71e92d.js.LICENSE.txt → 12cbd0d1cb4cf744c32f.js.LICENSE.txt} +0 -0
  59. /package/dist/{src/lib → lib}/CustomAttributionControl.d.ts +0 -0
  60. /package/dist/{src/lib → lib}/controls/geolonia-control.d.ts +0 -0
  61. /package/dist/{src/lib → lib}/geolonia-map.d.ts +0 -0
  62. /package/dist/{src/lib → lib}/geolonia-marker.d.ts +0 -0
  63. /package/dist/{src/lib → lib}/maplibre-util.d.ts +0 -0
  64. /package/dist/{src/lib → lib}/render.d.ts +0 -0
  65. /package/dist/{src/lib → lib}/simplestyle-vector.d.ts +0 -0
  66. /package/dist/{src/types-internal.d.ts → types-internal.d.ts} +0 -0
@@ -0,0 +1,4 @@
1
+ /**
2
+ * MapLibre GL JS
3
+ * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v5.19.0/LICENSE.txt
4
+ */
@@ -8,43 +8,8 @@ import { SimpleStyle } from './lib/simplestyle';
8
8
  import { VERSION as embedVersion } from './version';
9
9
  export type { GeoloniaMapOptions } from './lib/geolonia-map';
10
10
  export type Popup = maplibregl.Popup;
11
- export type EmbedAttributes = {
12
- lat: string;
13
- lng: string;
14
- zoom: string;
15
- bearing: string;
16
- pitch: string;
17
- hash: string;
18
- marker: string;
19
- markerColor: string;
20
- openPopup: string;
21
- customMarker: string;
22
- customMarkerOffset: string;
23
- gestureHandling: string;
24
- navigationControl: string;
25
- geolocateControl: string;
26
- fullscreenControl: string;
27
- scaleControl: string;
28
- geoloniaControl: string;
29
- geojson: string;
30
- cluster: string;
31
- clusterColor: string;
32
- style: string;
33
- lang: string;
34
- plugin: string;
35
- key: string;
36
- apiUrl: string;
37
- loader: string;
38
- minZoom: string;
39
- maxZoom: string;
40
- '3d': string;
41
- [otherKey: string]: string;
42
- };
43
- export type EmbedPlugin<PluginAttributes extends {
44
- [otherKey: string]: string;
45
- } = {
46
- [otherKey: string]: string;
47
- }> = (map: GeoloniaMap, target: HTMLElement, atts: EmbedAttributes & PluginAttributes) => void;
11
+ export type { EmbedAttributes, EmbedPlugin } from './types';
12
+ import type { EmbedPlugin } from './types';
48
13
  export type Geolonia = Partial<typeof maplibregl> & {
49
14
  accessToken?: string;
50
15
  embedVersion: string;