@opengeoweb/shared 9.8.0 → 9.10.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/index.esm.js +788 -41
- package/package.json +2 -2
- package/src/lib/components/CanvasComponent/CanvasComponent.d.ts +71 -0
- package/src/lib/components/CanvasComponent/CanvasComponent.stories.d.ts +7 -0
- package/src/lib/components/CanvasComponent/index.d.ts +1 -0
- package/src/lib/components/DraggableResizable/types.d.ts +8 -8
- package/src/lib/components/ToggleMenu/ToggleMenu.d.ts +2 -2
- package/src/lib/components/TooltipSelect/TooltipSelect.d.ts +6 -5
- package/src/lib/components/UserMenu/CheatSheet/ShortcutList.d.ts +2 -2
- package/src/lib/components/index.d.ts +1 -0
- package/src/lib/types/types.d.ts +1 -1
- package/src/lib/utils/dateUtils/dateUtils.d.ts +64 -11
- package/src/lib/utils/index.d.ts +1 -1
- package/src/lib/utils/metronome.d.ts +77 -0
- package/src/lib/utils/metronome.spec.d.ts +1 -0
- package/src/lib/utils/metronome.stories.d.ts +7 -0
- package/src/lib/utils/layoutUtils.d.ts +0 -1
- /package/src/lib/{utils/layoutUtils.spec.d.ts → components/CanvasComponent/CanvasComponent.spec.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/shared",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.10.0",
|
|
4
4
|
"description": "GeoWeb shared library with shared components and utils for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"url": "git@gitlab.com:opengeoweb/opengeoweb.git"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@mui/material": "5.
|
|
11
|
+
"@mui/material": "~5.15.11",
|
|
12
12
|
"@opengeoweb/theme": "*",
|
|
13
13
|
"react-draggable": "^4.4.6",
|
|
14
14
|
"re-resizable": "^6.9.11",
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
interface CanvasComponentProps {
|
|
3
|
+
onRenderCanvas: (ctx: CanvasRenderingContext2D, width: number, height: number, canvas: HTMLCanvasElement) => void;
|
|
4
|
+
onCanvasClick?: (x: number, y: number, width: number, height: number) => void;
|
|
5
|
+
onMouseMove?: (x: number, y: number, event: MouseEvent, width: number) => void;
|
|
6
|
+
onMouseUp?: (x: number) => void;
|
|
7
|
+
onMouseDown?: (x: number, y: number, width: number) => void;
|
|
8
|
+
onTouchStart?: (event: TouchEvent, width: number) => void;
|
|
9
|
+
onTouchEnd?: () => void;
|
|
10
|
+
onTouchMove?: (event: TouchEvent, width: number) => void;
|
|
11
|
+
onKeyUp?: (event: KeyboardEvent) => void;
|
|
12
|
+
onKeyDown?: (event: KeyboardEvent) => void;
|
|
13
|
+
isFocussed?: (isFocussed: boolean) => void;
|
|
14
|
+
onWheel?: ({ event, deltaY, deltaX, canvasWidth, mouseX, }: {
|
|
15
|
+
event: WheelEvent;
|
|
16
|
+
deltaY: number;
|
|
17
|
+
deltaX: number;
|
|
18
|
+
canvasWidth: number;
|
|
19
|
+
mouseX: number;
|
|
20
|
+
}) => void;
|
|
21
|
+
loop?: boolean;
|
|
22
|
+
redrawInterval?: number;
|
|
23
|
+
resizeCallback?: (newWidth: number) => void;
|
|
24
|
+
children?: React.ReactNode;
|
|
25
|
+
}
|
|
26
|
+
export declare class CanvasComponent extends Component<CanvasComponentProps> {
|
|
27
|
+
canvas: HTMLCanvasElement | null;
|
|
28
|
+
ctx: CanvasRenderingContext2D | null;
|
|
29
|
+
currentWidth: number;
|
|
30
|
+
currentHeight: number;
|
|
31
|
+
canvascontaineroutside: React.RefObject<HTMLDivElement> | null;
|
|
32
|
+
canvascontainer: React.RefObject<HTMLDivElement> | null;
|
|
33
|
+
timer: ReturnType<typeof setTimeout> | null;
|
|
34
|
+
redrawTimer: ReturnType<typeof setTimeout> | null;
|
|
35
|
+
loopHasStarted: boolean;
|
|
36
|
+
mounted: boolean;
|
|
37
|
+
static defaultProps: {
|
|
38
|
+
onRenderCanvas: () => void;
|
|
39
|
+
onCanvasClick: () => void;
|
|
40
|
+
onMouseMove: () => void;
|
|
41
|
+
onMouseUp: () => void;
|
|
42
|
+
onMouseDown: () => void;
|
|
43
|
+
onTouchStart: () => void;
|
|
44
|
+
onTouchEnd: () => void;
|
|
45
|
+
onTouchMove: () => void;
|
|
46
|
+
onWheel: () => void;
|
|
47
|
+
};
|
|
48
|
+
private _isFocussed;
|
|
49
|
+
constructor(props: CanvasComponentProps);
|
|
50
|
+
componentDidMount(): void;
|
|
51
|
+
shouldComponentUpdate(): boolean;
|
|
52
|
+
componentWillUnmount(): void;
|
|
53
|
+
handleMouseMoveEvent(event: MouseEvent): void;
|
|
54
|
+
handleMouseUpEvent(event: MouseEvent): void;
|
|
55
|
+
handleMouseDownEvent(event: MouseEvent): void;
|
|
56
|
+
handleTouchStartEvent(event: TouchEvent): void;
|
|
57
|
+
handleTouchEndEvent(): void;
|
|
58
|
+
handleTouchMoveEvent(event: TouchEvent): void;
|
|
59
|
+
handleClickEvent(event: MouseEvent): void;
|
|
60
|
+
handleWheelEvent(event: WheelEvent): void;
|
|
61
|
+
onFocus(): void;
|
|
62
|
+
onBlur(): void;
|
|
63
|
+
onKeyUp(event: KeyboardEvent): void;
|
|
64
|
+
_documentKeyDown(event: KeyboardEvent): void;
|
|
65
|
+
_handleWindowResize(): void;
|
|
66
|
+
startLoop(): void;
|
|
67
|
+
updateCanvas(): void;
|
|
68
|
+
resize(): void;
|
|
69
|
+
render(): React.ReactElement;
|
|
70
|
+
}
|
|
71
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CanvasComponent';
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ResizableProps } from 're-resizable';
|
|
3
|
-
export
|
|
3
|
+
export interface DraggablePosition {
|
|
4
4
|
x: number;
|
|
5
5
|
y: number;
|
|
6
|
-
}
|
|
7
|
-
export
|
|
6
|
+
}
|
|
7
|
+
export interface Position {
|
|
8
8
|
top: number;
|
|
9
9
|
left?: number;
|
|
10
10
|
right?: number;
|
|
11
|
-
}
|
|
12
|
-
export
|
|
11
|
+
}
|
|
12
|
+
export interface DraggableSize {
|
|
13
13
|
width: number;
|
|
14
14
|
height: number;
|
|
15
|
-
}
|
|
16
|
-
export
|
|
15
|
+
}
|
|
16
|
+
export interface Size {
|
|
17
17
|
width?: number | string;
|
|
18
18
|
height?: number | string;
|
|
19
|
-
}
|
|
19
|
+
}
|
|
20
20
|
export interface ResizableComponentProps extends Omit<ResizableProps, 'size'> {
|
|
21
21
|
startSize?: Size;
|
|
22
22
|
setSize?: (size: Size) => void;
|
|
@@ -6,12 +6,12 @@ export declare const getPosition: (menuPosition: MenuPosition) => {
|
|
|
6
6
|
anchorOrigin: PopoverOrigin;
|
|
7
7
|
transformOrigin: PopoverOrigin;
|
|
8
8
|
};
|
|
9
|
-
|
|
9
|
+
interface MenuItemType {
|
|
10
10
|
text: string;
|
|
11
11
|
action: (event: React.MouseEvent) => void;
|
|
12
12
|
icon?: React.ReactNode;
|
|
13
13
|
isDisabled?: boolean;
|
|
14
|
-
}
|
|
14
|
+
}
|
|
15
15
|
interface ToggleMenuProps {
|
|
16
16
|
buttonTestId?: string;
|
|
17
17
|
menuPosition?: MenuPosition;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { BaseSelectProps, SelectVariants } from '@mui/material';
|
|
3
|
+
interface ListELement {
|
|
4
4
|
value: string;
|
|
5
|
-
}
|
|
6
|
-
|
|
5
|
+
}
|
|
6
|
+
type TooltipSelectProps = BaseSelectProps & {
|
|
7
7
|
tooltip: string;
|
|
8
8
|
list?: ListELement[];
|
|
9
9
|
currentIndex?: number;
|
|
@@ -12,6 +12,7 @@ interface TooltipSelectProps extends SelectProps {
|
|
|
12
12
|
isEnabled?: boolean;
|
|
13
13
|
noStyling?: boolean;
|
|
14
14
|
hasBackgroundColor?: boolean;
|
|
15
|
-
|
|
15
|
+
variant?: SelectVariants;
|
|
16
|
+
};
|
|
16
17
|
export declare const TooltipSelect: React.FC<TooltipSelectProps>;
|
|
17
18
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
interface ShortCut {
|
|
3
3
|
title: string;
|
|
4
4
|
description: React.ReactNode;
|
|
5
5
|
descriptionMac?: React.ReactNode;
|
|
6
|
-
}
|
|
6
|
+
}
|
|
7
7
|
type Platform = 'windows' | 'mac';
|
|
8
8
|
export declare const shortcuts: ShortCut[];
|
|
9
9
|
export declare const getShortcutList: (shortcutList: ShortCut[], platform?: Platform) => ShortCut[];
|
package/src/lib/types/types.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export interface ConfigType {
|
|
|
4
4
|
GW_AUTH_LOGOUT_URL?: string;
|
|
5
5
|
GW_AUTH_TOKEN_URL?: string;
|
|
6
6
|
GW_AUTH_CLIENT_ID?: string;
|
|
7
|
-
|
|
7
|
+
GW_BE_VERSION_BASE_URL?: string;
|
|
8
8
|
GW_APP_URL?: string;
|
|
9
9
|
GW_INITIAL_PRESETS_FILENAME?: string;
|
|
10
10
|
GW_CAP_CONFIGURATION_FILENAME?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { parseISO, isEqual, Duration, startOfDay } from 'date-fns';
|
|
1
|
+
import { parseISO, isEqual, Duration, startOfDay, isWithinInterval } from 'date-fns';
|
|
2
2
|
export interface DateValues {
|
|
3
3
|
year?: number;
|
|
4
4
|
month?: number;
|
|
@@ -61,7 +61,7 @@ export interface DateValues {
|
|
|
61
61
|
* ``` isoStringToDate("2022-5-10T20:32:00+00:00") ```
|
|
62
62
|
* ``` isoStringToDate("2022-5-10T20:32:00:00Z", false) ```
|
|
63
63
|
*/
|
|
64
|
-
export declare const isoStringToDate: (input: string, utc?: boolean) => Date;
|
|
64
|
+
export declare const isoStringToDate: (input: string, utc?: boolean) => Date | undefined;
|
|
65
65
|
/**
|
|
66
66
|
* Parse a string to a date
|
|
67
67
|
*
|
|
@@ -77,7 +77,8 @@ export declare const isoStringToDate: (input: string, utc?: boolean) => Date;
|
|
|
77
77
|
* @example
|
|
78
78
|
* ``` stringToDate("2022 5 10 20:32", 'yyyy M d HH:mm')) ```
|
|
79
79
|
*/
|
|
80
|
-
export declare const stringToDate: (input: string, strFormat: string, utc?: boolean, referenceDate?: Date | number) => Date;
|
|
80
|
+
export declare const stringToDate: (input: string | undefined, strFormat: string, utc?: boolean, referenceDate?: Date | number) => Date | undefined;
|
|
81
|
+
export declare const dateToIsoString: (input: Date | undefined) => string | undefined;
|
|
81
82
|
/**
|
|
82
83
|
* Use this if you initialise a date without a timezone to set it to utc correctly
|
|
83
84
|
* eg.
|
|
@@ -92,7 +93,7 @@ export declare const stringToDate: (input: string, strFormat: string, utc?: bool
|
|
|
92
93
|
* @example
|
|
93
94
|
* ``` setUTCDate(new Date(2022, 10, 12, 15, 30)) ```
|
|
94
95
|
*/
|
|
95
|
-
export declare const setUTCDate: (inDate: Date) => Date;
|
|
96
|
+
export declare const setUTCDate: (inDate: Date | undefined) => Date | undefined;
|
|
96
97
|
/**
|
|
97
98
|
* Format a date to a string
|
|
98
99
|
*
|
|
@@ -105,7 +106,7 @@ export declare const setUTCDate: (inDate: Date) => Date;
|
|
|
105
106
|
* @example
|
|
106
107
|
* ``` dateToString(new Date(2022, 10, 12, 15, 30), 'dd MMM yyyy') ```
|
|
107
108
|
*/
|
|
108
|
-
export declare const dateToString: (inDate: Date, strFormat?: string, utc?: boolean) => string;
|
|
109
|
+
export declare const dateToString: (inDate: Date | undefined, strFormat?: string, utc?: boolean) => string | undefined;
|
|
109
110
|
/**
|
|
110
111
|
* Find out if a date is between two other dates.
|
|
111
112
|
*
|
|
@@ -156,6 +157,30 @@ export declare const add: (date: Date | number, duration: Duration) => Date;
|
|
|
156
157
|
* @returns {Date} the new Date
|
|
157
158
|
*/
|
|
158
159
|
export declare const sub: (date: Date | number, duration: Duration) => Date;
|
|
160
|
+
/**
|
|
161
|
+
* Finds the number of years between to dates
|
|
162
|
+
*
|
|
163
|
+
* @param dateLeft - the later date
|
|
164
|
+
* @param dateRight - the earlier date
|
|
165
|
+
* @returns {number} the number of minutes
|
|
166
|
+
*/
|
|
167
|
+
export declare const differenceInYears: (dateLeft: Date | number, dateRight: Date | number) => number;
|
|
168
|
+
/**
|
|
169
|
+
* Finds the number of months between to dates
|
|
170
|
+
*
|
|
171
|
+
* @param dateLeft - the later date
|
|
172
|
+
* @param dateRight - the earlier date
|
|
173
|
+
* @returns {number} the number of minutes
|
|
174
|
+
*/
|
|
175
|
+
export declare const differenceInMonths: (dateLeft: Date | number | string, dateRight: Date | number | string) => number;
|
|
176
|
+
/**
|
|
177
|
+
* Finds the number of days between to dates
|
|
178
|
+
*
|
|
179
|
+
* @param dateLeft - the later date
|
|
180
|
+
* @param dateRight - the earlier date
|
|
181
|
+
* @returns {number} the number of minutes
|
|
182
|
+
*/
|
|
183
|
+
export declare const differenceInDays: (dateLeft: Date | number | string, dateRight: Date | number | string) => number;
|
|
159
184
|
/**
|
|
160
185
|
* Finds the number of minuts between to dates
|
|
161
186
|
*
|
|
@@ -172,6 +197,14 @@ export declare const differenceInMinutes: (dateLeft: Date | number, dateRight: D
|
|
|
172
197
|
* @returns {number} the number of hours
|
|
173
198
|
*/
|
|
174
199
|
export declare const differenceInHours: (dateLeft: Date | number, dateRight: Date | number, roundingMethod?: 'ceil' | 'floor' | 'round' | 'trunc') => number;
|
|
200
|
+
/**
|
|
201
|
+
* Finds the number of seconds between to dates
|
|
202
|
+
*
|
|
203
|
+
* @param dateLeft - the later date
|
|
204
|
+
* @param dateRight - the earlier date
|
|
205
|
+
* @returns {number} the number of minutes
|
|
206
|
+
*/
|
|
207
|
+
export declare const differenceInSeconds: (dateLeft: Date | number, dateRight: Date | number) => number;
|
|
175
208
|
/**
|
|
176
209
|
*
|
|
177
210
|
* @param date - the date that should be before the other one to return true
|
|
@@ -189,17 +222,24 @@ export declare const isBefore: (date: Date | number, dateToCompare: Date | numbe
|
|
|
189
222
|
*/
|
|
190
223
|
export declare const isAfter: (date: Date | number, dateToCompare: Date | number) => boolean;
|
|
191
224
|
/**
|
|
192
|
-
*
|
|
225
|
+
* Gracefully parsing string to a date, setting tz to UTC even if it's missing or input is invalid
|
|
226
|
+
* Note: use getUtcFromString() to convert a string to a date with stricter returns
|
|
193
227
|
* @param dateStr - string containing date
|
|
194
|
-
* @returns {Date} - Date in UTC
|
|
228
|
+
* @returns {Date} - Date in UTC, or current date when something invalid is passed.
|
|
229
|
+
*/
|
|
230
|
+
export declare const utc: (dateStr?: string | undefined) => Date;
|
|
231
|
+
/**
|
|
232
|
+
* Parsing string to a date. Stricter check, will return undefined when dateString is invalid.
|
|
233
|
+
* @param dateStr - string containing date
|
|
234
|
+
* @returns {Date} - Date in UTC, undefined when not valid
|
|
195
235
|
*/
|
|
196
|
-
export declare const
|
|
236
|
+
export declare const getUtcFromString: (dateStr: string | undefined | null) => Date | undefined;
|
|
197
237
|
/**
|
|
198
238
|
* Check if a date object is valid
|
|
199
|
-
* @param {Date} date - date to be checked
|
|
239
|
+
* @param {Date | number} date - date to be checked
|
|
200
240
|
* @returns {boolean} - True if valid
|
|
201
241
|
*/
|
|
202
|
-
export declare const isValid: (date: Date) => boolean;
|
|
242
|
+
export declare const isValid: (date: Date | number) => boolean;
|
|
203
243
|
/**
|
|
204
244
|
* Get the seconds timestamp of the given date
|
|
205
245
|
* @param {Date} date - the given date
|
|
@@ -213,6 +253,19 @@ export declare const unix: (date: Date | number) => number;
|
|
|
213
253
|
*/
|
|
214
254
|
export declare const fromUnix: (unixTime: number) => Date;
|
|
215
255
|
export declare const parseCustomDateString: (dateStr: string) => Date;
|
|
256
|
+
/**
|
|
257
|
+
* Returns Date in UTC
|
|
258
|
+
* @returns {Date} - Date in UTC
|
|
259
|
+
*/
|
|
260
|
+
export declare const getNowUtc: () => Date;
|
|
261
|
+
/**
|
|
262
|
+
* Returns current time as string
|
|
263
|
+
* @param {string} strFormat - [default: "yyyy-MM-dd'T'HH:mm:ss'Z'"] format of string
|
|
264
|
+
* @param {boolean} utc - [default: true] true to return in utc otherwise return in local timezone
|
|
265
|
+
*
|
|
266
|
+
* @returns {string} - formatted date string
|
|
267
|
+
*/
|
|
268
|
+
export declare const getCurrentTimeAsString: (strFormat?: string, utc?: boolean) => string;
|
|
216
269
|
/**
|
|
217
270
|
* Set date values to a given date (by default it is assumed you are passing the new values in UTC).
|
|
218
271
|
* @param date - the dater to be changed
|
|
@@ -227,4 +280,4 @@ export declare const set: (date: Date, values: DateValues, useLocalTimeZone?: bo
|
|
|
227
280
|
* @param {Date} date - second date
|
|
228
281
|
* @returns {boolean} - True if dates are equal
|
|
229
282
|
*/
|
|
230
|
-
export { isEqual, startOfDay, parseISO };
|
|
283
|
+
export { isEqual, startOfDay, parseISO, isWithinInterval };
|
package/src/lib/utils/index.d.ts
CHANGED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
type TimerFunction = (timerId: string, tickId: number) => void;
|
|
3
|
+
interface Timer {
|
|
4
|
+
timerFunc: TimerFunction | null;
|
|
5
|
+
hertz: number;
|
|
6
|
+
timerId: string;
|
|
7
|
+
isPaused: boolean;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* This class should NEVER be initialized with new Metronome(). Use the
|
|
11
|
+
* exported variable. To reset the metronome use unregisterAllTimers()
|
|
12
|
+
* to remove all existing timers followed by init() to initialize the
|
|
13
|
+
* ticks.
|
|
14
|
+
*/
|
|
15
|
+
declare class Metronome {
|
|
16
|
+
tickId: number;
|
|
17
|
+
timers: Timer[];
|
|
18
|
+
interval: NodeJS.Timeout | null;
|
|
19
|
+
handleTimerTicks: ((timerIds: string[]) => void) | null;
|
|
20
|
+
constructor();
|
|
21
|
+
init(): void;
|
|
22
|
+
unregisterAllTimers(): void;
|
|
23
|
+
step(): void;
|
|
24
|
+
/**
|
|
25
|
+
* Multiple timers with varying frequencies can be made at the same
|
|
26
|
+
* time however each timerId must be unique. If you attempt to create
|
|
27
|
+
* two timers with the same timerId, the second will silently be ignored.
|
|
28
|
+
*
|
|
29
|
+
* @param timerFunc The function to be executed at the given hertz frequency
|
|
30
|
+
* @param hertz Frequency of the timer given in hertz
|
|
31
|
+
* @param timerId Id of the timer
|
|
32
|
+
* @returns Timer or nothing if no timer was created
|
|
33
|
+
*/
|
|
34
|
+
register(timerFunc: TimerFunction | null, hertz: number, timerId: string): Timer | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Unregistering a timer completely removes it, if you want to pause a
|
|
37
|
+
* timer, then use pauseTimer()
|
|
38
|
+
*
|
|
39
|
+
* @param timerId Id of the timer
|
|
40
|
+
*/
|
|
41
|
+
unregister(timerId: string): void;
|
|
42
|
+
/**
|
|
43
|
+
* Checks if a timer is paused
|
|
44
|
+
*
|
|
45
|
+
* @param timerId Id of the timer
|
|
46
|
+
* @returns true if the timer is paused, false if it is running
|
|
47
|
+
*/
|
|
48
|
+
isPaused(timerId: string): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Continues running a timer
|
|
51
|
+
*
|
|
52
|
+
* @param timerId Id of the timer
|
|
53
|
+
*/
|
|
54
|
+
continueTimer(timerId: string): void;
|
|
55
|
+
/**
|
|
56
|
+
* Pauses a timer
|
|
57
|
+
*
|
|
58
|
+
* @param timerId Id of the timer
|
|
59
|
+
*/
|
|
60
|
+
pauseTimer(timerId: string): void;
|
|
61
|
+
/**
|
|
62
|
+
* Toggles a timer to be paused or running. Be careful when asking redux
|
|
63
|
+
* to toggle a timer, it might toggle twice and therefore do nothing
|
|
64
|
+
*
|
|
65
|
+
* @param timerId Id of the timer
|
|
66
|
+
*/
|
|
67
|
+
toggleTimer(timerId: string): void;
|
|
68
|
+
/**
|
|
69
|
+
* Sets the speed of a timer to a new frequency given in hertz
|
|
70
|
+
*
|
|
71
|
+
* @param timerId Id of the timer
|
|
72
|
+
* @param hertz Frequency of the timer given in hertz
|
|
73
|
+
*/
|
|
74
|
+
setSpeed(timerId: string, hertz: number): void;
|
|
75
|
+
}
|
|
76
|
+
declare const metronome: Metronome;
|
|
77
|
+
export { metronome };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getHeight: (element: HTMLDivElement) => number | null;
|
|
File without changes
|