tg-map-vue3 3.0.1 → 3.0.2

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/README.md CHANGED
@@ -1,26 +1,12 @@
1
- # @tg/map
1
+ # tg-map-vue3
2
2
 
3
- 封装 百度地图, Google地图, Here地图 的Vue2组件库
3
+ 封装 百度地图, Google地图, Here地图(未完成)Vue3组件库
4
4
 
5
5
  ## 使用
6
6
 
7
- 1. 项目根目录的`.npmrc`中添加如下内容, 让`@transcodegroup`下的包都从github中获取:
8
-
9
- ```config
10
- @transcodegroup:registry=https://npm.pkg.github.com
11
- ```
12
-
13
- 2. 用户文件根目录的`~/.npmrc`中添加如下内容, 其中`TOKEN`在[这里](https://github.com/settings/tokens/new)创建, 记得勾选`package`相关权限:
14
-
15
- ```config
16
- //npm.pkg.github.com/:_authToken=TOKEN
17
- ```
18
-
19
- 3. 安装/更新
20
-
21
- ```sh
22
- npm install @transcodegroup/tg-map
23
- ```
7
+ ```sh
8
+ pnpm install tg-map-vue3
9
+ ```
24
10
 
25
11
  ## 发布
26
12
 
@@ -36,13 +22,13 @@ git clone https://github.com/TranscodeGroup/tg-map.git
36
22
  # 进入本地仓库目录
37
23
  cd tg-map
38
24
  # 安装依赖
39
- npm install
25
+ pnpm install
40
26
  # 往npm中注册@@transcodegroup\tg-map
41
- npm link
27
+ pnpm link
42
28
  # 进入需要依赖@transcodegroup\tg-map的仓库目录($REPO_MAIN_PATH替换成你自己的路径)
43
29
  cd $REPO_MAIN_PATH
44
30
  # 链接之前注册的@tg/map到该仓库
45
- npm link @transcodegroup\tg-map
31
+ pnpm link @transcodegroup\tg-map
46
32
  ```
47
33
 
48
34
  ### 修改一些第三方库的package.json
@@ -66,8 +52,8 @@ TypeScript/VSCode默认只会读取package.json中的main字段, 而webpack默
66
52
 
67
53
  ```jsonc
68
54
  {
69
- // 项目中使用的最新版TS, 需要让Vetur也使用这个版本
70
- "vetur.useWorkspaceDependencies": true,
55
+ // 统一使用项目中的TS版本
56
+ "typescript.tsdk": "node_modules/typescript/lib",
71
57
  }
72
58
  ```
73
59
 
@@ -75,33 +61,31 @@ TypeScript/VSCode默认只会读取package.json中的main字段, 而webpack默
75
61
 
76
62
  ```sh
77
63
  # 修改代码后要重新构建
78
- npm run build:lib
79
- # 或者使用watch模式, 自动重新构建
80
- npm run build:lib:watch
64
+ pnpm run build
81
65
  ```
82
66
 
83
67
  ## 其他
84
68
 
85
69
  ```sh
86
- npm install
70
+ pnpm install
87
71
  ```
88
72
 
89
73
  ### Compile and Hot-Reload for Development
90
74
 
91
75
  ```sh
92
- npm run dev
76
+ pnpm run dev
93
77
  ```
94
78
 
95
79
  ### Type-Check, Compile and Minify for Production
96
80
 
97
81
  ```sh
98
- npm run build
82
+ pnpm run build
99
83
  ```
100
84
 
101
85
  ### Lint with [ESLint](https://eslint.org/)
102
86
 
103
87
  ```sh
104
- npm run lint
88
+ pnpm run lint
105
89
  ```
106
90
 
107
91
  ### Customize configuration
@@ -8,7 +8,7 @@ declare const _sfc_main: import('./@vue/compat').DefineComponent<Props<MapTypeCo
8
8
  recreate(): void;
9
9
  }, import('./@vue/compat').ComponentOptionsMixin, import('./@vue/compat').ComponentOptionsMixin, {}, string, import('./@vue/compat').VNodeProps & import('./@vue/compat').AllowedComponentProps & import('./@vue/compat').ComponentCustomProps, Readonly<import('./@vue/compat').ExtractPropTypes<{}>>, {}>, import('./@vue/compat').ComponentOptionsMixin, {}, string, import('./@vue/compat').VNodeProps & import('./@vue/compat').AllowedComponentProps & import('./@vue/compat').ComponentCustomProps, Readonly<import('./@vue/compat').ExtractPropTypes<Props<MapTypeControlOptions>>>, {
10
10
  type?: any;
11
- position?: any;
12
11
  mapTypes?: any;
12
+ position?: any;
13
13
  }>;
14
14
  export default _sfc_main;
@@ -3,12 +3,26 @@ import type { App } from './@vue/compat';
3
3
  import { type PartialTgMapConfig, setTgMapConfig, type TgMapConfig, getTgMapConfig } from '../map/map-config';
4
4
  import MapMixin, { MIXIN_HOOK_DESTROY, MIXIN_HOOK_CREATE, MIXIN_MAP_NAME } from './map-mixin';
5
5
  import LifecycleLogPlugin, { type LifecycleLogOptions } from '../utils/lifecycle-log';
6
- import TgMap from './TgMap.vue';
7
- import TgInfoBox from './overlays/TgInfoBox.vue';
8
6
  declare const TgMapPlugin: {
9
7
  install(app: App, config?: PartialTgMapConfig): void;
10
8
  };
11
9
  export default TgMapPlugin;
10
+ export { default as TgMap } from './TgMap.vue';
11
+ export { default as TgMapWidget } from './TgMapWidget.vue';
12
+ export { default as TgCustomControl } from './controls/TgCustomControl.vue';
13
+ export { default as TgMapTypeControl } from './controls/TgMapTypeControl.vue';
14
+ export { default as TgScaleControl } from './controls/TgScaleControl.vue';
15
+ export { default as TgZoomControl } from './controls/TgZoomControl.vue';
16
+ export { default as TgMarkerClusterer } from './extra/TgMarkerClusterer.vue';
17
+ export { default as TgTrafficLayer } from './layers/TgTrafficLayer.vue';
18
+ export { default as TgCircle } from './overlays/TgCircle.vue';
19
+ export { default as TgElementOverlay } from './overlays/TgElementOverlay.vue';
20
+ export { default as TgInfoBox } from './overlays/TgInfoBox.vue';
21
+ export { default as TgInfoWindow } from './overlays/TgInfoWindow.vue';
22
+ export { default as TgLabel } from './overlays/TgLabel.vue';
23
+ export { default as TgMarker } from './overlays/TgMarker.vue';
24
+ export { default as TgPolygon } from './overlays/TgPolygon.vue';
25
+ export { default as TgPolyline } from './overlays/TgPolyline.vue';
12
26
  export * from '../map/lat-lng';
13
27
  export * from '../map/map/map';
14
28
  export * from '../map/map-factory';
@@ -33,4 +47,4 @@ export { Objects } from '../utils/objects';
33
47
  export * from '../utils/arrays';
34
48
  export * from '../utils/strings';
35
49
  export * from '../utils/values';
36
- export { TgMap, TgInfoBox, TgMapConfig, PartialTgMapConfig, getTgMapConfig, setTgMapConfig, LifecycleLogPlugin, LifecycleLogOptions, MapMixin, MIXIN_HOOK_CREATE, MIXIN_HOOK_DESTROY, MIXIN_MAP_NAME, };
50
+ export { TgMapConfig, PartialTgMapConfig, getTgMapConfig, setTgMapConfig, LifecycleLogPlugin, LifecycleLogOptions, MapMixin, MIXIN_HOOK_CREATE, MIXIN_HOOK_DESTROY, MIXIN_MAP_NAME, };
@@ -8,14 +8,14 @@ declare const _sfc_main: import('./@vue/compat').DefineComponent<Props<CircleOpt
8
8
  recreate(): void;
9
9
  }, import('./@vue/compat').ComponentOptionsMixin, import('./@vue/compat').ComponentOptionsMixin, {}, string, import('./@vue/compat').VNodeProps & import('./@vue/compat').AllowedComponentProps & import('./@vue/compat').ComponentCustomProps, Readonly<import('./@vue/compat').ExtractPropTypes<{}>>, {}>, import('./@vue/compat').ComponentOptionsMixin, {}, string, import('./@vue/compat').VNodeProps & import('./@vue/compat').AllowedComponentProps & import('./@vue/compat').ComponentCustomProps, Readonly<import('./@vue/compat').ExtractPropTypes<Props<CircleOptions>>>, {
10
10
  center: any;
11
- clickable?: any;
12
- visible?: any;
13
11
  fillColor?: any;
14
12
  fillOpacity?: any;
13
+ clickable?: any;
15
14
  editable?: any;
16
15
  strokeColor?: any;
17
16
  strokeOpacity?: any;
18
17
  strokeWeight?: any;
18
+ visible?: any;
19
19
  radius: any;
20
20
  }>;
21
21
  export default _sfc_main;
@@ -19,11 +19,11 @@ declare const _sfc_main: import('./@vue/compat').DefineComponent<Props<Omit<Info
19
19
  }, import('./@vue/compat').ComponentOptionsMixin, import('./@vue/compat').ComponentOptionsMixin, {}, string, import('./@vue/compat').VNodeProps & import('./@vue/compat').AllowedComponentProps & import('./@vue/compat').ComponentCustomProps, Readonly<import('./@vue/compat').ExtractPropTypes<{}>>, {}>, import('./@vue/compat').ComponentOptionsMixin, {}, string, import('./@vue/compat').VNodeProps & import('./@vue/compat').AllowedComponentProps & import('./@vue/compat').ComponentCustomProps, Readonly<import('./@vue/compat').ExtractPropTypes<Props<Omit<InfoBoxOptions, "content"> & {
20
20
  show: boolean;
21
21
  }>>>, {
22
+ maxWidth?: any;
23
+ zIndex?: any;
22
24
  show: any;
23
25
  position?: any;
24
26
  offset?: any;
25
- zIndex?: any;
26
- maxWidth?: any;
27
27
  borderClass?: any;
28
28
  }>;
29
29
  export default _sfc_main;
@@ -16,10 +16,10 @@ declare const _sfc_main: import('./@vue/compat').DefineComponent<Props<Omit<Info
16
16
  }, import('./@vue/compat').ComponentOptionsMixin, import('./@vue/compat').ComponentOptionsMixin, {}, string, import('./@vue/compat').VNodeProps & import('./@vue/compat').AllowedComponentProps & import('./@vue/compat').ComponentCustomProps, Readonly<import('./@vue/compat').ExtractPropTypes<{}>>, {}>, import('./@vue/compat').ComponentOptionsMixin, {}, string, import('./@vue/compat').VNodeProps & import('./@vue/compat').AllowedComponentProps & import('./@vue/compat').ComponentCustomProps, Readonly<import('./@vue/compat').ExtractPropTypes<Props<Omit<InfoWindowOptions, "content"> & {
17
17
  show: boolean;
18
18
  }>>>, {
19
+ maxWidth?: any;
20
+ disableAutoPan?: any;
19
21
  show: any;
20
22
  position?: any;
21
23
  offset?: any;
22
- maxWidth?: any;
23
- disableAutoPan?: any;
24
24
  }>;
25
25
  export default _sfc_main;
@@ -14,8 +14,8 @@ declare const _sfc_main: import('./@vue/compat').DefineComponent<Props<Omit<Labe
14
14
  }, import('./@vue/compat').DefineComponent<{}, {}, {}, {}, {
15
15
  recreate(): void;
16
16
  }, import('./@vue/compat').ComponentOptionsMixin, import('./@vue/compat').ComponentOptionsMixin, {}, string, import('./@vue/compat').VNodeProps & import('./@vue/compat').AllowedComponentProps & import('./@vue/compat').ComponentCustomProps, Readonly<import('./@vue/compat').ExtractPropTypes<{}>>, {}>, import('./@vue/compat').ComponentOptionsMixin, {}, string, import('./@vue/compat').VNodeProps & import('./@vue/compat').AllowedComponentProps & import('./@vue/compat').ComponentCustomProps, Readonly<import('./@vue/compat').ExtractPropTypes<Props<Omit<LabelOptions, "content">>>>, {
17
+ zIndex?: any;
17
18
  position?: any;
18
19
  offset?: any;
19
- zIndex?: any;
20
20
  }>;
21
21
  export default _sfc_main;
@@ -24,15 +24,15 @@ declare const TgMarker: import('./@vue/compat').DefineComponent<Props<MarkerOpti
24
24
  }, import('./@vue/compat').DefineComponent<{}, {}, {}, {}, {
25
25
  recreate(): void;
26
26
  }, import('./@vue/compat').ComponentOptionsMixin, import('./@vue/compat').ComponentOptionsMixin, {}, string, import('./@vue/compat').VNodeProps & import('./@vue/compat').AllowedComponentProps & import('./@vue/compat').ComponentCustomProps, Readonly<import('./@vue/compat').ExtractPropTypes<{}>>, {}>, import('./@vue/compat').ComponentOptionsMixin, {}, string, import('./@vue/compat').VNodeProps & import('./@vue/compat').AllowedComponentProps & import('./@vue/compat').ComponentCustomProps, Readonly<import('./@vue/compat').ExtractPropTypes<Props<MarkerOptions>>>, {
27
- position: any;
28
27
  zIndex?: any;
28
+ clickable?: any;
29
+ visible?: any;
30
+ position: any;
29
31
  title?: any;
30
32
  icon?: any;
31
- clickable?: any;
32
33
  draggable?: any;
33
34
  crossOnDrag?: any;
34
35
  cursor?: any;
35
- visible?: any;
36
36
  }>;
37
37
  declare const _sfc_main: import('./@vue/compat').DefineComponent<Props<MarkerOptions>, {
38
38
  marker: MarkerOverlay;
@@ -46,15 +46,15 @@ declare const _sfc_main: import('./@vue/compat').DefineComponent<Props<MarkerOpt
46
46
  }, import('./@vue/compat').DefineComponent<{}, {}, {}, {}, {
47
47
  recreate(): void;
48
48
  }, import('./@vue/compat').ComponentOptionsMixin, import('./@vue/compat').ComponentOptionsMixin, {}, string, import('./@vue/compat').VNodeProps & import('./@vue/compat').AllowedComponentProps & import('./@vue/compat').ComponentCustomProps, Readonly<import('./@vue/compat').ExtractPropTypes<{}>>, {}>, import('./@vue/compat').ComponentOptionsMixin, {}, string, import('./@vue/compat').VNodeProps & import('./@vue/compat').AllowedComponentProps & import('./@vue/compat').ComponentCustomProps, Readonly<import('./@vue/compat').ExtractPropTypes<Props<MarkerOptions>>>, {
49
- position: any;
50
49
  zIndex?: any;
50
+ clickable?: any;
51
+ visible?: any;
52
+ position: any;
51
53
  title?: any;
52
54
  icon?: any;
53
- clickable?: any;
54
55
  draggable?: any;
55
56
  crossOnDrag?: any;
56
57
  cursor?: any;
57
- visible?: any;
58
58
  }>;
59
59
  export type TgMarkerInstanceType = InstanceType<typeof TgMarker>;
60
60
  export default _sfc_main;
@@ -7,14 +7,14 @@ declare const _sfc_main: import('./@vue/compat').DefineComponent<Props<PolygonOp
7
7
  }, unknown, {}, {}, import('./@vue/compat').DefineComponent<{}, {}, {}, {}, {
8
8
  recreate(): void;
9
9
  }, import('./@vue/compat').ComponentOptionsMixin, import('./@vue/compat').ComponentOptionsMixin, {}, string, import('./@vue/compat').VNodeProps & import('./@vue/compat').AllowedComponentProps & import('./@vue/compat').ComponentCustomProps, Readonly<import('./@vue/compat').ExtractPropTypes<{}>>, {}>, import('./@vue/compat').ComponentOptionsMixin, {}, string, import('./@vue/compat').VNodeProps & import('./@vue/compat').AllowedComponentProps & import('./@vue/compat').ComponentCustomProps, Readonly<import('./@vue/compat').ExtractPropTypes<Props<PolygonOptions>>>, {
10
- clickable?: any;
11
- visible?: any;
12
10
  fillColor?: any;
13
11
  fillOpacity?: any;
12
+ clickable?: any;
14
13
  editable?: any;
15
14
  strokeColor?: any;
16
15
  strokeOpacity?: any;
17
16
  strokeWeight?: any;
17
+ visible?: any;
18
18
  paths: any;
19
19
  }>;
20
20
  export default _sfc_main;
@@ -8,11 +8,11 @@ declare const _sfc_main: import('./@vue/compat').DefineComponent<Props<PolylineO
8
8
  recreate(): void;
9
9
  }, import('./@vue/compat').ComponentOptionsMixin, import('./@vue/compat').ComponentOptionsMixin, {}, string, import('./@vue/compat').VNodeProps & import('./@vue/compat').AllowedComponentProps & import('./@vue/compat').ComponentCustomProps, Readonly<import('./@vue/compat').ExtractPropTypes<{}>>, {}>, import('./@vue/compat').ComponentOptionsMixin, {}, string, import('./@vue/compat').VNodeProps & import('./@vue/compat').AllowedComponentProps & import('./@vue/compat').ComponentCustomProps, Readonly<import('./@vue/compat').ExtractPropTypes<Props<PolylineOptions>>>, {
10
10
  clickable?: any;
11
- visible?: any;
12
11
  editable?: any;
13
12
  strokeColor?: any;
14
13
  strokeOpacity?: any;
15
14
  strokeWeight?: any;
15
+ visible?: any;
16
16
  path: any;
17
17
  }>;
18
18
  export default _sfc_main;
@@ -30,7 +30,7 @@ export declare class GoogleOverlay<T extends UnionGoogleOverlay = UnionGoogleOve
30
30
  export declare class BaiduOverlay<T extends UnionBaiduOverlay = UnionBaiduOverlay> extends Overlay<T> {
31
31
  constructor(innerOverlay: T, coordType: CoordType, map: AbstractMap);
32
32
  /** 仅限内部使用; 设为private时, 生成的d.ts文件中, 方法返回值会变成any, 故改成了public */
33
- get overlay(): Required<Pick<UnionBaiduOverlay, "show" | "isVisible" | "hide">>;
33
+ get overlay(): Required<Pick<UnionBaiduOverlay, "isVisible" | "show" | "hide">>;
34
34
  isVisible(): boolean;
35
35
  setVisible(visible: boolean): void;
36
36
  /** 在创建BaiduOverlay时, 设置options.visible, 仅内部使用 */
package/dist/tg-map.js CHANGED
@@ -4838,10 +4838,24 @@ export {
4838
4838
  Pt as Overlay,
4839
4839
  ce as Point,
4840
4840
  ye as Strings,
4841
+ ui as TgCircle,
4842
+ Jr as TgCustomControl,
4843
+ vi as TgElementOverlay,
4841
4844
  Zt as TgInfoBox,
4845
+ Dt as TgInfoWindow,
4846
+ Rt as TgLabel,
4842
4847
  Nt as TgMap,
4843
4848
  ze as TgMapFactory,
4844
4849
  $ as TgMapType,
4850
+ Qr as TgMapTypeControl,
4851
+ Kr as TgMapWidget,
4852
+ de as TgMarker,
4853
+ Gt as TgMarkerClusterer,
4854
+ _i as TgPolygon,
4855
+ Mi as TgPolyline,
4856
+ ei as TgScaleControl,
4857
+ pi as TgTrafficLayer,
4858
+ ti as TgZoomControl,
4845
4859
  ue as callHook,
4846
4860
  xi as computedSaveOnThis,
4847
4861
  rr as createEmptyVNode,