@nuxt/scripts 0.13.2 → 1.0.0-beta.12

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 (150) hide show
  1. package/README.md +15 -0
  2. package/dist/client/200.html +1 -1
  3. package/dist/client/404.html +1 -1
  4. package/dist/client/_nuxt/48AF9EJD.js +1 -0
  5. package/dist/client/_nuxt/Bk6ed9rg.js +1 -0
  6. package/dist/client/_nuxt/C4Cj8gBr.js +162 -0
  7. package/dist/client/_nuxt/{Bje-0OHL.js → DP0kj6Xn.js} +1 -1
  8. package/dist/client/_nuxt/builds/latest.json +1 -1
  9. package/dist/client/_nuxt/builds/meta/919b81d8-ed3a-4222-8a40-df0031cc3b99.json +1 -0
  10. package/dist/client/_nuxt/entry.D45OuV0w.css +1 -0
  11. package/dist/client/_nuxt/error-404.B57D-jUQ.css +1 -0
  12. package/dist/client/_nuxt/error-500.DTHUW7BI.css +1 -0
  13. package/dist/client/index.html +1 -1
  14. package/dist/module.d.mts +113 -4
  15. package/dist/module.d.ts +176 -0
  16. package/dist/module.json +1 -1
  17. package/dist/module.mjs +780 -299
  18. package/dist/registry.d.ts +6 -0
  19. package/dist/registry.mjs +94 -18
  20. package/dist/runtime/components/GoogleMaps/ScriptGoogleMaps.d.vue.ts +30 -2
  21. package/dist/runtime/components/GoogleMaps/ScriptGoogleMaps.vue +40 -15
  22. package/dist/runtime/components/GoogleMaps/ScriptGoogleMaps.vue.d.ts +30 -2
  23. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsAdvancedMarkerElement.vue +6 -6
  24. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsCircle.vue +7 -7
  25. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsHeatmapLayer.vue +6 -6
  26. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsInfoWindow.vue +12 -12
  27. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarker.vue +6 -6
  28. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarkerClusterer.d.vue.ts +21 -9
  29. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarkerClusterer.vue +8 -8
  30. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarkerClusterer.vue.d.ts +21 -9
  31. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPinElement.vue +11 -5
  32. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPolygon.vue +7 -7
  33. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPolyline.vue +7 -7
  34. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsRectangle.vue +7 -7
  35. package/dist/runtime/components/ScriptCrisp.d.vue.ts +1 -1
  36. package/dist/runtime/components/ScriptCrisp.vue +1 -1
  37. package/dist/runtime/components/ScriptCrisp.vue.d.ts +1 -1
  38. package/dist/runtime/components/ScriptGoogleAdsense.vue +1 -1
  39. package/dist/runtime/components/ScriptInstagramEmbed.d.vue.ts +53 -0
  40. package/dist/runtime/components/ScriptInstagramEmbed.vue +38 -0
  41. package/dist/runtime/components/ScriptInstagramEmbed.vue.d.ts +53 -0
  42. package/dist/runtime/components/ScriptIntercom.d.vue.ts +1 -1
  43. package/dist/runtime/components/ScriptIntercom.vue +4 -3
  44. package/dist/runtime/components/ScriptIntercom.vue.d.ts +1 -1
  45. package/dist/runtime/components/ScriptPayPalButtons.d.vue.ts +2 -2
  46. package/dist/runtime/components/ScriptPayPalButtons.vue +13 -11
  47. package/dist/runtime/components/ScriptPayPalButtons.vue.d.ts +2 -2
  48. package/dist/runtime/components/ScriptPayPalMarks.d.vue.ts +2 -2
  49. package/dist/runtime/components/ScriptPayPalMarks.vue +10 -8
  50. package/dist/runtime/components/ScriptPayPalMarks.vue.d.ts +2 -2
  51. package/dist/runtime/components/ScriptPayPalMessages.d.vue.ts +2 -2
  52. package/dist/runtime/components/ScriptPayPalMessages.vue +11 -9
  53. package/dist/runtime/components/ScriptPayPalMessages.vue.d.ts +2 -2
  54. package/dist/runtime/components/ScriptStripePricingTable.vue +2 -2
  55. package/dist/runtime/components/ScriptVimeoPlayer.d.vue.ts +2 -2
  56. package/dist/runtime/components/ScriptVimeoPlayer.vue +1 -1
  57. package/dist/runtime/components/ScriptVimeoPlayer.vue.d.ts +2 -2
  58. package/dist/runtime/components/ScriptXEmbed.d.vue.ts +82 -0
  59. package/dist/runtime/components/ScriptXEmbed.vue +76 -0
  60. package/dist/runtime/components/ScriptXEmbed.vue.d.ts +82 -0
  61. package/dist/runtime/components/ScriptYouTubePlayer.d.vue.ts +12 -1
  62. package/dist/runtime/components/ScriptYouTubePlayer.vue +44 -16
  63. package/dist/runtime/components/ScriptYouTubePlayer.vue.d.ts +12 -1
  64. package/dist/runtime/composables/useScript.js +36 -5
  65. package/dist/runtime/composables/useScriptEventPage.js +2 -2
  66. package/dist/runtime/composables/useScriptTriggerConsent.js +1 -1
  67. package/dist/runtime/composables/useScriptTriggerElement.js +1 -1
  68. package/dist/runtime/composables/useScriptTriggerIdleTimeout.js +1 -1
  69. package/dist/runtime/composables/useScriptTriggerServiceWorker.d.ts +7 -0
  70. package/dist/runtime/composables/useScriptTriggerServiceWorker.js +39 -0
  71. package/dist/runtime/npm-script-stub.d.ts +20 -0
  72. package/dist/runtime/npm-script-stub.js +73 -0
  73. package/dist/runtime/registry/clarity.js +21 -25
  74. package/dist/runtime/registry/cloudflare-web-analytics.js +1 -1
  75. package/dist/runtime/registry/crisp.js +1 -1
  76. package/dist/runtime/registry/databuddy-analytics.js +1 -1
  77. package/dist/runtime/registry/fathom-analytics.js +1 -1
  78. package/dist/runtime/registry/google-adsense.js +1 -1
  79. package/dist/runtime/registry/google-analytics.js +2 -2
  80. package/dist/runtime/registry/google-maps.d.ts +1 -1
  81. package/dist/runtime/registry/google-maps.js +1 -1
  82. package/dist/runtime/registry/google-recaptcha.d.ts +27 -0
  83. package/dist/runtime/registry/google-recaptcha.js +45 -0
  84. package/dist/runtime/registry/google-sign-in.d.ts +84 -0
  85. package/dist/runtime/registry/google-sign-in.js +50 -0
  86. package/dist/runtime/registry/google-tag-manager.d.ts +4 -2
  87. package/dist/runtime/registry/google-tag-manager.js +16 -6
  88. package/dist/runtime/registry/hotjar.js +1 -1
  89. package/dist/runtime/registry/instagram-embed.d.ts +23 -0
  90. package/dist/runtime/registry/instagram-embed.js +22 -0
  91. package/dist/runtime/registry/intercom.js +1 -1
  92. package/dist/runtime/registry/lemon-squeezy.d.ts +0 -1
  93. package/dist/runtime/registry/matomo-analytics.js +3 -3
  94. package/dist/runtime/registry/meta-pixel.js +1 -1
  95. package/dist/runtime/registry/npm.js +1 -1
  96. package/dist/runtime/registry/paypal.d.ts +1 -1
  97. package/dist/runtime/registry/paypal.js +2 -2
  98. package/dist/runtime/registry/plausible-analytics.js +21 -13
  99. package/dist/runtime/registry/posthog.d.ts +27 -0
  100. package/dist/runtime/registry/posthog.js +88 -0
  101. package/dist/runtime/registry/reddit-pixel.js +1 -1
  102. package/dist/runtime/registry/rybbit-analytics.js +41 -9
  103. package/dist/runtime/registry/segment.js +1 -1
  104. package/dist/runtime/registry/snapchat-pixel.js +1 -1
  105. package/dist/runtime/registry/stripe.d.ts +1 -1
  106. package/dist/runtime/registry/stripe.js +1 -1
  107. package/dist/runtime/registry/tiktok-pixel.d.ts +44 -0
  108. package/dist/runtime/registry/tiktok-pixel.js +44 -0
  109. package/dist/runtime/registry/umami-analytics.js +1 -1
  110. package/dist/runtime/registry/vimeo-player.d.ts +2 -2
  111. package/dist/runtime/registry/vimeo-player.js +1 -1
  112. package/dist/runtime/registry/x-embed.d.ts +77 -0
  113. package/dist/runtime/registry/x-embed.js +41 -0
  114. package/dist/runtime/registry/x-pixel.js +1 -1
  115. package/dist/runtime/registry/youtube-player.d.ts +7 -7
  116. package/dist/runtime/registry/youtube-player.js +1 -1
  117. package/dist/runtime/server/google-static-maps-proxy.d.ts +2 -0
  118. package/dist/runtime/server/google-static-maps-proxy.js +54 -0
  119. package/dist/runtime/server/instagram-embed-asset.d.ts +2 -0
  120. package/dist/runtime/server/instagram-embed-asset.js +42 -0
  121. package/dist/runtime/server/instagram-embed-image.d.ts +2 -0
  122. package/dist/runtime/server/instagram-embed-image.js +54 -0
  123. package/dist/runtime/server/instagram-embed.d.ts +2 -0
  124. package/dist/runtime/server/instagram-embed.js +91 -0
  125. package/dist/runtime/server/proxy-handler.d.ts +6 -0
  126. package/dist/runtime/server/proxy-handler.js +264 -0
  127. package/dist/runtime/server/utils/privacy.d.ts +141 -0
  128. package/dist/runtime/server/utils/privacy.js +324 -0
  129. package/dist/runtime/server/x-embed-image.d.ts +2 -0
  130. package/dist/runtime/server/x-embed-image.js +53 -0
  131. package/dist/runtime/server/x-embed.d.ts +49 -0
  132. package/dist/runtime/server/x-embed.js +31 -0
  133. package/dist/runtime/types.d.ts +61 -20
  134. package/dist/runtime/utils/pure.d.ts +9 -0
  135. package/dist/runtime/utils/pure.js +0 -0
  136. package/dist/runtime/utils.d.ts +5 -4
  137. package/dist/runtime/utils.js +12 -2
  138. package/dist/shared/scripts.DLRgvHQg.mjs +288 -0
  139. package/dist/stats.d.mts +39 -0
  140. package/dist/stats.d.ts +39 -0
  141. package/dist/stats.mjs +711 -0
  142. package/dist/types.d.mts +1 -1
  143. package/package.json +59 -46
  144. package/dist/client/_nuxt/DMut0W-e.js +0 -162
  145. package/dist/client/_nuxt/builds/meta/5e0206fe-a683-423c-8d59-2596d0b16fee.json +0 -1
  146. package/dist/client/_nuxt/entry.BjfcJo5q.css +0 -1
  147. package/dist/client/_nuxt/error-404.B0ZhSNwd.css +0 -1
  148. package/dist/client/_nuxt/error-500.D4MdgPaC.css +0 -1
  149. package/dist/client/_nuxt/iNmKC7TZ.js +0 -1
  150. package/dist/client/_nuxt/rttsH3SL.js +0 -1
@@ -1,10 +1,6 @@
1
- <template>
2
- <slot v-if="advancedMarkerElement" />
3
- </template>
4
-
5
1
  <script>
6
- import { inject, onUnmounted, provide, shallowRef } from "vue";
7
2
  import { whenever } from "@vueuse/core";
3
+ import { inject, onUnmounted, provide, shallowRef } from "vue";
8
4
  import { MAP_INJECTION_KEY } from "./ScriptGoogleMaps.vue";
9
5
  import { MARKER_CLUSTERER_INJECTION_KEY } from "./ScriptGoogleMapsMarkerClusterer.vue";
10
6
  export const ADVANCED_MARKER_ELEMENT_INJECTION_KEY = /* @__PURE__ */ Symbol("marker");
@@ -14,6 +10,7 @@ export const ADVANCED_MARKER_ELEMENT_INJECTION_KEY = /* @__PURE__ */ Symbol("mar
14
10
  const props = defineProps({
15
11
  options: { type: Object, required: false }
16
12
  });
13
+ const emit = defineEmits([]);
17
14
  const eventsWithoutPayload = [
18
15
  "animation_changed",
19
16
  "clickable_changed",
@@ -39,7 +36,6 @@ const eventsWithMapMouseEventPayload = [
39
36
  "mouseover",
40
37
  "mouseup"
41
38
  ];
42
- const emit = defineEmits([]);
43
39
  const mapContext = inject(MAP_INJECTION_KEY, void 0);
44
40
  const markerClustererContext = inject(MARKER_CLUSTERER_INJECTION_KEY, void 0);
45
41
  const advancedMarkerElement = shallowRef(void 0);
@@ -84,3 +80,7 @@ function setupAdvancedMarkerElementEventListeners(advancedMarkerElement2) {
84
80
  });
85
81
  }
86
82
  </script>
83
+
84
+ <template>
85
+ <slot v-if="advancedMarkerElement" />
86
+ </template>
@@ -1,14 +1,11 @@
1
- <template>
2
-
3
- </template>
4
-
5
1
  <script setup>
6
- import { inject, onUnmounted } from "vue";
7
2
  import { whenever } from "@vueuse/core";
3
+ import { inject, onUnmounted } from "vue";
8
4
  import { MAP_INJECTION_KEY } from "./ScriptGoogleMaps.vue";
9
5
  const props = defineProps({
10
6
  options: { type: Object, required: false }
11
7
  });
8
+ const emit = defineEmits([]);
12
9
  const eventsWithoutPayload = [
13
10
  "center_changed",
14
11
  "radius_changed"
@@ -26,9 +23,8 @@ const eventsWithMapMouseEventPayload = [
26
23
  "mouseup",
27
24
  "rightclick"
28
25
  ];
29
- const emit = defineEmits([]);
30
26
  const mapContext = inject(MAP_INJECTION_KEY, void 0);
31
- let circle = void 0;
27
+ let circle;
32
28
  whenever(() => mapContext?.map.value && mapContext.mapsApi.value, () => {
33
29
  circle = new mapContext.mapsApi.value.Circle({
34
30
  map: mapContext.map.value,
@@ -60,3 +56,7 @@ function setupCircleEventListeners(circle2) {
60
56
  });
61
57
  }
62
58
  </script>
59
+
60
+ <template>
61
+
62
+ </template>
@@ -1,16 +1,12 @@
1
- <template>
2
-
3
- </template>
4
-
5
1
  <script setup>
6
- import { inject, onUnmounted } from "vue";
7
2
  import { whenever } from "@vueuse/core";
3
+ import { inject, onUnmounted } from "vue";
8
4
  import { MAP_INJECTION_KEY } from "./ScriptGoogleMaps.vue";
9
5
  const props = defineProps({
10
6
  options: { type: Object, required: false }
11
7
  });
12
8
  const mapContext = inject(MAP_INJECTION_KEY, void 0);
13
- let heatmapLayer = void 0;
9
+ let heatmapLayer;
14
10
  whenever(() => mapContext?.map.value && mapContext.mapsApi.value, async () => {
15
11
  await mapContext.mapsApi.value.importLibrary("visualization");
16
12
  heatmapLayer = new mapContext.mapsApi.value.visualization.HeatmapLayer({
@@ -30,3 +26,7 @@ onUnmounted(() => {
30
26
  heatmapLayer?.setMap(null);
31
27
  });
32
28
  </script>
29
+
30
+ <template>
31
+
32
+ </template>
@@ -1,20 +1,13 @@
1
- <template>
2
- <div class="info-window-container">
3
- <div ref="info-window-container">
4
- <slot />
5
- </div>
6
- </div>
7
- </template>
8
-
9
1
  <script setup>
10
- import { inject, onUnmounted, useTemplateRef } from "vue";
11
2
  import { whenever } from "@vueuse/core";
12
- import { MARKER_INJECTION_KEY } from "./ScriptGoogleMapsMarker.vue";
3
+ import { inject, onUnmounted, useTemplateRef } from "vue";
13
4
  import { MAP_INJECTION_KEY } from "./ScriptGoogleMaps.vue";
14
5
  import { ADVANCED_MARKER_ELEMENT_INJECTION_KEY } from "./ScriptGoogleMapsAdvancedMarkerElement.vue";
6
+ import { MARKER_INJECTION_KEY } from "./ScriptGoogleMapsMarker.vue";
15
7
  const props = defineProps({
16
8
  options: { type: null, required: false }
17
9
  });
10
+ const emit = defineEmits([]);
18
11
  const infoWindowEvents = [
19
12
  "close",
20
13
  "closeclick",
@@ -26,12 +19,11 @@ const infoWindowEvents = [
26
19
  "visible",
27
20
  "zindex_changed"
28
21
  ];
29
- const emit = defineEmits([]);
30
22
  const mapContext = inject(MAP_INJECTION_KEY, void 0);
31
23
  const markerContext = inject(MARKER_INJECTION_KEY, void 0);
32
24
  const advancedMarkerElementContext = inject(ADVANCED_MARKER_ELEMENT_INJECTION_KEY, void 0);
33
25
  const infoWindowContainer = useTemplateRef("info-window-container");
34
- let infoWindow = void 0;
26
+ let infoWindow;
35
27
  whenever(
36
28
  () => mapContext?.map.value && mapContext.mapsApi.value && infoWindowContainer.value,
37
29
  () => {
@@ -83,6 +75,14 @@ function setupInfoWindowEventListeners(infoWindow2) {
83
75
  }
84
76
  </script>
85
77
 
78
+ <template>
79
+ <div class="info-window-container">
80
+ <div ref="info-window-container">
81
+ <slot />
82
+ </div>
83
+ </div>
84
+ </template>
85
+
86
86
  <style scoped>
87
87
  .info-window-container{display:none}
88
88
  </style>
@@ -1,10 +1,6 @@
1
- <template>
2
- <slot v-if="marker" />
3
- </template>
4
-
5
1
  <script>
6
- import { inject, onUnmounted, provide, shallowRef } from "vue";
7
2
  import { whenever } from "@vueuse/core";
3
+ import { inject, onUnmounted, provide, shallowRef } from "vue";
8
4
  import { MAP_INJECTION_KEY } from "./ScriptGoogleMaps.vue";
9
5
  import { MARKER_CLUSTERER_INJECTION_KEY } from "./ScriptGoogleMapsMarkerClusterer.vue";
10
6
  export const MARKER_INJECTION_KEY = /* @__PURE__ */ Symbol("marker");
@@ -14,6 +10,7 @@ export const MARKER_INJECTION_KEY = /* @__PURE__ */ Symbol("marker");
14
10
  const props = defineProps({
15
11
  options: { type: Object, required: false }
16
12
  });
13
+ const emit = defineEmits([]);
17
14
  const eventsWithoutPayload = [
18
15
  "animation_changed",
19
16
  "clickable_changed",
@@ -39,7 +36,6 @@ const eventsWithMapMouseEventPayload = [
39
36
  "mouseover",
40
37
  "mouseup"
41
38
  ];
42
- const emit = defineEmits([]);
43
39
  const mapContext = inject(MAP_INJECTION_KEY, void 0);
44
40
  const markerClustererContext = inject(MARKER_CLUSTERER_INJECTION_KEY, void 0);
45
41
  const marker = shallowRef(void 0);
@@ -83,3 +79,7 @@ function setupMarkerEventListeners(marker2) {
83
79
  });
84
80
  }
85
81
  </script>
82
+
83
+ <template>
84
+ <slot v-if="marker" />
85
+ </template>
@@ -1,7 +1,19 @@
1
- import type { MarkerClusterer, MarkerClustererOptions } from '@googlemaps/markerclusterer';
2
- import { type InjectionKey, type ShallowRef } from 'vue';
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
+ }
3
15
  export declare const MARKER_CLUSTERER_INJECTION_KEY: InjectionKey<{
4
- markerClusterer: ShallowRef<MarkerClusterer | undefined>;
16
+ markerClusterer: ShallowRef<MarkerClustererInstance | undefined>;
5
17
  requestRerender: () => void;
6
18
  }>;
7
19
  declare const _default: typeof __VLS_export;
@@ -9,15 +21,15 @@ export default _default;
9
21
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
10
22
  options?: Omit<MarkerClustererOptions, "map">;
11
23
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
12
- click: (payload: MarkerClusterer) => any;
13
- clusteringbegin: (payload: MarkerClusterer) => any;
14
- clusteringend: (payload: MarkerClusterer) => any;
24
+ click: (payload: MarkerClustererInstance) => any;
25
+ clusteringbegin: (payload: MarkerClustererInstance) => any;
26
+ clusteringend: (payload: MarkerClustererInstance) => any;
15
27
  }, string, import("vue").PublicProps, Readonly<{
16
28
  options?: Omit<MarkerClustererOptions, "map">;
17
29
  }> & Readonly<{
18
- onClick?: ((payload: MarkerClusterer) => any) | undefined;
19
- onClusteringbegin?: ((payload: MarkerClusterer) => any) | undefined;
20
- onClusteringend?: ((payload: MarkerClusterer) => any) | undefined;
30
+ onClick?: ((payload: MarkerClustererInstance) => any) | undefined;
31
+ onClusteringbegin?: ((payload: MarkerClustererInstance) => any) | undefined;
32
+ onClusteringend?: ((payload: MarkerClustererInstance) => any) | undefined;
21
33
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
22
34
  default?: (props: {}) => any;
23
35
  }>;
@@ -1,10 +1,6 @@
1
- <template>
2
- <slot v-if="markerClusterer" />
3
- </template>
4
-
5
1
  <script>
6
- import { inject, onUnmounted, provide, shallowRef } from "vue";
7
2
  import { whenever } from "@vueuse/core";
3
+ import { inject, onUnmounted, provide, shallowRef } from "vue";
8
4
  import { MAP_INJECTION_KEY } from "./ScriptGoogleMaps.vue";
9
5
  export const MARKER_CLUSTERER_INJECTION_KEY = /* @__PURE__ */ Symbol("marker-clusterer");
10
6
  </script>
@@ -13,12 +9,12 @@ export const MARKER_CLUSTERER_INJECTION_KEY = /* @__PURE__ */ Symbol("marker-clu
13
9
  const props = defineProps({
14
10
  options: { type: Object, required: false }
15
11
  });
12
+ const emit = defineEmits([]);
16
13
  const markerClustererEvents = [
17
14
  "click",
18
15
  "clusteringbegin",
19
16
  "clusteringend"
20
17
  ];
21
- const emit = defineEmits([]);
22
18
  const mapContext = inject(MAP_INJECTION_KEY, void 0);
23
19
  const markerClusterer = shallowRef(void 0);
24
20
  whenever(() => mapContext?.map.value, async (map) => {
@@ -54,9 +50,13 @@ provide(
54
50
  requestRerender
55
51
  }
56
52
  );
57
- function setupMarkerClustererEventListeners(markerClusterer2) {
53
+ function setupMarkerClustererEventListeners(clusterer) {
58
54
  markerClustererEvents.forEach((event) => {
59
- markerClusterer2.addListener(event, () => emit(event, markerClusterer2));
55
+ clusterer.addListener(event, () => emit(event, clusterer));
60
56
  });
61
57
  }
62
58
  </script>
59
+
60
+ <template>
61
+ <slot v-if="markerClusterer" />
62
+ </template>
@@ -1,7 +1,19 @@
1
- import type { MarkerClusterer, MarkerClustererOptions } from '@googlemaps/markerclusterer';
2
- import { type InjectionKey, type ShallowRef } from 'vue';
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
+ }
3
15
  export declare const MARKER_CLUSTERER_INJECTION_KEY: InjectionKey<{
4
- markerClusterer: ShallowRef<MarkerClusterer | undefined>;
16
+ markerClusterer: ShallowRef<MarkerClustererInstance | undefined>;
5
17
  requestRerender: () => void;
6
18
  }>;
7
19
  declare const _default: typeof __VLS_export;
@@ -9,15 +21,15 @@ export default _default;
9
21
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
10
22
  options?: Omit<MarkerClustererOptions, "map">;
11
23
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
12
- click: (payload: MarkerClusterer) => any;
13
- clusteringbegin: (payload: MarkerClusterer) => any;
14
- clusteringend: (payload: MarkerClusterer) => any;
24
+ click: (payload: MarkerClustererInstance) => any;
25
+ clusteringbegin: (payload: MarkerClustererInstance) => any;
26
+ clusteringend: (payload: MarkerClustererInstance) => any;
15
27
  }, string, import("vue").PublicProps, Readonly<{
16
28
  options?: Omit<MarkerClustererOptions, "map">;
17
29
  }> & Readonly<{
18
- onClick?: ((payload: MarkerClusterer) => any) | undefined;
19
- onClusteringbegin?: ((payload: MarkerClusterer) => any) | undefined;
20
- onClusteringend?: ((payload: MarkerClusterer) => any) | undefined;
30
+ onClick?: ((payload: MarkerClustererInstance) => any) | undefined;
31
+ onClusteringbegin?: ((payload: MarkerClustererInstance) => any) | undefined;
32
+ onClusteringend?: ((payload: MarkerClustererInstance) => any) | undefined;
21
33
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
22
34
  default?: (props: {}) => any;
23
35
  }>;
@@ -1,10 +1,6 @@
1
- <template>
2
-
3
- </template>
4
-
5
1
  <script setup>
6
- import { inject, shallowRef } from "vue";
7
2
  import { whenever } from "@vueuse/core";
3
+ import { inject, onUnmounted, shallowRef } from "vue";
8
4
  import { MAP_INJECTION_KEY } from "./ScriptGoogleMaps.vue";
9
5
  import { ADVANCED_MARKER_ELEMENT_INJECTION_KEY } from "./ScriptGoogleMapsAdvancedMarkerElement.vue";
10
6
  const props = defineProps({
@@ -34,4 +30,14 @@ whenever(
34
30
  once: true
35
31
  }
36
32
  );
33
+ onUnmounted(() => {
34
+ if (advancedMarkerElementContext?.advancedMarkerElement.value && pinElement.value) {
35
+ advancedMarkerElementContext.advancedMarkerElement.value.content = null;
36
+ }
37
+ pinElement.value = void 0;
38
+ });
37
39
  </script>
40
+
41
+ <template>
42
+
43
+ </template>
@@ -1,14 +1,11 @@
1
- <template>
2
-
3
- </template>
4
-
5
1
  <script setup>
6
- import { inject, onUnmounted } from "vue";
7
2
  import { whenever } from "@vueuse/core";
3
+ import { inject, onUnmounted } from "vue";
8
4
  import { MAP_INJECTION_KEY } from "./ScriptGoogleMaps.vue";
9
5
  const props = defineProps({
10
6
  options: { type: Object, required: false }
11
7
  });
8
+ const emit = defineEmits([]);
12
9
  const eventsWithPolyMouseEventPayload = [
13
10
  "click",
14
11
  "contextmenu",
@@ -24,9 +21,8 @@ const eventsWithMapMouseEventPayload = [
24
21
  "dragend",
25
22
  "dragstart"
26
23
  ];
27
- const emit = defineEmits([]);
28
24
  const mapContext = inject(MAP_INJECTION_KEY, void 0);
29
- let polygon = void 0;
25
+ let polygon;
30
26
  whenever(() => mapContext?.map.value && mapContext.mapsApi.value, () => {
31
27
  polygon = new mapContext.mapsApi.value.Polygon({
32
28
  map: mapContext.map.value,
@@ -58,3 +54,7 @@ function setupPolygonEventListeners(polygon2) {
58
54
  });
59
55
  }
60
56
  </script>
57
+
58
+ <template>
59
+
60
+ </template>
@@ -1,14 +1,11 @@
1
- <template>
2
-
3
- </template>
4
-
5
1
  <script setup>
6
- import { inject, onUnmounted } from "vue";
7
2
  import { whenever } from "@vueuse/core";
3
+ import { inject, onUnmounted } from "vue";
8
4
  import { MAP_INJECTION_KEY } from "./ScriptGoogleMaps.vue";
9
5
  const props = defineProps({
10
6
  options: { type: Object, required: false }
11
7
  });
8
+ const emit = defineEmits([]);
12
9
  const eventsWithPolyMouseEventPayload = [
13
10
  "click",
14
11
  "contextmenu",
@@ -24,9 +21,8 @@ const eventsWithMapMouseEventPayload = [
24
21
  "dragend",
25
22
  "dragstart"
26
23
  ];
27
- const emit = defineEmits([]);
28
24
  const mapContext = inject(MAP_INJECTION_KEY, void 0);
29
- let polyline = void 0;
25
+ let polyline;
30
26
  whenever(() => mapContext?.map.value && mapContext.mapsApi.value, () => {
31
27
  polyline = new mapContext.mapsApi.value.Polyline({
32
28
  map: mapContext.map.value,
@@ -58,3 +54,7 @@ function setupPolylineEventListeners(polyline2) {
58
54
  });
59
55
  }
60
56
  </script>
57
+
58
+ <template>
59
+
60
+ </template>
@@ -1,14 +1,11 @@
1
- <template>
2
-
3
- </template>
4
-
5
1
  <script setup>
6
- import { inject, onUnmounted } from "vue";
7
2
  import { whenever } from "@vueuse/core";
3
+ import { inject, onUnmounted } from "vue";
8
4
  import { MAP_INJECTION_KEY } from "./ScriptGoogleMaps.vue";
9
5
  const props = defineProps({
10
6
  options: { type: Object, required: false }
11
7
  });
8
+ const emit = defineEmits([]);
12
9
  const eventsWithoutPayload = [
13
10
  "bounds_changed"
14
11
  ];
@@ -25,9 +22,8 @@ const eventsWithMapMouseEventPayload = [
25
22
  "mouseover",
26
23
  "mouseup"
27
24
  ];
28
- const emit = defineEmits([]);
29
25
  const mapContext = inject(MAP_INJECTION_KEY, void 0);
30
- let rectangle = void 0;
26
+ let rectangle;
31
27
  whenever(() => mapContext?.map.value && mapContext.mapsApi.value, () => {
32
28
  rectangle = new mapContext.mapsApi.value.Rectangle({
33
29
  map: mapContext.map.value,
@@ -59,3 +55,7 @@ function setupRectangleEventListeners(rectangle2) {
59
55
  });
60
56
  }
61
57
  </script>
58
+
59
+ <template>
60
+
61
+ </template>
@@ -13,7 +13,7 @@ type __VLS_Props = {
13
13
  cookieExpiry?: number;
14
14
  };
15
15
  declare var __VLS_1: {
16
- ready: any;
16
+ ready: boolean;
17
17
  }, __VLS_3: {}, __VLS_5: {}, __VLS_7: {};
18
18
  type __VLS_Slots = {} & {
19
19
  default?: (props: typeof __VLS_1) => any;
@@ -1,5 +1,5 @@
1
1
  <script setup>
2
- import { ref, onMounted, onBeforeUnmount, watch, computed } from "vue";
2
+ import { computed, onBeforeUnmount, onMounted, ref, watch } from "vue";
3
3
  import { useScriptTriggerElement } from "../composables/useScriptTriggerElement";
4
4
  import { useScriptCrisp } from "../registry/crisp";
5
5
  const props = defineProps({
@@ -13,7 +13,7 @@ type __VLS_Props = {
13
13
  cookieExpiry?: number;
14
14
  };
15
15
  declare var __VLS_1: {
16
- ready: any;
16
+ ready: boolean;
17
17
  }, __VLS_3: {}, __VLS_5: {}, __VLS_7: {};
18
18
  type __VLS_Slots = {} & {
19
19
  default?: (props: typeof __VLS_1) => any;
@@ -1,6 +1,6 @@
1
1
  <script setup>
2
- import { computed, onMounted, ref, watch } from "vue";
3
2
  import { callOnce } from "nuxt/app";
3
+ import { computed, onMounted, ref, watch } from "vue";
4
4
  import { useScriptTriggerElement } from "../composables/useScriptTriggerElement";
5
5
  import { useScriptGoogleAdsense } from "../registry/google-adsense";
6
6
  import { scriptRuntimeConfig } from "../utils";
@@ -0,0 +1,53 @@
1
+ import type { HTMLAttributes } from 'vue';
2
+ type __VLS_Props = {
3
+ /**
4
+ * The Instagram post URL to embed
5
+ * e.g., https://www.instagram.com/p/ABC123/
6
+ */
7
+ postUrl: string;
8
+ /**
9
+ * Whether to include captions in the embed
10
+ * @default true
11
+ */
12
+ captions?: boolean;
13
+ /**
14
+ * Custom API endpoint for fetching embed HTML
15
+ * @default '/api/_scripts/instagram-embed'
16
+ */
17
+ apiEndpoint?: string;
18
+ /**
19
+ * Root element attributes
20
+ */
21
+ rootAttrs?: HTMLAttributes;
22
+ };
23
+ declare var __VLS_1: {}, __VLS_3: {
24
+ error: import("nuxt/app").NuxtError<unknown> | undefined;
25
+ }, __VLS_5: {
26
+ html: string;
27
+ shortcode: string | undefined;
28
+ postUrl: string;
29
+ };
30
+ type __VLS_Slots = {} & {
31
+ loading?: (props: typeof __VLS_1) => any;
32
+ } & {
33
+ error?: (props: typeof __VLS_3) => any;
34
+ } & {
35
+ default?: (props: typeof __VLS_5) => any;
36
+ };
37
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
38
+ html: import("vue").Ref<string | undefined, string | undefined>;
39
+ status: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus, import("nuxt/app").AsyncDataRequestStatus>;
40
+ error: import("vue").Ref<import("nuxt/app").NuxtError<unknown> | undefined, import("nuxt/app").NuxtError<unknown> | undefined>;
41
+ shortcode: import("vue").ComputedRef<string | undefined>;
42
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
43
+ captions: boolean;
44
+ apiEndpoint: string;
45
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
46
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
47
+ declare const _default: typeof __VLS_export;
48
+ export default _default;
49
+ type __VLS_WithSlots<T, S> = T & {
50
+ new (): {
51
+ $slots: S;
52
+ };
53
+ };
@@ -0,0 +1,38 @@
1
+ <script setup>
2
+ import { useAsyncData } from "nuxt/app";
3
+ import { computed } from "vue";
4
+ import { extractInstagramShortcode } from "../registry/instagram-embed";
5
+ const props = defineProps({
6
+ postUrl: { type: String, required: true },
7
+ captions: { type: Boolean, required: false, default: true },
8
+ apiEndpoint: { type: String, required: false, default: "/api/_scripts/instagram-embed" },
9
+ rootAttrs: { type: Object, required: false }
10
+ });
11
+ const shortcode = computed(() => extractInstagramShortcode(props.postUrl));
12
+ const { data: html, status, error } = useAsyncData(
13
+ `instagram-embed-${props.postUrl}`,
14
+ () => $fetch(`${props.apiEndpoint}?url=${encodeURIComponent(props.postUrl)}&captions=${props.captions}`),
15
+ { watch: [() => props.postUrl, () => props.captions] }
16
+ );
17
+ defineExpose({
18
+ html,
19
+ status,
20
+ error,
21
+ shortcode
22
+ });
23
+ </script>
24
+
25
+ <template>
26
+ <div v-bind="rootAttrs">
27
+ <slot v-if="status === 'pending'" name="loading">
28
+ <div>Loading Instagram post...</div>
29
+ </slot>
30
+ <slot v-else-if="status === 'error'" name="error" :error="error">
31
+ <div>Failed to load Instagram post</div>
32
+ </slot>
33
+ <slot v-else-if="html" :html="html" :shortcode="shortcode" :post-url="postUrl">
34
+ <!-- eslint-disable-next-line vue/no-v-html -->
35
+ <div v-html="html" />
36
+ </slot>
37
+ </div>
38
+ </template>
@@ -0,0 +1,53 @@
1
+ import type { HTMLAttributes } from 'vue';
2
+ type __VLS_Props = {
3
+ /**
4
+ * The Instagram post URL to embed
5
+ * e.g., https://www.instagram.com/p/ABC123/
6
+ */
7
+ postUrl: string;
8
+ /**
9
+ * Whether to include captions in the embed
10
+ * @default true
11
+ */
12
+ captions?: boolean;
13
+ /**
14
+ * Custom API endpoint for fetching embed HTML
15
+ * @default '/api/_scripts/instagram-embed'
16
+ */
17
+ apiEndpoint?: string;
18
+ /**
19
+ * Root element attributes
20
+ */
21
+ rootAttrs?: HTMLAttributes;
22
+ };
23
+ declare var __VLS_1: {}, __VLS_3: {
24
+ error: import("nuxt/app").NuxtError<unknown> | undefined;
25
+ }, __VLS_5: {
26
+ html: string;
27
+ shortcode: string | undefined;
28
+ postUrl: string;
29
+ };
30
+ type __VLS_Slots = {} & {
31
+ loading?: (props: typeof __VLS_1) => any;
32
+ } & {
33
+ error?: (props: typeof __VLS_3) => any;
34
+ } & {
35
+ default?: (props: typeof __VLS_5) => any;
36
+ };
37
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
38
+ html: import("vue").Ref<string | undefined, string | undefined>;
39
+ status: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus, import("nuxt/app").AsyncDataRequestStatus>;
40
+ error: import("vue").Ref<import("nuxt/app").NuxtError<unknown> | undefined, import("nuxt/app").NuxtError<unknown> | undefined>;
41
+ shortcode: import("vue").ComputedRef<string | undefined>;
42
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
43
+ captions: boolean;
44
+ apiEndpoint: string;
45
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
46
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
47
+ declare const _default: typeof __VLS_export;
48
+ export default _default;
49
+ type __VLS_WithSlots<T, S> = T & {
50
+ new (): {
51
+ $slots: S;
52
+ };
53
+ };
@@ -14,7 +14,7 @@ type __VLS_Props = {
14
14
  trigger?: ElementScriptTrigger;
15
15
  };
16
16
  declare var __VLS_1: {
17
- ready: any;
17
+ ready: boolean;
18
18
  }, __VLS_3: {}, __VLS_5: {}, __VLS_7: {};
19
19
  type __VLS_Slots = {} & {
20
20
  default?: (props: typeof __VLS_1) => any;
@@ -1,7 +1,7 @@
1
1
  <script setup>
2
- import { ref, onMounted, watch, onBeforeUnmount, computed } from "vue";
3
- import { useScriptIntercom } from "../registry/intercom";
2
+ import { computed, onBeforeUnmount, onMounted, ref, watch } from "vue";
4
3
  import { useScriptTriggerElement } from "../composables/useScriptTriggerElement";
4
+ import { useScriptIntercom } from "../registry/intercom";
5
5
  const props = defineProps({
6
6
  appId: { type: String, required: true },
7
7
  apiBase: { type: String, required: false },
@@ -52,8 +52,9 @@ onMounted(() => {
52
52
  }
53
53
  });
54
54
  observer.observe(document.body, { childList: true, subtree: true });
55
- } else if (status2 === "error")
55
+ } else if (status2 === "error") {
56
56
  emits("error");
57
+ }
57
58
  });
58
59
  });
59
60
  onBeforeUnmount(() => {