@rankingcoach/vanguard 1.12.2 → 1.13.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.
- package/dist/index-AdvancedMarker.js +235 -0
- package/dist/index-Autocomplete.js +62 -62
- package/dist/index-DateRange.js +1 -1
- package/dist/index-GoogleMaps.js +42 -36
- package/dist/index-GoogleMapsAdvancedMarker.js +64 -0
- package/dist/index-GoogleMapsAdvancedMarkerContent.js +41 -0
- package/dist/index-Parser2.js +3 -2
- package/dist/index-_virtual10.js +5 -3
- package/dist/index-_virtual11.js +5 -5
- package/dist/index-_virtual12.js +3 -5
- package/dist/index-cjs.js +1 -1
- package/dist/index-lib5.js +1 -1
- package/dist/index-map-context.js +12 -0
- package/dist/index-map-helper.js +38 -0
- package/dist/index-tiny-invariant.js +12 -0
- package/dist/index-video.es.js +2 -2
- package/dist/index.js +425 -418
- package/dist/types/core/Autocomplete/stories/WithMultiple.story.d.ts +0 -4
- package/dist/types/core/GoogleMaps/GoogleMaps.d.ts +2 -1
- package/dist/types/core/GoogleMaps/GoogleMapsAdvancedMarker/GoogleMapsAdvancedMarker.d.ts +55 -0
- package/dist/types/core/GoogleMaps/GoogleMapsAdvancedMarker/GoogleMapsAdvancedMarkerContent.d.ts +41 -0
- package/dist/types/core/GoogleMaps/index.d.ts +6 -0
- package/dist/types/core/GoogleMaps/map-context.d.ts +1 -1
- package/dist/types/core/GoogleMaps/stories/WithAdvancedMarker.story.d.ts +2 -0
- package/dist/types/core/GoogleMaps/stories/WithAdvancedMarkerCustomIcon.story.d.ts +2 -0
- package/dist/types/core/GoogleMaps/stories/WithAdvancedMarkerHTML.story.d.ts +2 -0
- package/dist/types/core/GoogleMaps/stories/WithMapIdAndMarkers.story.d.ts +2 -0
- package/dist/types/core/GoogleMaps/stories/WithMarkerInfoBox.story.d.ts +2 -0
- package/dist/types/core/GoogleMaps/stories/WithMultipleAdvancedMarkers.story.d.ts +2 -0
- package/dist/types/core/GoogleMaps/stories/WithMultipleMarkers.story.d.ts +2 -0
- package/dist/types/core/GoogleMaps/stories/WithSingleMarker.story.d.ts +2 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/vanguard-asset-analysis.json +1 -1
- package/dist-wordpress/index.js +18553 -19223
- package/dist-wordpress/types/index.d.ts +0 -2
- package/dist-wordpress/vanguard.css +1 -1
- package/package.json +4 -4
|
@@ -9,7 +9,8 @@ export type GoogleMapsProps = {
|
|
|
9
9
|
testId?: string;
|
|
10
10
|
onLoad?: ((map: google.maps.Map) => void | Promise<void>) | undefined;
|
|
11
11
|
mapId?: boolean | string;
|
|
12
|
-
|
|
12
|
+
options?: Omit<google.maps.MapOptions, 'styles' | 'mapId'>;
|
|
13
|
+
} & Omit<GoogleMapProps, 'mapContainerStyle' | 'options'>;
|
|
13
14
|
/**
|
|
14
15
|
* Google Maps Component
|
|
15
16
|
*
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Props for GoogleMapsAdvancedMarker component
|
|
4
|
+
*/
|
|
5
|
+
export interface GoogleMapsAdvancedMarkerProps {
|
|
6
|
+
/** Unique identifier for the marker */
|
|
7
|
+
id: string;
|
|
8
|
+
/** Indicates if Google Maps JavaScript API is loaded */
|
|
9
|
+
isJsApiLoaded: boolean;
|
|
10
|
+
/** Callback when marker is clicked, receives marker ID */
|
|
11
|
+
onClick?: (id: string) => void;
|
|
12
|
+
/** Callback when mouse enters marker area */
|
|
13
|
+
onMouseOver?: (e: google.maps.MapMouseEvent) => void;
|
|
14
|
+
/** Callback when mouse leaves marker area */
|
|
15
|
+
onMouseOut?: (e: google.maps.MapMouseEvent) => void;
|
|
16
|
+
/** Marker position coordinates */
|
|
17
|
+
pos: {
|
|
18
|
+
lat: number;
|
|
19
|
+
lng: number;
|
|
20
|
+
};
|
|
21
|
+
/** Z-index for marker layering */
|
|
22
|
+
zIndex?: number;
|
|
23
|
+
/** Rollover text displayed on hover */
|
|
24
|
+
title?: string;
|
|
25
|
+
/** If true, the marker can be dragged */
|
|
26
|
+
draggable?: boolean;
|
|
27
|
+
/** Callback when user stops dragging the marker */
|
|
28
|
+
onDragEnd?: (e: google.maps.MapMouseEvent) => void;
|
|
29
|
+
/**
|
|
30
|
+
* Content rendered inside the AdvancedMarkerElement via React portal.
|
|
31
|
+
* Use GoogleMapsAdvancedMarkerContent for a default pin, or provide custom HTML.
|
|
32
|
+
* Absolutely-positioned children (e.g. info overlays) won't affect the marker anchor.
|
|
33
|
+
*/
|
|
34
|
+
children?: ReactNode;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* GoogleMapsAdvancedMarker Component
|
|
38
|
+
*
|
|
39
|
+
* Uses google.maps.marker.AdvancedMarkerElement with a React portal so that
|
|
40
|
+
* children are rendered directly inside the marker's DOM content node.
|
|
41
|
+
* This allows arbitrary React content (SVG pins, info overlays, etc.) to be
|
|
42
|
+
* placed exactly where the marker is on the map.
|
|
43
|
+
*
|
|
44
|
+
* Requires a mapId on the parent GoogleMaps component.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```tsx
|
|
48
|
+
* <GoogleMaps mapId="YOUR_MAP_ID" center={center} zoom={10}>
|
|
49
|
+
* <GoogleMapsAdvancedMarker id="marker-1" isJsApiLoaded={true} pos={{ lat: 40.7, lng: -74.0 }}>
|
|
50
|
+
* <GoogleMapsAdvancedMarkerContent color="#4285F4" />
|
|
51
|
+
* </GoogleMapsAdvancedMarker>
|
|
52
|
+
* </GoogleMaps>
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
export declare const GoogleMapsAdvancedMarker: (props: GoogleMapsAdvancedMarkerProps) => import('react').ReactPortal;
|
package/dist/types/core/GoogleMaps/GoogleMapsAdvancedMarker/GoogleMapsAdvancedMarkerContent.d.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Props for GoogleMapsAdvancedMarkerContent component
|
|
3
|
+
*/
|
|
4
|
+
export interface GoogleMapsAdvancedMarkerContentProps {
|
|
5
|
+
/** Icon image URL (data URL or external URL). If provided, displays as img element */
|
|
6
|
+
icon?: string;
|
|
7
|
+
/** Size of the marker icon in pixels */
|
|
8
|
+
size?: {
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
};
|
|
12
|
+
/** Color for the default pin marker (only used if icon is not provided) */
|
|
13
|
+
color?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* GoogleMapsAdvancedMarkerContent Component
|
|
17
|
+
*
|
|
18
|
+
* Provides default visual content for GoogleMapsAdvancedMarker. This component renders either:
|
|
19
|
+
* - A custom icon image if `icon` prop is provided
|
|
20
|
+
* - A default pin SVG with customizable color if no icon is provided
|
|
21
|
+
*
|
|
22
|
+
* Since AdvancedMarkerElement uses HTML content instead of icon URLs,
|
|
23
|
+
* this component acts as a bridge to maintain familiar icon-based workflows.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```tsx
|
|
27
|
+
* // Default pin with custom color
|
|
28
|
+
* <GoogleMapsAdvancedMarker id="1" pos={position}>
|
|
29
|
+
* <GoogleMapsAdvancedMarkerContent color="#4285F4" />
|
|
30
|
+
* </GoogleMapsAdvancedMarker>
|
|
31
|
+
*
|
|
32
|
+
* // Custom icon image
|
|
33
|
+
* <GoogleMapsAdvancedMarker id="2" pos={position}>
|
|
34
|
+
* <GoogleMapsAdvancedMarkerContent
|
|
35
|
+
* icon="data:image/png;base64,..."
|
|
36
|
+
* size={{ x: 32, y: 40 }}
|
|
37
|
+
* />
|
|
38
|
+
* </GoogleMapsAdvancedMarker>
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export declare const GoogleMapsAdvancedMarkerContent: ({ icon, size, color, }: GoogleMapsAdvancedMarkerContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -9,3 +9,9 @@ export { defaultGoogleMarker, defaultMarkerIcon } from './GoogleMapsMarker/icons
|
|
|
9
9
|
export type { GoogleMapsMarkerDefaultProps } from './GoogleMapsMarkerDefault/GoogleMapsMarkerDefault';
|
|
10
10
|
export { GoogleMapsMarkerDefault } from './GoogleMapsMarkerDefault/GoogleMapsMarkerDefault';
|
|
11
11
|
export { MarkerF } from '@react-google-maps/api';
|
|
12
|
+
export { MarkerF as AdvancedMarkerF, Marker as AdvancedMarker } from './GoogleMapsMarker/AdvancedMarker';
|
|
13
|
+
export type { MarkerProps as AdvancedMarkerProps } from './GoogleMapsMarker/AdvancedMarker';
|
|
14
|
+
export type { GoogleMapsAdvancedMarkerProps } from './GoogleMapsAdvancedMarker/GoogleMapsAdvancedMarker';
|
|
15
|
+
export { GoogleMapsAdvancedMarker } from './GoogleMapsAdvancedMarker/GoogleMapsAdvancedMarker';
|
|
16
|
+
export type { GoogleMapsAdvancedMarkerContentProps } from './GoogleMapsAdvancedMarker/GoogleMapsAdvancedMarkerContent';
|
|
17
|
+
export { GoogleMapsAdvancedMarkerContent } from './GoogleMapsAdvancedMarker/GoogleMapsAdvancedMarkerContent';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const MapContext: import('react').Context<google.maps.Map>;
|
|
2
|
-
export declare function useGoogleMap(): google.maps.Map
|
|
2
|
+
export declare function useGoogleMap(): google.maps.Map;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -248,6 +248,9 @@ export type { GoogleMapsProps } from './core/GoogleMaps';
|
|
|
248
248
|
export type { GoogleMapsCircleProps } from './core/GoogleMaps';
|
|
249
249
|
export type { GoogleMapsMarkerProps } from './core/GoogleMaps';
|
|
250
250
|
export type { GoogleMapsMarkerDefaultProps } from './core/GoogleMaps';
|
|
251
|
+
export type { AdvancedMarkerProps } from './core/GoogleMaps';
|
|
252
|
+
export type { GoogleMapsAdvancedMarkerProps } from './core/GoogleMaps';
|
|
253
|
+
export type { GoogleMapsAdvancedMarkerContentProps } from './core/GoogleMaps';
|
|
251
254
|
export { panToOffset } from './core/GoogleMaps';
|
|
252
255
|
export { GoogleMaps } from './core/GoogleMaps';
|
|
253
256
|
export { GoogleMapsCircle } from './core/GoogleMaps';
|
|
@@ -255,6 +258,9 @@ export { MarkerF } from './core/GoogleMaps';
|
|
|
255
258
|
export { GoogleMapsMarker } from './core/GoogleMaps';
|
|
256
259
|
export { GoogleMapsMarkerDefault } from './core/GoogleMaps';
|
|
257
260
|
export { defaultGoogleMarker, defaultMarkerIcon } from './core/GoogleMaps';
|
|
261
|
+
export { AdvancedMarkerF, AdvancedMarker } from './core/GoogleMaps';
|
|
262
|
+
export { GoogleMapsAdvancedMarker } from './core/GoogleMaps';
|
|
263
|
+
export { GoogleMapsAdvancedMarkerContent } from './core/GoogleMaps';
|
|
258
264
|
export type { IconButtonProps } from './core/IconButton';
|
|
259
265
|
export { IconButton } from './core/IconButton';
|
|
260
266
|
export type { IllustrationBlobProps } from './core/IllustrationBlob';
|