@nuxt/scripts 1.0.0-beta.20 → 1.0.0-beta.22

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 (69) hide show
  1. package/dist/client/200.html +1 -1
  2. package/dist/client/404.html +1 -1
  3. package/dist/client/_nuxt/{DMlY-BNa.js → B7aPLMNo.js} +1 -1
  4. package/dist/client/_nuxt/BNNMZFwZ.js +162 -0
  5. package/dist/client/_nuxt/{__ZZTkMj.js → Bh9fd9qr.js} +1 -1
  6. package/dist/client/_nuxt/{9LJPrOyI.js → UTi7FhVv.js} +1 -1
  7. package/dist/client/_nuxt/builds/latest.json +1 -1
  8. package/dist/client/_nuxt/builds/meta/7b372941-1db0-4ea4-80d2-a41f53088a98.json +1 -0
  9. package/dist/client/_nuxt/error-404.DMdWw4vT.css +1 -0
  10. package/dist/client/_nuxt/error-500.CROTF27X.css +1 -0
  11. package/dist/client/index.html +1 -1
  12. package/dist/module.d.mts +2 -2
  13. package/dist/module.d.ts +2 -2
  14. package/dist/module.json +1 -1
  15. package/dist/module.mjs +75 -51
  16. package/dist/registry.mjs +65 -4
  17. package/dist/runtime/components/GoogleMaps/ScriptGoogleMaps.d.vue.ts +3 -3
  18. package/dist/runtime/components/GoogleMaps/ScriptGoogleMaps.vue +14 -1
  19. package/dist/runtime/components/GoogleMaps/ScriptGoogleMaps.vue.d.ts +3 -3
  20. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsAdvancedMarkerElement.d.vue.ts +2 -2
  21. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsAdvancedMarkerElement.vue.d.ts +2 -2
  22. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarker.d.vue.ts +2 -2
  23. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarker.vue.d.ts +2 -2
  24. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPolygon.d.vue.ts +2 -2
  25. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPolygon.vue.d.ts +2 -2
  26. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPolyline.d.vue.ts +2 -2
  27. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPolyline.vue.d.ts +2 -2
  28. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsRectangle.d.vue.ts +2 -2
  29. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsRectangle.vue.d.ts +2 -2
  30. package/dist/runtime/components/ScriptBlueskyEmbed.d.vue.ts +87 -0
  31. package/dist/runtime/components/ScriptBlueskyEmbed.vue +85 -0
  32. package/dist/runtime/components/ScriptBlueskyEmbed.vue.d.ts +87 -0
  33. package/dist/runtime/components/ScriptInstagramEmbed.d.vue.ts +2 -2
  34. package/dist/runtime/components/ScriptInstagramEmbed.vue +4 -1
  35. package/dist/runtime/components/ScriptInstagramEmbed.vue.d.ts +2 -2
  36. package/dist/runtime/components/ScriptXEmbed.d.vue.ts +2 -2
  37. package/dist/runtime/components/ScriptXEmbed.vue +5 -2
  38. package/dist/runtime/components/ScriptXEmbed.vue.d.ts +2 -2
  39. package/dist/runtime/registry/bluesky-embed.d.ts +116 -0
  40. package/dist/runtime/registry/bluesky-embed.js +72 -0
  41. package/dist/runtime/registry/gravatar.js +2 -2
  42. package/dist/runtime/registry/schemas.d.ts +20 -3
  43. package/dist/runtime/registry/schemas.js +20 -3
  44. package/dist/runtime/registry/x-embed.js +1 -1
  45. package/dist/runtime/server/bluesky-embed-image.d.ts +2 -0
  46. package/dist/runtime/server/bluesky-embed-image.js +7 -0
  47. package/dist/runtime/server/bluesky-embed.d.ts +16 -0
  48. package/dist/runtime/server/bluesky-embed.js +59 -0
  49. package/dist/runtime/server/google-maps-geocode-proxy.d.ts +2 -0
  50. package/dist/runtime/server/google-maps-geocode-proxy.js +34 -0
  51. package/dist/runtime/server/google-static-maps-proxy.js +1 -12
  52. package/dist/runtime/server/gravatar-proxy.js +1 -16
  53. package/dist/runtime/server/instagram-embed-asset.js +8 -42
  54. package/dist/runtime/server/instagram-embed-image.js +6 -54
  55. package/dist/runtime/server/instagram-embed.d.ts +16 -0
  56. package/dist/runtime/server/instagram-embed.js +171 -42
  57. package/dist/runtime/server/utils/image-proxy.d.ts +12 -0
  58. package/dist/runtime/server/utils/image-proxy.js +70 -0
  59. package/dist/runtime/server/x-embed-image.js +5 -49
  60. package/dist/runtime/types.d.ts +16 -0
  61. package/dist/runtime/utils.d.ts +1 -0
  62. package/dist/runtime/utils.js +11 -2
  63. package/dist/stats.mjs +1 -1
  64. package/dist/types-source.mjs +18 -6
  65. package/package.json +10 -9
  66. package/dist/client/_nuxt/DFEfk2pB.js +0 -162
  67. package/dist/client/_nuxt/builds/meta/8212d4fa-7985-421b-815a-03a886e667d4.json +0 -1
  68. package/dist/client/_nuxt/error-404.CHeaW3dp.css +0 -1
  69. package/dist/client/_nuxt/error-500.DvOvWme_.css +0 -1
@@ -107,7 +107,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
107
107
  readonly googleMaps: Ref<typeof google.maps | undefined, typeof google.maps | undefined>;
108
108
  readonly map: ShallowRef<google.maps.Map | undefined>;
109
109
  readonly createAdvancedMapMarker: (_options?: google.maps.marker.AdvancedMarkerElementOptions | `${string},${string}`) => Promise<google.maps.marker.AdvancedMarkerElement | undefined>;
110
- readonly resolveQueryToLatLang: (query: string) => Promise<google.maps.LatLng | undefined>;
110
+ readonly resolveQueryToLatLang: (query: string) => Promise<google.maps.LatLng | google.maps.LatLngLiteral | undefined>;
111
111
  readonly importLibrary: {
112
112
  (key: "marker"): Promise<google.maps.MarkerLibrary>;
113
113
  (key: "places"): Promise<google.maps.PlacesLibrary>;
@@ -122,7 +122,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
122
122
  readonly googleMaps: Ref<typeof google.maps | undefined, typeof google.maps | undefined>;
123
123
  readonly map: ShallowRef<google.maps.Map | undefined>;
124
124
  readonly createAdvancedMapMarker: (_options?: google.maps.marker.AdvancedMarkerElementOptions | `${string},${string}`) => Promise<google.maps.marker.AdvancedMarkerElement | undefined>;
125
- readonly resolveQueryToLatLang: (query: string) => Promise<google.maps.LatLng | undefined>;
125
+ readonly resolveQueryToLatLang: (query: string) => Promise<google.maps.LatLng | google.maps.LatLngLiteral | undefined>;
126
126
  readonly importLibrary: {
127
127
  (key: "marker"): Promise<google.maps.MarkerLibrary>;
128
128
  (key: "places"): Promise<google.maps.PlacesLibrary>;
@@ -216,7 +216,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
216
216
  readonly googleMaps: Ref<typeof google.maps | undefined, typeof google.maps | undefined>;
217
217
  readonly map: ShallowRef<google.maps.Map | undefined>;
218
218
  readonly createAdvancedMapMarker: (_options?: google.maps.marker.AdvancedMarkerElementOptions | `${string},${string}`) => Promise<google.maps.marker.AdvancedMarkerElement | undefined>;
219
- readonly resolveQueryToLatLang: (query: string) => Promise<google.maps.LatLng | undefined>;
219
+ readonly resolveQueryToLatLang: (query: string) => Promise<google.maps.LatLng | google.maps.LatLngLiteral | undefined>;
220
220
  readonly importLibrary: {
221
221
  (key: "marker"): Promise<google.maps.MarkerLibrary>;
222
222
  (key: "places"): Promise<google.maps.PlacesLibrary>;
@@ -127,6 +127,19 @@ async function resolveQueryToLatLang(query) {
127
127
  if (queryToLatLngCache.has(query)) {
128
128
  return Promise.resolve(queryToLatLngCache.get(query));
129
129
  }
130
+ const endpoints = runtimeConfig.public["nuxt-scripts"]?.endpoints;
131
+ if (endpoints?.googleMaps) {
132
+ const data = await $fetch("/_scripts/proxy/google-maps-geocode", {
133
+ params: { address: query }
134
+ });
135
+ if (data.status === "OK" && data.results?.[0]?.geometry?.location) {
136
+ const loc = data.results[0].geometry.location;
137
+ const latLng = { lat: loc.lat, lng: loc.lng };
138
+ queryToLatLngCache.set(query, latLng);
139
+ return latLng;
140
+ }
141
+ throw new Error(`No location found for ${query}`);
142
+ }
130
143
  return new Promise(async (resolve, reject) => {
131
144
  if (!mapsApi.value) {
132
145
  await load();
@@ -321,7 +334,7 @@ const placeholder = computed(() => {
321
334
  return m;
322
335
  }).join("|")
323
336
  });
324
- const baseUrl = proxyConfig?.enabled ? "/_scripts/google-static-maps-proxy" : "https://maps.googleapis.com/maps/api/staticmap";
337
+ const baseUrl = proxyConfig?.enabled ? "/_scripts/proxy/google-static-maps" : "https://maps.googleapis.com/maps/api/staticmap";
325
338
  return withQuery(baseUrl, placeholderOptions);
326
339
  });
327
340
  const placeholderAttrs = computed(() => {
@@ -107,7 +107,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
107
107
  readonly googleMaps: Ref<typeof google.maps | undefined, typeof google.maps | undefined>;
108
108
  readonly map: ShallowRef<google.maps.Map | undefined>;
109
109
  readonly createAdvancedMapMarker: (_options?: google.maps.marker.AdvancedMarkerElementOptions | `${string},${string}`) => Promise<google.maps.marker.AdvancedMarkerElement | undefined>;
110
- readonly resolveQueryToLatLang: (query: string) => Promise<google.maps.LatLng | undefined>;
110
+ readonly resolveQueryToLatLang: (query: string) => Promise<google.maps.LatLng | google.maps.LatLngLiteral | undefined>;
111
111
  readonly importLibrary: {
112
112
  (key: "marker"): Promise<google.maps.MarkerLibrary>;
113
113
  (key: "places"): Promise<google.maps.PlacesLibrary>;
@@ -122,7 +122,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
122
122
  readonly googleMaps: Ref<typeof google.maps | undefined, typeof google.maps | undefined>;
123
123
  readonly map: ShallowRef<google.maps.Map | undefined>;
124
124
  readonly createAdvancedMapMarker: (_options?: google.maps.marker.AdvancedMarkerElementOptions | `${string},${string}`) => Promise<google.maps.marker.AdvancedMarkerElement | undefined>;
125
- readonly resolveQueryToLatLang: (query: string) => Promise<google.maps.LatLng | undefined>;
125
+ readonly resolveQueryToLatLang: (query: string) => Promise<google.maps.LatLng | google.maps.LatLngLiteral | undefined>;
126
126
  readonly importLibrary: {
127
127
  (key: "marker"): Promise<google.maps.MarkerLibrary>;
128
128
  (key: "places"): Promise<google.maps.PlacesLibrary>;
@@ -216,7 +216,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
216
216
  readonly googleMaps: Ref<typeof google.maps | undefined, typeof google.maps | undefined>;
217
217
  readonly map: ShallowRef<google.maps.Map | undefined>;
218
218
  readonly createAdvancedMapMarker: (_options?: google.maps.marker.AdvancedMarkerElementOptions | `${string},${string}`) => Promise<google.maps.marker.AdvancedMarkerElement | undefined>;
219
- readonly resolveQueryToLatLang: (query: string) => Promise<google.maps.LatLng | undefined>;
219
+ readonly resolveQueryToLatLang: (query: string) => Promise<google.maps.LatLng | google.maps.LatLngLiteral | undefined>;
220
220
  readonly importLibrary: {
221
221
  (key: "marker"): Promise<google.maps.MarkerLibrary>;
222
222
  (key: "places"): Promise<google.maps.PlacesLibrary>;
@@ -7,8 +7,8 @@ export default _default;
7
7
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
8
8
  options?: Omit<google.maps.marker.AdvancedMarkerElementOptions, "map">;
9
9
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
10
- click: (payload: google.maps.MapMouseEvent) => any;
11
10
  contextmenu: (payload: google.maps.MapMouseEvent) => any;
11
+ click: (payload: google.maps.MapMouseEvent) => any;
12
12
  dblclick: (payload: google.maps.MapMouseEvent) => any;
13
13
  drag: (payload: google.maps.MapMouseEvent) => any;
14
14
  dragend: (payload: google.maps.MapMouseEvent) => any;
@@ -31,8 +31,8 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
31
31
  }, string, import("vue").PublicProps, Readonly<{
32
32
  options?: Omit<google.maps.marker.AdvancedMarkerElementOptions, "map">;
33
33
  }> & Readonly<{
34
- onClick?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
35
34
  onContextmenu?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
35
+ onClick?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
36
36
  onDblclick?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
37
37
  onDrag?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
38
38
  onDragend?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
@@ -7,8 +7,8 @@ export default _default;
7
7
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
8
8
  options?: Omit<google.maps.marker.AdvancedMarkerElementOptions, "map">;
9
9
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
10
- click: (payload: google.maps.MapMouseEvent) => any;
11
10
  contextmenu: (payload: google.maps.MapMouseEvent) => any;
11
+ click: (payload: google.maps.MapMouseEvent) => any;
12
12
  dblclick: (payload: google.maps.MapMouseEvent) => any;
13
13
  drag: (payload: google.maps.MapMouseEvent) => any;
14
14
  dragend: (payload: google.maps.MapMouseEvent) => any;
@@ -31,8 +31,8 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
31
31
  }, string, import("vue").PublicProps, Readonly<{
32
32
  options?: Omit<google.maps.marker.AdvancedMarkerElementOptions, "map">;
33
33
  }> & Readonly<{
34
- onClick?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
35
34
  onContextmenu?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
35
+ onClick?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
36
36
  onDblclick?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
37
37
  onDrag?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
38
38
  onDragend?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
@@ -7,8 +7,8 @@ export default _default;
7
7
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
8
8
  options?: Omit<google.maps.MarkerOptions, "map">;
9
9
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
10
- click: (payload: google.maps.MapMouseEvent) => any;
11
10
  contextmenu: (payload: google.maps.MapMouseEvent) => any;
11
+ click: (payload: google.maps.MapMouseEvent) => any;
12
12
  dblclick: (payload: google.maps.MapMouseEvent) => any;
13
13
  drag: (payload: google.maps.MapMouseEvent) => any;
14
14
  dragend: (payload: google.maps.MapMouseEvent) => any;
@@ -31,8 +31,8 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
31
31
  }, string, import("vue").PublicProps, Readonly<{
32
32
  options?: Omit<google.maps.MarkerOptions, "map">;
33
33
  }> & Readonly<{
34
- onClick?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
35
34
  onContextmenu?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
35
+ onClick?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
36
36
  onDblclick?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
37
37
  onDrag?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
38
38
  onDragend?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
@@ -7,8 +7,8 @@ export default _default;
7
7
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
8
8
  options?: Omit<google.maps.MarkerOptions, "map">;
9
9
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
10
- click: (payload: google.maps.MapMouseEvent) => any;
11
10
  contextmenu: (payload: google.maps.MapMouseEvent) => any;
11
+ click: (payload: google.maps.MapMouseEvent) => any;
12
12
  dblclick: (payload: google.maps.MapMouseEvent) => any;
13
13
  drag: (payload: google.maps.MapMouseEvent) => any;
14
14
  dragend: (payload: google.maps.MapMouseEvent) => any;
@@ -31,8 +31,8 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
31
31
  }, string, import("vue").PublicProps, Readonly<{
32
32
  options?: Omit<google.maps.MarkerOptions, "map">;
33
33
  }> & Readonly<{
34
- onClick?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
35
34
  onContextmenu?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
35
+ onClick?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
36
36
  onDblclick?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
37
37
  onDrag?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
38
38
  onDragend?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
@@ -2,8 +2,8 @@ type __VLS_Props = {
2
2
  options?: Omit<google.maps.PolygonOptions, 'map'>;
3
3
  };
4
4
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
5
- click: (payload: google.maps.PolyMouseEvent) => any;
6
5
  contextmenu: (payload: google.maps.PolyMouseEvent) => any;
6
+ click: (payload: google.maps.PolyMouseEvent) => any;
7
7
  dblclick: (payload: google.maps.PolyMouseEvent) => any;
8
8
  drag: (payload: google.maps.MapMouseEvent) => any;
9
9
  dragend: (payload: google.maps.MapMouseEvent) => any;
@@ -14,8 +14,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
14
14
  mouseover: (payload: google.maps.PolyMouseEvent) => any;
15
15
  mouseup: (payload: google.maps.PolyMouseEvent) => any;
16
16
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
17
- onClick?: ((payload: google.maps.PolyMouseEvent) => any) | undefined;
18
17
  onContextmenu?: ((payload: google.maps.PolyMouseEvent) => any) | undefined;
18
+ onClick?: ((payload: google.maps.PolyMouseEvent) => any) | undefined;
19
19
  onDblclick?: ((payload: google.maps.PolyMouseEvent) => any) | undefined;
20
20
  onDrag?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
21
21
  onDragend?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
@@ -2,8 +2,8 @@ type __VLS_Props = {
2
2
  options?: Omit<google.maps.PolygonOptions, 'map'>;
3
3
  };
4
4
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
5
- click: (payload: google.maps.PolyMouseEvent) => any;
6
5
  contextmenu: (payload: google.maps.PolyMouseEvent) => any;
6
+ click: (payload: google.maps.PolyMouseEvent) => any;
7
7
  dblclick: (payload: google.maps.PolyMouseEvent) => any;
8
8
  drag: (payload: google.maps.MapMouseEvent) => any;
9
9
  dragend: (payload: google.maps.MapMouseEvent) => any;
@@ -14,8 +14,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
14
14
  mouseover: (payload: google.maps.PolyMouseEvent) => any;
15
15
  mouseup: (payload: google.maps.PolyMouseEvent) => any;
16
16
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
17
- onClick?: ((payload: google.maps.PolyMouseEvent) => any) | undefined;
18
17
  onContextmenu?: ((payload: google.maps.PolyMouseEvent) => any) | undefined;
18
+ onClick?: ((payload: google.maps.PolyMouseEvent) => any) | undefined;
19
19
  onDblclick?: ((payload: google.maps.PolyMouseEvent) => any) | undefined;
20
20
  onDrag?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
21
21
  onDragend?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
@@ -2,8 +2,8 @@ type __VLS_Props = {
2
2
  options?: Omit<google.maps.PolylineOptions, 'map'>;
3
3
  };
4
4
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
5
- click: (payload: google.maps.PolyMouseEvent) => any;
6
5
  contextmenu: (payload: google.maps.PolyMouseEvent) => any;
6
+ click: (payload: google.maps.PolyMouseEvent) => any;
7
7
  dblclick: (payload: google.maps.PolyMouseEvent) => any;
8
8
  drag: (payload: google.maps.MapMouseEvent) => any;
9
9
  dragend: (payload: google.maps.MapMouseEvent) => any;
@@ -14,8 +14,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
14
14
  mouseover: (payload: google.maps.PolyMouseEvent) => any;
15
15
  mouseup: (payload: google.maps.PolyMouseEvent) => any;
16
16
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
17
- onClick?: ((payload: google.maps.PolyMouseEvent) => any) | undefined;
18
17
  onContextmenu?: ((payload: google.maps.PolyMouseEvent) => any) | undefined;
18
+ onClick?: ((payload: google.maps.PolyMouseEvent) => any) | undefined;
19
19
  onDblclick?: ((payload: google.maps.PolyMouseEvent) => any) | undefined;
20
20
  onDrag?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
21
21
  onDragend?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
@@ -2,8 +2,8 @@ type __VLS_Props = {
2
2
  options?: Omit<google.maps.PolylineOptions, 'map'>;
3
3
  };
4
4
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
5
- click: (payload: google.maps.PolyMouseEvent) => any;
6
5
  contextmenu: (payload: google.maps.PolyMouseEvent) => any;
6
+ click: (payload: google.maps.PolyMouseEvent) => any;
7
7
  dblclick: (payload: google.maps.PolyMouseEvent) => any;
8
8
  drag: (payload: google.maps.MapMouseEvent) => any;
9
9
  dragend: (payload: google.maps.MapMouseEvent) => any;
@@ -14,8 +14,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
14
14
  mouseover: (payload: google.maps.PolyMouseEvent) => any;
15
15
  mouseup: (payload: google.maps.PolyMouseEvent) => any;
16
16
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
17
- onClick?: ((payload: google.maps.PolyMouseEvent) => any) | undefined;
18
17
  onContextmenu?: ((payload: google.maps.PolyMouseEvent) => any) | undefined;
18
+ onClick?: ((payload: google.maps.PolyMouseEvent) => any) | undefined;
19
19
  onDblclick?: ((payload: google.maps.PolyMouseEvent) => any) | undefined;
20
20
  onDrag?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
21
21
  onDragend?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
@@ -2,8 +2,8 @@ type __VLS_Props = {
2
2
  options?: Omit<google.maps.RectangleOptions, 'map'>;
3
3
  };
4
4
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
5
- click: (payload: google.maps.MapMouseEvent) => any;
6
5
  contextmenu: (payload: google.maps.MapMouseEvent) => any;
6
+ click: (payload: google.maps.MapMouseEvent) => any;
7
7
  dblclick: (payload: google.maps.MapMouseEvent) => any;
8
8
  drag: (payload: google.maps.MapMouseEvent) => any;
9
9
  dragend: (payload: google.maps.MapMouseEvent) => any;
@@ -15,8 +15,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
15
15
  mouseup: (payload: google.maps.MapMouseEvent) => any;
16
16
  bounds_changed: () => any;
17
17
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
18
- onClick?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
19
18
  onContextmenu?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
19
+ onClick?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
20
20
  onDblclick?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
21
21
  onDrag?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
22
22
  onDragend?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
@@ -2,8 +2,8 @@ type __VLS_Props = {
2
2
  options?: Omit<google.maps.RectangleOptions, 'map'>;
3
3
  };
4
4
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
5
- click: (payload: google.maps.MapMouseEvent) => any;
6
5
  contextmenu: (payload: google.maps.MapMouseEvent) => any;
6
+ click: (payload: google.maps.MapMouseEvent) => any;
7
7
  dblclick: (payload: google.maps.MapMouseEvent) => any;
8
8
  drag: (payload: google.maps.MapMouseEvent) => any;
9
9
  dragend: (payload: google.maps.MapMouseEvent) => any;
@@ -15,8 +15,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
15
15
  mouseup: (payload: google.maps.MapMouseEvent) => any;
16
16
  bounds_changed: () => any;
17
17
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
18
- onClick?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
19
18
  onContextmenu?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
19
+ onClick?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
20
20
  onDblclick?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
21
21
  onDrag?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
22
22
  onDragend?: ((payload: google.maps.MapMouseEvent) => any) | undefined;
@@ -0,0 +1,87 @@
1
+ import type { HTMLAttributes } from 'vue';
2
+ import type { BlueskyEmbedPostData } from '../registry/bluesky-embed.js';
3
+ type __VLS_Props = {
4
+ /**
5
+ * The Bluesky post URL to embed
6
+ * @example 'https://bsky.app/profile/bsky.app/post/3mgnwwvj3u22a'
7
+ */
8
+ postUrl: string;
9
+ /**
10
+ * Custom API endpoint for fetching post data
11
+ * @default '/_scripts/embed/bluesky'
12
+ */
13
+ apiEndpoint?: string;
14
+ /**
15
+ * Custom image proxy endpoint
16
+ * @default '/_scripts/embed/bluesky-image'
17
+ */
18
+ imageProxyEndpoint?: string;
19
+ /**
20
+ * Root element attributes
21
+ */
22
+ rootAttrs?: HTMLAttributes;
23
+ };
24
+ declare var __VLS_1: {}, __VLS_3: {
25
+ error: import("nuxt/app").NuxtError<unknown> | undefined;
26
+ }, __VLS_5: {
27
+ post: BlueskyEmbedPostData;
28
+ displayName: string;
29
+ handle: string;
30
+ avatar: string;
31
+ avatarOriginal: string;
32
+ isVerified: boolean;
33
+ text: string;
34
+ richText: string;
35
+ langs: string[] | undefined;
36
+ datetime: string;
37
+ createdAt: Date;
38
+ likes: number;
39
+ likesFormatted: string;
40
+ reposts: number;
41
+ repostsFormatted: string;
42
+ replies: number;
43
+ repliesFormatted: string;
44
+ quotes: number;
45
+ quotesFormatted: string;
46
+ images: {
47
+ thumb: string;
48
+ fullsize: string;
49
+ alt: string;
50
+ aspectRatio: {
51
+ width: number;
52
+ height: number;
53
+ } | undefined;
54
+ }[] | undefined;
55
+ externalEmbed: {
56
+ uri: string;
57
+ title: string;
58
+ description: string;
59
+ thumb: string | undefined;
60
+ } | undefined;
61
+ postUrl: string;
62
+ authorUrl: string;
63
+ proxyImage: (url: string) => string;
64
+ };
65
+ type __VLS_Slots = {} & {
66
+ loading?: (props: typeof __VLS_1) => any;
67
+ } & {
68
+ error?: (props: typeof __VLS_3) => any;
69
+ } & {
70
+ default?: (props: typeof __VLS_5) => any;
71
+ };
72
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
73
+ post: import("vue").Ref<BlueskyEmbedPostData | undefined, BlueskyEmbedPostData | undefined>;
74
+ status: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus, import("nuxt/app").AsyncDataRequestStatus>;
75
+ error: import("vue").Ref<import("nuxt/app").NuxtError<unknown> | undefined, import("nuxt/app").NuxtError<unknown> | undefined>;
76
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
77
+ apiEndpoint: string;
78
+ imageProxyEndpoint: string;
79
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
80
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
81
+ declare const _default: typeof __VLS_export;
82
+ export default _default;
83
+ type __VLS_WithSlots<T, S> = T & {
84
+ new (): {
85
+ $slots: S;
86
+ };
87
+ };
@@ -0,0 +1,85 @@
1
+ <script setup>
2
+ import { useAsyncData } from "nuxt/app";
3
+ import { computed } from "vue";
4
+ import { extractBlueskyPostId, facetsToHtml, formatBlueskyDate, formatCount, proxyBlueskyImageUrl } from "../registry/bluesky-embed";
5
+ import { requireRegistryEndpoint } from "../utils";
6
+ const props = defineProps({
7
+ postUrl: { type: String, required: true },
8
+ apiEndpoint: { type: String, required: false, default: "/_scripts/embed/bluesky" },
9
+ imageProxyEndpoint: { type: String, required: false, default: "/_scripts/embed/bluesky-image" },
10
+ rootAttrs: { type: Object, required: false }
11
+ });
12
+ if (!props.apiEndpoint || props.apiEndpoint === "/_scripts/embed/bluesky")
13
+ requireRegistryEndpoint("ScriptBlueskyEmbed", "blueskyEmbed");
14
+ const postId = computed(() => extractBlueskyPostId(props.postUrl));
15
+ const cacheKey = computed(() => `bluesky-embed-${postId.value?.actor}-${postId.value?.rkey}`);
16
+ const { data: post, status, error } = useAsyncData(
17
+ cacheKey,
18
+ () => $fetch(`${props.apiEndpoint}?url=${encodeURIComponent(props.postUrl)}`)
19
+ );
20
+ const slotProps = computed(() => {
21
+ if (!post.value)
22
+ return null;
23
+ const p = post.value;
24
+ return {
25
+ // Raw data
26
+ post: p,
27
+ // Author info
28
+ displayName: p.author.displayName,
29
+ handle: p.author.handle,
30
+ avatar: proxyBlueskyImageUrl(p.author.avatar, props.imageProxyEndpoint),
31
+ avatarOriginal: p.author.avatar,
32
+ isVerified: p.author.verification?.verifiedStatus === "valid",
33
+ // Post content
34
+ text: p.record.text,
35
+ richText: facetsToHtml(p.record.text, p.record.facets),
36
+ langs: p.record.langs,
37
+ // Formatted values
38
+ datetime: formatBlueskyDate(p.record.createdAt),
39
+ createdAt: new Date(p.record.createdAt),
40
+ likes: p.likeCount,
41
+ likesFormatted: formatCount(p.likeCount),
42
+ reposts: p.repostCount,
43
+ repostsFormatted: formatCount(p.repostCount),
44
+ replies: p.replyCount,
45
+ repliesFormatted: formatCount(p.replyCount),
46
+ quotes: p.quoteCount,
47
+ quotesFormatted: formatCount(p.quoteCount),
48
+ // Media
49
+ images: p.embed?.images?.map((img) => ({
50
+ thumb: proxyBlueskyImageUrl(img.thumb, props.imageProxyEndpoint),
51
+ fullsize: proxyBlueskyImageUrl(img.fullsize, props.imageProxyEndpoint),
52
+ alt: img.alt,
53
+ aspectRatio: img.aspectRatio
54
+ })),
55
+ externalEmbed: p.embed?.external ? {
56
+ uri: p.embed.external.uri,
57
+ title: p.embed.external.title,
58
+ description: p.embed.external.description,
59
+ thumb: p.embed.external.thumb ? proxyBlueskyImageUrl(p.embed.external.thumb, props.imageProxyEndpoint) : void 0
60
+ } : void 0,
61
+ // Links
62
+ postUrl: props.postUrl,
63
+ authorUrl: `https://bsky.app/profile/${p.author.handle}`,
64
+ // Helpers
65
+ proxyImage: (url) => proxyBlueskyImageUrl(url, props.imageProxyEndpoint)
66
+ };
67
+ });
68
+ defineExpose({
69
+ post,
70
+ status,
71
+ error
72
+ });
73
+ </script>
74
+
75
+ <template>
76
+ <div v-bind="rootAttrs">
77
+ <slot v-if="status === 'pending'" name="loading">
78
+ <div>Loading Bluesky post...</div>
79
+ </slot>
80
+ <slot v-else-if="status === 'error'" name="error" :error="error">
81
+ <div>Failed to load Bluesky post</div>
82
+ </slot>
83
+ <slot v-else-if="slotProps" v-bind="slotProps" />
84
+ </div>
85
+ </template>
@@ -0,0 +1,87 @@
1
+ import type { HTMLAttributes } from 'vue';
2
+ import type { BlueskyEmbedPostData } from '../registry/bluesky-embed.js';
3
+ type __VLS_Props = {
4
+ /**
5
+ * The Bluesky post URL to embed
6
+ * @example 'https://bsky.app/profile/bsky.app/post/3mgnwwvj3u22a'
7
+ */
8
+ postUrl: string;
9
+ /**
10
+ * Custom API endpoint for fetching post data
11
+ * @default '/_scripts/embed/bluesky'
12
+ */
13
+ apiEndpoint?: string;
14
+ /**
15
+ * Custom image proxy endpoint
16
+ * @default '/_scripts/embed/bluesky-image'
17
+ */
18
+ imageProxyEndpoint?: string;
19
+ /**
20
+ * Root element attributes
21
+ */
22
+ rootAttrs?: HTMLAttributes;
23
+ };
24
+ declare var __VLS_1: {}, __VLS_3: {
25
+ error: import("nuxt/app").NuxtError<unknown> | undefined;
26
+ }, __VLS_5: {
27
+ post: BlueskyEmbedPostData;
28
+ displayName: string;
29
+ handle: string;
30
+ avatar: string;
31
+ avatarOriginal: string;
32
+ isVerified: boolean;
33
+ text: string;
34
+ richText: string;
35
+ langs: string[] | undefined;
36
+ datetime: string;
37
+ createdAt: Date;
38
+ likes: number;
39
+ likesFormatted: string;
40
+ reposts: number;
41
+ repostsFormatted: string;
42
+ replies: number;
43
+ repliesFormatted: string;
44
+ quotes: number;
45
+ quotesFormatted: string;
46
+ images: {
47
+ thumb: string;
48
+ fullsize: string;
49
+ alt: string;
50
+ aspectRatio: {
51
+ width: number;
52
+ height: number;
53
+ } | undefined;
54
+ }[] | undefined;
55
+ externalEmbed: {
56
+ uri: string;
57
+ title: string;
58
+ description: string;
59
+ thumb: string | undefined;
60
+ } | undefined;
61
+ postUrl: string;
62
+ authorUrl: string;
63
+ proxyImage: (url: string) => string;
64
+ };
65
+ type __VLS_Slots = {} & {
66
+ loading?: (props: typeof __VLS_1) => any;
67
+ } & {
68
+ error?: (props: typeof __VLS_3) => any;
69
+ } & {
70
+ default?: (props: typeof __VLS_5) => any;
71
+ };
72
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
73
+ post: import("vue").Ref<BlueskyEmbedPostData | undefined, BlueskyEmbedPostData | undefined>;
74
+ status: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus, import("nuxt/app").AsyncDataRequestStatus>;
75
+ error: import("vue").Ref<import("nuxt/app").NuxtError<unknown> | undefined, import("nuxt/app").NuxtError<unknown> | undefined>;
76
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
77
+ apiEndpoint: string;
78
+ imageProxyEndpoint: string;
79
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
80
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
81
+ declare const _default: typeof __VLS_export;
82
+ export default _default;
83
+ type __VLS_WithSlots<T, S> = T & {
84
+ new (): {
85
+ $slots: S;
86
+ };
87
+ };
@@ -12,7 +12,7 @@ type __VLS_Props = {
12
12
  captions?: boolean;
13
13
  /**
14
14
  * Custom API endpoint for fetching embed HTML
15
- * @default '/api/_scripts/instagram-embed'
15
+ * @default '/_scripts/embed/instagram'
16
16
  */
17
17
  apiEndpoint?: string;
18
18
  /**
@@ -40,8 +40,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
40
40
  error: import("vue").Ref<import("nuxt/app").NuxtError<unknown> | undefined, import("nuxt/app").NuxtError<unknown> | undefined>;
41
41
  shortcode: import("vue").ComputedRef<string | undefined>;
42
42
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
43
- captions: boolean;
44
43
  apiEndpoint: string;
44
+ captions: boolean;
45
45
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
46
46
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
47
47
  declare const _default: typeof __VLS_export;
@@ -2,12 +2,15 @@
2
2
  import { useAsyncData } from "nuxt/app";
3
3
  import { computed } from "vue";
4
4
  import { extractInstagramShortcode } from "../registry/instagram-embed";
5
+ import { requireRegistryEndpoint } from "../utils";
5
6
  const props = defineProps({
6
7
  postUrl: { type: String, required: true },
7
8
  captions: { type: Boolean, required: false, default: true },
8
- apiEndpoint: { type: String, required: false, default: "/api/_scripts/instagram-embed" },
9
+ apiEndpoint: { type: String, required: false, default: "/_scripts/embed/instagram" },
9
10
  rootAttrs: { type: Object, required: false }
10
11
  });
12
+ if (!props.apiEndpoint || props.apiEndpoint === "/_scripts/embed/instagram")
13
+ requireRegistryEndpoint("ScriptInstagramEmbed", "instagramEmbed");
11
14
  const shortcode = computed(() => extractInstagramShortcode(props.postUrl));
12
15
  const { data: html, status, error } = useAsyncData(
13
16
  `instagram-embed-${props.postUrl}`,
@@ -12,7 +12,7 @@ type __VLS_Props = {
12
12
  captions?: boolean;
13
13
  /**
14
14
  * Custom API endpoint for fetching embed HTML
15
- * @default '/api/_scripts/instagram-embed'
15
+ * @default '/_scripts/embed/instagram'
16
16
  */
17
17
  apiEndpoint?: string;
18
18
  /**
@@ -40,8 +40,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
40
40
  error: import("vue").Ref<import("nuxt/app").NuxtError<unknown> | undefined, import("nuxt/app").NuxtError<unknown> | undefined>;
41
41
  shortcode: import("vue").ComputedRef<string | undefined>;
42
42
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
43
- captions: boolean;
44
43
  apiEndpoint: string;
44
+ captions: boolean;
45
45
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
46
46
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
47
47
  declare const _default: typeof __VLS_export;
@@ -7,12 +7,12 @@ type __VLS_Props = {
7
7
  tweetId: string;
8
8
  /**
9
9
  * Custom API endpoint for fetching tweet data
10
- * @default '/api/_scripts/x-embed'
10
+ * @default '/_scripts/embed/x'
11
11
  */
12
12
  apiEndpoint?: string;
13
13
  /**
14
14
  * Custom image proxy endpoint
15
- * @default '/_scripts/x-embed-image'
15
+ * @default '/_scripts/embed/x-image'
16
16
  */
17
17
  imageProxyEndpoint?: string;
18
18
  /**
@@ -2,12 +2,15 @@
2
2
  import { useAsyncData } from "nuxt/app";
3
3
  import { computed } from "vue";
4
4
  import { formatCount, formatTweetDate, proxyXImageUrl } from "../registry/x-embed";
5
+ import { requireRegistryEndpoint } from "../utils";
5
6
  const props = defineProps({
6
7
  tweetId: { type: String, required: true },
7
- apiEndpoint: { type: String, required: false, default: "/api/_scripts/x-embed" },
8
- imageProxyEndpoint: { type: String, required: false, default: "/api/_scripts/x-embed-image" },
8
+ apiEndpoint: { type: String, required: false, default: "/_scripts/embed/x" },
9
+ imageProxyEndpoint: { type: String, required: false, default: "/_scripts/embed/x-image" },
9
10
  rootAttrs: { type: Object, required: false }
10
11
  });
12
+ if (!props.apiEndpoint || props.apiEndpoint === "/_scripts/embed/x")
13
+ requireRegistryEndpoint("ScriptXEmbed", "xEmbed");
11
14
  const cacheKey = computed(() => `x-embed-${props.tweetId}`);
12
15
  const { data: tweet, status, error } = useAsyncData(
13
16
  cacheKey,