@heycar/heycars-map 0.9.25-alpha1 → 0.9.25-alpha3

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.
@@ -3,6 +3,7 @@ import { h } from "vue";
3
3
  import { useMapLoader, Status } from "../../hooks/useMapLoader.js";
4
4
  import { provideMapSupplier, useMapSupplier } from "../../hooks/useMapSupplier.js";
5
5
  import { defineLagecySetup } from "../../types/helper.js";
6
+ import "../../utils/alipayPolyfill.js";
6
7
  import { loadTraditionalChineseConvertOnce } from "../../utils/cn2tw.js";
7
8
  import { detectWebGL, WEBGL_STATUS } from "../../utils/platform.js";
8
9
  import { language2vectorMapForeign, vec2lnglat } from "../../utils/transform.js";
@@ -18,6 +18,7 @@ export declare const useDeviceOrientation: (props: UseDeviceOrientationProps) =>
18
18
  };
19
19
  };
20
20
  /**
21
+ * @deprecated
21
22
  * 修复 ios 微信小程序 页面切换和 DeviceOrientationEvent.requestPermission 冲突问题。
22
23
  * @param duration 毫秒
23
24
  * @returns 在 duration 时间内是否页面被小程序关闭了
package/dist/index.js CHANGED
@@ -34,8 +34,6 @@ import { useMapRecomendPlace } from "./hooks/useMapRecomendPlace.js";
34
34
  import { useWalkingRoute } from "./hooks/useWalkingRoute.js";
35
35
  import { CenterPlaceStatus } from "./types/interface.js";
36
36
  import { MINI_PROGRAM_WEB_VIEW_CLOSE_EVENT, MINI_PROGRAM_WEB_VIEW_CLOSE_TIMEOUT, patchMiniprogramRedirectTo } from "./utils/patchMiniprogram.js";
37
- import { logVersion } from "./utils/log.js";
38
- logVersion();
39
37
  export {
40
38
  AbsoluteAddressBox,
41
39
  AddressBox,
@@ -12,7 +12,9 @@ class QueryWxSignatureStatus {
12
12
  __publicField(this, "timoutStatusPromise", Promise.resolve("TIMEOUT"));
13
13
  __publicField(this, "readyStatusPromise", Promise.resolve("READY"));
14
14
  this.pendingStatusPromise = new Promise((resolve, reject) => {
15
+ const now = Date.now();
15
16
  wx == null ? void 0 : wx.ready(() => {
17
+ console.warn(`微信签名状态:查询到状态-签名成功, 用时 ${(Date.now() - now) / 1e3} 秒`);
16
18
  this.status = "READY";
17
19
  resolve("READY");
18
20
  });
@@ -1 +1 @@
1
- export {};
1
+ export declare function alipayPolyfill(): void;
@@ -1,10 +1,17 @@
1
- if (typeof window !== "undefined" && typeof globalThis === "undefined") {
2
- window.globalThis = window;
3
- }
4
- if (typeof GeolocationPositionError === "undefined") {
5
- window.GeolocationPositionError = {
6
- PERMISSION_DENIED: 1,
7
- POSITION_UNAVAILABLE: 2,
8
- TIMEOUT: 3
9
- };
1
+ function alipayPolyfill() {
2
+ window.abcdefg = "abcdefg";
3
+ if (typeof window !== "undefined" && typeof globalThis === "undefined") {
4
+ window.globalThis = window;
5
+ }
6
+ if (typeof GeolocationPositionError === "undefined") {
7
+ window.GeolocationPositionError = {
8
+ PERMISSION_DENIED: 1,
9
+ POSITION_UNAVAILABLE: 2,
10
+ TIMEOUT: 3
11
+ };
12
+ }
10
13
  }
14
+ alipayPolyfill();
15
+ export {
16
+ alipayPolyfill
17
+ };
package/dist/utils/log.js CHANGED
@@ -1,6 +1,6 @@
1
1
  const availableLogKeys = /* @__PURE__ */ new Set();
2
2
  const pkgName = "@heycar/heycars-map";
3
- const pkgVersion = "0.9.25-alpha1";
3
+ const pkgVersion = "0.9.25-alpha3";
4
4
  const isEnableLog = (name) => {
5
5
  const searchParam = new URLSearchParams(location.search);
6
6
  return searchParam.has(`log-${name}`);
@@ -16,6 +16,7 @@ const logVersion = () => {
16
16
  console.log(`package name: ${pkgName} version: ${pkgVersion}`);
17
17
  window.HeycarMapVersion = pkgVersion;
18
18
  };
19
+ logVersion();
19
20
  export {
20
21
  logVersion,
21
22
  spaceLog
@@ -1,4 +1,7 @@
1
1
  import type { Wx } from "../types/wx";
2
2
  export declare const MINI_PROGRAM_WEB_VIEW_CLOSE_EVENT = "MINI_PROGRAM_WEB_VIEW_CLOSE_EVENT";
3
3
  export declare const MINI_PROGRAM_WEB_VIEW_CLOSE_TIMEOUT: number;
4
+ /**
5
+ * @deprecated
6
+ */
4
7
  export declare const patchMiniprogramRedirectTo: (wx: Wx) => Wx["miniProgram"]["redirectTo"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heycar/heycars-map",
3
- "version": "0.9.25-alpha1",
3
+ "version": "0.9.25-alpha3",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "checkVersion": "./bin/checkVersion.js"
@@ -24,7 +24,8 @@
24
24
  },
25
25
  "sideEffects": [
26
26
  "**/*.css",
27
- "**/*.css.ts"
27
+ "**/*.css.ts",
28
+ "dist/utils/alipayPolyfill.js"
28
29
  ],
29
30
  "files": [
30
31
  "dist"