@heycar/heycars-map 0.2.1 → 0.2.3

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 (35) hide show
  1. package/dist/api/geometry.d.ts +3 -3
  2. package/dist/business-components/PassengerCircle/PassengerCircle.css.d.ts +14 -1
  3. package/dist/business-components/PassengerCircle/PassengerCircle.d.ts +1 -0
  4. package/dist/business-components/PlaceCircle/PlaceCircle.css.d.ts +8 -1
  5. package/dist/business-components/PlaceCircle/PlaceCircle.d.ts +1 -0
  6. package/dist/hooks/useDrivingRoute.d.ts +12 -5
  7. package/dist/hooks/useGeoLocation.d.ts +1 -1
  8. package/dist/hooks/useMapGeometry.d.ts +10 -0
  9. package/dist/hooks-business/useBusinessMapFitView.d.ts +2297 -0
  10. package/dist/index.cjs +45 -45
  11. package/dist/index.d.ts +2 -0
  12. package/dist/index.js +967 -862
  13. package/dist/style.css +1 -1
  14. package/dist/types/interface.d.ts +5 -0
  15. package/package.json +1 -1
  16. package/src/api/geometry.ts +3 -4
  17. package/src/business-components/DrivingRoute/DrivingRoute.tsx +5 -5
  18. package/src/business-components/PassengerCircle/PassengerCircle.css.ts +19 -6
  19. package/src/business-components/PassengerCircle/PassengerCircle.tsx +14 -8
  20. package/src/business-components/PlaceCircle/PlaceCircle.css.ts +14 -4
  21. package/src/business-components/PlaceCircle/PlaceCircle.tsx +30 -24
  22. package/src/business-components/StartEndPoint/StartEndPoint.tsx +5 -5
  23. package/src/business-components/WalkingLine/WalkingLine.tsx +6 -2
  24. package/src/business-components/WalkingRoute/WalkingRoute.tsx +2 -8
  25. package/src/components/Demo/HeycarDemo.tsx +20 -8
  26. package/src/hooks/useDrivingRoute.ts +57 -25
  27. package/src/hooks/useGeoLocation.ts +2 -2
  28. package/src/hooks/useMapGeometry.ts +27 -0
  29. package/src/hooks/useMapLoader.ts +1 -1
  30. package/src/hooks/useWalkingRoute.ts +24 -11
  31. package/src/hooks-business/useBusinessMapFitView.ts +6 -0
  32. package/src/index.ts +2 -0
  33. package/src/types/amap/plugin.d.ts +1 -1
  34. package/src/types/interface.ts +6 -0
  35. package/todo.md +10 -5
@@ -5,15 +5,15 @@ export interface ApiMapMeta {
5
5
  export interface DistanceOfLineProps extends ApiMapMeta {
6
6
  path: Point[];
7
7
  }
8
- export declare function apiDistanceOfLine(props: DistanceOfLineProps): number;
8
+ export declare function apiMapDistanceOfLine(props: DistanceOfLineProps): number;
9
9
  export interface IsPointInRingProps extends ApiMapMeta {
10
10
  point: Point;
11
11
  path: Point[];
12
12
  }
13
- export declare function apiIsPointInRing(props: IsPointInRingProps): boolean;
13
+ export declare function apiMapIsPointInRing(props: IsPointInRingProps): boolean;
14
14
  export interface IsPointInLineProps extends ApiMapMeta {
15
15
  point: Point;
16
16
  path: Point[];
17
17
  tolerance: number;
18
18
  }
19
- export declare function apiIsPointInLine(props: IsPointInLineProps): boolean;
19
+ export declare function apiMapIsPointInLine(props: IsPointInLineProps): boolean;
@@ -1 +1,14 @@
1
- export declare const passengerCircle: string;
1
+ export declare const passengerCircle: import("@vanilla-extract/recipes").RuntimeFn<{
2
+ size: {
3
+ small: {
4
+ width: "4.53vw";
5
+ height: "4.53vw";
6
+ marginBottom: "-2.265vw";
7
+ };
8
+ large: {
9
+ width: "16.27vw";
10
+ height: "16.27vw";
11
+ marginBottom: "-8.135vw";
12
+ };
13
+ };
14
+ }>;
@@ -1,5 +1,6 @@
1
1
  interface PassengerCircleProps {
2
2
  position: [number, number];
3
+ size?: "small" | "large";
3
4
  }
4
5
  export declare const APassengerCircle: import("vue").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<PassengerCircleProps>, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").EmitByProps<PassengerCircleProps, Required<PassengerCircleProps>>, never, PassengerCircleProps, {}>;
5
6
  export declare const GPassengerCircle: import("vue").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<PassengerCircleProps>, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").EmitByProps<PassengerCircleProps, Required<PassengerCircleProps>>, never, PassengerCircleProps, {}>;
@@ -26,5 +26,12 @@ export declare const gmapPlaceIconLayout: import("@vanilla-extract/recipes").Run
26
26
  };
27
27
  };
28
28
  }>;
29
- export declare const placeIcon: string;
29
+ export declare const placeIcon: import("@vanilla-extract/recipes").RuntimeFn<{
30
+ hideIcon: {
31
+ true: {
32
+ opacity: number;
33
+ };
34
+ false: {};
35
+ };
36
+ }>;
30
37
  export declare const label: string;
@@ -2,6 +2,7 @@ export interface PlaceCircleProps {
2
2
  position: [number, number];
3
3
  label?: string;
4
4
  textAlign?: "left" | "right";
5
+ hideIcon?: boolean;
5
6
  }
6
7
  export declare const APlaceCircle: import("vue-demi").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<PlaceCircleProps>, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").EmitByProps<PlaceCircleProps, Required<PlaceCircleProps>>, never, PlaceCircleProps, {}>;
7
8
  export declare const GPlaceCircle: import("vue-demi").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<PlaceCircleProps>, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").EmitByProps<PlaceCircleProps, Required<PlaceCircleProps>>, never, PlaceCircleProps, {}>;
@@ -1,9 +1,16 @@
1
- import { ShallowRef } from "vue-demi";
2
- import type { Point } from "../types/interface";
1
+ import type { Point, Route } from "../types/interface";
3
2
  export interface UseDrivingRouteProps {
4
3
  from: Point;
5
4
  to: Point;
6
5
  }
7
- export declare const useADrivingRoute: (props: UseDrivingRouteProps) => ShallowRef<Point[]>;
8
- export declare const useGDrivingRoute: (props: UseDrivingRouteProps) => ShallowRef<Point[]>;
9
- export declare const useDrivingRoute: (props: UseDrivingRouteProps) => ShallowRef<Point[]>;
6
+ export declare const useADrivingRoute: (props: UseDrivingRouteProps) => {
7
+ path: [number, number][];
8
+ distance: number;
9
+ duration: number;
10
+ };
11
+ export declare const useGDrivingRoute: (props: UseDrivingRouteProps) => {
12
+ path: [number, number][];
13
+ distance: number;
14
+ duration: number;
15
+ };
16
+ export declare const useDrivingRoute: (props: UseDrivingRouteProps) => Route;
@@ -9,7 +9,7 @@ export interface UseGeoLocationProps {
9
9
  coordinate: GeolocationCoordinates;
10
10
  }) => any;
11
11
  }
12
- export declare const useGeoLocation: (props: UseGeoLocationProps) => {
12
+ export declare const useGeoLocation: (props?: UseGeoLocationProps) => {
13
13
  geoError: import("vue-demi").Ref<GeolocationPositionError | undefined>;
14
14
  geoPosition: import("vue-demi").Ref<[number, number]>;
15
15
  geoCoordinate: import("vue-demi").Ref<{
@@ -0,0 +1,10 @@
1
+ import type { Point } from "../types/interface";
2
+ export declare const useAmapGeometry: () => {
3
+ apiMapDistance: (from: Point, to: Point) => number | undefined;
4
+ };
5
+ export declare const useGmapGeometry: () => {
6
+ apiMapDistance: (from: Point, to: Point) => number | undefined;
7
+ };
8
+ export declare const useMapGeometry: () => {
9
+ apiMapDistance: (from: Point, to: Point) => number | undefined;
10
+ };