@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,7 @@
1
+ export * from "../types/actions.enums";
2
+ export * from "../types/actions.types";
3
+ export * from "../layer/types";
4
+ export * from "../marker/types";
5
+ export * from "../popup/types";
6
+ export * from "../route/types";
7
+ export * from "../zoom/types";
@@ -0,0 +1,3 @@
1
+ import { CreateActionsFactory } from "../types";
2
+ import { ZoomActions } from "./types";
3
+ export declare const createZoomActionsFactory: CreateActionsFactory<ZoomActions>;
@@ -0,0 +1,2 @@
1
+ import { CreateActionsFactory, ZoomActions } from "../types";
2
+ export declare const zoomActionsFactory: CreateActionsFactory<ZoomActions>;
@@ -0,0 +1 @@
1
+ export * from "./zoomActions.types";
@@ -0,0 +1,76 @@
1
+ import { LonLatLike } from "../../../types";
2
+ /**
3
+ * Center by coordinates options
4
+ * @interface
5
+ * @group Actions
6
+ * @category Zoom
7
+ */
8
+ export type CenterByCoordinatesOptions = {
9
+ /**
10
+ * Zoom
11
+ */
12
+ zoom?: boolean;
13
+ /**
14
+ * Animate
15
+ * @default true
16
+ */
17
+ animate?: boolean;
18
+ /**
19
+ * Zoom step
20
+ * @default 4
21
+ */
22
+ zoomStep?: number;
23
+ /**
24
+ * Zoom value
25
+ */
26
+ zoomValue?: number;
27
+ };
28
+ /**
29
+ * Zoom actions
30
+ * @interface
31
+ * @group Actions
32
+ * @category Zoom
33
+ */
34
+ export type ZoomActions = {
35
+ /**
36
+ * Reset camera pan
37
+ */
38
+ resetPan(options?: {
39
+ animate?: boolean;
40
+ }): void;
41
+ /**
42
+ * Zoom in by given step
43
+ */
44
+ zoomIn(step?: number): void;
45
+ /**
46
+ * Zoom in by given step
47
+ */
48
+ zoomOut(step?: number): void;
49
+ /**
50
+ * Get is disabled zoom in
51
+ */
52
+ getIsDisabledZoomIn(): boolean;
53
+ /**
54
+ * Get is disabled zoom out
55
+ */
56
+ getIsDisabledZoomOut(): boolean;
57
+ /**
58
+ * Fit into given bounds with zooming.
59
+ */
60
+ mapFlyToBounds(lonLatLikeArray: LonLatLike[], options?: {
61
+ /**
62
+ * Padding
63
+ * @default 100
64
+ */
65
+ padding?: number;
66
+ /**
67
+ * Animate
68
+ * @default true
69
+ */
70
+ animate?: boolean;
71
+ }): void;
72
+ /**
73
+ * centerByCoordinates
74
+ */
75
+ centerByCoordinates(lonLatLike: LonLatLike, options?: CenterByCoordinatesOptions): void;
76
+ };
@@ -0,0 +1,4 @@
1
+ import { LonLatTuple } from "../types";
2
+ export declare const MAP_INITIAL_CENTER: LonLatTuple;
3
+ export declare const MAP_DEFAULT_ZOOM_STEP = 4;
4
+ export declare const MAP_INITIAL_ZOOM = 4;
@@ -0,0 +1 @@
1
+ export * from "./common.constants";
@@ -0,0 +1,8 @@
1
+ export declare const CONTROL_POSITION_CLASS_MAP: {
2
+ "top-left": string;
3
+ "top-right": string;
4
+ "bottom-left": string;
5
+ "bottom-right": string;
6
+ };
7
+ export declare const CONTROLS_EDGE_GAP = 20;
8
+ export declare const CONTROLS_GAP = 8;
@@ -0,0 +1 @@
1
+ export * from "./controls.constants";
@@ -0,0 +1,4 @@
1
+ import { AttributionControl, ControlCreatorFactory } from "./types";
2
+ export declare const createAttributionControlFactory: ControlCreatorFactory<AttributionControl, {
3
+ customAttribution?: string[];
4
+ }>;
@@ -0,0 +1,3 @@
1
+ import "./styles/baseLayerControl.scss";
2
+ import { BaseLayerControl, ControlCreatorFactory } from "./types";
3
+ export declare const createBaseLayerControlFactory: ControlCreatorFactory<BaseLayerControl>;
@@ -0,0 +1,3 @@
1
+ import "./styles/currentPositionControl.scss";
2
+ import { ControlCreatorFactory, CurrentPositionControl } from "./types";
3
+ export declare const createCurrentPositionControlFactory: ControlCreatorFactory<CurrentPositionControl>;
@@ -0,0 +1,3 @@
1
+ import "./styles/trafficLayerControl.scss";
2
+ import { ControlCreatorFactory, TrafficLayerControl } from "./types";
3
+ export declare const createTrafficLayerControlFactory: ControlCreatorFactory<TrafficLayerControl>;
@@ -0,0 +1,3 @@
1
+ import "./styles/zoomControl.scss";
2
+ import { ControlCreatorFactory, ZoomControl } from "./types";
3
+ export declare const createZoomControlFactory: ControlCreatorFactory<ZoomControl>;
@@ -0,0 +1,5 @@
1
+ export * from "./createAttributionControl.factory";
2
+ export * from "./createBaseLayerControl.factory";
3
+ export * from "./createCurrentPositionControl.factory";
4
+ export * from "./createTrafficLayerControl.factory";
5
+ export * from "./createZoomControl.factory";
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Control position enum
3
+ * @enum
4
+ * @group Map Controls
5
+ */
6
+ export declare enum ControlPosition {
7
+ TOP_LEFT = "top-left",
8
+ TOP_RIGHT = "top-right",
9
+ BOTTOM_LEFT = "bottom-left",
10
+ BOTTOM_RIGHT = "bottom-right"
11
+ }
@@ -0,0 +1,121 @@
1
+ import MapProvider from "../../MapProvider";
2
+ import { MapActions } from "../../actions/types";
3
+ import { ControlPosition } from "./controls.enums";
4
+ /**
5
+ * Basic map control
6
+ * @interface
7
+ * @group Map Controls
8
+ */
9
+ type BaseMapControl = {
10
+ /**
11
+ * Hide map control
12
+ */
13
+ hide(): void;
14
+ /**
15
+ * Show map control
16
+ */
17
+ show(): void;
18
+ /**
19
+ * Get is map control visible
20
+ */
21
+ getIsVisible(): boolean;
22
+ };
23
+ /**
24
+ * Basic control creator factory options
25
+ * @group Map Controls
26
+ * @ignore
27
+ * @interface
28
+ */
29
+ type BaseControlCreatorFactoryOptions = {
30
+ map: MapProvider.Map;
31
+ actions: MapActions;
32
+ };
33
+ /**
34
+ * Control creator factory
35
+ * @group Map Controls
36
+ * @ignore
37
+ * @typeParam {Control extends BaseMapControl} Return - A control to return
38
+ * @typeParam {AdditionalOptions = void} AdditionalOptions - Additional creator options
39
+ */
40
+ export type ControlCreatorFactory<Control extends BaseMapControl, AdditionalOptions = void> = (props: BaseControlCreatorFactoryOptions) => (options?: BaseControlCreatorOptions & (AdditionalOptions extends void ? unknown : AdditionalOptions)) => Control;
41
+ /**
42
+ * Basic control creator options
43
+ * @group Map Controls
44
+ * @interface
45
+ */
46
+ type BaseControlCreatorOptions = {
47
+ /**
48
+ * Control position on a screen
49
+ * @default "bottom-right"
50
+ */
51
+ position?: ControlPosition;
52
+ };
53
+ /**
54
+ * Attribution control
55
+ * @group Map Controls
56
+ * @interface
57
+ */
58
+ export type AttributionControl = {
59
+ /**
60
+ * Add custom attribution string
61
+ * @param customAttribution - Custom attribution or array of attributions to add
62
+ */
63
+ addAttribution(customAttribution: string | string[]): void;
64
+ /**
65
+ * Remove custom attribution by a string match
66
+ * @param customAttribution - Custom attribution to remove by string match
67
+ */
68
+ removeAttribution(customAttribution: string): void;
69
+ } & BaseMapControl;
70
+ /**
71
+ * Base layer control
72
+ * @group Map Controls
73
+ * @interface
74
+ */
75
+ export type BaseLayerControl = BaseMapControl;
76
+ /**
77
+ * Current position control
78
+ * @group Map Controls
79
+ * @interface
80
+ */
81
+ export type CurrentPositionControl = BaseMapControl;
82
+ /**
83
+ * Traffic layer control
84
+ * @group Map Controls
85
+ * @interface
86
+ */
87
+ export type TrafficLayerControl = BaseMapControl;
88
+ /**
89
+ * Zoom control
90
+ * @group Map Controls
91
+ * @interface
92
+ */
93
+ export type ZoomControl = BaseMapControl;
94
+ /**
95
+ * Map control creators
96
+ * @group Map Controls
97
+ * @interface
98
+ */
99
+ export type MapControlCreators = {
100
+ /**
101
+ * Creates and returns a base layer control instance.
102
+ * @function
103
+ */
104
+ createBaseLayerControl: (options?: BaseControlCreatorOptions) => BaseLayerControl;
105
+ /**
106
+ * Creates and returns a traffic layer control instance.
107
+ * @function
108
+ */
109
+ createTrafficLayerControl: (options?: BaseControlCreatorOptions) => TrafficLayerControl;
110
+ /**
111
+ * Creates and returns a zoom control instance.
112
+ * @function
113
+ */
114
+ createZoomControl: (options?: BaseControlCreatorOptions) => ZoomControl;
115
+ /**
116
+ * Creates and returns a current position control instance.
117
+ * @function
118
+ */
119
+ createCurrentPositionControl: (options?: BaseControlCreatorOptions) => CurrentPositionControl;
120
+ };
121
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from "./controls.enums";
2
+ export * from "./controls.types";
@@ -0,0 +1 @@
1
+ export declare const DEFAULTER_MAP_MIN_ZOOM = 2.5;
@@ -0,0 +1 @@
1
+ export * from "./createMap.constants";
@@ -0,0 +1,23 @@
1
+ import "../styles/styles.scss";
2
+ import { CreateMapProps, MapInstance } from "./types";
3
+ /**
4
+ * This is the main method that allows to mount the app and use all the features
5
+ * @group Map Initialization
6
+ * @param {CreateMapProps} options - Options to configure the map with
7
+ * @example
8
+ * How to create map instance, with default streets map style
9
+ * ```ts
10
+ * const containerElement = document.getElementById("map");
11
+ *
12
+ * if (!containerElement) {
13
+ * ...
14
+ * return;
15
+ * }
16
+ *
17
+ * const mapInstance: MapInstance = await createMap({
18
+ * container: containerElement,
19
+ * accessToken: "*ACCESS_TOKEN*",
20
+ * });
21
+ * ```
22
+ */
23
+ export declare const createMap: ({ container, baseApiUrl, accessToken, initialZoom, initialCenter, baseLayer, onReady, onError }: CreateMapProps) => Promise<MapInstance>;
@@ -0,0 +1 @@
1
+ export * from "./createMap";
@@ -0,0 +1,67 @@
1
+ import { MapActions } from "../../actions/types";
2
+ import { AttributionControl, MapControlCreators } from "../../controls/types";
3
+ import { LonLatLike, MapBaseLayer } from "../../types";
4
+ /**
5
+ * Map initialization options.
6
+ * @group Map Initialization
7
+ * @interface
8
+ */
9
+ export type CreateMapProps = {
10
+ /**
11
+ * Element to mount the map, or element id
12
+ */
13
+ container: HTMLElement | string;
14
+ /**
15
+ * Access token
16
+ */
17
+ accessToken: string;
18
+ /**
19
+ * Base Api Url
20
+ * @default https://localhost/proxy
21
+ */
22
+ baseApiUrl?: string;
23
+ /**
24
+ * Base layer token
25
+ * @default MapBaseLayer.STREETS
26
+ */
27
+ baseLayer?: MapBaseLayer;
28
+ /**
29
+ * Map initial zoom
30
+ * @default 4
31
+ */
32
+ initialZoom?: number;
33
+ /**
34
+ * Map initial zoom
35
+ * @default [-97.98373685376561, 35.87721419596477]
36
+ */
37
+ initialCenter?: LonLatLike;
38
+ /**
39
+ * Callback function to be called when the map is ready. It receives a MapInstance as a parameter.
40
+ * @event
41
+ */
42
+ onReady?(result: MapInstance): void;
43
+ /**
44
+ * Callback function to be called when an error occurs. It receives an Error as a parameter.
45
+ * @event
46
+ */
47
+ onError?(error: Error): void;
48
+ };
49
+ /**
50
+ * Map instance.
51
+ * @group Map Initialization
52
+ * @interface
53
+ */
54
+ export type MapInstance = {
55
+ /**
56
+ * The attribution control instance.
57
+ */
58
+ attributionControl: AttributionControl;
59
+ /**
60
+ * The map control creators.
61
+ */
62
+ controls: MapControlCreators;
63
+ /**
64
+ * The map actions.
65
+ */
66
+ actions: MapActions;
67
+ };
@@ -0,0 +1 @@
1
+ export * from "./createMap.types";
@@ -0,0 +1,7 @@
1
+ import { LonLatTuple } from "../types";
2
+ /**
3
+ * Decode a polyline string with precision 6
4
+ * @group Helpers
5
+ * @param str - A shape polyline string to decode
6
+ */
7
+ export declare const decodeRoutePolylineString: (str: string[]) => LonLatTuple[];
@@ -0,0 +1 @@
1
+ export declare const generateUuid: () => string;
@@ -0,0 +1,6 @@
1
+ import MapProvider from "../MapProvider";
2
+ import { ControlPosition } from "../controls/types";
3
+ export declare const getControlAbsolutePosition: ({ map, position }: {
4
+ map: MapProvider.Map;
5
+ position: ControlPosition;
6
+ }) => string;
@@ -0,0 +1,8 @@
1
+ import { LonLatLike } from "../types";
2
+ /**
3
+ * Parse a {@link LonLatLike} to {@link Coordinates}
4
+ * @group Helpers
5
+ * @param initialCoordinates - {@link LonLatLike} object to be parsed
6
+ * @param targetCoordinates - {@link LonLatLike} object to be parsed
7
+ */
8
+ export declare function getDistanceBetweenPoints(initialCoordinates: LonLatLike, targetCoordinates: LonLatLike): number;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Check is browser is supported
3
+ * @group Helpers
4
+ */
5
+ export declare const getIsSupported: () => boolean;
@@ -0,0 +1,7 @@
1
+ import { LonLatLike } from "../types";
2
+ export declare const getMapFlyToAnimationDuration: ({ initialPixelCoordinates, targetPixelCoordinates, initialZoom, targetZoom }: {
3
+ initialPixelCoordinates: LonLatLike;
4
+ targetPixelCoordinates: LonLatLike;
5
+ initialZoom?: number | undefined;
6
+ targetZoom?: number | undefined;
7
+ }) => number;
@@ -0,0 +1,14 @@
1
+ import { CenterByCoordinatesOptions, LonLatTuple } from "../types";
2
+ export declare const getMapFlyToOptions: ({ currentZoom, targetLonLatLike, transformLonLatToPoint, currentCenter, animate, zoom, zoomValue, zoomStep }: {
3
+ currentCenter: LonLatTuple;
4
+ targetLonLatLike: LonLatTuple;
5
+ currentZoom: number;
6
+ transformLonLatToPoint(lonLatLike: LonLatTuple): {
7
+ x: number;
8
+ y: number;
9
+ } & object;
10
+ } & CenterByCoordinatesOptions) => {
11
+ zoom: number;
12
+ duration: number;
13
+ animate: boolean;
14
+ };
@@ -0,0 +1,9 @@
1
+ declare const TIME_IN_MILLISECONDS: {
2
+ millisecond: number;
3
+ second: number;
4
+ minute: number;
5
+ hour: number;
6
+ day: number;
7
+ };
8
+ export declare const getNumberOfTimeUnites: (number: number, unit: keyof typeof TIME_IN_MILLISECONDS, inUnit?: keyof typeof TIME_IN_MILLISECONDS | undefined) => number;
9
+ export {};
@@ -0,0 +1,29 @@
1
+ type StateItem<T> = {
2
+ getValue: () => T;
3
+ setValue: (value: T | ((current: T) => T)) => void;
4
+ };
5
+ type Props<State extends Record<string, unknown> = Record<string, unknown>> = {
6
+ elementId: string;
7
+ parentElement: HTMLElement;
8
+ className?: string;
9
+ style?: string;
10
+ state?: State;
11
+ render(state: {
12
+ [Key in keyof State]: State[Key];
13
+ }): string;
14
+ onmount?(): (() => void) | void;
15
+ listeners?: Record<string, Record<`on${keyof GlobalEventHandlersEventMap}` | string, (events: Event) => void>>;
16
+ };
17
+ type Returns<State extends Record<string, unknown> = Record<string, unknown>> = {
18
+ render(): void;
19
+ unmount(): void;
20
+ mount(): void;
21
+ state: {
22
+ [Key in keyof State]: StateItem<State[Key]>;
23
+ };
24
+ mountedElementRef: {
25
+ current: HTMLElement | null;
26
+ };
27
+ };
28
+ export declare const htmlRender: <State extends Record<string, unknown> = Record<string, unknown>>({ elementId, parentElement, className, style, onmount, listeners, state: initialState, render: renderProp }: Props<State>) => Returns<State>;
29
+ export {};
@@ -0,0 +1,5 @@
1
+ export * from "./decodeRoutePolylineString.helper";
2
+ export * from "./parseLonLatLikeToCoordinates.helper";
3
+ export * from "./parseLonLatLikeToTuple.helper";
4
+ export * from "./replaceMatchInSvg.helper";
5
+ export * from "./getIsSupported.helper";
@@ -0,0 +1,7 @@
1
+ export declare const injectHtmlElement: ({ id, parentElement, htmlContent, className, style }: {
2
+ id: string;
3
+ parentElement: HTMLElement;
4
+ htmlContent: string;
5
+ className?: string | undefined;
6
+ style?: string | undefined;
7
+ }) => HTMLElement;
@@ -0,0 +1,7 @@
1
+ import { Coordinates, LonLatLike } from "../types";
2
+ /**
3
+ * Parse a {@link LonLatLike} to {@link Coordinates}
4
+ * @group Helpers
5
+ * @param lonLatLike - {@link LonLatLike} object to be parsed
6
+ */
7
+ export declare const parseLonLatLikeToCoordinates: (lonLatLike: LonLatLike) => Coordinates;
@@ -0,0 +1,7 @@
1
+ import { LonLatLike, LonLatTuple } from "../types";
2
+ /**
3
+ * Parse a {@link LonLatLike} to {@link LonLatTuple}
4
+ * @group Helpers
5
+ * @param lonLatLike - {@link LonLatLike} object to be parsed
6
+ */
7
+ export declare const parseLonLatLikeToTuple: (lonLatLike: LonLatLike) => LonLatTuple;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Replace a match in svg string
3
+ * @group Helpers
4
+ * @example
5
+ * ```ts
6
+ * replaceMatch({ searchValue: /{fill}/g, value: color, stringSvg });
7
+ * ```
8
+ * @param searchValue - Search to replace
9
+ * @param value - Value to be placed
10
+ * @param stringSvg - Svg string
11
+ */
12
+ export declare function replaceMatchInSvg({ searchValue, stringSvg, value }: {
13
+ searchValue: RegExp;
14
+ stringSvg: string;
15
+ value: number | string;
16
+ }): string;