gis-common 5.1.36 → 5.2.1
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/gis-common.es.js +160 -14004
- package/dist/gis-common.umd.js +1 -1
- package/dist/index.d.ts +51 -4
- package/package.json +40 -41
package/dist/index.d.ts
CHANGED
|
@@ -166,6 +166,13 @@ export declare class AudioPlayer {
|
|
|
166
166
|
constructor(url: string);
|
|
167
167
|
play(): void;
|
|
168
168
|
pause(): void;
|
|
169
|
+
/**
|
|
170
|
+
* @description 从头开始连续播放指定次数,全部播放完成后 resolve
|
|
171
|
+
* 注意: 中途被 pause() 暂停时 Promise 会保持 pending,直到继续播放完成
|
|
172
|
+
* @param {number} times 播放次数
|
|
173
|
+
* @returns {Promise<void>}
|
|
174
|
+
*/
|
|
175
|
+
playTimes(times: number): Promise<void>;
|
|
169
176
|
get muted(): boolean;
|
|
170
177
|
/**
|
|
171
178
|
* @description 设置静音状态,如果静音,autoplay属性将失效
|
|
@@ -175,6 +182,46 @@ export declare class AudioPlayer {
|
|
|
175
182
|
|
|
176
183
|
export declare type BBox = [number, number, number, number];
|
|
177
184
|
|
|
185
|
+
export declare class BinaryReader {
|
|
186
|
+
private _buffer;
|
|
187
|
+
private _view;
|
|
188
|
+
private _offset;
|
|
189
|
+
private _littleEndian;
|
|
190
|
+
constructor(buffer: ArrayBuffer, littleEndian?: boolean);
|
|
191
|
+
/** 当前读取位置 */
|
|
192
|
+
get offset(): number;
|
|
193
|
+
/** 原始 ArrayBuffer */
|
|
194
|
+
get buffer(): ArrayBuffer;
|
|
195
|
+
/** 底层 DataView */
|
|
196
|
+
get dataView(): DataView;
|
|
197
|
+
/** 重置读取位置到开头 */
|
|
198
|
+
reset(): void;
|
|
199
|
+
/** 跳转到指定位置 */
|
|
200
|
+
seek(offset: number): void;
|
|
201
|
+
/** 跳过指定字节数 */
|
|
202
|
+
skip(bytes: number): void;
|
|
203
|
+
/** 读取 1 字节无符号整数 */
|
|
204
|
+
readUint8(): number;
|
|
205
|
+
/** 读取 2 字节无符号整数 */
|
|
206
|
+
readUint16(): number;
|
|
207
|
+
/** 读取 4 字节无符号整数 */
|
|
208
|
+
readUint32(): number;
|
|
209
|
+
/** 读取 1 字节有符号整数 */
|
|
210
|
+
readInt8(): number;
|
|
211
|
+
/** 读取 2 字节有符号整数 */
|
|
212
|
+
readInt16(): number;
|
|
213
|
+
/** 读取 4 字节有符号整数 */
|
|
214
|
+
readInt32(): number;
|
|
215
|
+
/** 读取 4 字节浮点数 (float32) */
|
|
216
|
+
readFloat32(): number;
|
|
217
|
+
/** 读取 8 字节浮点数 (float64) */
|
|
218
|
+
readFloat64(): number;
|
|
219
|
+
/** 读取指定长度的 buffer 片段 */
|
|
220
|
+
readBuffer(length: number): ArrayBuffer;
|
|
221
|
+
/** 读取指定长度的字符串 */
|
|
222
|
+
readString(length: number): string;
|
|
223
|
+
}
|
|
224
|
+
|
|
178
225
|
declare interface BrowserType {
|
|
179
226
|
type: string;
|
|
180
227
|
version: string;
|
|
@@ -1274,8 +1321,8 @@ export declare class MqttClient extends EventDispatcher {
|
|
|
1274
1321
|
_onError(): void;
|
|
1275
1322
|
_onMessage(): void;
|
|
1276
1323
|
sendMsg(topic: string, msg: string): this | undefined;
|
|
1277
|
-
subscribe(topic:
|
|
1278
|
-
unsubscribe(topic
|
|
1324
|
+
subscribe(topic: string | string[]): this;
|
|
1325
|
+
unsubscribe(topic?: string | string[]): this;
|
|
1279
1326
|
unsubscribeAll(): this;
|
|
1280
1327
|
unconnect(): void;
|
|
1281
1328
|
}
|
|
@@ -1349,7 +1396,7 @@ export declare const OptimizeUtil: {
|
|
|
1349
1396
|
*
|
|
1350
1397
|
* @param fun 要递归调用的函数。
|
|
1351
1398
|
* @param frequency 每次调用函数之间的时间间隔,单位为毫秒,默认为500毫秒。
|
|
1352
|
-
* @param duration
|
|
1399
|
+
* @param duration 函数递归调用的总时长,单位为毫秒,默认为不限制。
|
|
1353
1400
|
*/
|
|
1354
1401
|
recurve(fun: Function, frequency?: number, duration?: number): void;
|
|
1355
1402
|
/**
|
|
@@ -1615,7 +1662,7 @@ export declare const Util: {
|
|
|
1615
1662
|
* @param text 要复制的文本
|
|
1616
1663
|
* @returns 返回一个Promise,表示复制操作的结果
|
|
1617
1664
|
*/
|
|
1618
|
-
|
|
1665
|
+
copyText(text: string): Promise<void>;
|
|
1619
1666
|
isArray(a: any): a is any[];
|
|
1620
1667
|
isObject(a: any): boolean;
|
|
1621
1668
|
isNil(a: any): boolean;
|
package/package.json
CHANGED
|
@@ -1,41 +1,40 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "gis-common",
|
|
3
|
-
"version": "5.1
|
|
4
|
-
"author": "Guo.Yan <luv02@vip.qq.com>",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"private": false,
|
|
7
|
-
"module": "dist/gis-common.umd.js",
|
|
8
|
-
"main": "dist/gis-common.umd.js",
|
|
9
|
-
"type": "module",
|
|
10
|
-
"files": [
|
|
11
|
-
"dist"
|
|
12
|
-
],
|
|
13
|
-
"types": "dist/index.d.ts",
|
|
14
|
-
"exports": {
|
|
15
|
-
".": {
|
|
16
|
-
"import": "./dist/gis-common.umd.js",
|
|
17
|
-
"require": "./dist/gis-common.umd.js"
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
"scripts": {
|
|
21
|
-
"dev": "vite",
|
|
22
|
-
"lib": "vite build --mode lib",
|
|
23
|
-
"serve": "vite preview"
|
|
24
|
-
},
|
|
25
|
-
"repository": {
|
|
26
|
-
"type": "git",
|
|
27
|
-
"url": ""
|
|
28
|
-
},
|
|
29
|
-
"dependencies": {
|
|
30
|
-
"mqtt
|
|
31
|
-
},
|
|
32
|
-
"devDependencies": {
|
|
33
|
-
"@types/leaflet": "^1.9.12",
|
|
34
|
-
"@types/node": "^22.5.5",
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"vite": "^5.4
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "gis-common",
|
|
3
|
+
"version": "5.2.1",
|
|
4
|
+
"author": "Guo.Yan <luv02@vip.qq.com>",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"private": false,
|
|
7
|
+
"module": "dist/gis-common.umd.js",
|
|
8
|
+
"main": "dist/gis-common.umd.js",
|
|
9
|
+
"type": "module",
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"types": "dist/index.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"import": "./dist/gis-common.umd.js",
|
|
17
|
+
"require": "./dist/gis-common.umd.js"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"scripts": {
|
|
21
|
+
"dev": "vite",
|
|
22
|
+
"lib": "vite build --mode lib",
|
|
23
|
+
"serve": "vite preview"
|
|
24
|
+
},
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": ""
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"mqtt": "^5.15.1"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@types/leaflet": "^1.9.12",
|
|
34
|
+
"@types/node": "^22.5.5",
|
|
35
|
+
"terser": "^5.32.0",
|
|
36
|
+
"typescript": "^5.5.4",
|
|
37
|
+
"vite": "^5.4.0",
|
|
38
|
+
"vite-plugin-dts": "^4.5.4"
|
|
39
|
+
}
|
|
40
|
+
}
|