@milemaker/milemaker-js 1.0.0

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 (75) hide show
  1. package/LICENSE +134 -0
  2. package/README.md +41 -0
  3. package/dist/MapProvider/index.d.ts +2453 -0
  4. package/dist/actions/constants/actions.constants.d.ts +14 -0
  5. package/dist/actions/constants/index.d.ts +1 -0
  6. package/dist/actions/index.d.ts +10 -0
  7. package/dist/actions/layer/baseLayerActions.factory.d.ts +6 -0
  8. package/dist/actions/layer/index.d.ts +6 -0
  9. package/dist/actions/layer/trafficLayerActions.factory.d.ts +3 -0
  10. package/dist/actions/layer/types/index.d.ts +1 -0
  11. package/dist/actions/layer/types/layerActions.types.d.ts +62 -0
  12. package/dist/actions/marker/createMarkerAction.factory.d.ts +2 -0
  13. package/dist/actions/marker/createRouteStopMarkerAction.factory.d.ts +3 -0
  14. package/dist/actions/marker/createRouteStopMarkersAction.factory.d.ts +3 -0
  15. package/dist/actions/marker/index.d.ts +3 -0
  16. package/dist/actions/marker/types/index.d.ts +1 -0
  17. package/dist/actions/marker/types/markerActions.types.d.ts +217 -0
  18. package/dist/actions/popup/createPopupAction.factory.d.ts +4 -0
  19. package/dist/actions/popup/index.d.ts +3 -0
  20. package/dist/actions/popup/types/index.d.ts +1 -0
  21. package/dist/actions/popup/types/popupActions.types.d.ts +128 -0
  22. package/dist/actions/route/createRouteAction.factory.d.ts +3 -0
  23. package/dist/actions/route/createShapeAction.factory.d.ts +3 -0
  24. package/dist/actions/route/index.d.ts +3 -0
  25. package/dist/actions/route/types/index.d.ts +1 -0
  26. package/dist/actions/route/types/routeActions.types.d.ts +96 -0
  27. package/dist/actions/types/actions.enums.d.ts +11 -0
  28. package/dist/actions/types/actions.types.d.ts +60 -0
  29. package/dist/actions/types/index.d.ts +7 -0
  30. package/dist/actions/zoom/createZoomActions.factory.d.ts +3 -0
  31. package/dist/actions/zoom/index.d.ts +2 -0
  32. package/dist/actions/zoom/types/index.d.ts +1 -0
  33. package/dist/actions/zoom/types/zoomActions.types.d.ts +76 -0
  34. package/dist/constants/common.constants.d.ts +4 -0
  35. package/dist/constants/index.d.ts +1 -0
  36. package/dist/controls/constants/controls.constants.d.ts +8 -0
  37. package/dist/controls/constants/index.d.ts +1 -0
  38. package/dist/controls/createAttributionControl.factory.d.ts +4 -0
  39. package/dist/controls/createBaseLayerControl.factory.d.ts +3 -0
  40. package/dist/controls/createCurrentPositionControl.factory.d.ts +3 -0
  41. package/dist/controls/createTrafficLayerControl.factory.d.ts +3 -0
  42. package/dist/controls/createZoomControl.factory.d.ts +3 -0
  43. package/dist/controls/index.d.ts +5 -0
  44. package/dist/controls/types/controls.enums.d.ts +11 -0
  45. package/dist/controls/types/controls.types.d.ts +121 -0
  46. package/dist/controls/types/index.d.ts +2 -0
  47. package/dist/createMap/constants/createMap.constants.d.ts +1 -0
  48. package/dist/createMap/constants/index.d.ts +1 -0
  49. package/dist/createMap/createMap.d.ts +23 -0
  50. package/dist/createMap/index.d.ts +1 -0
  51. package/dist/createMap/types/createMap.types.d.ts +67 -0
  52. package/dist/createMap/types/index.d.ts +1 -0
  53. package/dist/helpers/decodeRoutePolylineString.helper.d.ts +7 -0
  54. package/dist/helpers/generateUuid.helper.d.ts +1 -0
  55. package/dist/helpers/getControlAbsolutePosition.helper.d.ts +6 -0
  56. package/dist/helpers/getDistanceBetweenLonLatLike.helper.d.ts +8 -0
  57. package/dist/helpers/getIsSupported.helper.d.ts +5 -0
  58. package/dist/helpers/getMapFlyToAnimationDuration.helper.d.ts +7 -0
  59. package/dist/helpers/getMapFlyToOptions.helper.d.ts +14 -0
  60. package/dist/helpers/getNumberOfTimeUnites.helper.d.ts +9 -0
  61. package/dist/helpers/htmlRender.d.ts +29 -0
  62. package/dist/helpers/index.d.ts +5 -0
  63. package/dist/helpers/injectHTMLElement.helper.d.ts +7 -0
  64. package/dist/helpers/parseLonLatLikeToCoordinates.helper.d.ts +7 -0
  65. package/dist/helpers/parseLonLatLikeToTuple.helper.d.ts +7 -0
  66. package/dist/helpers/replaceMatchInSvg.helper.d.ts +16 -0
  67. package/dist/index.cjs +3944 -0
  68. package/dist/index.d.ts +3 -0
  69. package/dist/index.js +54058 -0
  70. package/dist/nmaps-gl-5352a2f0.js +4 -0
  71. package/dist/nmaps-gl-df6fcdba.cjs +1 -0
  72. package/dist/types/common.enums.d.ts +11 -0
  73. package/dist/types/common.types.d.ts +59 -0
  74. package/dist/types/index.d.ts +5 -0
  75. package/package.json +55 -0
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Available map base layers
3
+ * @group Common
4
+ * @category Enums
5
+ */
6
+ export declare enum MapBaseLayer {
7
+ STREETS = "Streets",
8
+ LIGHT = "Light",
9
+ DARK = "Dark",
10
+ SATELLITE = "Satellite"
11
+ }
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Tuple where first item is longitude and second is latitude
3
+ * @type
4
+ * @group Common
5
+ * @category Types
6
+ */
7
+ export type LonLatTuple = [
8
+ /**
9
+ * Longitude
10
+ */
11
+ lon: number,
12
+ /**
13
+ * Latitude
14
+ */
15
+ lat: number
16
+ ];
17
+ /**
18
+ * Coordinate object
19
+ * @interface
20
+ * @group Common
21
+ * @category Interfaces
22
+ */
23
+ export type Coordinates = {
24
+ /**
25
+ * Latitude
26
+ */
27
+ lat: number;
28
+ /**
29
+ * Longitude
30
+ */
31
+ lon: number;
32
+ };
33
+ /**
34
+ * Longitude Latitude object
35
+ * @interface
36
+ * @group Common
37
+ * @category Interfaces
38
+ */
39
+ export type LngLat = {
40
+ /**
41
+ * Latitude
42
+ */
43
+ lat: number;
44
+ /**
45
+ * Longitude
46
+ */
47
+ lng: number;
48
+ };
49
+ /**
50
+ * Longitude LatLatitude ike object
51
+ * Can be a tuple, a coordinate object, or LngLat object
52
+ * {@link LonLatTuple}
53
+ * {@link Coordinates}
54
+ * {@link LngLat}
55
+ * @type
56
+ * @group Common
57
+ * @category Types
58
+ */
59
+ export type LonLatLike = LonLatTuple | Coordinates | LngLat;
@@ -0,0 +1,5 @@
1
+ export * from "./common.types";
2
+ export * from "./common.enums";
3
+ export type * from "../createMap/types";
4
+ export type * from "../actions/types";
5
+ export type * from "../controls/types";
package/package.json ADDED
@@ -0,0 +1,55 @@
1
+ {
2
+ "name": "@milemaker/milemaker-js",
3
+ "private": false,
4
+ "version": "1.0.0",
5
+ "type": "module",
6
+ "license": "BSD-3-Clause",
7
+ "files": [
8
+ "dist",
9
+ "LICENSE",
10
+ "README.md"
11
+ ],
12
+ "keywords": [
13
+ "milemaker",
14
+ "vanila-milemaker-js-sdk",
15
+ "milemaker-js",
16
+ "randmcnally",
17
+ "milemaker-js-sdk"
18
+ ],
19
+ "publishConfig": {
20
+ "access": "restricted",
21
+ "registry": "https://registry.npmjs.org"
22
+ },
23
+ "scripts": {
24
+ "build": "tsc -p ./tsconfig.json && vite build --mode production",
25
+ "postbuild": "sh ./scripts/postbuild.sh",
26
+ "build:publish": "yarn build && npm publish"
27
+ },
28
+ "dependencies": {
29
+ "@googlemaps/polyline-codec": "^1.0.28",
30
+ "lodash": "^4.17.21",
31
+ "uuid": "^9.0.0"
32
+ },
33
+ "devDependencies": {
34
+ "@ndrive/nmaps-gl": "^1.6.6",
35
+ "@rollup/plugin-typescript": "^11.1.5",
36
+ "@types/lodash": "^4.14.197",
37
+ "@types/node": "^17.0.35",
38
+ "@types/uuid": "^9.0.2",
39
+ "sass": "^1.69.5",
40
+ "tslib": "^2.6.2",
41
+ "typedoc-plugin-missing-exports": "^2.1.0",
42
+ "typescript": "^5.1.6",
43
+ "vite": "^4.4.5",
44
+ "vite-plugin-css-injected-by-js": "^3.3.0"
45
+ },
46
+ "exports": {
47
+ ".": {
48
+ "import": "./dist/index.js",
49
+ "require": "./dist/index.cjs"
50
+ }
51
+ },
52
+ "index": "./dist/index.cjs",
53
+ "module": "./dist/index.js",
54
+ "typings": "./dist/index.d.ts"
55
+ }