@nuxt/scripts 1.0.0-rc.1 → 1.0.0-rc.10
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/bin/cli.mjs +2 -0
- package/dist/cli.d.mts +2 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.mjs +50 -0
- package/dist/devtools-client/200.html +1 -1
- package/dist/devtools-client/404.html +1 -1
- package/dist/devtools-client/_nuxt/{ajngqPCs.js → BgPDxVUn.js} +1 -1
- package/dist/devtools-client/_nuxt/{DKL6PHO3.js → BmlapxLP.js} +1 -1
- package/dist/devtools-client/_nuxt/CM2vefXI.js +188 -0
- package/dist/devtools-client/_nuxt/{CfOsp0mU.js → DAF5Qk9P.js} +1 -1
- package/dist/devtools-client/_nuxt/{B3kN3DAy.js → Dx6HhVmj.js} +1 -1
- package/dist/devtools-client/_nuxt/{dlaR8P-P.js → S8LiR9M1.js} +1 -1
- package/dist/devtools-client/_nuxt/builds/latest.json +1 -1
- package/dist/devtools-client/_nuxt/builds/meta/5458a3f2-af35-479c-8852-bf6f92fed611.json +1 -0
- package/dist/devtools-client/_nuxt/{entry.BwpOBArY.css → entry.BKkVrcJj.css} +1 -1
- package/dist/devtools-client/_nuxt/error-404.d44aGwWI.css +1 -0
- package/dist/devtools-client/_nuxt/error-500.NthMfIEt.css +1 -0
- package/dist/devtools-client/_nuxt/index.DZD1lwyI.css +1 -0
- package/dist/devtools-client/_nuxt/vBkR1GJq.js +1 -0
- package/dist/devtools-client/docs/index.html +1 -1
- package/dist/devtools-client/first-party/index.html +1 -1
- package/dist/devtools-client/index.html +1 -1
- package/dist/devtools-client/registry/index.html +1 -1
- package/dist/module.d.mts +66 -2
- package/dist/module.d.ts +66 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +144 -28
- package/dist/registry.d.mts +1 -0
- package/dist/registry.d.ts +1 -0
- package/dist/registry.mjs +14 -14
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMaps.d.vue.ts +73 -97
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMaps.vue +81 -58
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMaps.vue.d.ts +73 -97
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsInfoWindow.d.vue.ts +2 -3
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsInfoWindow.vue +1 -0
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsInfoWindow.vue.d.ts +2 -3
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarker.d.vue.ts +2 -3
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarker.vue +2 -1
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarker.vue.d.ts +2 -3
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarkerClusterer.d.vue.ts +10 -43
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarkerClusterer.vue +3 -1
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarkerClusterer.vue.d.ts +10 -43
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsOverlayView.d.vue.ts +50 -30
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsOverlayView.vue +145 -104
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsOverlayView.vue.d.ts +50 -30
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsStaticMap.vue +7 -2
- package/dist/runtime/components/GoogleMaps/types.d.ts +42 -0
- package/dist/runtime/components/GoogleMaps/types.js +1 -0
- package/dist/runtime/components/GoogleMaps/useGoogleMapsResource.d.ts +50 -0
- package/dist/runtime/components/GoogleMaps/useGoogleMapsResource.js +76 -1
- package/dist/runtime/components/ScriptBlueskyEmbed.d.vue.ts +10 -12
- package/dist/runtime/components/ScriptBlueskyEmbed.vue +13 -10
- package/dist/runtime/components/ScriptBlueskyEmbed.vue.d.ts +10 -12
- package/dist/runtime/components/ScriptCarbonAds.d.vue.ts +4 -7
- package/dist/runtime/components/ScriptCarbonAds.vue +1 -0
- package/dist/runtime/components/ScriptCarbonAds.vue.d.ts +4 -7
- package/dist/runtime/components/ScriptCrisp.d.vue.ts +7 -11
- package/dist/runtime/components/ScriptCrisp.vue +1 -0
- package/dist/runtime/components/ScriptCrisp.vue.d.ts +7 -11
- package/dist/runtime/components/ScriptGoogleAdsense.d.vue.ts +4 -7
- package/dist/runtime/components/ScriptGoogleAdsense.vue +1 -0
- package/dist/runtime/components/ScriptGoogleAdsense.vue.d.ts +4 -7
- package/dist/runtime/components/ScriptInstagramEmbed.d.vue.ts +11 -13
- package/dist/runtime/components/ScriptInstagramEmbed.vue +4 -1
- package/dist/runtime/components/ScriptInstagramEmbed.vue.d.ts +11 -13
- package/dist/runtime/components/ScriptIntercom.d.vue.ts +7 -11
- package/dist/runtime/components/ScriptIntercom.vue +1 -0
- package/dist/runtime/components/ScriptIntercom.vue.d.ts +7 -11
- package/dist/runtime/components/ScriptLemonSqueezy.d.vue.ts +2 -3
- package/dist/runtime/components/ScriptLemonSqueezy.vue +1 -0
- package/dist/runtime/components/ScriptLemonSqueezy.vue.d.ts +2 -3
- package/dist/runtime/components/ScriptPayPalButtons.d.vue.ts +8 -13
- package/dist/runtime/components/ScriptPayPalButtons.vue +1 -0
- package/dist/runtime/components/ScriptPayPalButtons.vue.d.ts +8 -13
- package/dist/runtime/components/ScriptPayPalMessages.d.vue.ts +8 -13
- package/dist/runtime/components/ScriptPayPalMessages.vue +1 -0
- package/dist/runtime/components/ScriptPayPalMessages.vue.d.ts +8 -13
- package/dist/runtime/components/ScriptStripePricingTable.d.vue.ts +5 -9
- package/dist/runtime/components/ScriptStripePricingTable.vue +1 -0
- package/dist/runtime/components/ScriptStripePricingTable.vue.d.ts +5 -9
- package/dist/runtime/components/ScriptVimeoPlayer.d.vue.ts +8 -11
- package/dist/runtime/components/ScriptVimeoPlayer.vue +1 -0
- package/dist/runtime/components/ScriptVimeoPlayer.vue.d.ts +8 -11
- package/dist/runtime/components/ScriptXEmbed.d.vue.ts +10 -12
- package/dist/runtime/components/ScriptXEmbed.vue +12 -9
- package/dist/runtime/components/ScriptXEmbed.vue.d.ts +10 -12
- package/dist/runtime/components/ScriptYouTubePlayer.d.vue.ts +8 -13
- package/dist/runtime/components/ScriptYouTubePlayer.vue +1 -0
- package/dist/runtime/components/ScriptYouTubePlayer.vue.d.ts +8 -13
- package/dist/runtime/composables/useScript.js +17 -6
- package/dist/runtime/composables/useScriptProxyToken.d.ts +12 -0
- package/dist/runtime/composables/useScriptProxyToken.js +4 -0
- package/dist/runtime/composables/useScriptProxyUrl.d.ts +12 -0
- package/dist/runtime/composables/useScriptProxyUrl.js +27 -0
- package/dist/runtime/plugins/proxy-token.server.d.ts +10 -0
- package/dist/runtime/plugins/proxy-token.server.js +17 -0
- package/dist/runtime/registry/bing-uet.d.ts +189 -11
- package/dist/runtime/registry/bing-uet.js +16 -2
- package/dist/runtime/registry/bluesky-embed.d.ts +0 -4
- package/dist/runtime/registry/bluesky-embed.js +0 -4
- package/dist/runtime/registry/clarity.d.ts +6 -2
- package/dist/runtime/registry/clarity.js +12 -1
- package/dist/runtime/registry/google-analytics.d.ts +6 -2
- package/dist/runtime/registry/google-analytics.js +12 -1
- package/dist/runtime/registry/google-tag-manager.d.ts +6 -2
- package/dist/runtime/registry/google-tag-manager.js +10 -1
- package/dist/runtime/registry/gravatar.js +10 -13
- package/dist/runtime/registry/matomo-analytics.d.ts +9 -3
- package/dist/runtime/registry/matomo-analytics.js +28 -1
- package/dist/runtime/registry/meta-pixel.d.ts +8 -2
- package/dist/runtime/registry/meta-pixel.js +10 -1
- package/dist/runtime/registry/mixpanel-analytics.d.ts +12 -2
- package/dist/runtime/registry/mixpanel-analytics.js +16 -4
- package/dist/runtime/registry/posthog.d.ts +8 -2
- package/dist/runtime/registry/posthog.js +15 -4
- package/dist/runtime/registry/schemas.d.ts +65 -0
- package/dist/runtime/registry/schemas.js +75 -8
- package/dist/runtime/registry/tiktok-pixel.d.ts +16 -2
- package/dist/runtime/registry/tiktok-pixel.js +22 -1
- package/dist/runtime/registry/x-embed.d.ts +0 -4
- package/dist/runtime/registry/x-embed.js +0 -4
- package/dist/runtime/server/bluesky-embed-image.d.ts +1 -1
- package/dist/runtime/server/bluesky-embed.d.ts +1 -15
- package/dist/runtime/server/bluesky-embed.js +25 -6
- package/dist/runtime/server/google-maps-geocode-proxy.js +12 -8
- package/dist/runtime/server/google-static-maps-proxy.d.ts +1 -1
- package/dist/runtime/server/google-static-maps-proxy.js +17 -11
- package/dist/runtime/server/gravatar-proxy.d.ts +1 -1
- package/dist/runtime/server/gravatar-proxy.js +10 -10
- package/dist/runtime/server/instagram-embed-asset.d.ts +1 -1
- package/dist/runtime/server/instagram-embed-image.d.ts +1 -1
- package/dist/runtime/server/instagram-embed.d.ts +1 -16
- package/dist/runtime/server/instagram-embed.js +26 -125
- package/dist/runtime/server/proxy-handler.js +1 -2
- package/dist/runtime/server/utils/cached-upstream.d.ts +55 -0
- package/dist/runtime/server/utils/cached-upstream.js +65 -0
- package/dist/runtime/server/utils/embed-rewriters.d.ts +19 -0
- package/dist/runtime/server/utils/embed-rewriters.js +41 -0
- package/dist/runtime/server/utils/image-proxy.d.ts +3 -1
- package/dist/runtime/server/utils/image-proxy.js +11 -8
- package/dist/runtime/server/utils/instagram-embed.d.ts +16 -0
- package/dist/runtime/server/utils/instagram-embed.js +153 -0
- package/dist/runtime/server/utils/proxy-url.d.ts +9 -0
- package/dist/runtime/server/utils/proxy-url.js +21 -0
- package/dist/runtime/server/utils/sign-constants.d.ts +16 -0
- package/dist/runtime/server/utils/sign-constants.js +5 -0
- package/dist/runtime/server/utils/sign.d.ts +101 -0
- package/dist/runtime/server/utils/sign.js +91 -0
- package/dist/runtime/server/utils/withSigning.d.ts +23 -0
- package/dist/runtime/server/utils/withSigning.js +19 -0
- package/dist/runtime/server/x-embed-image.d.ts +1 -1
- package/dist/runtime/server/x-embed.js +23 -4
- package/dist/runtime/types.d.ts +41 -6
- package/dist/runtime/types.js +1 -0
- package/dist/stats.mjs +298 -338
- package/dist/types-source.mjs +537 -164
- package/dist/types.d.mts +2 -2
- package/package.json +10 -6
- package/dist/devtools-client/_nuxt/C8jhSQ8l.js +0 -1
- package/dist/devtools-client/_nuxt/CJD6wrkT.js +0 -188
- package/dist/devtools-client/_nuxt/builds/meta/b800a0be-5cab-4ea6-89e3-dd3a85690a73.json +0 -1
- package/dist/devtools-client/_nuxt/error-404.CvOVjXeC.css +0 -1
- package/dist/devtools-client/_nuxt/error-500.BIm53nmx.css +0 -1
- package/dist/devtools-client/_nuxt/index.CA-OpSj0.css +0 -1
|
@@ -1,34 +1,47 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
|
|
3
|
+
</script>
|
|
4
|
+
|
|
1
5
|
<script setup>
|
|
2
|
-
import { computed, inject,
|
|
3
|
-
import { MARKER_CLUSTERER_INJECTION_KEY } from "./
|
|
4
|
-
import { MARKER_INJECTION_KEY, useGoogleMapsResource } from "./useGoogleMapsResource";
|
|
6
|
+
import { computed, inject, shallowRef, useTemplateRef, watch } from "vue";
|
|
7
|
+
import { MARKER_CLUSTERER_INJECTION_KEY } from "./types";
|
|
8
|
+
import { defineDeprecatedAlias, MARKER_INJECTION_KEY, normalizeLatLng, useGoogleMapsResource } from "./useGoogleMapsResource";
|
|
5
9
|
defineOptions({
|
|
6
10
|
inheritAttrs: false
|
|
7
11
|
});
|
|
8
|
-
const
|
|
12
|
+
const {
|
|
13
|
+
position,
|
|
14
|
+
defaultOpen = true,
|
|
15
|
+
anchor = "bottom-center",
|
|
16
|
+
offset,
|
|
17
|
+
pane = "floatPane",
|
|
18
|
+
zIndex,
|
|
19
|
+
blockMapInteraction = true,
|
|
20
|
+
panOnOpen = true,
|
|
21
|
+
hideWhenClustered = true
|
|
22
|
+
} = defineProps({
|
|
9
23
|
position: { type: null, required: false },
|
|
10
|
-
|
|
24
|
+
defaultOpen: { type: Boolean, required: false },
|
|
25
|
+
anchor: { type: String, required: false },
|
|
11
26
|
offset: { type: Object, required: false },
|
|
12
|
-
pane: { type: String, required: false
|
|
27
|
+
pane: { type: String, required: false },
|
|
13
28
|
zIndex: { type: Number, required: false },
|
|
14
|
-
blockMapInteraction: { type: Boolean, required: false
|
|
15
|
-
panOnOpen: { type: [Boolean, Number], required: false
|
|
16
|
-
hideWhenClustered: { type: Boolean, required: false
|
|
29
|
+
blockMapInteraction: { type: Boolean, required: false },
|
|
30
|
+
panOnOpen: { type: [Boolean, Number], required: false },
|
|
31
|
+
hideWhenClustered: { type: Boolean, required: false }
|
|
17
32
|
});
|
|
33
|
+
defineSlots();
|
|
18
34
|
const open = defineModel("open", { type: Boolean, ...{ default: void 0 } });
|
|
35
|
+
if (open.value === void 0)
|
|
36
|
+
open.value = defaultOpen ?? true;
|
|
19
37
|
const markerContext = inject(MARKER_INJECTION_KEY, void 0);
|
|
20
38
|
const markerClustererContext = inject(MARKER_CLUSTERER_INJECTION_KEY, void 0);
|
|
21
39
|
function getResolvedPosition() {
|
|
22
|
-
if (
|
|
23
|
-
return
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
if ("lat" in pos && typeof pos.lat === "function")
|
|
28
|
-
return { lat: pos.lat(), lng: pos.lng() };
|
|
29
|
-
return pos;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
40
|
+
if (position)
|
|
41
|
+
return normalizeLatLng(position);
|
|
42
|
+
const markerPosition = markerContext?.advancedMarkerElement.value?.position;
|
|
43
|
+
if (markerPosition)
|
|
44
|
+
return normalizeLatLng(markerPosition);
|
|
32
45
|
return void 0;
|
|
33
46
|
}
|
|
34
47
|
const ANCHOR_TRANSFORMS = {
|
|
@@ -42,21 +55,32 @@ const ANCHOR_TRANSFORMS = {
|
|
|
42
55
|
"left-center": "translate(0, -50%)",
|
|
43
56
|
"right-center": "translate(-100%, -50%)"
|
|
44
57
|
};
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
const dataState = computed(
|
|
58
|
+
const overlayAnchor = useTemplateRef("overlay-anchor");
|
|
59
|
+
const overlayPosition = shallowRef(void 0);
|
|
60
|
+
const dataState = computed(
|
|
61
|
+
() => open.value !== false && overlayPosition.value !== void 0 ? "open" : "closed"
|
|
62
|
+
);
|
|
63
|
+
const overlayStyle = computed(() => {
|
|
64
|
+
const visible = open.value !== false && overlayPosition.value !== void 0;
|
|
65
|
+
if (!visible) {
|
|
66
|
+
return {
|
|
67
|
+
position: "absolute",
|
|
68
|
+
visibility: "hidden",
|
|
69
|
+
pointerEvents: "none"
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
const { x, y } = overlayPosition.value;
|
|
73
|
+
return {
|
|
74
|
+
position: "absolute",
|
|
75
|
+
left: `${x + (offset?.x ?? 0)}px`,
|
|
76
|
+
top: `${y + (offset?.y ?? 0)}px`,
|
|
77
|
+
transform: ANCHOR_TRANSFORMS[anchor],
|
|
78
|
+
zIndex: zIndex !== void 0 ? String(zIndex) : void 0,
|
|
79
|
+
visibility: "visible",
|
|
80
|
+
pointerEvents: "auto"
|
|
81
|
+
};
|
|
82
|
+
});
|
|
48
83
|
const listeners = [];
|
|
49
|
-
function setDataState(el, state) {
|
|
50
|
-
el.dataset.state = state;
|
|
51
|
-
const child = el.firstElementChild;
|
|
52
|
-
if (child)
|
|
53
|
-
child.dataset.state = state;
|
|
54
|
-
}
|
|
55
|
-
function hideElement(el) {
|
|
56
|
-
el.style.visibility = "hidden";
|
|
57
|
-
el.style.pointerEvents = "none";
|
|
58
|
-
setDataState(el, "closed");
|
|
59
|
-
}
|
|
60
84
|
function panMapToFitOverlay(el, map, padding) {
|
|
61
85
|
const child = el.firstElementChild;
|
|
62
86
|
if (!child)
|
|
@@ -76,69 +100,59 @@ function panMapToFitOverlay(el, map, padding) {
|
|
|
76
100
|
if (panX !== 0 || panY !== 0)
|
|
77
101
|
map.panBy(panX, panY);
|
|
78
102
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
panes[props.pane].appendChild(el);
|
|
89
|
-
if (props.blockMapInteraction)
|
|
90
|
-
mapsApi.OverlayView.preventMapHitsAndGesturesFrom(el);
|
|
91
|
-
}
|
|
92
|
-
if (props.panOnOpen) {
|
|
93
|
-
const padding = typeof props.panOnOpen === "number" ? props.panOnOpen : 40;
|
|
94
|
-
requestAnimationFrame(() => {
|
|
95
|
-
panMapToFitOverlay(el, map, padding);
|
|
96
|
-
});
|
|
97
|
-
}
|
|
103
|
+
function makeOverlayClass(mapsApi, map) {
|
|
104
|
+
return class CustomOverlay extends mapsApi.OverlayView {
|
|
105
|
+
onAdd() {
|
|
106
|
+
const panes = this.getPanes();
|
|
107
|
+
const el = overlayAnchor.value;
|
|
108
|
+
if (panes && el) {
|
|
109
|
+
panes[pane].appendChild(el);
|
|
110
|
+
if (blockMapInteraction)
|
|
111
|
+
mapsApi.OverlayView.preventMapHitsAndGesturesFrom(el);
|
|
98
112
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}
|
|
105
|
-
const position = getResolvedPosition();
|
|
106
|
-
if (!position) {
|
|
107
|
-
isPositioned.value = false;
|
|
108
|
-
hideElement(el);
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
const projection = this.getProjection();
|
|
112
|
-
if (!projection) {
|
|
113
|
-
isPositioned.value = false;
|
|
114
|
-
hideElement(el);
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
const pos = projection.fromLatLngToDivPixel(
|
|
118
|
-
new mapsApi.LatLng(position.lat, position.lng)
|
|
119
|
-
);
|
|
120
|
-
if (!pos) {
|
|
121
|
-
isPositioned.value = false;
|
|
122
|
-
hideElement(el);
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
el.style.position = "absolute";
|
|
126
|
-
el.style.left = `${pos.x + (props.offset?.x ?? 0)}px`;
|
|
127
|
-
el.style.top = `${pos.y + (props.offset?.y ?? 0)}px`;
|
|
128
|
-
el.style.transform = ANCHOR_TRANSFORMS[props.anchor];
|
|
129
|
-
if (props.zIndex !== void 0)
|
|
130
|
-
el.style.zIndex = String(props.zIndex);
|
|
131
|
-
el.style.visibility = "visible";
|
|
132
|
-
el.style.pointerEvents = "auto";
|
|
133
|
-
setDataState(el, "open");
|
|
134
|
-
isPositioned.value = true;
|
|
113
|
+
if (panOnOpen && open.value !== false) {
|
|
114
|
+
const padding = typeof panOnOpen === "number" ? panOnOpen : 40;
|
|
115
|
+
requestAnimationFrame(() => {
|
|
116
|
+
if (open.value !== false && overlayAnchor.value && overlayPosition.value)
|
|
117
|
+
panMapToFitOverlay(overlayAnchor.value, map, padding);
|
|
118
|
+
});
|
|
135
119
|
}
|
|
136
|
-
|
|
137
|
-
|
|
120
|
+
}
|
|
121
|
+
draw() {
|
|
122
|
+
if (open.value === false) {
|
|
123
|
+
overlayPosition.value = void 0;
|
|
124
|
+
return;
|
|
138
125
|
}
|
|
126
|
+
const resolvedPosition = getResolvedPosition();
|
|
127
|
+
if (!resolvedPosition) {
|
|
128
|
+
overlayPosition.value = void 0;
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
const projection = this.getProjection();
|
|
132
|
+
if (!projection) {
|
|
133
|
+
overlayPosition.value = void 0;
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
const pos = projection.fromLatLngToDivPixel(
|
|
137
|
+
new mapsApi.LatLng(resolvedPosition.lat, resolvedPosition.lng)
|
|
138
|
+
);
|
|
139
|
+
if (!pos) {
|
|
140
|
+
overlayPosition.value = void 0;
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
overlayPosition.value = { x: pos.x, y: pos.y };
|
|
139
144
|
}
|
|
140
|
-
|
|
141
|
-
|
|
145
|
+
onRemove() {
|
|
146
|
+
const el = overlayAnchor.value;
|
|
147
|
+
el?.parentNode?.removeChild(el);
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
const overlay = useGoogleMapsResource({
|
|
152
|
+
// ready condition accesses .value on ShallowRefs — tracked by whenever() in useGoogleMapsResource
|
|
153
|
+
ready: () => !!overlayAnchor.value && !!(position || markerContext?.advancedMarkerElement.value),
|
|
154
|
+
create({ mapsApi, map }) {
|
|
155
|
+
const CustomOverlay = makeOverlayClass(mapsApi, map);
|
|
142
156
|
const ov = new CustomOverlay();
|
|
143
157
|
ov.setMap(map);
|
|
144
158
|
if (markerContext?.advancedMarkerElement.value) {
|
|
@@ -159,12 +173,8 @@ const overlay = useGoogleMapsResource({
|
|
|
159
173
|
if (markerContext) {
|
|
160
174
|
watch(
|
|
161
175
|
() => {
|
|
162
|
-
const
|
|
163
|
-
|
|
164
|
-
return void 0;
|
|
165
|
-
if ("lat" in pos && typeof pos.lat === "function")
|
|
166
|
-
return { lat: pos.lat(), lng: pos.lng() };
|
|
167
|
-
return pos;
|
|
176
|
+
const markerPosition = markerContext.advancedMarkerElement.value?.position;
|
|
177
|
+
return markerPosition ? normalizeLatLng(markerPosition) : void 0;
|
|
168
178
|
},
|
|
169
179
|
() => {
|
|
170
180
|
overlay.value?.draw();
|
|
@@ -172,7 +182,10 @@ if (markerContext) {
|
|
|
172
182
|
);
|
|
173
183
|
}
|
|
174
184
|
watch(
|
|
175
|
-
() =>
|
|
185
|
+
() => {
|
|
186
|
+
const p = position ? normalizeLatLng(position) : void 0;
|
|
187
|
+
return [p?.lat, p?.lng, offset?.x, offset?.y, zIndex, anchor];
|
|
188
|
+
},
|
|
176
189
|
() => {
|
|
177
190
|
overlay.value?.draw();
|
|
178
191
|
}
|
|
@@ -182,7 +195,7 @@ watch(() => open.value, () => {
|
|
|
182
195
|
return;
|
|
183
196
|
overlay.value.draw();
|
|
184
197
|
});
|
|
185
|
-
watch([() =>
|
|
198
|
+
watch([() => pane, () => blockMapInteraction], () => {
|
|
186
199
|
if (overlay.value) {
|
|
187
200
|
const map = overlay.value.getMap();
|
|
188
201
|
overlay.value.setMap(null);
|
|
@@ -194,7 +207,7 @@ if (markerClustererContext && markerContext) {
|
|
|
194
207
|
watch(
|
|
195
208
|
() => markerClustererContext.clusteringVersion.value,
|
|
196
209
|
() => {
|
|
197
|
-
if (!
|
|
210
|
+
if (!hideWhenClustered || open.value === false)
|
|
198
211
|
return;
|
|
199
212
|
const clusterer = markerClustererContext.markerClusterer.value;
|
|
200
213
|
if (!clusterer?.clusters)
|
|
@@ -210,13 +223,41 @@ if (markerClustererContext && markerContext) {
|
|
|
210
223
|
}
|
|
211
224
|
);
|
|
212
225
|
}
|
|
213
|
-
|
|
226
|
+
const exposed = {
|
|
227
|
+
overlayView: overlay,
|
|
228
|
+
// Plain alias for production. In dev, replaced below with a getter that
|
|
229
|
+
// emits a one-shot deprecation warning. Both forms return the same
|
|
230
|
+
// shallow ref as `overlayView`.
|
|
231
|
+
overlay,
|
|
232
|
+
dataState
|
|
233
|
+
};
|
|
234
|
+
if (import.meta.dev) {
|
|
235
|
+
defineDeprecatedAlias(
|
|
236
|
+
exposed,
|
|
237
|
+
"overlay",
|
|
238
|
+
"overlayView",
|
|
239
|
+
'[nuxt-scripts] <ScriptGoogleMapsOverlayView> expose key "overlay" is deprecated; use "overlayView" instead. See https://scripts.nuxt.com/docs/migration-guide/v0-to-v1'
|
|
240
|
+
);
|
|
241
|
+
}
|
|
242
|
+
defineExpose(exposed);
|
|
214
243
|
</script>
|
|
215
244
|
|
|
216
245
|
<template>
|
|
217
246
|
<div style="display: none;">
|
|
218
|
-
|
|
219
|
-
|
|
247
|
+
<!--
|
|
248
|
+
Two-element structure:
|
|
249
|
+
- `overlay-anchor` is moved into a Google Maps pane on `onAdd()`. Its
|
|
250
|
+
inline style is reactively bound to `overlayStyle`, so position
|
|
251
|
+
updates from `draw()` flow through Vue's patcher even after the node
|
|
252
|
+
has been reparented out of the component tree.
|
|
253
|
+
- `overlay-content` carries `data-state`, attribute-based animations,
|
|
254
|
+
and forwards parent attrs (e.g. `class`) so consumers can target it
|
|
255
|
+
directly with `[data-state]` selectors.
|
|
256
|
+
-->
|
|
257
|
+
<div ref="overlay-anchor" :style="overlayStyle">
|
|
258
|
+
<div :data-state="dataState" v-bind="$attrs">
|
|
259
|
+
<slot />
|
|
260
|
+
</div>
|
|
220
261
|
</div>
|
|
221
262
|
</div>
|
|
222
263
|
</template>
|
|
@@ -1,16 +1,29 @@
|
|
|
1
|
-
type
|
|
2
|
-
type
|
|
3
|
-
type
|
|
1
|
+
import type { ShallowRef } from 'vue';
|
|
2
|
+
export type ScriptGoogleMapsOverlayAnchor = 'center' | 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' | 'left-center' | 'right-center';
|
|
3
|
+
export type ScriptGoogleMapsOverlayPane = 'mapPane' | 'overlayLayer' | 'markerLayer' | 'overlayMouseTarget' | 'floatPane';
|
|
4
|
+
export interface ScriptGoogleMapsOverlayViewProps {
|
|
4
5
|
/**
|
|
5
6
|
* Geographic position for the overlay. Falls back to parent marker position if omitted.
|
|
7
|
+
*
|
|
8
|
+
* Accepts either a plain `LatLngLiteral` (`{ lat, lng }`) or a
|
|
9
|
+
* `google.maps.LatLng` instance.
|
|
6
10
|
* @see https://developers.google.com/maps/documentation/javascript/reference/overlay-view#OverlayView
|
|
7
11
|
*/
|
|
8
|
-
position?: google.maps.LatLngLiteral;
|
|
12
|
+
position?: google.maps.LatLng | google.maps.LatLngLiteral;
|
|
13
|
+
/**
|
|
14
|
+
* Initial open state for the uncontrolled mode (when `v-model:open` is not
|
|
15
|
+
* bound). When omitted, the overlay opens on mount, matching v0 behaviour.
|
|
16
|
+
*
|
|
17
|
+
* Has no effect when `v-model:open` is used; pass an initial value to the
|
|
18
|
+
* bound ref instead.
|
|
19
|
+
* @default true
|
|
20
|
+
*/
|
|
21
|
+
defaultOpen?: boolean;
|
|
9
22
|
/**
|
|
10
23
|
* Anchor point of the overlay relative to its position.
|
|
11
24
|
* @default 'bottom-center'
|
|
12
25
|
*/
|
|
13
|
-
anchor?:
|
|
26
|
+
anchor?: ScriptGoogleMapsOverlayAnchor;
|
|
14
27
|
/**
|
|
15
28
|
* Pixel offset from the anchor position.
|
|
16
29
|
*/
|
|
@@ -23,7 +36,7 @@ type __VLS_Props = {
|
|
|
23
36
|
* @default 'floatPane'
|
|
24
37
|
* @see https://developers.google.com/maps/documentation/javascript/reference/overlay-view#MapPanes
|
|
25
38
|
*/
|
|
26
|
-
pane?:
|
|
39
|
+
pane?: ScriptGoogleMapsOverlayPane;
|
|
27
40
|
/**
|
|
28
41
|
* CSS z-index for the overlay element.
|
|
29
42
|
*/
|
|
@@ -45,32 +58,39 @@ type __VLS_Props = {
|
|
|
45
58
|
* @default true
|
|
46
59
|
*/
|
|
47
60
|
hideWhenClustered?: boolean;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
71
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
61
|
+
}
|
|
62
|
+
export interface ScriptGoogleMapsOverlayViewEmits {
|
|
63
|
+
/** Event handler called when the open state of the overlay view changes. */
|
|
64
|
+
'update:open': [value: boolean];
|
|
65
|
+
}
|
|
66
|
+
export interface ScriptGoogleMapsOverlayViewSlots {
|
|
67
|
+
default?: () => any;
|
|
68
|
+
}
|
|
69
|
+
export interface ScriptGoogleMapsOverlayViewExpose {
|
|
70
|
+
/** The underlying `OverlayView` instance. */
|
|
71
|
+
overlayView: ShallowRef<google.maps.OverlayView | undefined>;
|
|
72
|
+
/**
|
|
73
|
+
* The underlying `OverlayView` instance.
|
|
74
|
+
*
|
|
75
|
+
* @deprecated Use `overlayView` instead. The `overlay` alias will be
|
|
76
|
+
* removed in a future major version.
|
|
77
|
+
* @see https://scripts.nuxt.com/docs/migration-guide/v0-to-v1
|
|
78
|
+
*/
|
|
79
|
+
overlay: ShallowRef<google.maps.OverlayView | undefined>;
|
|
80
|
+
/** The current data-state of the overlay, either 'open' or 'closed'. */
|
|
81
|
+
dataState: Readonly<ShallowRef<'open' | 'closed'>>;
|
|
82
|
+
}
|
|
72
83
|
declare const _default: typeof __VLS_export;
|
|
73
84
|
export default _default;
|
|
85
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ScriptGoogleMapsOverlayViewProps & {
|
|
86
|
+
open?: boolean;
|
|
87
|
+
}, ScriptGoogleMapsOverlayViewExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
88
|
+
"update:open": (value: boolean) => any;
|
|
89
|
+
}, string, import("vue").PublicProps, Readonly<ScriptGoogleMapsOverlayViewProps & {
|
|
90
|
+
open?: boolean;
|
|
91
|
+
}> & Readonly<{
|
|
92
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
93
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ScriptGoogleMapsOverlayViewSlots>;
|
|
74
94
|
type __VLS_WithSlots<T, S> = T & {
|
|
75
95
|
new (): {
|
|
76
96
|
$slots: S;
|
|
@@ -4,6 +4,7 @@ import { defu } from "defu";
|
|
|
4
4
|
import { useHead, useRuntimeConfig } from "nuxt/app";
|
|
5
5
|
import { withQuery } from "ufo";
|
|
6
6
|
import { computed, onMounted, ref } from "vue";
|
|
7
|
+
import { useScriptProxyUrl } from "../../composables/useScriptProxyUrl";
|
|
7
8
|
</script>
|
|
8
9
|
|
|
9
10
|
<script setup>
|
|
@@ -29,10 +30,12 @@ const props = defineProps({
|
|
|
29
30
|
objectFit: { type: String, required: false, default: "cover" },
|
|
30
31
|
imgAttrs: { type: Object, required: false }
|
|
31
32
|
});
|
|
33
|
+
defineSlots();
|
|
32
34
|
const runtimeConfig = useRuntimeConfig();
|
|
33
35
|
const proxyConfig = runtimeConfig.public["nuxt-scripts"]?.googleStaticMapsProxy;
|
|
34
36
|
const apiKey = props.apiKey || scriptRuntimeConfig("googleMaps")?.apiKey;
|
|
35
37
|
const useProxy = !props.apiKey && proxyConfig?.enabled;
|
|
38
|
+
const proxyUrl = useScriptProxyUrl();
|
|
36
39
|
if (import.meta.dev) {
|
|
37
40
|
if (!apiKey && !useProxy)
|
|
38
41
|
console.warn("[nuxt-scripts] ScriptGoogleMapsStaticMap requires a Google Maps API key with Static Maps API access. Set NUXT_PUBLIC_SCRIPTS_GOOGLE_MAPS_API_KEY in your .env, or enable the proxy via `scripts.registry.googleMaps`.");
|
|
@@ -121,8 +124,10 @@ const src = computed(() => {
|
|
|
121
124
|
if (query[key] === void 0)
|
|
122
125
|
delete query[key];
|
|
123
126
|
}
|
|
124
|
-
|
|
125
|
-
|
|
127
|
+
if (useProxy) {
|
|
128
|
+
return proxyUrl("/_scripts/proxy/google-static-maps", query);
|
|
129
|
+
}
|
|
130
|
+
return withQuery("https://maps.googleapis.com/maps/api/staticmap", query);
|
|
126
131
|
});
|
|
127
132
|
const imgAttributes = computed(() => {
|
|
128
133
|
return defu(props.imgAttrs, {
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { InjectionKey, ShallowRef } from 'vue';
|
|
2
|
+
export interface MarkerClustererInstance {
|
|
3
|
+
render: () => void;
|
|
4
|
+
setMap: (map: google.maps.Map | null) => void;
|
|
5
|
+
addListener: (event: string, handler: () => void) => void;
|
|
6
|
+
addMarker: (marker: google.maps.marker.AdvancedMarkerElement | google.maps.Marker, noDraw?: boolean) => void;
|
|
7
|
+
removeMarker: (marker: google.maps.marker.AdvancedMarkerElement | google.maps.Marker, noDraw?: boolean) => boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface MarkerClustererOptions {
|
|
10
|
+
markers?: google.maps.marker.AdvancedMarkerElement[];
|
|
11
|
+
algorithm?: unknown;
|
|
12
|
+
renderer?: unknown;
|
|
13
|
+
onClusterClick?: unknown;
|
|
14
|
+
}
|
|
15
|
+
export interface Cluster {
|
|
16
|
+
marker: google.maps.marker.AdvancedMarkerElement;
|
|
17
|
+
markers?: google.maps.marker.AdvancedMarkerElement[];
|
|
18
|
+
position: google.maps.LatLng;
|
|
19
|
+
bounds: google.maps.LatLngBounds | undefined;
|
|
20
|
+
count: number;
|
|
21
|
+
}
|
|
22
|
+
export interface ClusterStats {
|
|
23
|
+
markers: {
|
|
24
|
+
sum: number;
|
|
25
|
+
};
|
|
26
|
+
clusters: {
|
|
27
|
+
count: number;
|
|
28
|
+
markers: {
|
|
29
|
+
min: number;
|
|
30
|
+
max: number;
|
|
31
|
+
mean: number;
|
|
32
|
+
sum: number;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export interface MarkerClustererContext {
|
|
37
|
+
markerClusterer: ShallowRef<MarkerClustererInstance | undefined>;
|
|
38
|
+
requestRerender: () => void;
|
|
39
|
+
/** Increments after each clustering cycle; watch to detect cluster membership changes */
|
|
40
|
+
clusteringVersion: ShallowRef<number>;
|
|
41
|
+
}
|
|
42
|
+
export declare const MARKER_CLUSTERER_INJECTION_KEY: InjectionKey<MarkerClustererContext>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const MARKER_CLUSTERER_INJECTION_KEY = Symbol("marker-clusterer");
|
|
@@ -25,6 +25,56 @@ export interface GoogleMapsResourceContext {
|
|
|
25
25
|
map: google.maps.Map;
|
|
26
26
|
mapsApi: typeof google.maps;
|
|
27
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* Normalizes a `LatLng | LatLngLiteral` value into a plain `LatLngLiteral`.
|
|
30
|
+
*
|
|
31
|
+
* Google's `LatLng` exposes coordinates via `.lat()`/`.lng()` methods, while
|
|
32
|
+
* `LatLngLiteral` exposes them as plain `lat`/`lng` numeric properties. The
|
|
33
|
+
* runtime distinguishes them by checking whether `.lat` is callable; this is
|
|
34
|
+
* preferred over `instanceof google.maps.LatLng` because mocked APIs in tests
|
|
35
|
+
* return plain objects rather than real `LatLng` instances.
|
|
36
|
+
*/
|
|
37
|
+
export declare function normalizeLatLng(p: google.maps.LatLng | google.maps.LatLngLiteral): google.maps.LatLngLiteral;
|
|
38
|
+
/**
|
|
39
|
+
* Defines a deprecated property alias on an exposed object. Reading the alias
|
|
40
|
+
* returns the value of the canonical key and emits a one-shot
|
|
41
|
+
* `console.warn` (so repeated reads don't spam the console).
|
|
42
|
+
*
|
|
43
|
+
* Used to provide backward-compatible renames on `defineExpose` payloads
|
|
44
|
+
* without breaking existing template-ref consumers. Call sites should wrap
|
|
45
|
+
* this in `if (import.meta.dev)` so production builds skip the getter
|
|
46
|
+
* entirely and the alias stays a plain data property.
|
|
47
|
+
*/
|
|
48
|
+
export declare function defineDeprecatedAlias<T extends object, K extends keyof T>(target: T, alias: string, canonicalKey: K, message: string): T;
|
|
49
|
+
/**
|
|
50
|
+
* Emits dev-mode deprecation warnings for the legacy top-level `center` and
|
|
51
|
+
* `zoom` props on `<ScriptGoogleMaps>`. Both props still work, but new code
|
|
52
|
+
* should pass them via `mapOptions` instead.
|
|
53
|
+
*
|
|
54
|
+
* Returns the number of warnings emitted (useful for tests).
|
|
55
|
+
*/
|
|
56
|
+
export declare function warnDeprecatedTopLevelMapProps(props: {
|
|
57
|
+
center?: unknown;
|
|
58
|
+
zoom?: unknown;
|
|
59
|
+
}): number;
|
|
60
|
+
/**
|
|
61
|
+
* Wait until the Google Maps API and a Map instance are both available.
|
|
62
|
+
*
|
|
63
|
+
* Triggers script loading via `load()` if not already loaded. Uses an
|
|
64
|
+
* immediate watcher (matching `importLibrary`'s pattern) to avoid the race
|
|
65
|
+
* where `load()` resolves synchronously: a non-immediate watcher would miss
|
|
66
|
+
* the change and the promise would hang forever.
|
|
67
|
+
*
|
|
68
|
+
* Rejects if `status` enters an `'error'` state before both refs are populated.
|
|
69
|
+
* Runs the watcher inside a detached effect scope so it is safe to call from
|
|
70
|
+
* any context (component setup, exposed methods, tests).
|
|
71
|
+
*/
|
|
72
|
+
export declare function waitForMapsReady({ mapsApi, map, status, load, }: {
|
|
73
|
+
mapsApi: ShallowRef<typeof google.maps | undefined>;
|
|
74
|
+
map: ShallowRef<google.maps.Map | undefined>;
|
|
75
|
+
status: Ref<string>;
|
|
76
|
+
load: () => Promise<unknown> | unknown;
|
|
77
|
+
}): Promise<void>;
|
|
28
78
|
/**
|
|
29
79
|
* Composable for safely managing Google Maps resource lifecycle.
|
|
30
80
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { whenever } from "@vueuse/core";
|
|
2
|
-
import { inject, onUnmounted, ref, shallowRef } from "vue";
|
|
2
|
+
import { effectScope, inject, onUnmounted, ref, shallowRef, watch } from "vue";
|
|
3
3
|
export const MAP_INJECTION_KEY = Symbol("map");
|
|
4
4
|
export const MARKER_INJECTION_KEY = Symbol("marker");
|
|
5
5
|
export function bindGoogleMapsEvents(instance, emit, config) {
|
|
@@ -10,6 +10,81 @@ export function bindGoogleMapsEvents(instance, emit, config) {
|
|
|
10
10
|
instance.addListener(event, (payload) => emit(event, payload));
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
|
+
export function normalizeLatLng(p) {
|
|
14
|
+
if (typeof p.lat === "function") {
|
|
15
|
+
const ll = p;
|
|
16
|
+
return { lat: ll.lat(), lng: ll.lng() };
|
|
17
|
+
}
|
|
18
|
+
return { lat: p.lat, lng: p.lng };
|
|
19
|
+
}
|
|
20
|
+
export function defineDeprecatedAlias(target, alias, canonicalKey, message) {
|
|
21
|
+
let warned = false;
|
|
22
|
+
Object.defineProperty(target, alias, {
|
|
23
|
+
get() {
|
|
24
|
+
if (!warned) {
|
|
25
|
+
warned = true;
|
|
26
|
+
console.warn(message);
|
|
27
|
+
}
|
|
28
|
+
return target[canonicalKey];
|
|
29
|
+
},
|
|
30
|
+
enumerable: true,
|
|
31
|
+
configurable: true
|
|
32
|
+
});
|
|
33
|
+
return target;
|
|
34
|
+
}
|
|
35
|
+
export function warnDeprecatedTopLevelMapProps(props) {
|
|
36
|
+
let warned = 0;
|
|
37
|
+
if (props.center !== void 0) {
|
|
38
|
+
warned++;
|
|
39
|
+
console.warn(
|
|
40
|
+
'[nuxt-scripts] <ScriptGoogleMaps> prop "center" is deprecated; use `:map-options="{ center: ... }"` instead. See https://scripts.nuxt.com/docs/migration-guide/v0-to-v1'
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
if (props.zoom !== void 0) {
|
|
44
|
+
warned++;
|
|
45
|
+
console.warn(
|
|
46
|
+
'[nuxt-scripts] <ScriptGoogleMaps> prop "zoom" is deprecated; use `:map-options="{ zoom: ... }"` instead. See https://scripts.nuxt.com/docs/migration-guide/v0-to-v1'
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
return warned;
|
|
50
|
+
}
|
|
51
|
+
export async function waitForMapsReady({
|
|
52
|
+
mapsApi,
|
|
53
|
+
map,
|
|
54
|
+
status,
|
|
55
|
+
load
|
|
56
|
+
}) {
|
|
57
|
+
if (mapsApi.value && map.value)
|
|
58
|
+
return;
|
|
59
|
+
if (status.value === "error")
|
|
60
|
+
throw new Error("Google Maps script failed to load");
|
|
61
|
+
await load();
|
|
62
|
+
if (mapsApi.value && map.value)
|
|
63
|
+
return;
|
|
64
|
+
if (status.value === "error")
|
|
65
|
+
throw new Error("Google Maps script failed to load");
|
|
66
|
+
const scope = effectScope(true);
|
|
67
|
+
try {
|
|
68
|
+
await new Promise((resolve, reject) => {
|
|
69
|
+
scope.run(() => {
|
|
70
|
+
watch(
|
|
71
|
+
[mapsApi, map, status],
|
|
72
|
+
([api, m, s]) => {
|
|
73
|
+
if (api && m) {
|
|
74
|
+
resolve();
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
if (s === "error")
|
|
78
|
+
reject(new Error("Google Maps script failed to load"));
|
|
79
|
+
},
|
|
80
|
+
{ immediate: true }
|
|
81
|
+
);
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
} finally {
|
|
85
|
+
scope.stop();
|
|
86
|
+
}
|
|
87
|
+
}
|
|
13
88
|
export function useGoogleMapsResource({
|
|
14
89
|
ready,
|
|
15
90
|
create,
|