@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.
Files changed (164) hide show
  1. package/bin/cli.mjs +2 -0
  2. package/dist/cli.d.mts +2 -0
  3. package/dist/cli.d.ts +2 -0
  4. package/dist/cli.mjs +50 -0
  5. package/dist/devtools-client/200.html +1 -1
  6. package/dist/devtools-client/404.html +1 -1
  7. package/dist/devtools-client/_nuxt/{ajngqPCs.js → BgPDxVUn.js} +1 -1
  8. package/dist/devtools-client/_nuxt/{DKL6PHO3.js → BmlapxLP.js} +1 -1
  9. package/dist/devtools-client/_nuxt/CM2vefXI.js +188 -0
  10. package/dist/devtools-client/_nuxt/{CfOsp0mU.js → DAF5Qk9P.js} +1 -1
  11. package/dist/devtools-client/_nuxt/{B3kN3DAy.js → Dx6HhVmj.js} +1 -1
  12. package/dist/devtools-client/_nuxt/{dlaR8P-P.js → S8LiR9M1.js} +1 -1
  13. package/dist/devtools-client/_nuxt/builds/latest.json +1 -1
  14. package/dist/devtools-client/_nuxt/builds/meta/5458a3f2-af35-479c-8852-bf6f92fed611.json +1 -0
  15. package/dist/devtools-client/_nuxt/{entry.BwpOBArY.css → entry.BKkVrcJj.css} +1 -1
  16. package/dist/devtools-client/_nuxt/error-404.d44aGwWI.css +1 -0
  17. package/dist/devtools-client/_nuxt/error-500.NthMfIEt.css +1 -0
  18. package/dist/devtools-client/_nuxt/index.DZD1lwyI.css +1 -0
  19. package/dist/devtools-client/_nuxt/vBkR1GJq.js +1 -0
  20. package/dist/devtools-client/docs/index.html +1 -1
  21. package/dist/devtools-client/first-party/index.html +1 -1
  22. package/dist/devtools-client/index.html +1 -1
  23. package/dist/devtools-client/registry/index.html +1 -1
  24. package/dist/module.d.mts +66 -2
  25. package/dist/module.d.ts +66 -2
  26. package/dist/module.json +1 -1
  27. package/dist/module.mjs +144 -28
  28. package/dist/registry.d.mts +1 -0
  29. package/dist/registry.d.ts +1 -0
  30. package/dist/registry.mjs +14 -14
  31. package/dist/runtime/components/GoogleMaps/ScriptGoogleMaps.d.vue.ts +73 -97
  32. package/dist/runtime/components/GoogleMaps/ScriptGoogleMaps.vue +81 -58
  33. package/dist/runtime/components/GoogleMaps/ScriptGoogleMaps.vue.d.ts +73 -97
  34. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsInfoWindow.d.vue.ts +2 -3
  35. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsInfoWindow.vue +1 -0
  36. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsInfoWindow.vue.d.ts +2 -3
  37. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarker.d.vue.ts +2 -3
  38. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarker.vue +2 -1
  39. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarker.vue.d.ts +2 -3
  40. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarkerClusterer.d.vue.ts +10 -43
  41. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarkerClusterer.vue +3 -1
  42. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarkerClusterer.vue.d.ts +10 -43
  43. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsOverlayView.d.vue.ts +50 -30
  44. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsOverlayView.vue +145 -104
  45. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsOverlayView.vue.d.ts +50 -30
  46. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsStaticMap.vue +7 -2
  47. package/dist/runtime/components/GoogleMaps/types.d.ts +42 -0
  48. package/dist/runtime/components/GoogleMaps/types.js +1 -0
  49. package/dist/runtime/components/GoogleMaps/useGoogleMapsResource.d.ts +50 -0
  50. package/dist/runtime/components/GoogleMaps/useGoogleMapsResource.js +76 -1
  51. package/dist/runtime/components/ScriptBlueskyEmbed.d.vue.ts +10 -12
  52. package/dist/runtime/components/ScriptBlueskyEmbed.vue +13 -10
  53. package/dist/runtime/components/ScriptBlueskyEmbed.vue.d.ts +10 -12
  54. package/dist/runtime/components/ScriptCarbonAds.d.vue.ts +4 -7
  55. package/dist/runtime/components/ScriptCarbonAds.vue +1 -0
  56. package/dist/runtime/components/ScriptCarbonAds.vue.d.ts +4 -7
  57. package/dist/runtime/components/ScriptCrisp.d.vue.ts +7 -11
  58. package/dist/runtime/components/ScriptCrisp.vue +1 -0
  59. package/dist/runtime/components/ScriptCrisp.vue.d.ts +7 -11
  60. package/dist/runtime/components/ScriptGoogleAdsense.d.vue.ts +4 -7
  61. package/dist/runtime/components/ScriptGoogleAdsense.vue +1 -0
  62. package/dist/runtime/components/ScriptGoogleAdsense.vue.d.ts +4 -7
  63. package/dist/runtime/components/ScriptInstagramEmbed.d.vue.ts +11 -13
  64. package/dist/runtime/components/ScriptInstagramEmbed.vue +4 -1
  65. package/dist/runtime/components/ScriptInstagramEmbed.vue.d.ts +11 -13
  66. package/dist/runtime/components/ScriptIntercom.d.vue.ts +7 -11
  67. package/dist/runtime/components/ScriptIntercom.vue +1 -0
  68. package/dist/runtime/components/ScriptIntercom.vue.d.ts +7 -11
  69. package/dist/runtime/components/ScriptLemonSqueezy.d.vue.ts +2 -3
  70. package/dist/runtime/components/ScriptLemonSqueezy.vue +1 -0
  71. package/dist/runtime/components/ScriptLemonSqueezy.vue.d.ts +2 -3
  72. package/dist/runtime/components/ScriptPayPalButtons.d.vue.ts +8 -13
  73. package/dist/runtime/components/ScriptPayPalButtons.vue +1 -0
  74. package/dist/runtime/components/ScriptPayPalButtons.vue.d.ts +8 -13
  75. package/dist/runtime/components/ScriptPayPalMessages.d.vue.ts +8 -13
  76. package/dist/runtime/components/ScriptPayPalMessages.vue +1 -0
  77. package/dist/runtime/components/ScriptPayPalMessages.vue.d.ts +8 -13
  78. package/dist/runtime/components/ScriptStripePricingTable.d.vue.ts +5 -9
  79. package/dist/runtime/components/ScriptStripePricingTable.vue +1 -0
  80. package/dist/runtime/components/ScriptStripePricingTable.vue.d.ts +5 -9
  81. package/dist/runtime/components/ScriptVimeoPlayer.d.vue.ts +8 -11
  82. package/dist/runtime/components/ScriptVimeoPlayer.vue +1 -0
  83. package/dist/runtime/components/ScriptVimeoPlayer.vue.d.ts +8 -11
  84. package/dist/runtime/components/ScriptXEmbed.d.vue.ts +10 -12
  85. package/dist/runtime/components/ScriptXEmbed.vue +12 -9
  86. package/dist/runtime/components/ScriptXEmbed.vue.d.ts +10 -12
  87. package/dist/runtime/components/ScriptYouTubePlayer.d.vue.ts +8 -13
  88. package/dist/runtime/components/ScriptYouTubePlayer.vue +1 -0
  89. package/dist/runtime/components/ScriptYouTubePlayer.vue.d.ts +8 -13
  90. package/dist/runtime/composables/useScript.js +17 -6
  91. package/dist/runtime/composables/useScriptProxyToken.d.ts +12 -0
  92. package/dist/runtime/composables/useScriptProxyToken.js +4 -0
  93. package/dist/runtime/composables/useScriptProxyUrl.d.ts +12 -0
  94. package/dist/runtime/composables/useScriptProxyUrl.js +27 -0
  95. package/dist/runtime/plugins/proxy-token.server.d.ts +10 -0
  96. package/dist/runtime/plugins/proxy-token.server.js +17 -0
  97. package/dist/runtime/registry/bing-uet.d.ts +189 -11
  98. package/dist/runtime/registry/bing-uet.js +16 -2
  99. package/dist/runtime/registry/bluesky-embed.d.ts +0 -4
  100. package/dist/runtime/registry/bluesky-embed.js +0 -4
  101. package/dist/runtime/registry/clarity.d.ts +6 -2
  102. package/dist/runtime/registry/clarity.js +12 -1
  103. package/dist/runtime/registry/google-analytics.d.ts +6 -2
  104. package/dist/runtime/registry/google-analytics.js +12 -1
  105. package/dist/runtime/registry/google-tag-manager.d.ts +6 -2
  106. package/dist/runtime/registry/google-tag-manager.js +10 -1
  107. package/dist/runtime/registry/gravatar.js +10 -13
  108. package/dist/runtime/registry/matomo-analytics.d.ts +9 -3
  109. package/dist/runtime/registry/matomo-analytics.js +28 -1
  110. package/dist/runtime/registry/meta-pixel.d.ts +8 -2
  111. package/dist/runtime/registry/meta-pixel.js +10 -1
  112. package/dist/runtime/registry/mixpanel-analytics.d.ts +12 -2
  113. package/dist/runtime/registry/mixpanel-analytics.js +16 -4
  114. package/dist/runtime/registry/posthog.d.ts +8 -2
  115. package/dist/runtime/registry/posthog.js +15 -4
  116. package/dist/runtime/registry/schemas.d.ts +65 -0
  117. package/dist/runtime/registry/schemas.js +75 -8
  118. package/dist/runtime/registry/tiktok-pixel.d.ts +16 -2
  119. package/dist/runtime/registry/tiktok-pixel.js +22 -1
  120. package/dist/runtime/registry/x-embed.d.ts +0 -4
  121. package/dist/runtime/registry/x-embed.js +0 -4
  122. package/dist/runtime/server/bluesky-embed-image.d.ts +1 -1
  123. package/dist/runtime/server/bluesky-embed.d.ts +1 -15
  124. package/dist/runtime/server/bluesky-embed.js +25 -6
  125. package/dist/runtime/server/google-maps-geocode-proxy.js +12 -8
  126. package/dist/runtime/server/google-static-maps-proxy.d.ts +1 -1
  127. package/dist/runtime/server/google-static-maps-proxy.js +17 -11
  128. package/dist/runtime/server/gravatar-proxy.d.ts +1 -1
  129. package/dist/runtime/server/gravatar-proxy.js +10 -10
  130. package/dist/runtime/server/instagram-embed-asset.d.ts +1 -1
  131. package/dist/runtime/server/instagram-embed-image.d.ts +1 -1
  132. package/dist/runtime/server/instagram-embed.d.ts +1 -16
  133. package/dist/runtime/server/instagram-embed.js +26 -125
  134. package/dist/runtime/server/proxy-handler.js +1 -2
  135. package/dist/runtime/server/utils/cached-upstream.d.ts +55 -0
  136. package/dist/runtime/server/utils/cached-upstream.js +65 -0
  137. package/dist/runtime/server/utils/embed-rewriters.d.ts +19 -0
  138. package/dist/runtime/server/utils/embed-rewriters.js +41 -0
  139. package/dist/runtime/server/utils/image-proxy.d.ts +3 -1
  140. package/dist/runtime/server/utils/image-proxy.js +11 -8
  141. package/dist/runtime/server/utils/instagram-embed.d.ts +16 -0
  142. package/dist/runtime/server/utils/instagram-embed.js +153 -0
  143. package/dist/runtime/server/utils/proxy-url.d.ts +9 -0
  144. package/dist/runtime/server/utils/proxy-url.js +21 -0
  145. package/dist/runtime/server/utils/sign-constants.d.ts +16 -0
  146. package/dist/runtime/server/utils/sign-constants.js +5 -0
  147. package/dist/runtime/server/utils/sign.d.ts +101 -0
  148. package/dist/runtime/server/utils/sign.js +91 -0
  149. package/dist/runtime/server/utils/withSigning.d.ts +23 -0
  150. package/dist/runtime/server/utils/withSigning.js +19 -0
  151. package/dist/runtime/server/x-embed-image.d.ts +1 -1
  152. package/dist/runtime/server/x-embed.js +23 -4
  153. package/dist/runtime/types.d.ts +41 -6
  154. package/dist/runtime/types.js +1 -0
  155. package/dist/stats.mjs +298 -338
  156. package/dist/types-source.mjs +537 -164
  157. package/dist/types.d.mts +2 -2
  158. package/package.json +10 -6
  159. package/dist/devtools-client/_nuxt/C8jhSQ8l.js +0 -1
  160. package/dist/devtools-client/_nuxt/CJD6wrkT.js +0 -188
  161. package/dist/devtools-client/_nuxt/builds/meta/b800a0be-5cab-4ea6-89e3-dd3a85690a73.json +0 -1
  162. package/dist/devtools-client/_nuxt/error-404.CvOVjXeC.css +0 -1
  163. package/dist/devtools-client/_nuxt/error-500.BIm53nmx.css +0 -1
  164. package/dist/devtools-client/_nuxt/index.CA-OpSj0.css +0 -1
@@ -19,14 +19,19 @@ type __VLS_Props = {
19
19
  */
20
20
  rootAttrs?: HTMLAttributes;
21
21
  };
22
- declare var __VLS_1: {}, __VLS_3: {
23
- error: import("nuxt/app").NuxtError<unknown> | undefined;
24
- }, __VLS_5: {
22
+ type __VLS_Slots = {
23
+ default?: (props: NonNullable<typeof slotProps.value>) => any;
24
+ loading?: () => any;
25
+ error?: (props: {
26
+ error: typeof error.value;
27
+ }) => any;
28
+ };
29
+ declare const error: import("vue").Ref<import("nuxt/app").NuxtError<unknown> | undefined, import("nuxt/app").NuxtError<unknown> | undefined>;
30
+ declare const slotProps: import("vue").ComputedRef<{
25
31
  post: BlueskyEmbedPostData;
26
32
  displayName: string;
27
33
  handle: string;
28
34
  avatar: string;
29
- avatarOriginal: string;
30
35
  isVerified: boolean;
31
36
  text: string;
32
37
  richText: string;
@@ -59,14 +64,7 @@ declare var __VLS_1: {}, __VLS_3: {
59
64
  postUrl: string;
60
65
  authorUrl: string;
61
66
  proxyImage: (url: string) => string;
62
- };
63
- type __VLS_Slots = {} & {
64
- loading?: (props: typeof __VLS_1) => any;
65
- } & {
66
- error?: (props: typeof __VLS_3) => any;
67
- } & {
68
- default?: (props: typeof __VLS_5) => any;
69
- };
67
+ } | null>;
70
68
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
71
69
  post: import("vue").Ref<BlueskyEmbedPostData | undefined, BlueskyEmbedPostData | undefined>;
72
70
  status: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus, import("nuxt/app").AsyncDataRequestStatus>;
@@ -1,7 +1,8 @@
1
1
  <script setup>
2
2
  import { useAsyncData } from "nuxt/app";
3
3
  import { computed } from "vue";
4
- import { extractBlueskyPostId, facetsToHtml, formatBlueskyDate, formatCount, proxyBlueskyImageUrl } from "../registry/bluesky-embed";
4
+ import { useScriptProxyUrl } from "../composables/useScriptProxyUrl";
5
+ import { extractBlueskyPostId, facetsToHtml, formatBlueskyDate, formatCount } from "../registry/bluesky-embed";
5
6
  import { requireRegistryEndpoint, scriptsPrefix } from "../utils";
6
7
  const props = defineProps({
7
8
  postUrl: { type: String, required: true },
@@ -9,16 +10,18 @@ const props = defineProps({
9
10
  imageProxyEndpoint: { type: String, required: false, default: void 0 },
10
11
  rootAttrs: { type: Object, required: false }
11
12
  });
13
+ defineSlots();
12
14
  const prefix = scriptsPrefix();
13
15
  const resolvedApiEndpoint = computed(() => props.apiEndpoint || `${prefix}/embed/bluesky`);
14
16
  const resolvedImageProxyEndpoint = computed(() => props.imageProxyEndpoint || `${prefix}/embed/bluesky-image`);
15
17
  if (!props.apiEndpoint)
16
18
  requireRegistryEndpoint("ScriptBlueskyEmbed", "blueskyEmbed");
19
+ const proxyUrl = useScriptProxyUrl();
17
20
  const postId = computed(() => extractBlueskyPostId(props.postUrl));
18
21
  const cacheKey = computed(() => `bluesky-embed-${postId.value?.actor}-${postId.value?.rkey}`);
19
22
  const { data: post, status, error } = useAsyncData(
20
23
  cacheKey,
21
- () => $fetch(`${resolvedApiEndpoint.value}?url=${encodeURIComponent(props.postUrl)}`)
24
+ () => $fetch(proxyUrl(resolvedApiEndpoint.value, { url: props.postUrl }))
22
25
  );
23
26
  const slotProps = computed(() => {
24
27
  if (!post.value)
@@ -30,8 +33,7 @@ const slotProps = computed(() => {
30
33
  // Author info
31
34
  displayName: p.author.displayName,
32
35
  handle: p.author.handle,
33
- avatar: proxyBlueskyImageUrl(p.author.avatar, resolvedImageProxyEndpoint.value),
34
- avatarOriginal: p.author.avatar,
36
+ avatar: p.author.avatar,
35
37
  isVerified: p.author.verification?.verifiedStatus === "valid",
36
38
  // Post content
37
39
  text: p.record.text,
@@ -48,10 +50,10 @@ const slotProps = computed(() => {
48
50
  repliesFormatted: formatCount(p.replyCount),
49
51
  quotes: p.quoteCount,
50
52
  quotesFormatted: formatCount(p.quoteCount),
51
- // Media
53
+ // Media (already proxied)
52
54
  images: p.embed?.images?.map((img) => ({
53
- thumb: proxyBlueskyImageUrl(img.thumb, resolvedImageProxyEndpoint.value),
54
- fullsize: proxyBlueskyImageUrl(img.fullsize, resolvedImageProxyEndpoint.value),
55
+ thumb: img.thumb,
56
+ fullsize: img.fullsize,
55
57
  alt: img.alt,
56
58
  aspectRatio: img.aspectRatio
57
59
  })),
@@ -59,13 +61,14 @@ const slotProps = computed(() => {
59
61
  uri: p.embed.external.uri,
60
62
  title: p.embed.external.title,
61
63
  description: p.embed.external.description,
62
- thumb: p.embed.external.thumb ? proxyBlueskyImageUrl(p.embed.external.thumb, resolvedImageProxyEndpoint.value) : void 0
64
+ thumb: p.embed.external.thumb
63
65
  } : void 0,
64
66
  // Links
65
67
  postUrl: props.postUrl,
66
68
  authorUrl: `https://bsky.app/profile/${p.author.handle}`,
67
- // Helpers
68
- proxyImage: (url) => proxyBlueskyImageUrl(url, resolvedImageProxyEndpoint.value)
69
+ // Helpers — proxy an arbitrary URL through the image endpoint at runtime.
70
+ // Uses the page token emitted during SSR so client-generated URLs validate.
71
+ proxyImage: (url) => proxyUrl(resolvedImageProxyEndpoint.value, { url })
69
72
  };
70
73
  });
71
74
  defineExpose({
@@ -19,14 +19,19 @@ type __VLS_Props = {
19
19
  */
20
20
  rootAttrs?: HTMLAttributes;
21
21
  };
22
- declare var __VLS_1: {}, __VLS_3: {
23
- error: import("nuxt/app").NuxtError<unknown> | undefined;
24
- }, __VLS_5: {
22
+ type __VLS_Slots = {
23
+ default?: (props: NonNullable<typeof slotProps.value>) => any;
24
+ loading?: () => any;
25
+ error?: (props: {
26
+ error: typeof error.value;
27
+ }) => any;
28
+ };
29
+ declare const error: import("vue").Ref<import("nuxt/app").NuxtError<unknown> | undefined, import("nuxt/app").NuxtError<unknown> | undefined>;
30
+ declare const slotProps: import("vue").ComputedRef<{
25
31
  post: BlueskyEmbedPostData;
26
32
  displayName: string;
27
33
  handle: string;
28
34
  avatar: string;
29
- avatarOriginal: string;
30
35
  isVerified: boolean;
31
36
  text: string;
32
37
  richText: string;
@@ -59,14 +64,7 @@ declare var __VLS_1: {}, __VLS_3: {
59
64
  postUrl: string;
60
65
  authorUrl: string;
61
66
  proxyImage: (url: string) => string;
62
- };
63
- type __VLS_Slots = {} & {
64
- loading?: (props: typeof __VLS_1) => any;
65
- } & {
66
- error?: (props: typeof __VLS_3) => any;
67
- } & {
68
- default?: (props: typeof __VLS_5) => any;
69
- };
67
+ } | null>;
70
68
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
71
69
  post: import("vue").Ref<BlueskyEmbedPostData | undefined, BlueskyEmbedPostData | undefined>;
72
70
  status: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus, import("nuxt/app").AsyncDataRequestStatus>;
@@ -8,13 +8,10 @@ type __VLS_Props = {
8
8
  */
9
9
  trigger?: ElementScriptTrigger;
10
10
  };
11
- declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {};
12
- type __VLS_Slots = {} & {
13
- awaitingLoad?: (props: typeof __VLS_1) => any;
14
- } & {
15
- loading?: (props: typeof __VLS_3) => any;
16
- } & {
17
- error?: (props: typeof __VLS_5) => any;
11
+ type __VLS_Slots = {
12
+ awaitingLoad?: () => any;
13
+ loading?: () => any;
14
+ error?: () => any;
18
15
  };
19
16
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
20
17
  error: (error: string | Event) => any;
@@ -9,6 +9,7 @@ const props = defineProps({
9
9
  trigger: { type: [String, Array, Boolean], required: false }
10
10
  });
11
11
  const emit = defineEmits(["error", "ready"]);
12
+ defineSlots();
12
13
  const attrId = `_carbonads_js`;
13
14
  const carbonadsEl = ref(import.meta.client ? document.getElementById(attrId) : null);
14
15
  const status = ref("awaitingLoad");
@@ -8,13 +8,10 @@ type __VLS_Props = {
8
8
  */
9
9
  trigger?: ElementScriptTrigger;
10
10
  };
11
- declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {};
12
- type __VLS_Slots = {} & {
13
- awaitingLoad?: (props: typeof __VLS_1) => any;
14
- } & {
15
- loading?: (props: typeof __VLS_3) => any;
16
- } & {
17
- error?: (props: typeof __VLS_5) => any;
11
+ type __VLS_Slots = {
12
+ awaitingLoad?: () => any;
13
+ loading?: () => any;
14
+ error?: () => any;
18
15
  };
19
16
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
20
17
  error: (error: string | Event) => any;
@@ -12,17 +12,13 @@ type __VLS_Props = {
12
12
  cookieDomain?: string;
13
13
  cookieExpiry?: number;
14
14
  };
15
- declare var __VLS_1: {
16
- ready: boolean;
17
- }, __VLS_3: {}, __VLS_5: {}, __VLS_7: {};
18
- type __VLS_Slots = {} & {
19
- default?: (props: typeof __VLS_1) => any;
20
- } & {
21
- awaitingLoad?: (props: typeof __VLS_3) => any;
22
- } & {
23
- loading?: (props: typeof __VLS_5) => any;
24
- } & {
25
- error?: (props: typeof __VLS_7) => any;
15
+ type __VLS_Slots = {
16
+ default?: (props: {
17
+ ready: boolean;
18
+ }) => any;
19
+ awaitingLoad?: () => any;
20
+ loading?: () => any;
21
+ error?: () => any;
26
22
  };
27
23
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
28
24
  crisp: import("#nuxt-scripts/types").UseScriptContext<import("../registry/crisp.js").CrispApi>;
@@ -11,6 +11,7 @@ const props = defineProps({
11
11
  cookieExpiry: { type: Number, required: false }
12
12
  });
13
13
  const emits = defineEmits(["ready", "error"]);
14
+ defineSlots();
14
15
  const rootEl = ref(null);
15
16
  const trigger = useScriptTriggerElement({ trigger: props.trigger, el: rootEl });
16
17
  const isReady = ref(false);
@@ -12,17 +12,13 @@ type __VLS_Props = {
12
12
  cookieDomain?: string;
13
13
  cookieExpiry?: number;
14
14
  };
15
- declare var __VLS_1: {
16
- ready: boolean;
17
- }, __VLS_3: {}, __VLS_5: {}, __VLS_7: {};
18
- type __VLS_Slots = {} & {
19
- default?: (props: typeof __VLS_1) => any;
20
- } & {
21
- awaitingLoad?: (props: typeof __VLS_3) => any;
22
- } & {
23
- loading?: (props: typeof __VLS_5) => any;
24
- } & {
25
- error?: (props: typeof __VLS_7) => any;
15
+ type __VLS_Slots = {
16
+ default?: (props: {
17
+ ready: boolean;
18
+ }) => any;
19
+ awaitingLoad?: () => any;
20
+ loading?: () => any;
21
+ error?: () => any;
26
22
  };
27
23
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
28
24
  crisp: import("#nuxt-scripts/types").UseScriptContext<import("../registry/crisp.js").CrispApi>;
@@ -10,13 +10,10 @@ type __VLS_Props = {
10
10
  */
11
11
  trigger?: ElementScriptTrigger;
12
12
  };
13
- declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {};
14
- type __VLS_Slots = {} & {
15
- awaitingLoad?: (props: typeof __VLS_1) => any;
16
- } & {
17
- loading?: (props: typeof __VLS_3) => any;
18
- } & {
19
- error?: (props: typeof __VLS_5) => any;
13
+ type __VLS_Slots = {
14
+ awaitingLoad?: () => any;
15
+ loading?: () => any;
16
+ error?: () => any;
20
17
  };
21
18
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
22
19
  error: () => any;
@@ -13,6 +13,7 @@ const props = defineProps({
13
13
  trigger: { type: [String, Array, Boolean], required: false }
14
14
  });
15
15
  const emits = defineEmits(["ready", "error"]);
16
+ defineSlots();
16
17
  const rootEl = ref(null);
17
18
  const trigger = useScriptTriggerElement({ trigger: props.trigger, el: rootEl });
18
19
  const scriptConfig = scriptRuntimeConfig("googleAdsense");
@@ -10,13 +10,10 @@ type __VLS_Props = {
10
10
  */
11
11
  trigger?: ElementScriptTrigger;
12
12
  };
13
- declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {};
14
- type __VLS_Slots = {} & {
15
- awaitingLoad?: (props: typeof __VLS_1) => any;
16
- } & {
17
- loading?: (props: typeof __VLS_3) => any;
18
- } & {
19
- error?: (props: typeof __VLS_5) => any;
13
+ type __VLS_Slots = {
14
+ awaitingLoad?: () => any;
15
+ loading?: () => any;
16
+ error?: () => any;
20
17
  };
21
18
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
22
19
  error: () => any;
@@ -19,20 +19,18 @@ type __VLS_Props = {
19
19
  */
20
20
  rootAttrs?: HTMLAttributes;
21
21
  };
22
- declare var __VLS_1: {}, __VLS_3: {
23
- error: import("nuxt/app").NuxtError<unknown> | undefined;
24
- }, __VLS_5: {
25
- html: string;
26
- shortcode: string | undefined;
27
- postUrl: string;
28
- };
29
- type __VLS_Slots = {} & {
30
- loading?: (props: typeof __VLS_1) => any;
31
- } & {
32
- error?: (props: typeof __VLS_3) => any;
33
- } & {
34
- default?: (props: typeof __VLS_5) => any;
22
+ type __VLS_Slots = {
23
+ default?: (props: {
24
+ html: string;
25
+ shortcode: string | undefined;
26
+ postUrl: string;
27
+ }) => any;
28
+ loading?: () => any;
29
+ error?: (props: {
30
+ error: typeof error.value;
31
+ }) => any;
35
32
  };
33
+ declare const error: import("vue").Ref<import("nuxt/app").NuxtError<unknown> | undefined, import("nuxt/app").NuxtError<unknown> | undefined>;
36
34
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
37
35
  html: import("vue").Ref<string | undefined, string | undefined>;
38
36
  status: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus, import("nuxt/app").AsyncDataRequestStatus>;
@@ -1,6 +1,7 @@
1
1
  <script setup>
2
2
  import { useAsyncData } from "nuxt/app";
3
3
  import { computed } from "vue";
4
+ import { useScriptProxyUrl } from "../composables/useScriptProxyUrl";
4
5
  import { extractInstagramShortcode } from "../registry/instagram-embed";
5
6
  import { requireRegistryEndpoint, scriptsPrefix } from "../utils";
6
7
  const props = defineProps({
@@ -9,14 +10,16 @@ const props = defineProps({
9
10
  apiEndpoint: { type: String, required: false, default: void 0 },
10
11
  rootAttrs: { type: Object, required: false }
11
12
  });
13
+ defineSlots();
12
14
  const prefix = scriptsPrefix();
13
15
  const apiEndpoint = computed(() => props.apiEndpoint || `${prefix}/embed/instagram`);
14
16
  if (!props.apiEndpoint)
15
17
  requireRegistryEndpoint("ScriptInstagramEmbed", "instagramEmbed");
18
+ const proxyUrl = useScriptProxyUrl();
16
19
  const shortcode = computed(() => extractInstagramShortcode(props.postUrl));
17
20
  const { data: html, status, error } = useAsyncData(
18
21
  `instagram-embed-${props.postUrl}`,
19
- () => $fetch(`${apiEndpoint.value}?url=${encodeURIComponent(props.postUrl)}&captions=${props.captions}`),
22
+ () => $fetch(proxyUrl(apiEndpoint.value, { url: props.postUrl, captions: props.captions })),
20
23
  { watch: [() => props.postUrl, () => props.captions] }
21
24
  );
22
25
  defineExpose({
@@ -19,20 +19,18 @@ type __VLS_Props = {
19
19
  */
20
20
  rootAttrs?: HTMLAttributes;
21
21
  };
22
- declare var __VLS_1: {}, __VLS_3: {
23
- error: import("nuxt/app").NuxtError<unknown> | undefined;
24
- }, __VLS_5: {
25
- html: string;
26
- shortcode: string | undefined;
27
- postUrl: string;
28
- };
29
- type __VLS_Slots = {} & {
30
- loading?: (props: typeof __VLS_1) => any;
31
- } & {
32
- error?: (props: typeof __VLS_3) => any;
33
- } & {
34
- default?: (props: typeof __VLS_5) => any;
22
+ type __VLS_Slots = {
23
+ default?: (props: {
24
+ html: string;
25
+ shortcode: string | undefined;
26
+ postUrl: string;
27
+ }) => any;
28
+ loading?: () => any;
29
+ error?: (props: {
30
+ error: typeof error.value;
31
+ }) => any;
35
32
  };
33
+ declare const error: import("vue").Ref<import("nuxt/app").NuxtError<unknown> | undefined, import("nuxt/app").NuxtError<unknown> | undefined>;
36
34
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
37
35
  html: import("vue").Ref<string | undefined, string | undefined>;
38
36
  status: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus, import("nuxt/app").AsyncDataRequestStatus>;
@@ -13,17 +13,13 @@ type __VLS_Props = {
13
13
  */
14
14
  trigger?: ElementScriptTrigger;
15
15
  };
16
- declare var __VLS_1: {
17
- ready: boolean;
18
- }, __VLS_3: {}, __VLS_5: {}, __VLS_7: {};
19
- type __VLS_Slots = {} & {
20
- default?: (props: typeof __VLS_1) => any;
21
- } & {
22
- awaitingLoad?: (props: typeof __VLS_3) => any;
23
- } & {
24
- loading?: (props: typeof __VLS_5) => any;
25
- } & {
26
- error?: (props: typeof __VLS_7) => any;
16
+ type __VLS_Slots = {
17
+ default?: (props: {
18
+ ready: boolean;
19
+ }) => any;
20
+ awaitingLoad?: () => any;
21
+ loading?: () => any;
22
+ error?: () => any;
27
23
  };
28
24
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
29
25
  intercom: import("#nuxt-scripts/types").UseScriptContext<import("../registry/intercom.js").IntercomApi>;
@@ -14,6 +14,7 @@ const props = defineProps({
14
14
  trigger: { type: [String, Array, Boolean], required: false, default: "click" }
15
15
  });
16
16
  const emits = defineEmits(["ready", "error"]);
17
+ defineSlots();
17
18
  const rootEl = ref(null);
18
19
  const trigger = useScriptTriggerElement({ trigger: props.trigger, el: rootEl });
19
20
  const isReady = ref(false);
@@ -13,17 +13,13 @@ type __VLS_Props = {
13
13
  */
14
14
  trigger?: ElementScriptTrigger;
15
15
  };
16
- declare var __VLS_1: {
17
- ready: boolean;
18
- }, __VLS_3: {}, __VLS_5: {}, __VLS_7: {};
19
- type __VLS_Slots = {} & {
20
- default?: (props: typeof __VLS_1) => any;
21
- } & {
22
- awaitingLoad?: (props: typeof __VLS_3) => any;
23
- } & {
24
- loading?: (props: typeof __VLS_5) => any;
25
- } & {
26
- error?: (props: typeof __VLS_7) => any;
16
+ type __VLS_Slots = {
17
+ default?: (props: {
18
+ ready: boolean;
19
+ }) => any;
20
+ awaitingLoad?: () => any;
21
+ loading?: () => any;
22
+ error?: () => any;
27
23
  };
28
24
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
29
25
  intercom: import("#nuxt-scripts/types").UseScriptContext<import("../registry/intercom.js").IntercomApi>;
@@ -2,9 +2,8 @@ import type { ElementScriptTrigger } from '../types.js';
2
2
  type __VLS_Props = {
3
3
  trigger?: ElementScriptTrigger;
4
4
  };
5
- declare var __VLS_1: {};
6
- type __VLS_Slots = {} & {
7
- default?: (props: typeof __VLS_1) => any;
5
+ type __VLS_Slots = {
6
+ default?: () => any;
8
7
  };
9
8
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
9
  ready: (args_0: import("../types.js").UseScriptContext<import("../registry/lemon-squeezy.js").LemonSqueezyApi>) => any;
@@ -6,6 +6,7 @@ const props = defineProps({
6
6
  trigger: { type: [String, Array, Boolean], required: false, default: "visible" }
7
7
  });
8
8
  const emits = defineEmits(["ready", "lemonSqueezyEvent"]);
9
+ defineSlots();
9
10
  const rootEl = ref(null);
10
11
  const trigger = useScriptTriggerElement({ trigger: props.trigger, el: rootEl });
11
12
  const instance = useScriptLemonSqueezy({
@@ -2,9 +2,8 @@ import type { ElementScriptTrigger } from '../types.js';
2
2
  type __VLS_Props = {
3
3
  trigger?: ElementScriptTrigger;
4
4
  };
5
- declare var __VLS_1: {};
6
- type __VLS_Slots = {} & {
7
- default?: (props: typeof __VLS_1) => any;
5
+ type __VLS_Slots = {
6
+ default?: () => any;
8
7
  };
9
8
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
9
  ready: (args_0: import("../types.js").UseScriptContext<import("../registry/lemon-squeezy.js").LemonSqueezyApi>) => any;
@@ -45,19 +45,14 @@ type __VLS_Props = {
45
45
  */
46
46
  paypalScriptOptions?: Partial<PayPalInput>;
47
47
  };
48
- declare var __VLS_1: {
49
- sdkInstance: SdkInstance<Components[]> | undefined;
50
- }, __VLS_3: {}, __VLS_5: {}, __VLS_12: {}, __VLS_14: {};
51
- type __VLS_Slots = {} & {
52
- default?: (props: typeof __VLS_1) => any;
53
- } & {
54
- placeholder?: (props: typeof __VLS_3) => any;
55
- } & {
56
- loading?: (props: typeof __VLS_5) => any;
57
- } & {
58
- awaitingLoad?: (props: typeof __VLS_12) => any;
59
- } & {
60
- error?: (props: typeof __VLS_14) => any;
48
+ type __VLS_Slots = {
49
+ default?: (props: {
50
+ sdkInstance: SdkInstance<Components[]> | undefined;
51
+ }) => any;
52
+ placeholder?: () => any;
53
+ loading?: () => any;
54
+ awaitingLoad?: () => any;
55
+ error?: () => any;
61
56
  };
62
57
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
63
58
  /** The PayPal SDK v6 instance for creating payment sessions, checking eligibility, etc. */
@@ -16,6 +16,7 @@ const props = defineProps({
16
16
  paypalScriptOptions: { type: Object, required: false, default: () => ({}) }
17
17
  });
18
18
  const emit = defineEmits(["ready", "error"]);
19
+ defineSlots();
19
20
  const el = ref(null);
20
21
  const rootEl = ref(null);
21
22
  const ready = ref(false);
@@ -45,19 +45,14 @@ type __VLS_Props = {
45
45
  */
46
46
  paypalScriptOptions?: Partial<PayPalInput>;
47
47
  };
48
- declare var __VLS_1: {
49
- sdkInstance: SdkInstance<Components[]> | undefined;
50
- }, __VLS_3: {}, __VLS_5: {}, __VLS_12: {}, __VLS_14: {};
51
- type __VLS_Slots = {} & {
52
- default?: (props: typeof __VLS_1) => any;
53
- } & {
54
- placeholder?: (props: typeof __VLS_3) => any;
55
- } & {
56
- loading?: (props: typeof __VLS_5) => any;
57
- } & {
58
- awaitingLoad?: (props: typeof __VLS_12) => any;
59
- } & {
60
- error?: (props: typeof __VLS_14) => any;
48
+ type __VLS_Slots = {
49
+ default?: (props: {
50
+ sdkInstance: SdkInstance<Components[]> | undefined;
51
+ }) => any;
52
+ placeholder?: () => any;
53
+ loading?: () => any;
54
+ awaitingLoad?: () => any;
55
+ error?: () => any;
61
56
  };
62
57
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
63
58
  /** The PayPal SDK v6 instance for creating payment sessions, checking eligibility, etc. */
@@ -44,19 +44,14 @@ type __VLS_Props = {
44
44
  */
45
45
  paypalScriptOptions?: Partial<PayPalInput>;
46
46
  };
47
- declare var __VLS_1: {
48
- messagesSession: PayPalMessagesSession | undefined;
49
- }, __VLS_3: {}, __VLS_5: {}, __VLS_12: {}, __VLS_14: {};
50
- type __VLS_Slots = {} & {
51
- default?: (props: typeof __VLS_1) => any;
52
- } & {
53
- placeholder?: (props: typeof __VLS_3) => any;
54
- } & {
55
- loading?: (props: typeof __VLS_5) => any;
56
- } & {
57
- awaitingLoad?: (props: typeof __VLS_12) => any;
58
- } & {
59
- error?: (props: typeof __VLS_14) => any;
47
+ type __VLS_Slots = {
48
+ default?: (props: {
49
+ messagesSession: PayPalMessagesSession | undefined;
50
+ }) => any;
51
+ placeholder?: () => any;
52
+ loading?: () => any;
53
+ awaitingLoad?: () => any;
54
+ error?: () => any;
60
55
  };
61
56
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
62
57
  messagesSession: import("vue").ShallowRef<PayPalMessagesSession | undefined, PayPalMessagesSession | undefined>;
@@ -16,6 +16,7 @@ const props = defineProps({
16
16
  paypalScriptOptions: { type: Object, required: false, default: () => ({}) }
17
17
  });
18
18
  const emit = defineEmits(["ready", "error"]);
19
+ defineSlots();
19
20
  const el = ref(null);
20
21
  const rootEl = ref(null);
21
22
  const ready = ref(false);
@@ -44,19 +44,14 @@ type __VLS_Props = {
44
44
  */
45
45
  paypalScriptOptions?: Partial<PayPalInput>;
46
46
  };
47
- declare var __VLS_1: {
48
- messagesSession: PayPalMessagesSession | undefined;
49
- }, __VLS_3: {}, __VLS_5: {}, __VLS_12: {}, __VLS_14: {};
50
- type __VLS_Slots = {} & {
51
- default?: (props: typeof __VLS_1) => any;
52
- } & {
53
- placeholder?: (props: typeof __VLS_3) => any;
54
- } & {
55
- loading?: (props: typeof __VLS_5) => any;
56
- } & {
57
- awaitingLoad?: (props: typeof __VLS_12) => any;
58
- } & {
59
- error?: (props: typeof __VLS_14) => any;
47
+ type __VLS_Slots = {
48
+ default?: (props: {
49
+ messagesSession: PayPalMessagesSession | undefined;
50
+ }) => any;
51
+ placeholder?: () => any;
52
+ loading?: () => any;
53
+ awaitingLoad?: () => any;
54
+ error?: () => any;
60
55
  };
61
56
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
62
57
  messagesSession: import("vue").ShallowRef<PayPalMessagesSession | undefined, PayPalMessagesSession | undefined>;