@heycar/heycars-map 0.1.9 → 0.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 (87) hide show
  1. package/README.md +30 -7
  2. package/dist/business-components/StartEndPoint/StartEndPoint.d.ts +18309 -4
  3. package/dist/components/AmapLoader/AmapLoader.d.ts +5 -20
  4. package/dist/components/AmapMarker/AmapMarker.d.ts +3 -2
  5. package/dist/components/Demo/HeycarDemo.d.ts +3 -3
  6. package/dist/components/Demo/searchResult.d.ts +1 -1
  7. package/dist/components/GmapAdvancedMarkerView/GmapAdvancedMarkerView.d.ts +3 -2
  8. package/dist/components/GmapLoader/GmapLoader.d.ts +3 -35
  9. package/dist/components/GmapMarker/GmapMarker.d.ts +3 -2
  10. package/dist/components/MapProvider/MapProvider.d.ts +4 -5
  11. package/dist/hooks/useGeoLocation.d.ts +2 -2
  12. package/dist/hooks/useMap.d.ts +801 -0
  13. package/dist/hooks/useMapAutoComplete.d.ts +4 -6
  14. package/dist/hooks/useMapCityBound.d.ts +5 -6
  15. package/dist/hooks/useMapEventSource.d.ts +5 -0
  16. package/dist/hooks/useMapFitView.d.ts +4599 -0
  17. package/dist/hooks/useMapLoader.d.ts +67 -0
  18. package/dist/hooks/useMapPlace.d.ts +4 -6
  19. package/dist/hooks/useMapRecomendPlace.d.ts +5 -797
  20. package/dist/hooks/useMapSupplier.d.ts +8 -0
  21. package/dist/hooks/useOverlay.d.ts +12 -0
  22. package/dist/hooks-business/useBusinessMapAutoComplete.d.ts +5 -5
  23. package/dist/hooks-business/useBusinessMapRecomendPlace.d.ts +4 -3
  24. package/dist/index.cjs +52 -52
  25. package/dist/index.d.ts +2 -0
  26. package/dist/index.js +1366 -1165
  27. package/dist/types/interface.d.ts +4 -0
  28. package/package.json +1 -1
  29. package/src/App.tsx +1 -1
  30. package/src/api/place.ts +0 -2
  31. package/src/business-components/AddressBox/AddressBox.tsx +1 -1
  32. package/src/business-components/AddressLocator/AddressLocator.tsx +1 -1
  33. package/src/business-components/DrivingLine/DrivingLine.tsx +1 -1
  34. package/src/business-components/DrivingRoute/DrivingRoute.tsx +2 -3
  35. package/src/business-components/PassengerCircle/PassengerCircle.tsx +1 -1
  36. package/src/business-components/PlaceCircle/PlaceCircle.tsx +1 -1
  37. package/src/business-components/StartEndPoint/StartEndPoint.tsx +23 -7
  38. package/src/business-components/TaxiCar/TaxiCar.tsx +1 -1
  39. package/src/business-components/WalkingLine/WalkingLine.tsx +1 -1
  40. package/src/business-components/WalkingRoute/WalkingRoute.tsx +2 -3
  41. package/src/business-components/WaveCircle/WaveCircle.tsx +1 -1
  42. package/src/components/Amap/Amap.ts +1 -1
  43. package/src/components/AmapInfoWindow/AmapInfoWindow.ts +1 -1
  44. package/src/components/AmapLoader/AmapLoader.ts +6 -54
  45. package/src/components/AmapMarker/AmapMarker.ts +5 -2
  46. package/src/components/AmapPolygon/AmapPolygon.ts +1 -1
  47. package/src/components/AmapPolyline/AmapPolyline.ts +1 -1
  48. package/src/components/AmapText/AmapText.ts +1 -1
  49. package/src/components/Demo/Demo.css.ts +1 -1
  50. package/src/components/Demo/HeycarDemo.tsx +50 -33
  51. package/src/components/Demo/SearchDemo.tsx +40 -65
  52. package/src/components/Demo/searchResult.ts +12888 -1
  53. package/src/components/Gmap/Gmap.ts +17 -5
  54. package/src/components/GmapAdvancedMarkerView/GmapAdvancedMarkerView.ts +9 -4
  55. package/src/components/GmapInfoWindow/GmapInfoWindow.ts +1 -1
  56. package/src/components/GmapLoader/GmapLoader.ts +4 -62
  57. package/src/components/GmapMarker/GmapMarker.ts +5 -2
  58. package/src/components/GmapPolygon/GmapPolygon.ts +1 -1
  59. package/src/components/GmapPolyline/GmapPolyline.ts +1 -1
  60. package/src/components/MapProvider/MapProvider.tsx +33 -50
  61. package/src/hooks/useDrivingRoute.ts +1 -1
  62. package/src/hooks/useGeoLocation.ts +4 -2
  63. package/src/hooks/useHeycarMap.ts +1 -1
  64. package/src/hooks/useMap.ts +29 -0
  65. package/src/hooks/useMapAngle.ts +1 -1
  66. package/src/hooks/useMapAutoComplete.ts +16 -19
  67. package/src/hooks/useMapCityBound.ts +36 -24
  68. package/src/hooks/useMapDrag.ts +1 -1
  69. package/src/hooks/useMapEventSource.ts +20 -0
  70. package/src/hooks/useMapFitView.ts +127 -0
  71. package/src/hooks/useMapLoader.ts +164 -0
  72. package/src/hooks/useMapPlace.ts +20 -22
  73. package/src/hooks/useMapRecomendPlace.ts +18 -25
  74. package/src/{components/MapProvider → hooks}/useMapSupplier.ts +4 -7
  75. package/src/hooks/useOverlay.ts +22 -0
  76. package/src/hooks/useWalkingRoute.ts +1 -1
  77. package/src/hooks-business/useBusinessMapAutoComplete.ts +13 -7
  78. package/src/hooks-business/useBusinessMapRecomendPlace.ts +10 -10
  79. package/src/index.ts +2 -0
  80. package/src/types/interface.ts +5 -0
  81. package/dist/components/Amap/useAmap.d.ts +0 -399
  82. package/dist/components/Gmap/useGmap.d.ts +0 -5
  83. package/dist/components/MapProvider/useMapSupplier.d.ts +0 -11
  84. package/dist/hooks/useMapReady.d.ts +0 -4
  85. package/src/components/Amap/useAmap.ts +0 -9
  86. package/src/components/Gmap/useGmap.ts +0 -7
  87. package/src/hooks/useMapReady.ts +0 -14
@@ -1,10 +1,8 @@
1
- /// <reference types="google.maps" />
2
- import type { City, MapShallowRef } from "../types/interface";
3
- export interface UseMapAutoCompleteProps<M = AMap.Map | google.maps.Map> {
4
- mapRef: MapShallowRef<M>;
1
+ import type { City } from "../types/interface";
2
+ export interface UseMapAutoCompleteProps {
5
3
  city: City;
6
4
  }
7
- export declare const useAmapAutoComplete: (props: UseMapAutoCompleteProps<AMap.Map>) => {
5
+ export declare const useAmapAutoComplete: (props: UseMapAutoCompleteProps) => {
8
6
  setKeyword: (value: string) => void;
9
7
  setCity: (value: City) => void;
10
8
  autoCompletePlaces: import("vue-demi").Ref<{
@@ -16,7 +14,7 @@ export declare const useAmapAutoComplete: (props: UseMapAutoCompleteProps<AMap.M
16
14
  cityName?: string | undefined;
17
15
  }[]>;
18
16
  };
19
- export declare const useGmapAutoComplete: (props: UseMapAutoCompleteProps<google.maps.Map>) => {
17
+ export declare const useGmapAutoComplete: (props: UseMapAutoCompleteProps) => {
20
18
  setKeyword: (value: string) => void;
21
19
  setCity: (value: City) => void;
22
20
  autoCompletePlaces: import("vue-demi").Ref<{
@@ -1,10 +1,9 @@
1
- /// <reference types="google.maps" />
2
- import type { City, MapShallowRef } from "../types/interface";
3
- export interface UseMapCityBoundProps<M = AMap.Map | google.maps.Map> {
4
- mapRef: MapShallowRef<M>;
5
- cityName: string;
1
+ import { Ref } from "vue-demi";
2
+ import type { City } from "../types/interface";
3
+ export interface UseMapCityBoundProps {
4
+ cityNameRef: Ref<string | undefined>;
6
5
  onChange?: (value: City) => any;
7
6
  }
8
- export declare const useGmapBoundCity: (props: UseMapCityBoundProps) => City;
9
7
  export declare const useAmapBoundCity: (props: UseMapCityBoundProps) => City;
8
+ export declare const useGmapBoundCity: (props: UseMapCityBoundProps) => City;
10
9
  export declare const useMapBoundCity: (props: UseMapCityBoundProps) => City;
@@ -0,0 +1,5 @@
1
+ export type MapEventSource = "api" | "user";
2
+ export declare const getMapEvnetSource: () => MapEventSource;
3
+ export declare const useMapEventSource: () => {
4
+ executeMapApi: (fn: () => void) => void;
5
+ };