@heycar/heycars-map 0.9.27-google6 → 0.9.27-google7

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.
@@ -1,5 +1,6 @@
1
1
  import "../chunks/index.fbc1adc8.js";
2
2
  import { watchPostEffectForDeepOption } from "../utils/compare.js";
3
+ import { createRunOnce } from "../utils/helper.js";
3
4
  import { shallowRef, computed } from "vue";
4
5
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
5
6
  var distExports = {};
@@ -604,6 +605,7 @@ const useAmapLoader = (props) => {
604
605
  );
605
606
  return { statusRef, readyPromise };
606
607
  };
608
+ const createGmapLoaderOnce = createRunOnce((opts) => new Loader(opts));
607
609
  const useGmapLoader = (props) => {
608
610
  const { onChange } = props;
609
611
  let resolveLoader;
@@ -624,7 +626,7 @@ const useGmapLoader = (props) => {
624
626
  () => optionsRef.value,
625
627
  (options) => {
626
628
  const language = navigator.language;
627
- const loader = new Loader({ ...options, language });
629
+ const loader = createGmapLoaderOnce({ ...options, language });
628
630
  const setStatusAndExecuteCallback = (status) => {
629
631
  statusRef.value = status;
630
632
  if (status === "SUCCESS")
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.27-google6";
3
+ const pkgVersion = "0.9.27-google7";
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": "0.9.27-google6",
3
+ "version": "0.9.27-google7",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "checkVersion": "./bin/checkVersion.js"