runbir-tools 1.0.2 → 1.0.4
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/runbir-tools.css +1 -0
- package/dist/runbir-tools.es.js +10 -15
- package/dist/runbir-tools.umd.js +2 -3
- package/dist/types/src/App.vue.d.ts +2 -0
- package/dist/types/src/components/VueOl.vue.d.ts +16 -0
- package/dist/types/src/main.d.ts +0 -0
- package/dist/types/src/router/index.d.ts +2 -0
- package/dist/types/src/services/api-client.d.ts +3 -0
- package/dist/types/src/services/demo.services.d.ts +10 -0
- package/dist/types/src/utils/Typhoon.d.ts +48 -0
- package/dist/types/src/utils/WindBarb.d.ts +22 -0
- package/dist/types/src/view/Index.vue.d.ts +2 -0
- package/dist/types/vite.config.d.ts +2 -0
- package/package.json +5 -4
- package/dist/style.css +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ViewOptions } from 'ol/View';
|
|
2
|
+
interface Options {
|
|
3
|
+
view: ViewOptions;
|
|
4
|
+
layers: Array<any>;
|
|
5
|
+
controls: any;
|
|
6
|
+
event: any;
|
|
7
|
+
}
|
|
8
|
+
type __VLS_Props = {
|
|
9
|
+
options: Options;
|
|
10
|
+
};
|
|
11
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
12
|
+
olMap: (...args: any[]) => void;
|
|
13
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
|
+
onOlMap?: ((...args: any[]) => any) | undefined;
|
|
15
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
16
|
+
export default _default;
|
|
File without changes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 获取台风列表
|
|
3
|
+
*/
|
|
4
|
+
export declare function getTyphoonList(): Promise<import('axios').AxiosResponse<any, any>>;
|
|
5
|
+
/**
|
|
6
|
+
* 获取台风路径
|
|
7
|
+
* @param id 台风编号
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
export declare function getTyphoonPath(id: string): Promise<import('axios').AxiosResponse<any, any>>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { default as Feature } from 'ol/Feature';
|
|
2
|
+
import { Geometry } from 'ol/geom';
|
|
3
|
+
import { default as VectorSource } from 'ol/source/Vector';
|
|
4
|
+
interface TyphoonEntity {
|
|
5
|
+
longitude: number;
|
|
6
|
+
latitude: number;
|
|
7
|
+
type: string;
|
|
8
|
+
tcRank: string;
|
|
9
|
+
}
|
|
10
|
+
interface TyphoonForecast {
|
|
11
|
+
[key: string]: {
|
|
12
|
+
obs: Array<TyphoonEntity>;
|
|
13
|
+
fore: Array<TyphoonEntity>;
|
|
14
|
+
color: string;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
interface TyphoonInfo {
|
|
18
|
+
live: Array<TyphoonEntity>;
|
|
19
|
+
forecast?: TyphoonForecast;
|
|
20
|
+
baseInfo?: any;
|
|
21
|
+
unit: string;
|
|
22
|
+
}
|
|
23
|
+
declare class Typhoon {
|
|
24
|
+
typhoonLevel: any;
|
|
25
|
+
vectorSource: any;
|
|
26
|
+
lastPointLive: any;
|
|
27
|
+
createTrack(data: TyphoonInfo): any;
|
|
28
|
+
/**
|
|
29
|
+
* 画点
|
|
30
|
+
* @param vectorSource
|
|
31
|
+
* @param pointData
|
|
32
|
+
* @param baseInfo
|
|
33
|
+
* @param callback
|
|
34
|
+
*/
|
|
35
|
+
drawPoint(vectorSource: VectorSource<Feature<Geometry>>, pointData: any, baseInfo: any, unit: string): void;
|
|
36
|
+
/**
|
|
37
|
+
* 画风圈
|
|
38
|
+
* @param config
|
|
39
|
+
* @param vectorSource
|
|
40
|
+
*/
|
|
41
|
+
drawWindCircle(p?: any): void;
|
|
42
|
+
/**
|
|
43
|
+
* 获取与预报路径最近时间的实况点
|
|
44
|
+
* @param point
|
|
45
|
+
*/
|
|
46
|
+
getLastPoint(data: any, point: any): any;
|
|
47
|
+
}
|
|
48
|
+
export default Typhoon;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare class WindBarb {
|
|
2
|
+
maxWinds: number;
|
|
3
|
+
windbarbWidth: number;
|
|
4
|
+
windbarbHeight: number;
|
|
5
|
+
interval: number;
|
|
6
|
+
lineWidth: number;
|
|
7
|
+
icons: HTMLCanvasElement[];
|
|
8
|
+
/**
|
|
9
|
+
* 构造函数
|
|
10
|
+
* @param size 图标大小
|
|
11
|
+
*/
|
|
12
|
+
constructor(size: number);
|
|
13
|
+
getIconOfCanvas(winds: number, isCenter?: boolean): HTMLCanvasElement;
|
|
14
|
+
/**
|
|
15
|
+
* 创建风向杆
|
|
16
|
+
* @param context
|
|
17
|
+
* @param windIcon
|
|
18
|
+
* @param isCenter
|
|
19
|
+
*/
|
|
20
|
+
createWindBarb(context: CanvasRenderingContext2D, windIcon: number, isCenter: boolean): void;
|
|
21
|
+
}
|
|
22
|
+
export default WindBarb;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
2
|
+
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "runbir-tools",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/runbir-tools.umd.js",
|
|
6
6
|
"module": "./dist/runbir-tools.es.js",
|
|
@@ -27,13 +27,14 @@
|
|
|
27
27
|
"coverage": "vitest run --coverage"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
|
+
"axios": "^1.9.0",
|
|
30
31
|
"vue": "^3.5.13",
|
|
31
|
-
"vue-router": "^4.5.1"
|
|
32
|
-
"axios": "^1.9.0"
|
|
32
|
+
"vue-router": "^4.5.1"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@turf/turf": "^7.2.0",
|
|
36
|
-
"ol": "^10.6.1"
|
|
36
|
+
"ol": "^10.6.1",
|
|
37
|
+
"vite-plugin-dts": "^4.5.4"
|
|
37
38
|
},
|
|
38
39
|
"devDependencies": {
|
|
39
40
|
"@eslint/js": "^9.28.0",
|
package/dist/style.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.map[data-v-1225a1e0]{width:100%;height:100%}@keyframes rotate-1225a1e0{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
|