@heycar/heycars-map 2.11.5-skipGeo1 → 2.11.5-skipGeo2

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,11 +3,14 @@ import { apiGetCenterPlaceFromCache } from "../../api/browser.js";
3
3
  import { apiMemoryShouldSkipByKey } from "../../api/memory.js";
4
4
  import { useMapCoordinatify } from "../../hooks/useMapCoordinatify.js";
5
5
  import { maybeFunctionToFunction, lnglat2point } from "../../utils/transform.js";
6
+ import { t as throttle } from "../../chunks/throttle.8bdd8d3b.js";
6
7
  const IS_FIRST_LOAD_KEY = "IS_FIRST_LOAD_KEY";
8
+ const THROTTLE_TIME = 3e3;
9
+ const throttledApiMemoryShouldSkipByKey = throttle(apiMemoryShouldSkipByKey, THROTTLE_TIME);
7
10
  const useCacheCenterPlace = (props) => {
8
11
  var _a;
9
12
  const { geoLoadingTitle, emptyTitle, skipWaitGeo } = props;
10
- const isAppFirstLoad = !apiMemoryShouldSkipByKey(IS_FIRST_LOAD_KEY);
13
+ const isAppFirstLoad = !throttledApiMemoryShouldSkipByKey(IS_FIRST_LOAD_KEY);
11
14
  const isFirstLoadWithGps = isAppFirstLoad && !skipWaitGeo;
12
15
  const getDefaultCenterPlace = maybeFunctionToFunction(props.defaultCenterPlace);
13
16
  const { unCoordinatifyPlace } = useMapCoordinatify();
@@ -1,6 +1,6 @@
1
1
  const availableLogKeys = /* @__PURE__ */ new Set();
2
2
  const pkgName = "@heycar/heycars-map";
3
- const pkgVersion = "2.11.5-skipGeo1";
3
+ const pkgVersion = "2.11.5-skipGeo2";
4
4
  const isEnableLog = (name) => {
5
5
  const searchParam = new URLSearchParams(location.search);
6
6
  return searchParam.has(`log-${name}`);
@@ -3,11 +3,14 @@ import { apiGetCenterPlaceFromCache } from "../../api/browser.js";
3
3
  import { apiMemoryShouldSkipByKey } from "../../api/memory.js";
4
4
  import { useMapCoordinatify } from "../../hooks/useMapCoordinatify.js";
5
5
  import { maybeFunctionToFunction, lnglat2point } from "../../utils/transform.js";
6
+ import { t as throttle } from "../../chunks/throttle.8bdd8d3b.js";
6
7
  const IS_FIRST_LOAD_KEY = "IS_FIRST_LOAD_KEY";
8
+ const THROTTLE_TIME = 3e3;
9
+ const throttledApiMemoryShouldSkipByKey = throttle(apiMemoryShouldSkipByKey, THROTTLE_TIME);
7
10
  const useCacheCenterPlace = (props) => {
8
11
  var _a;
9
12
  const { geoLoadingTitle, emptyTitle, skipWaitGeo } = props;
10
- const isAppFirstLoad = !apiMemoryShouldSkipByKey(IS_FIRST_LOAD_KEY);
13
+ const isAppFirstLoad = !throttledApiMemoryShouldSkipByKey(IS_FIRST_LOAD_KEY);
11
14
  const isFirstLoadWithGps = isAppFirstLoad && !skipWaitGeo;
12
15
  const getDefaultCenterPlace = maybeFunctionToFunction(props.defaultCenterPlace);
13
16
  const { unCoordinatifyPlace } = useMapCoordinatify();
@@ -1,6 +1,6 @@
1
1
  const availableLogKeys = /* @__PURE__ */ new Set();
2
2
  const pkgName = "@heycar/heycars-map";
3
- const pkgVersion = "2.11.5-skipGeo1";
3
+ const pkgVersion = "2.11.5-skipGeo2";
4
4
  const isEnableLog = (name) => {
5
5
  const searchParam = new URLSearchParams(location.search);
6
6
  return searchParam.has(`log-${name}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heycar/heycars-map",
3
- "version": "2.11.5-skipGeo1",
3
+ "version": "2.11.5-skipGeo2",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "checkVersion": "./bin/checkVersion.js",