@nuxt/scripts 1.0.0-beta.21 → 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 (68) hide show
  1. package/dist/client/200.html +1 -1
  2. package/dist/client/404.html +1 -1
  3. package/dist/client/_nuxt/{BlmrFwhD.js → B7aPLMNo.js} +1 -1
  4. package/dist/client/_nuxt/{DvbTvDd0.js → BNNMZFwZ.js} +21 -21
  5. package/dist/client/_nuxt/{BwCYQWJt.js → Bh9fd9qr.js} +1 -1
  6. package/dist/client/_nuxt/{ZrewjUYk.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 +57 -50
  16. package/dist/registry.mjs +30 -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 +11 -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 +8 -7
  66. package/dist/client/_nuxt/builds/meta/6660a023-888d-415f-b66d-ce774e6f8f11.json +0 -1
  67. package/dist/client/_nuxt/error-404.CHeaW3dp.css +0 -1
  68. package/dist/client/_nuxt/error-500.DvOvWme_.css +0 -1
@@ -0,0 +1,70 @@
1
+ import { createError, defineEventHandler, getQuery, setHeader } from "h3";
2
+ import { $fetch } from "ofetch";
3
+ const AMP_RE = /&/g;
4
+ export function createImageProxyHandler(config) {
5
+ const {
6
+ accept = "image/webp,image/jpeg,image/png,image/*,*/*;q=0.8",
7
+ userAgent,
8
+ cacheMaxAge = 3600,
9
+ contentType = "image/jpeg",
10
+ followRedirects = true,
11
+ decodeAmpersands = false
12
+ } = config;
13
+ return defineEventHandler(async (event) => {
14
+ const query = getQuery(event);
15
+ let url = query.url;
16
+ if (decodeAmpersands && url)
17
+ url = url.replace(AMP_RE, "&");
18
+ if (!url) {
19
+ throw createError({
20
+ statusCode: 400,
21
+ statusMessage: "Image URL is required"
22
+ });
23
+ }
24
+ let parsedUrl;
25
+ try {
26
+ parsedUrl = new URL(url);
27
+ } catch {
28
+ throw createError({
29
+ statusCode: 400,
30
+ statusMessage: "Invalid image URL"
31
+ });
32
+ }
33
+ if (parsedUrl.protocol !== "http:" && parsedUrl.protocol !== "https:") {
34
+ throw createError({
35
+ statusCode: 400,
36
+ statusMessage: "Invalid URL scheme"
37
+ });
38
+ }
39
+ const domainAllowed = typeof config.allowedDomains === "function" ? config.allowedDomains(parsedUrl.hostname) : config.allowedDomains.includes(parsedUrl.hostname);
40
+ if (!domainAllowed) {
41
+ throw createError({
42
+ statusCode: 403,
43
+ statusMessage: "Domain not allowed"
44
+ });
45
+ }
46
+ const headers = { Accept: accept };
47
+ if (userAgent)
48
+ headers["User-Agent"] = userAgent;
49
+ const response = await $fetch.raw(url, {
50
+ timeout: 5e3,
51
+ redirect: followRedirects ? "follow" : "manual",
52
+ ignoreResponseError: !followRedirects,
53
+ headers
54
+ }).catch((error) => {
55
+ throw createError({
56
+ statusCode: error.statusCode || 500,
57
+ statusMessage: error.statusMessage || "Failed to fetch image"
58
+ });
59
+ });
60
+ if (!followRedirects && response.status >= 300 && response.status < 400) {
61
+ throw createError({
62
+ statusCode: 403,
63
+ statusMessage: "Redirects not allowed"
64
+ });
65
+ }
66
+ setHeader(event, "Content-Type", response.headers.get("content-type") || contentType);
67
+ setHeader(event, "Cache-Control", `public, max-age=${cacheMaxAge}, s-maxage=${cacheMaxAge}`);
68
+ return response._data;
69
+ });
70
+ }
@@ -1,53 +1,9 @@
1
- import { createError, defineEventHandler, getQuery, setHeader } from "h3";
2
- import { $fetch } from "ofetch";
3
- export default defineEventHandler(async (event) => {
4
- const query = getQuery(event);
5
- const url = query.url;
6
- if (!url) {
7
- throw createError({
8
- statusCode: 400,
9
- statusMessage: "Image URL is required"
10
- });
11
- }
12
- let parsedUrl;
13
- try {
14
- parsedUrl = new URL(url);
15
- } catch {
16
- throw createError({
17
- statusCode: 400,
18
- statusMessage: "Invalid image URL"
19
- });
20
- }
21
- if (parsedUrl.protocol !== "http:" && parsedUrl.protocol !== "https:") {
22
- throw createError({
23
- statusCode: 400,
24
- statusMessage: "Invalid URL scheme"
25
- });
26
- }
27
- const allowedDomains = [
1
+ import { createImageProxyHandler } from "./utils/image-proxy.js";
2
+ export default createImageProxyHandler({
3
+ allowedDomains: [
28
4
  "pbs.twimg.com",
29
5
  "abs.twimg.com",
30
6
  "video.twimg.com"
31
- ];
32
- if (!allowedDomains.includes(parsedUrl.hostname)) {
33
- throw createError({
34
- statusCode: 403,
35
- statusMessage: "Domain not allowed"
36
- });
37
- }
38
- const response = await $fetch.raw(url, {
39
- timeout: 5e3,
40
- headers: {
41
- "Accept": "image/webp,image/jpeg,image/png,image/*,*/*;q=0.8",
42
- "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36"
43
- }
44
- }).catch((error) => {
45
- throw createError({
46
- statusCode: error.statusCode || 500,
47
- statusMessage: error.statusMessage || "Failed to fetch image"
48
- });
49
- });
50
- setHeader(event, "Content-Type", response.headers.get("content-type") || "image/jpeg");
51
- setHeader(event, "Cache-Control", "public, max-age=3600, s-maxage=3600");
52
- return response._data;
7
+ ],
8
+ userAgent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36"
53
9
  });
@@ -3,6 +3,7 @@ import type { Script } from '@unhead/vue/types';
3
3
  import type { Import } from 'unimport';
4
4
  import type { InferInput, ObjectSchema, UnionSchema, ValiError } from 'valibot';
5
5
  import type { ComputedRef, Ref } from 'vue';
6
+ import type { BlueskyEmbedInput } from './registry/bluesky-embed.js';
6
7
  import type { ClarityInput } from './registry/clarity.js';
7
8
  import type { CloudflareWebAnalyticsInput } from './registry/cloudflare-web-analytics.js';
8
9
  import type { CrispInput } from './registry/crisp.js';
@@ -155,6 +156,7 @@ export interface NuxtDevToolsScriptInstance {
155
156
  }[];
156
157
  }
157
158
  export interface ScriptRegistry {
159
+ blueskyEmbed?: BlueskyEmbedInput;
158
160
  crisp?: CrispInput;
159
161
  clarity?: ClarityInput;
160
162
  cloudflareWebAnalytics?: CloudflareWebAnalyticsInput;
@@ -214,6 +216,11 @@ export type RegistryScriptInput<T = EmptyOptionsSchema, Bundelable extends boole
214
216
  scriptInput: Required<Pick<ScriptInput, 'src'>> & ScriptInput;
215
217
  scriptOptions?: Omit<NuxtUseScriptOptions, Bundelable extends true ? '' : 'bundle' | Usable extends true ? '' : 'use'>;
216
218
  } : never);
219
+ export interface RegistryScriptServerHandler {
220
+ route: string;
221
+ handler: string;
222
+ middleware?: boolean;
223
+ }
217
224
  export interface RegistryScript {
218
225
  /**
219
226
  * The config key used in `scripts.registry` in nuxt.config (e.g., 'googleAnalytics', 'plausibleAnalytics').
@@ -240,6 +247,10 @@ export interface RegistryScript {
240
247
  light: string;
241
248
  dark: string;
242
249
  };
250
+ /**
251
+ * Server handlers (routes/middleware) to register when this script is enabled via registry config.
252
+ */
253
+ serverHandlers?: RegistryScriptServerHandler[];
243
254
  }
244
255
  export type ElementScriptTrigger = 'immediate' | 'visible' | string | string[] | false;
245
256
  export type RegistryScripts = RegistryScript[];
@@ -14,5 +14,6 @@ type OptionsFn<O> = (options: InferIfSchema<O>, ctx: {
14
14
  scriptMode?: 'external' | 'npm';
15
15
  });
16
16
  export declare function scriptRuntimeConfig<T extends keyof ScriptRegistry>(key: T): ScriptRegistry[T];
17
+ export declare function requireRegistryEndpoint(componentName: string, registryKey: string): void;
17
18
  export declare function useRegistryScript<T extends Record<string | symbol, any>, O = EmptyOptionsSchema>(registryKey: keyof ScriptRegistry | string, optionsFn: OptionsFn<O>, _userOptions?: RegistryScriptInput<O>): UseScriptContext<UseFunctionType<NuxtUseScriptOptions<T>, T>>;
18
19
  export * from './utils/pure.js';
@@ -1,6 +1,6 @@
1
1
  import { parse } from "#nuxt-scripts-validator";
2
2
  import { defu } from "defu";
3
- import { useRuntimeConfig } from "nuxt/app";
3
+ import { createError, useRuntimeConfig } from "nuxt/app";
4
4
  import { parseQuery, parseURL, withQuery } from "ufo";
5
5
  import { useScript } from "./composables/useScript.js";
6
6
  import { createNpmScriptStub } from "./npm-script-stub.js";
@@ -21,6 +21,15 @@ function validateScriptInputSchema(key, schema, options) {
21
21
  export function scriptRuntimeConfig(key) {
22
22
  return (useRuntimeConfig().public.scripts || {})[key];
23
23
  }
24
+ export function requireRegistryEndpoint(componentName, registryKey) {
25
+ const endpoints = useRuntimeConfig().public["nuxt-scripts"]?.endpoints;
26
+ if (!endpoints?.[registryKey]) {
27
+ throw createError({
28
+ message: `${componentName} requires \`scripts.registry.${registryKey}\` to be enabled in nuxt.config`,
29
+ fatal: import.meta.dev
30
+ });
31
+ }
32
+ }
24
33
  export function useRegistryScript(registryKey, optionsFn, _userOptions) {
25
34
  const scriptConfig = scriptRuntimeConfig(registryKey);
26
35
  const userOptions = Object.assign(_userOptions || {}, typeof scriptConfig === "object" ? scriptConfig : {});
@@ -49,7 +58,7 @@ export function useRegistryScript(registryKey, optionsFn, _userOptions) {
49
58
  };
50
59
  }
51
60
  const scriptInput = defu(finalScriptInput, userOptions.scriptInput, { key: registryKey });
52
- const scriptOptions = Object.assign(userOptions?.scriptOptions || {}, options.scriptOptions || {});
61
+ const scriptOptions = { ...userOptions?.scriptOptions, ...options.scriptOptions };
53
62
  if (import.meta.dev) {
54
63
  const error = new Error("Stack trace for component location");
55
64
  const stack = error.stack?.split("\n");
package/dist/stats.mjs CHANGED
@@ -734,7 +734,7 @@ function deriveMetaKey(importName, label) {
734
734
  async function getScriptStats() {
735
735
  const { registry } = await import('./registry.mjs');
736
736
  const entries = await registry();
737
- const proxyConfigs = getAllProxyConfigs("/_scripts");
737
+ const proxyConfigs = getAllProxyConfigs("/_scripts/assets");
738
738
  const sizes = scriptSizes;
739
739
  return entries.map((entry) => {
740
740
  const metaKey = deriveMetaKey(entry.import?.name, entry.label);
@@ -193,6 +193,18 @@ const stripe = [
193
193
  }
194
194
  ];
195
195
  const registryTypes = {
196
+ "bluesky-embed": [
197
+ {
198
+ name: "BlueskyEmbedOptions",
199
+ kind: "const",
200
+ code: "export const BlueskyEmbedOptions = object({\n /**\n * The Bluesky post URL to embed.\n * @example 'https://bsky.app/profile/bsky.app/post/3mgnwwvj3u22a'\n */\n postUrl: string(),\n /**\n * Custom API endpoint for fetching post data.\n * @default '/_scripts/embed/bluesky'\n */\n apiEndpoint: optional(string()),\n /**\n * Custom image proxy endpoint.\n * @default '/_scripts/embed/bluesky-image'\n */\n imageProxyEndpoint: optional(string()),\n})"
201
+ },
202
+ {
203
+ name: "BlueskyEmbedPostData",
204
+ kind: "interface",
205
+ code: "export interface BlueskyEmbedPostData {\n uri: string\n cid: string\n author: {\n did: string\n handle: string\n displayName: string\n avatar: string\n labels: Array<{ val: string }>\n verification?: {\n verifiedStatus: string\n }\n }\n record: {\n $type: string\n createdAt: string\n text: string\n langs?: string[]\n facets?: Array<{\n features: Array<{\n $type: string\n uri?: string\n did?: string\n tag?: string\n }>\n index: {\n byteStart: number\n byteEnd: number\n }\n }>\n embed?: {\n $type: string\n images?: Array<{\n alt: string\n image: { ref: { $link: string }, mimeType: string, size: number }\n aspectRatio?: { width: number, height: number }\n }>\n external?: {\n uri: string\n title: string\n description: string\n thumb?: { ref: { $link: string }, mimeType: string, size: number }\n }\n }\n }\n embed?: {\n $type: string\n images?: Array<{\n thumb: string\n fullsize: string\n alt: string\n aspectRatio?: { width: number, height: number }\n }>\n external?: {\n uri: string\n title: string\n description: string\n thumb?: string\n }\n }\n likeCount: number\n repostCount: number\n replyCount: number\n quoteCount: number\n indexedAt: string\n labels: Array<{ val: string }>\n}"
206
+ }
207
+ ],
196
208
  clarity: clarity,
197
209
  "cloudflare-web-analytics": [
198
210
  {
@@ -499,17 +511,17 @@ const registryTypes = {
499
511
  {
500
512
  name: "InstagramEmbedOptions",
501
513
  kind: "const",
502
- code: "export const InstagramEmbedOptions = object({\n /**\n * The Instagram post URL to embed.\n * @example 'https://www.instagram.com/p/C_XXXXXXXXX/'\n * @see https://developers.facebook.com/docs/instagram/oembed/\n */\n postUrl: string(),\n /**\n * Whether to include captions in the embed.\n * @default true\n */\n captions: optional(boolean()),\n /**\n * Custom API endpoint for fetching embed HTML.\n * @default '/api/_scripts/instagram-embed'\n */\n apiEndpoint: optional(string()),\n})"
514
+ code: "export const InstagramEmbedOptions = object({\n /**\n * The Instagram post URL to embed.\n * @example 'https://www.instagram.com/p/C_XXXXXXXXX/'\n * @see https://developers.facebook.com/docs/instagram/oembed/\n */\n postUrl: string(),\n /**\n * Whether to include captions in the embed.\n * @default true\n */\n captions: optional(boolean()),\n /**\n * Custom API endpoint for fetching embed HTML.\n * @default '/_scripts/embed/instagram'\n */\n apiEndpoint: optional(string()),\n})"
503
515
  },
504
516
  {
505
517
  name: "ScriptInstagramEmbedProps",
506
518
  kind: "interface",
507
- code: "interface ScriptInstagramEmbedProps {\n /**\n * The Instagram post URL to embed\n * e.g., https://www.instagram.com/p/ABC123/\n */\n postUrl: string\n /**\n * Whether to include captions in the embed\n * @default true\n */\n captions?: boolean\n /**\n * Custom API endpoint for fetching embed HTML\n * @default '/api/_scripts/instagram-embed'\n */\n apiEndpoint?: string\n /**\n * Root element attributes\n */\n rootAttrs?: HTMLAttributes\n}"
519
+ code: "interface ScriptInstagramEmbedProps {\n /**\n * The Instagram post URL to embed\n * e.g., https://www.instagram.com/p/ABC123/\n */\n postUrl: string\n /**\n * Whether to include captions in the embed\n * @default true\n */\n captions?: boolean\n /**\n * Custom API endpoint for fetching embed HTML\n * @default '/_scripts/embed/instagram'\n */\n apiEndpoint?: string\n /**\n * Root element attributes\n */\n rootAttrs?: HTMLAttributes\n}"
508
520
  },
509
521
  {
510
522
  name: "ScriptInstagramEmbedDefaults",
511
523
  kind: "const",
512
- code: "const ScriptInstagramEmbedDefaults = {\n \"captions\": \"true\",\n \"apiEndpoint\": \"'/api/_scripts/instagram-embed'\"\n}"
524
+ code: "const ScriptInstagramEmbedDefaults = {\n \"captions\": \"true\",\n \"apiEndpoint\": \"'/_scripts/embed/instagram'\"\n}"
513
525
  }
514
526
  ],
515
527
  intercom: intercom,
@@ -789,7 +801,7 @@ const registryTypes = {
789
801
  {
790
802
  name: "XEmbedOptions",
791
803
  kind: "const",
792
- code: "export const XEmbedOptions = object({\n /**\n * The tweet ID to embed.\n * @example '1754336034228171055'\n * @see https://developer.x.com/en/docs/twitter-for-websites/embedded-tweets/overview\n */\n tweetId: string(),\n /**\n * Optional: Custom API endpoint for fetching tweet data.\n * @default '/api/_scripts/x-embed'\n */\n apiEndpoint: optional(string()),\n /**\n * Optional: Custom image proxy endpoint.\n * @default '/api/_scripts/x-embed-image'\n */\n imageProxyEndpoint: optional(string()),\n})"
804
+ code: "export const XEmbedOptions = object({\n /**\n * The tweet ID to embed.\n * @example '1754336034228171055'\n * @see https://developer.x.com/en/docs/twitter-for-websites/embedded-tweets/overview\n */\n tweetId: string(),\n /**\n * Optional: Custom API endpoint for fetching tweet data.\n * @default '/_scripts/embed/x'\n */\n apiEndpoint: optional(string()),\n /**\n * Optional: Custom image proxy endpoint.\n * @default '/_scripts/embed/x-image'\n */\n imageProxyEndpoint: optional(string()),\n})"
793
805
  },
794
806
  {
795
807
  name: "XEmbedTweetData",
@@ -799,12 +811,12 @@ const registryTypes = {
799
811
  {
800
812
  name: "ScriptXEmbedProps",
801
813
  kind: "interface",
802
- code: "interface ScriptXEmbedProps {\n /**\n * The tweet ID to embed\n */\n tweetId: string\n /**\n * Custom API endpoint for fetching tweet data\n * @default '/api/_scripts/x-embed'\n */\n apiEndpoint?: string\n /**\n * Custom image proxy endpoint\n * @default '/_scripts/x-embed-image'\n */\n imageProxyEndpoint?: string\n /**\n * Root element attributes\n */\n rootAttrs?: HTMLAttributes\n}"
814
+ code: "interface ScriptXEmbedProps {\n /**\n * The tweet ID to embed\n */\n tweetId: string\n /**\n * Custom API endpoint for fetching tweet data\n * @default '/_scripts/embed/x'\n */\n apiEndpoint?: string\n /**\n * Custom image proxy endpoint\n * @default '/_scripts/embed/x-image'\n */\n imageProxyEndpoint?: string\n /**\n * Root element attributes\n */\n rootAttrs?: HTMLAttributes\n}"
803
815
  },
804
816
  {
805
817
  name: "ScriptXEmbedDefaults",
806
818
  kind: "const",
807
- code: "const ScriptXEmbedDefaults = {\n \"apiEndpoint\": \"'/api/_scripts/x-embed'\",\n \"imageProxyEndpoint\": \"'/api/_scripts/x-embed-image'\"\n}"
819
+ code: "const ScriptXEmbedDefaults = {\n \"apiEndpoint\": \"'/_scripts/embed/x'\",\n \"imageProxyEndpoint\": \"'/_scripts/embed/x-image'\"\n}"
808
820
  }
809
821
  ],
810
822
  "x-pixel": [
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nuxt/scripts",
3
3
  "type": "module",
4
- "version": "1.0.0-beta.21",
4
+ "version": "1.0.0-beta.22",
5
5
  "description": "Load third-party scripts with better performance, privacy and DX in Nuxt Apps.",
6
6
  "author": {
7
7
  "name": "Harlan Wilton",
@@ -97,7 +97,7 @@
97
97
  },
98
98
  "dependencies": {
99
99
  "@nuxt/devtools-kit": "^3.2.3",
100
- "@nuxt/kit": "^4.3.1",
100
+ "@nuxt/kit": "^4.4.2",
101
101
  "@vueuse/core": "^14.2.1",
102
102
  "consola": "^3.4.2",
103
103
  "defu": "^6.1.4",
@@ -112,12 +112,13 @@
112
112
  "sirv": "^3.0.2",
113
113
  "std-env": "^4.0.0",
114
114
  "ufo": "^1.6.3",
115
+ "ultrahtml": "^1.6.0",
115
116
  "unplugin": "^3.0.0",
116
117
  "unstorage": "^1.17.4",
117
118
  "valibot": "^1.2.0"
118
119
  },
119
120
  "devDependencies": {
120
- "@antfu/eslint-config": "^7.7.0",
121
+ "@antfu/eslint-config": "^7.7.2",
121
122
  "@nuxt/devtools-ui-kit": "^3.2.3",
122
123
  "@nuxt/module-builder": "^1.0.2",
123
124
  "@nuxt/test-utils": "^4.0.0",
@@ -130,18 +131,18 @@
130
131
  "bumpp": "^10.4.1",
131
132
  "eslint": "^10.0.3",
132
133
  "eslint-plugin-harlanzw": "^0.5.17",
133
- "happy-dom": "^20.8.3",
134
+ "happy-dom": "^20.8.4",
134
135
  "knitwork": "^1.3.0",
135
- "nuxt": "^4.3.1",
136
+ "nuxt": "^4.4.2",
136
137
  "playwright-core": "^1.58.2",
137
138
  "posthog-js": "^1.360.1",
138
139
  "shiki": "^4.0.2",
139
140
  "typescript": "^5.9.3",
140
- "vitest": "^4.0.18",
141
+ "vitest": "^4.1.0",
141
142
  "vue": "^3.5.30",
142
143
  "vue-router": "^5.0.3",
143
144
  "vue-tsc": "^3.2.5",
144
- "@nuxt/scripts": "1.0.0-beta.21"
145
+ "@nuxt/scripts": "1.0.0-beta.22"
145
146
  },
146
147
  "resolutions": {
147
148
  "@nuxt/scripts": "workspace:*"
@@ -1 +0,0 @@
1
- {"id":"6660a023-888d-415f-b66d-ce774e6f8f11","timestamp":1773295617596,"prerendered":[]}
@@ -1 +0,0 @@
1
- .grid[data-v-df3b570e]{display:grid}.mb-2[data-v-df3b570e]{margin-bottom:.5rem}.mb-4[data-v-df3b570e]{margin-bottom:1rem}.max-w-520px[data-v-df3b570e]{max-width:520px}.min-h-screen[data-v-df3b570e]{min-height:100vh}.w-full[data-v-df3b570e]{width:100%}.flex[data-v-df3b570e]{display:flex}.place-content-center[data-v-df3b570e]{place-content:center}.items-center[data-v-df3b570e]{align-items:center}.justify-center[data-v-df3b570e]{justify-content:center}.overflow-hidden[data-v-df3b570e]{overflow:hidden}.bg-white[data-v-df3b570e]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-2[data-v-df3b570e]{padding-left:.5rem;padding-right:.5rem}.text-center[data-v-df3b570e]{text-align:center}.text-\[80px\][data-v-df3b570e]{font-size:80px}.text-2xl[data-v-df3b570e]{font-size:1.5rem;line-height:2rem}.text-sm[data-v-df3b570e]{font-size:.875rem;line-height:1.25rem}.text-\[\#020420\][data-v-df3b570e]{--un-text-opacity:1;color:rgb(2 4 32/var(--un-text-opacity))}.text-\[\#64748B\][data-v-df3b570e]{--un-text-opacity:1;color:rgb(100 116 139/var(--un-text-opacity))}.hover\:text-\[\#00DC82\][data-v-df3b570e]:hover{--un-text-opacity:1;color:rgb(0 220 130/var(--un-text-opacity))}.font-medium[data-v-df3b570e]{font-weight:500}.font-semibold[data-v-df3b570e]{font-weight:600}.leading-none[data-v-df3b570e]{line-height:1}.tracking-wide[data-v-df3b570e]{letter-spacing:.025em}.font-sans[data-v-df3b570e]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.tabular-nums[data-v-df3b570e]{--un-numeric-spacing:tabular-nums;font-variant-numeric:var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction)}.underline[data-v-df3b570e]{text-decoration-line:underline}.underline-offset-3[data-v-df3b570e]{text-underline-offset:3px}.antialiased[data-v-df3b570e]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media(prefers-color-scheme:dark){.dark\:bg-\[\#020420\][data-v-df3b570e]{--un-bg-opacity:1;background-color:rgb(2 4 32/var(--un-bg-opacity))}.dark\:text-white[data-v-df3b570e]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media(min-width:640px){.sm\:text-\[110px\][data-v-df3b570e]{font-size:110px}.sm\:text-3xl[data-v-df3b570e]{font-size:1.875rem;line-height:2.25rem}}
@@ -1 +0,0 @@
1
- .grid[data-v-fe397717]{display:grid}.mb-2[data-v-fe397717]{margin-bottom:.5rem}.mb-4[data-v-fe397717]{margin-bottom:1rem}.max-w-520px[data-v-fe397717]{max-width:520px}.min-h-screen[data-v-fe397717]{min-height:100vh}.place-content-center[data-v-fe397717]{place-content:center}.overflow-hidden[data-v-fe397717]{overflow:hidden}.bg-white[data-v-fe397717]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-2[data-v-fe397717]{padding-left:.5rem;padding-right:.5rem}.text-center[data-v-fe397717]{text-align:center}.text-\[80px\][data-v-fe397717]{font-size:80px}.text-2xl[data-v-fe397717]{font-size:1.5rem;line-height:2rem}.text-\[\#020420\][data-v-fe397717]{--un-text-opacity:1;color:rgb(2 4 32/var(--un-text-opacity))}.text-\[\#64748B\][data-v-fe397717]{--un-text-opacity:1;color:rgb(100 116 139/var(--un-text-opacity))}.font-semibold[data-v-fe397717]{font-weight:600}.leading-none[data-v-fe397717]{line-height:1}.tracking-wide[data-v-fe397717]{letter-spacing:.025em}.font-sans[data-v-fe397717]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.tabular-nums[data-v-fe397717]{--un-numeric-spacing:tabular-nums;font-variant-numeric:var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction)}.antialiased[data-v-fe397717]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media(prefers-color-scheme:dark){.dark\:bg-\[\#020420\][data-v-fe397717]{--un-bg-opacity:1;background-color:rgb(2 4 32/var(--un-bg-opacity))}.dark\:text-white[data-v-fe397717]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media(min-width:640px){.sm\:text-\[110px\][data-v-fe397717]{font-size:110px}.sm\:text-3xl[data-v-fe397717]{font-size:1.875rem;line-height:2.25rem}}