@nuxt/scripts 0.11.13 → 0.12.1

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.
Files changed (109) hide show
  1. package/dist/client/200.html +1 -1
  2. package/dist/client/404.html +1 -1
  3. package/dist/client/_nuxt/B1l158TM.js +179 -0
  4. package/dist/client/_nuxt/CEpyMuZa.js +1 -0
  5. package/dist/client/_nuxt/CVO1_9PV.js +1 -0
  6. package/dist/client/_nuxt/Cp-IABpG.js +1 -0
  7. package/dist/client/_nuxt/D0r3Knsf.js +1 -0
  8. package/dist/client/_nuxt/DlfHMoPT.js +1 -0
  9. package/dist/client/_nuxt/DyLGGY9L.js +1 -0
  10. package/dist/client/_nuxt/builds/latest.json +1 -1
  11. package/dist/client/_nuxt/builds/meta/ab2a05b7-9c93-484e-ae04-bd1f39e5f3c1.json +1 -0
  12. package/dist/client/_nuxt/entry.Bb8Z00UZ.css +1 -0
  13. package/dist/client/_nuxt/error-404.pWWosX5v.css +1 -0
  14. package/dist/client/_nuxt/error-500.DHpVpAn4.css +1 -0
  15. package/dist/client/_nuxt/n57rOy2v.js +1 -0
  16. package/dist/client/index.html +1 -1
  17. package/dist/module.d.mts +6 -0
  18. package/dist/module.json +1 -1
  19. package/dist/module.mjs +167 -42
  20. package/dist/registry.mjs +30 -0
  21. package/dist/runtime/components/GoogleMaps/ScriptGoogleMaps.d.vue.ts +0 -0
  22. package/dist/runtime/components/{ScriptGoogleMaps.vue → GoogleMaps/ScriptGoogleMaps.vue} +17 -13
  23. package/dist/runtime/components/GoogleMaps/ScriptGoogleMaps.vue.d.ts +0 -0
  24. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsAdvancedMarkerElement.d.vue.ts +61 -0
  25. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsAdvancedMarkerElement.vue +86 -0
  26. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsAdvancedMarkerElement.vue.d.ts +61 -0
  27. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsCircle.d.vue.ts +33 -0
  28. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsCircle.vue +62 -0
  29. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsCircle.vue.d.ts +33 -0
  30. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsHeatmapLayer.d.vue.ts +5 -0
  31. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsHeatmapLayer.vue +32 -0
  32. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsHeatmapLayer.vue.d.ts +5 -0
  33. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsInfoWindow.d.vue.ts +35 -0
  34. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsInfoWindow.vue +88 -0
  35. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsInfoWindow.vue.d.ts +35 -0
  36. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarker.d.vue.ts +61 -0
  37. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarker.vue +85 -0
  38. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarker.vue.d.ts +61 -0
  39. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarkerClusterer.d.vue.ts +27 -0
  40. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarkerClusterer.vue +62 -0
  41. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarkerClusterer.vue.d.ts +27 -0
  42. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPinElement.d.vue.ts +5 -0
  43. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPinElement.vue +37 -0
  44. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPinElement.vue.d.ts +5 -0
  45. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPolygon.d.vue.ts +29 -0
  46. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPolygon.vue +60 -0
  47. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPolygon.vue.d.ts +29 -0
  48. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPolyline.d.vue.ts +29 -0
  49. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPolyline.vue +60 -0
  50. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPolyline.vue.d.ts +29 -0
  51. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsRectangle.d.vue.ts +31 -0
  52. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsRectangle.vue +61 -0
  53. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsRectangle.vue.d.ts +31 -0
  54. package/dist/runtime/components/ScriptAriaLoadingIndicator.d.vue.ts +2 -0
  55. package/dist/runtime/components/ScriptCarbonAds.d.vue.ts +32 -0
  56. package/dist/runtime/components/ScriptCrisp.d.vue.ts +44 -0
  57. package/dist/runtime/components/ScriptGoogleAdsense.d.vue.ts +37 -0
  58. package/dist/runtime/components/ScriptIntercom.d.vue.ts +45 -0
  59. package/dist/runtime/components/ScriptLemonSqueezy.d.vue.ts +24 -0
  60. package/dist/runtime/components/ScriptLoadingIndicator.d.vue.ts +9 -0
  61. package/dist/runtime/components/ScriptLoadingIndicator.vue.d.ts +1 -1
  62. package/dist/runtime/components/ScriptPayPalButtons.d.vue.ts +72 -0
  63. package/dist/runtime/components/ScriptPayPalButtons.vue +116 -0
  64. package/dist/runtime/components/ScriptPayPalButtons.vue.d.ts +72 -0
  65. package/dist/runtime/components/ScriptPayPalMarks.d.vue.ts +51 -0
  66. package/dist/runtime/components/ScriptPayPalMarks.vue +69 -0
  67. package/dist/runtime/components/ScriptPayPalMarks.vue.d.ts +51 -0
  68. package/dist/runtime/components/ScriptPayPalMessages.d.vue.ts +67 -0
  69. package/dist/runtime/components/ScriptPayPalMessages.vue +90 -0
  70. package/dist/runtime/components/ScriptPayPalMessages.vue.d.ts +67 -0
  71. package/dist/runtime/components/ScriptStripePricingTable.d.vue.ts +35 -0
  72. package/dist/runtime/components/ScriptStripePricingTable.vue +1 -1
  73. package/dist/runtime/components/ScriptVimeoPlayer.d.vue.ts +127 -0
  74. package/dist/runtime/components/ScriptVimeoPlayer.vue.d.ts +2 -2
  75. package/dist/runtime/components/ScriptYouTubePlayer.d.vue.ts +66 -0
  76. package/dist/runtime/composables/useScript.js +35 -2
  77. package/dist/runtime/composables/useScriptEventPage.js +6 -2
  78. package/dist/runtime/composables/useScriptTriggerIdleTimeout.d.ts +10 -0
  79. package/dist/runtime/composables/useScriptTriggerIdleTimeout.js +22 -0
  80. package/dist/runtime/composables/useScriptTriggerInteraction.d.ts +15 -0
  81. package/dist/runtime/composables/useScriptTriggerInteraction.js +35 -0
  82. package/dist/runtime/logger.d.ts +1 -0
  83. package/dist/runtime/logger.js +6 -0
  84. package/dist/runtime/registry/databuddy-analytics.d.ts +77 -0
  85. package/dist/runtime/registry/databuddy-analytics.js +103 -0
  86. package/dist/runtime/registry/google-analytics.d.ts +1 -1
  87. package/dist/runtime/registry/google-analytics.js +5 -5
  88. package/dist/runtime/registry/google-tag-manager.js +3 -5
  89. package/dist/runtime/registry/matomo-analytics.d.ts +1 -0
  90. package/dist/runtime/registry/matomo-analytics.js +27 -4
  91. package/dist/runtime/registry/paypal.d.ts +34 -0
  92. package/dist/runtime/registry/paypal.js +86 -0
  93. package/dist/runtime/registry/reddit-pixel.d.ts +18 -0
  94. package/dist/runtime/registry/reddit-pixel.js +36 -0
  95. package/dist/runtime/registry/stripe.d.ts +2 -2
  96. package/dist/runtime/registry/stripe.js +1 -1
  97. package/dist/runtime/types.d.ts +18 -7
  98. package/dist/runtime/utils.d.ts +5 -2
  99. package/dist/runtime/utils.js +49 -19
  100. package/package.json +26 -19
  101. package/dist/client/_nuxt/1mHV-1pA.js +0 -1
  102. package/dist/client/_nuxt/7VVldQq3.js +0 -1
  103. package/dist/client/_nuxt/CQGAJOTU.js +0 -21
  104. package/dist/client/_nuxt/CYHtqd0e.js +0 -1
  105. package/dist/client/_nuxt/builds/meta/8ed6dba0-c6c1-426f-804b-f7cbe9d62b69.json +0 -1
  106. package/dist/client/_nuxt/entry.tbizjOMR.css +0 -1
  107. package/dist/client/_nuxt/error-404.CDmSTChJ.css +0 -1
  108. package/dist/client/_nuxt/error-500.DpcyFY5F.css +0 -1
  109. package/dist/runtime/components/ScriptGoogleMaps.vue.d.ts +0 -145
@@ -0,0 +1,61 @@
1
+ import type { InjectionKey, ShallowRef } from 'vue';
2
+ export declare const ADVANCED_MARKER_ELEMENT_INJECTION_KEY: InjectionKey<{
3
+ advancedMarkerElement: ShallowRef<google.maps.marker.AdvancedMarkerElement | undefined>;
4
+ }>;
5
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
6
+ options?: Omit<google.maps.marker.AdvancedMarkerElementOptions, "map">;
7
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
8
+ click: (payload: google.maps.MapMouseEvent) => any;
9
+ contextmenu: (payload: google.maps.MapMouseEvent) => any;
10
+ dblclick: (payload: google.maps.MapMouseEvent) => any;
11
+ drag: (payload: google.maps.MapMouseEvent) => any;
12
+ dragend: (payload: google.maps.MapMouseEvent) => any;
13
+ dragstart: (payload: google.maps.MapMouseEvent) => any;
14
+ mousedown: (payload: google.maps.MapMouseEvent) => any;
15
+ mouseout: (payload: google.maps.MapMouseEvent) => any;
16
+ mouseover: (payload: google.maps.MapMouseEvent) => any;
17
+ mouseup: (payload: google.maps.MapMouseEvent) => any;
18
+ animation_changed: () => any;
19
+ clickable_changed: () => any;
20
+ cursor_changed: () => any;
21
+ draggable_changed: () => any;
22
+ flat_changed: () => any;
23
+ icon_changed: () => any;
24
+ position_changed: () => any;
25
+ shape_changed: () => any;
26
+ title_changed: () => any;
27
+ visible_changed: () => any;
28
+ zindex_changed: () => any;
29
+ }, string, import("vue").PublicProps, Readonly<{
30
+ options?: Omit<google.maps.marker.AdvancedMarkerElementOptions, "map">;
31
+ }> & Readonly<{
32
+ onClick?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
33
+ onContextmenu?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
34
+ onDblclick?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
35
+ onDrag?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
36
+ onDragend?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
37
+ onDragstart?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
38
+ onMousedown?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
39
+ onMouseout?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
40
+ onMouseover?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
41
+ onMouseup?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
42
+ onAnimation_changed?: (() => any) | undefined;
43
+ onClickable_changed?: (() => any) | undefined;
44
+ onCursor_changed?: (() => any) | undefined;
45
+ onDraggable_changed?: (() => any) | undefined;
46
+ onFlat_changed?: (() => any) | undefined;
47
+ onIcon_changed?: (() => any) | undefined;
48
+ onPosition_changed?: (() => any) | undefined;
49
+ onShape_changed?: (() => any) | undefined;
50
+ onTitle_changed?: (() => any) | undefined;
51
+ onVisible_changed?: (() => any) | undefined;
52
+ onZindex_changed?: (() => any) | undefined;
53
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
54
+ default?: (props: {}) => any;
55
+ }>;
56
+ export default _default;
57
+ type __VLS_WithSlots<T, S> = T & {
58
+ new (): {
59
+ $slots: S;
60
+ };
61
+ };
@@ -0,0 +1,86 @@
1
+ <template>
2
+ <slot v-if="advancedMarkerElement" />
3
+ </template>
4
+
5
+ <script>
6
+ import { inject, onUnmounted, provide, shallowRef } from "vue";
7
+ import { whenever } from "@vueuse/core";
8
+ import { MAP_INJECTION_KEY } from "./ScriptGoogleMaps.vue";
9
+ import { MARKER_CLUSTERER_INJECTION_KEY } from "./ScriptGoogleMapsMarkerClusterer.vue";
10
+ export const ADVANCED_MARKER_ELEMENT_INJECTION_KEY = Symbol("marker");
11
+ </script>
12
+
13
+ <script setup>
14
+ const props = defineProps({
15
+ options: { type: Object, required: false }
16
+ });
17
+ const eventsWithoutPayload = [
18
+ "animation_changed",
19
+ "clickable_changed",
20
+ "cursor_changed",
21
+ "draggable_changed",
22
+ "flat_changed",
23
+ "icon_changed",
24
+ "position_changed",
25
+ "shape_changed",
26
+ "title_changed",
27
+ "visible_changed",
28
+ "zindex_changed"
29
+ ];
30
+ const eventsWithMapMouseEventPayload = [
31
+ "click",
32
+ "contextmenu",
33
+ "dblclick",
34
+ "drag",
35
+ "dragend",
36
+ "dragstart",
37
+ "mousedown",
38
+ "mouseout",
39
+ "mouseover",
40
+ "mouseup"
41
+ ];
42
+ const emit = defineEmits([]);
43
+ const mapContext = inject(MAP_INJECTION_KEY, void 0);
44
+ const markerClustererContext = inject(MARKER_CLUSTERER_INJECTION_KEY, void 0);
45
+ const advancedMarkerElement = shallowRef(void 0);
46
+ whenever(() => mapContext?.map.value && mapContext.mapsApi.value, async () => {
47
+ await mapContext.mapsApi.value.importLibrary("marker");
48
+ advancedMarkerElement.value = new mapContext.mapsApi.value.marker.AdvancedMarkerElement(props.options);
49
+ setupAdvancedMarkerElementEventListeners(advancedMarkerElement.value);
50
+ if (markerClustererContext?.markerClusterer.value) {
51
+ markerClustererContext.markerClusterer.value.addMarker(advancedMarkerElement.value);
52
+ } else {
53
+ advancedMarkerElement.value.map = mapContext.map.value;
54
+ }
55
+ whenever(() => props.options, (options) => {
56
+ if (advancedMarkerElement.value && options) {
57
+ Object.assign(advancedMarkerElement.value, options);
58
+ }
59
+ }, {
60
+ deep: true
61
+ });
62
+ }, {
63
+ immediate: true,
64
+ once: true
65
+ });
66
+ onUnmounted(() => {
67
+ if (!advancedMarkerElement.value || !mapContext?.mapsApi.value) {
68
+ return;
69
+ }
70
+ mapContext.mapsApi.value.event.clearInstanceListeners(advancedMarkerElement.value);
71
+ if (markerClustererContext) {
72
+ markerClustererContext.markerClusterer.value?.removeMarker(advancedMarkerElement.value);
73
+ } else {
74
+ advancedMarkerElement.value.map = null;
75
+ }
76
+ });
77
+ provide(ADVANCED_MARKER_ELEMENT_INJECTION_KEY, { advancedMarkerElement });
78
+ function setupAdvancedMarkerElementEventListeners(advancedMarkerElement2) {
79
+ eventsWithoutPayload.forEach((event) => {
80
+ advancedMarkerElement2.addListener(event, () => emit(event));
81
+ });
82
+ eventsWithMapMouseEventPayload.forEach((event) => {
83
+ advancedMarkerElement2.addListener(event, (payload) => emit(event, payload));
84
+ });
85
+ }
86
+ </script>
@@ -0,0 +1,61 @@
1
+ import type { InjectionKey, ShallowRef } from 'vue';
2
+ export declare const ADVANCED_MARKER_ELEMENT_INJECTION_KEY: InjectionKey<{
3
+ advancedMarkerElement: ShallowRef<google.maps.marker.AdvancedMarkerElement | undefined>;
4
+ }>;
5
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
6
+ options?: Omit<google.maps.marker.AdvancedMarkerElementOptions, "map">;
7
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
8
+ click: (payload: google.maps.MapMouseEvent) => any;
9
+ contextmenu: (payload: google.maps.MapMouseEvent) => any;
10
+ dblclick: (payload: google.maps.MapMouseEvent) => any;
11
+ drag: (payload: google.maps.MapMouseEvent) => any;
12
+ dragend: (payload: google.maps.MapMouseEvent) => any;
13
+ dragstart: (payload: google.maps.MapMouseEvent) => any;
14
+ mousedown: (payload: google.maps.MapMouseEvent) => any;
15
+ mouseout: (payload: google.maps.MapMouseEvent) => any;
16
+ mouseover: (payload: google.maps.MapMouseEvent) => any;
17
+ mouseup: (payload: google.maps.MapMouseEvent) => any;
18
+ animation_changed: () => any;
19
+ clickable_changed: () => any;
20
+ cursor_changed: () => any;
21
+ draggable_changed: () => any;
22
+ flat_changed: () => any;
23
+ icon_changed: () => any;
24
+ position_changed: () => any;
25
+ shape_changed: () => any;
26
+ title_changed: () => any;
27
+ visible_changed: () => any;
28
+ zindex_changed: () => any;
29
+ }, string, import("vue").PublicProps, Readonly<{
30
+ options?: Omit<google.maps.marker.AdvancedMarkerElementOptions, "map">;
31
+ }> & Readonly<{
32
+ onClick?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
33
+ onContextmenu?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
34
+ onDblclick?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
35
+ onDrag?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
36
+ onDragend?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
37
+ onDragstart?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
38
+ onMousedown?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
39
+ onMouseout?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
40
+ onMouseover?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
41
+ onMouseup?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
42
+ onAnimation_changed?: (() => any) | undefined;
43
+ onClickable_changed?: (() => any) | undefined;
44
+ onCursor_changed?: (() => any) | undefined;
45
+ onDraggable_changed?: (() => any) | undefined;
46
+ onFlat_changed?: (() => any) | undefined;
47
+ onIcon_changed?: (() => any) | undefined;
48
+ onPosition_changed?: (() => any) | undefined;
49
+ onShape_changed?: (() => any) | undefined;
50
+ onTitle_changed?: (() => any) | undefined;
51
+ onVisible_changed?: (() => any) | undefined;
52
+ onZindex_changed?: (() => any) | undefined;
53
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
54
+ default?: (props: {}) => any;
55
+ }>;
56
+ export default _default;
57
+ type __VLS_WithSlots<T, S> = T & {
58
+ new (): {
59
+ $slots: S;
60
+ };
61
+ };
@@ -0,0 +1,33 @@
1
+ type __VLS_Props = {
2
+ options?: Omit<google.maps.CircleOptions, 'map'>;
3
+ };
4
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
5
+ click: (payload: google.maps.MapMouseEvent) => any;
6
+ dblclick: (payload: google.maps.MapMouseEvent) => any;
7
+ drag: (payload: google.maps.MapMouseEvent) => any;
8
+ dragend: (payload: google.maps.MapMouseEvent) => any;
9
+ dragstart: (payload: google.maps.MapMouseEvent) => any;
10
+ mousedown: (payload: google.maps.MapMouseEvent) => any;
11
+ mousemove: (payload: google.maps.MapMouseEvent) => any;
12
+ mouseout: (payload: google.maps.MapMouseEvent) => any;
13
+ mouseover: (payload: google.maps.MapMouseEvent) => any;
14
+ mouseup: (payload: google.maps.MapMouseEvent) => any;
15
+ center_changed: () => any;
16
+ radius_changed: () => any;
17
+ rightclick: (payload: google.maps.MapMouseEvent) => any;
18
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
19
+ onClick?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
20
+ onDblclick?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
21
+ onDrag?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
22
+ onDragend?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
23
+ onDragstart?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
24
+ onMousedown?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
25
+ onMousemove?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
26
+ onMouseout?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
27
+ onMouseover?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
28
+ onMouseup?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
29
+ onCenter_changed?: (() => any) | undefined;
30
+ onRadius_changed?: (() => any) | undefined;
31
+ onRightclick?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
32
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
33
+ export default _default;
@@ -0,0 +1,62 @@
1
+ <template>
2
+
3
+ </template>
4
+
5
+ <script setup>
6
+ import { inject, onUnmounted } from "vue";
7
+ import { whenever } from "@vueuse/core";
8
+ import { MAP_INJECTION_KEY } from "./ScriptGoogleMaps.vue";
9
+ const props = defineProps({
10
+ options: { type: Object, required: false }
11
+ });
12
+ const eventsWithoutPayload = [
13
+ "center_changed",
14
+ "radius_changed"
15
+ ];
16
+ const eventsWithMapMouseEventPayload = [
17
+ "click",
18
+ "dblclick",
19
+ "drag",
20
+ "dragend",
21
+ "dragstart",
22
+ "mousedown",
23
+ "mousemove",
24
+ "mouseout",
25
+ "mouseover",
26
+ "mouseup",
27
+ "rightclick"
28
+ ];
29
+ const emit = defineEmits([]);
30
+ const mapContext = inject(MAP_INJECTION_KEY, void 0);
31
+ let circle = void 0;
32
+ whenever(() => mapContext?.map.value && mapContext.mapsApi.value, () => {
33
+ circle = new mapContext.mapsApi.value.Circle({
34
+ map: mapContext.map.value,
35
+ ...props.options
36
+ });
37
+ setupCircleEventListeners(circle);
38
+ whenever(() => props.options, (options) => {
39
+ circle?.setOptions(options);
40
+ }, {
41
+ deep: true
42
+ });
43
+ }, {
44
+ immediate: true,
45
+ once: true
46
+ });
47
+ onUnmounted(() => {
48
+ if (!circle || !mapContext?.mapsApi.value) {
49
+ return;
50
+ }
51
+ mapContext.mapsApi.value.event.clearInstanceListeners(circle);
52
+ circle.setMap(null);
53
+ });
54
+ function setupCircleEventListeners(circle2) {
55
+ eventsWithoutPayload.forEach((event) => {
56
+ circle2.addListener(event, () => emit(event));
57
+ });
58
+ eventsWithMapMouseEventPayload.forEach((event) => {
59
+ circle2.addListener(event, (payload) => emit(event, payload));
60
+ });
61
+ }
62
+ </script>
@@ -0,0 +1,33 @@
1
+ type __VLS_Props = {
2
+ options?: Omit<google.maps.CircleOptions, 'map'>;
3
+ };
4
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
5
+ click: (payload: google.maps.MapMouseEvent) => any;
6
+ dblclick: (payload: google.maps.MapMouseEvent) => any;
7
+ drag: (payload: google.maps.MapMouseEvent) => any;
8
+ dragend: (payload: google.maps.MapMouseEvent) => any;
9
+ dragstart: (payload: google.maps.MapMouseEvent) => any;
10
+ mousedown: (payload: google.maps.MapMouseEvent) => any;
11
+ mousemove: (payload: google.maps.MapMouseEvent) => any;
12
+ mouseout: (payload: google.maps.MapMouseEvent) => any;
13
+ mouseover: (payload: google.maps.MapMouseEvent) => any;
14
+ mouseup: (payload: google.maps.MapMouseEvent) => any;
15
+ center_changed: () => any;
16
+ radius_changed: () => any;
17
+ rightclick: (payload: google.maps.MapMouseEvent) => any;
18
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
19
+ onClick?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
20
+ onDblclick?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
21
+ onDrag?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
22
+ onDragend?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
23
+ onDragstart?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
24
+ onMousedown?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
25
+ onMousemove?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
26
+ onMouseout?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
27
+ onMouseover?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
28
+ onMouseup?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
29
+ onCenter_changed?: (() => any) | undefined;
30
+ onRadius_changed?: (() => any) | undefined;
31
+ onRightclick?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
32
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
33
+ export default _default;
@@ -0,0 +1,5 @@
1
+ type __VLS_Props = {
2
+ options?: Omit<google.maps.visualization.HeatmapLayerOptions, 'map'>;
3
+ };
4
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
+ export default _default;
@@ -0,0 +1,32 @@
1
+ <template>
2
+
3
+ </template>
4
+
5
+ <script setup>
6
+ import { inject, onUnmounted } from "vue";
7
+ import { whenever } from "@vueuse/core";
8
+ import { MAP_INJECTION_KEY } from "./ScriptGoogleMaps.vue";
9
+ const props = defineProps({
10
+ options: { type: Object, required: false }
11
+ });
12
+ const mapContext = inject(MAP_INJECTION_KEY, void 0);
13
+ let heatmapLayer = void 0;
14
+ whenever(() => mapContext?.map.value && mapContext.mapsApi.value, async () => {
15
+ await mapContext.mapsApi.value.importLibrary("visualization");
16
+ heatmapLayer = new mapContext.mapsApi.value.visualization.HeatmapLayer({
17
+ map: mapContext.map.value,
18
+ ...props.options
19
+ });
20
+ whenever(() => props.options, (options) => {
21
+ heatmapLayer?.setOptions(options);
22
+ }, {
23
+ deep: true
24
+ });
25
+ }, {
26
+ immediate: true,
27
+ once: true
28
+ });
29
+ onUnmounted(() => {
30
+ heatmapLayer?.setMap(null);
31
+ });
32
+ </script>
@@ -0,0 +1,5 @@
1
+ type __VLS_Props = {
2
+ options?: Omit<google.maps.visualization.HeatmapLayerOptions, 'map'>;
3
+ };
4
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
+ export default _default;
@@ -0,0 +1,35 @@
1
+ type __VLS_Props = {
2
+ options?: google.maps.InfoWindowOptions;
3
+ };
4
+ declare var __VLS_1: {};
5
+ type __VLS_Slots = {} & {
6
+ default?: (props: typeof __VLS_1) => any;
7
+ };
8
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
+ close: () => any;
10
+ visible: () => any;
11
+ position_changed: () => any;
12
+ zindex_changed: () => any;
13
+ closeclick: () => any;
14
+ content_changed: () => any;
15
+ domready: () => any;
16
+ headercontent_changed: () => any;
17
+ headerdisabled_changed: () => any;
18
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
19
+ onClose?: (() => any) | undefined;
20
+ onVisible?: (() => any) | undefined;
21
+ onPosition_changed?: (() => any) | undefined;
22
+ onZindex_changed?: (() => any) | undefined;
23
+ onCloseclick?: (() => any) | undefined;
24
+ onContent_changed?: (() => any) | undefined;
25
+ onDomready?: (() => any) | undefined;
26
+ onHeadercontent_changed?: (() => any) | undefined;
27
+ onHeaderdisabled_changed?: (() => any) | undefined;
28
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
29
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
30
+ export default _default;
31
+ type __VLS_WithSlots<T, S> = T & {
32
+ new (): {
33
+ $slots: S;
34
+ };
35
+ };
@@ -0,0 +1,88 @@
1
+ <template>
2
+ <div class="info-window-container">
3
+ <div ref="info-window-container">
4
+ <slot />
5
+ </div>
6
+ </div>
7
+ </template>
8
+
9
+ <script setup>
10
+ import { inject, onUnmounted, useTemplateRef } from "vue";
11
+ import { whenever } from "@vueuse/core";
12
+ import { MARKER_INJECTION_KEY } from "./ScriptGoogleMapsMarker.vue";
13
+ import { MAP_INJECTION_KEY } from "./ScriptGoogleMaps.vue";
14
+ import { ADVANCED_MARKER_ELEMENT_INJECTION_KEY } from "./ScriptGoogleMapsAdvancedMarkerElement.vue";
15
+ const props = defineProps({
16
+ options: { type: null, required: false }
17
+ });
18
+ const infoWindowEvents = [
19
+ "close",
20
+ "closeclick",
21
+ "content_changed",
22
+ "domready",
23
+ "headercontent_changed",
24
+ "headerdisabled_changed",
25
+ "position_changed",
26
+ "visible",
27
+ "zindex_changed"
28
+ ];
29
+ const emit = defineEmits([]);
30
+ const mapContext = inject(MAP_INJECTION_KEY, void 0);
31
+ const markerContext = inject(MARKER_INJECTION_KEY, void 0);
32
+ const advancedMarkerElementContext = inject(ADVANCED_MARKER_ELEMENT_INJECTION_KEY, void 0);
33
+ const infoWindowContainer = useTemplateRef("info-window-container");
34
+ let infoWindow = void 0;
35
+ whenever(
36
+ () => mapContext?.map.value && mapContext.mapsApi.value && infoWindowContainer.value,
37
+ () => {
38
+ infoWindow = new mapContext.mapsApi.value.InfoWindow({
39
+ content: infoWindowContainer.value,
40
+ ...props.options
41
+ });
42
+ setupInfoWindowEventListeners(infoWindow);
43
+ if (markerContext?.marker.value) {
44
+ markerContext.marker.value.addListener("click", () => {
45
+ infoWindow.open({
46
+ anchor: markerContext.marker.value,
47
+ map: mapContext.map.value
48
+ });
49
+ });
50
+ } else if (advancedMarkerElementContext?.advancedMarkerElement.value) {
51
+ advancedMarkerElementContext.advancedMarkerElement.value.addListener("click", () => {
52
+ infoWindow.open({
53
+ anchor: advancedMarkerElementContext.advancedMarkerElement.value,
54
+ map: mapContext.map.value
55
+ });
56
+ });
57
+ } else {
58
+ infoWindow.setPosition(props.options?.position);
59
+ infoWindow.open(mapContext.map.value);
60
+ }
61
+ whenever(() => props.options, (options) => {
62
+ infoWindow?.setOptions(options);
63
+ }, {
64
+ deep: true
65
+ });
66
+ },
67
+ {
68
+ immediate: true,
69
+ once: true
70
+ }
71
+ );
72
+ onUnmounted(() => {
73
+ if (!infoWindow || !mapContext?.mapsApi.value) {
74
+ return;
75
+ }
76
+ mapContext.mapsApi.value.event.clearInstanceListeners(infoWindow);
77
+ infoWindow.close();
78
+ });
79
+ function setupInfoWindowEventListeners(infoWindow2) {
80
+ infoWindowEvents.forEach((event) => {
81
+ infoWindow2.addListener(event, () => emit(event));
82
+ });
83
+ }
84
+ </script>
85
+
86
+ <style scoped>
87
+ .info-window-container{display:none}
88
+ </style>
@@ -0,0 +1,35 @@
1
+ type __VLS_Props = {
2
+ options?: google.maps.InfoWindowOptions;
3
+ };
4
+ declare var __VLS_1: {};
5
+ type __VLS_Slots = {} & {
6
+ default?: (props: typeof __VLS_1) => any;
7
+ };
8
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
+ close: () => any;
10
+ visible: () => any;
11
+ position_changed: () => any;
12
+ zindex_changed: () => any;
13
+ closeclick: () => any;
14
+ content_changed: () => any;
15
+ domready: () => any;
16
+ headercontent_changed: () => any;
17
+ headerdisabled_changed: () => any;
18
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
19
+ onClose?: (() => any) | undefined;
20
+ onVisible?: (() => any) | undefined;
21
+ onPosition_changed?: (() => any) | undefined;
22
+ onZindex_changed?: (() => any) | undefined;
23
+ onCloseclick?: (() => any) | undefined;
24
+ onContent_changed?: (() => any) | undefined;
25
+ onDomready?: (() => any) | undefined;
26
+ onHeadercontent_changed?: (() => any) | undefined;
27
+ onHeaderdisabled_changed?: (() => any) | undefined;
28
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
29
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
30
+ export default _default;
31
+ type __VLS_WithSlots<T, S> = T & {
32
+ new (): {
33
+ $slots: S;
34
+ };
35
+ };
@@ -0,0 +1,61 @@
1
+ import type { InjectionKey, ShallowRef } from 'vue';
2
+ export declare const MARKER_INJECTION_KEY: InjectionKey<{
3
+ marker: ShallowRef<google.maps.Marker | undefined>;
4
+ }>;
5
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
6
+ options?: Omit<google.maps.MarkerOptions, "map">;
7
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
8
+ click: (payload: google.maps.MapMouseEvent) => any;
9
+ contextmenu: (payload: google.maps.MapMouseEvent) => any;
10
+ dblclick: (payload: google.maps.MapMouseEvent) => any;
11
+ drag: (payload: google.maps.MapMouseEvent) => any;
12
+ dragend: (payload: google.maps.MapMouseEvent) => any;
13
+ dragstart: (payload: google.maps.MapMouseEvent) => any;
14
+ mousedown: (payload: google.maps.MapMouseEvent) => any;
15
+ mouseout: (payload: google.maps.MapMouseEvent) => any;
16
+ mouseover: (payload: google.maps.MapMouseEvent) => any;
17
+ mouseup: (payload: google.maps.MapMouseEvent) => any;
18
+ animation_changed: () => any;
19
+ clickable_changed: () => any;
20
+ cursor_changed: () => any;
21
+ draggable_changed: () => any;
22
+ flat_changed: () => any;
23
+ icon_changed: () => any;
24
+ position_changed: () => any;
25
+ shape_changed: () => any;
26
+ title_changed: () => any;
27
+ visible_changed: () => any;
28
+ zindex_changed: () => any;
29
+ }, string, import("vue").PublicProps, Readonly<{
30
+ options?: Omit<google.maps.MarkerOptions, "map">;
31
+ }> & Readonly<{
32
+ onClick?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
33
+ onContextmenu?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
34
+ onDblclick?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
35
+ onDrag?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
36
+ onDragend?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
37
+ onDragstart?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
38
+ onMousedown?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
39
+ onMouseout?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
40
+ onMouseover?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
41
+ onMouseup?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
42
+ onAnimation_changed?: (() => any) | undefined;
43
+ onClickable_changed?: (() => any) | undefined;
44
+ onCursor_changed?: (() => any) | undefined;
45
+ onDraggable_changed?: (() => any) | undefined;
46
+ onFlat_changed?: (() => any) | undefined;
47
+ onIcon_changed?: (() => any) | undefined;
48
+ onPosition_changed?: (() => any) | undefined;
49
+ onShape_changed?: (() => any) | undefined;
50
+ onTitle_changed?: (() => any) | undefined;
51
+ onVisible_changed?: (() => any) | undefined;
52
+ onZindex_changed?: (() => any) | undefined;
53
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
54
+ default?: (props: {}) => any;
55
+ }>;
56
+ export default _default;
57
+ type __VLS_WithSlots<T, S> = T & {
58
+ new (): {
59
+ $slots: S;
60
+ };
61
+ };