static-google-map
Advanced tools
Comparing version 0.0.4 to 0.0.5
{ | ||
"name": "static-google-map", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"main": "dist/static-google-map.cjs.js", | ||
@@ -39,3 +39,6 @@ "module": "dist/static-google-map.esm.js", | ||
"test": "jest", | ||
"prepublish": "yarn build" | ||
"prepublish": "yarn build", | ||
"release:patch": "npm version patch && npm publish", | ||
"release:minor": "npm version minor && npm publish", | ||
"release:major": "npm version major && npm publish" | ||
}, | ||
@@ -42,0 +45,0 @@ "files": [ |
@@ -8,3 +8,3 @@ interface GoogleMapImageProps { | ||
*/ | ||
size: string; | ||
size?: string; | ||
@@ -117,17 +117,22 @@ /** | ||
interface MarkerGroup { | ||
type Color = | ||
| "black" | ||
| "brown" | ||
| "green" | ||
| "purple" | ||
| "yellow" | ||
| "blue" | ||
| "gray" | ||
| "orange" | ||
| "red" | ||
| "white" | ||
| (string & Record<never, never>); // Keeps autocomplete for above default values, while allowing any string | ||
interface MarkerStyles { | ||
size?: "tiny" | "mid" | "small" | "normal"; | ||
color?: | ||
| "black" | ||
| "brown" | ||
| "green" | ||
| "purple" | ||
| "yellow" | ||
| "blue" | ||
| "gray" | ||
| "orange" | ||
| "red" | ||
| "white" | ||
| number; | ||
/** Can be a predefined color from the set or a 24-bit color in the format "0xFFFFFF" */ | ||
color?: Color; | ||
iconURL?: string; | ||
/** Single alphanumeric character */ | ||
label?: string; | ||
@@ -146,7 +151,11 @@ scale?: "1" | "2" | "4" | 1 | 2 | 4; | ||
interface Marker extends MarkerGroup { | ||
interface Marker extends MarkerStyles { | ||
location: locationType; | ||
} | ||
interface PathGroup { | ||
interface MarkerGroup extends MarkerStyles { | ||
markers: Marker[]; | ||
} | ||
interface PathStyles { | ||
weight?: string | number; | ||
@@ -170,6 +179,10 @@ color?: | ||
interface Path extends PathGroup { | ||
interface Path extends PathStyles { | ||
points: locationType; | ||
} | ||
interface PathGroup extends PathStyles { | ||
paths: Path[]; | ||
} | ||
interface Direction extends PathGroup { | ||
@@ -200,3 +213,3 @@ origin: string | { lat: string | number; lng: string | number }; | ||
} | ||
interface Props extends Record<string, any> { | ||
interface Props extends GoogleMapImageProps { | ||
markers?: Marker[]; | ||
@@ -203,0 +216,0 @@ markerGroups?: MarkerGroup[]; |
64327
1263