runbir-tools 1.0.3 → 1.0.5

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/package.json CHANGED
@@ -1,20 +1,21 @@
1
1
  {
2
2
  "name": "runbir-tools",
3
- "version": "1.0.3",
3
+ "private": false,
4
+ "version": "1.0.5",
4
5
  "type": "module",
5
6
  "main": "./dist/runbir-tools.umd.js",
6
7
  "module": "./dist/runbir-tools.es.js",
7
- "types": "dist/index.d.ts",
8
- "files": [
9
- "dist",
10
- "dist/style.css"
11
- ],
8
+ "types": "./types/index.d.ts",
12
9
  "exports": {
13
10
  ".": {
14
11
  "import": "./dist/runbir-tools.es.js",
15
12
  "require": "./dist/runbir-tools.umd.js"
16
13
  }
17
14
  },
15
+ "files": [
16
+ "dist",
17
+ "types"
18
+ ],
18
19
  "scripts": {
19
20
  "dev": "vite",
20
21
  "build": "vue-tsc -b && vite build",
@@ -27,13 +28,9 @@
27
28
  "coverage": "vitest run --coverage"
28
29
  },
29
30
  "peerDependencies": {
31
+ "axios": "^1.9.0",
30
32
  "vue": "^3.5.13",
31
- "vue-router": "^4.5.1",
32
- "axios": "^1.9.0"
33
- },
34
- "dependencies": {
35
- "@turf/turf": "^7.2.0",
36
- "ol": "^10.6.1"
33
+ "vue-router": "^4.5.1"
37
34
  },
38
35
  "devDependencies": {
39
36
  "@eslint/js": "^9.28.0",
@@ -53,10 +50,11 @@
53
50
  "husky": "^9.1.7",
54
51
  "jiti": "^2.4.2",
55
52
  "lint-staged": "^16.1.0",
56
- "sass": "^1.89.2",
57
- "sass-loader": "^16.0.5",
58
53
  "typescript": "~5.5.4",
54
+ "unplugin-auto-import": "^19.3.0",
55
+ "unplugin-vue-components": "^28.7.0",
59
56
  "vite": "^6.3.5",
57
+ "vite-plugin-css-injected-by-js": "^3.5.2",
60
58
  "vite-plugin-eslint": "^1.8.1",
61
59
  "vitest": "^3.2.3",
62
60
  "vue-eslint-parser": "^9.4.3",
@@ -73,5 +71,9 @@
73
71
  },
74
72
  "engines": {
75
73
  "node": ">=22.0.0"
74
+ },
75
+ "dependencies": {
76
+ "@turf/turf": "^7.2.0",
77
+ "ol": "^10.6.1"
76
78
  }
77
79
  }
@@ -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 type { 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, {}, any>;
16
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import { Plugin } from 'vue';
2
+ import VueOl from './components/VueOl.vue';
3
+ export { VueOl };
4
+ declare const plugin: Plugin;
5
+ export default plugin;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ declare const router: import("vue-router").Router;
2
+ export default router;
@@ -0,0 +1,3 @@
1
+ import { AxiosInstance } from 'axios';
2
+ declare const _axios: AxiosInstance;
3
+ export default _axios;
@@ -0,0 +1,2 @@
1
+ export declare function getTyphoonList(): Promise<import("axios").AxiosResponse<any, any>>;
2
+ export declare function getTyphoonPath(id: number): Promise<import("axios").AxiosResponse<any, any>>;
@@ -0,0 +1,48 @@
1
+ import Feature from 'ol/Feature';
2
+ import { Geometry } from 'ol/geom';
3
+ import 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, {}, any>;
2
+ export default _default;
@@ -1 +0,0 @@
1
- .map[data-v-1225a1e0]{width:100%;height:100%}@keyframes rotate-1225a1e0{0%{transform:rotate(0)}to{transform:rotate(360deg)}}