@nuxt/scripts 0.10.5 → 0.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/README.md +71 -71
  2. package/dist/client/200.html +10 -10
  3. package/dist/client/404.html +10 -10
  4. package/dist/client/_nuxt/{BOGJUGGn.js → BFM-Ncmx.js} +1 -1
  5. package/dist/client/_nuxt/{Bso10INu.js → BSA2bgdb.js} +1 -1
  6. package/dist/client/_nuxt/CtQNcfGE.js +1 -0
  7. package/dist/client/_nuxt/DuCkB5R-.js +21 -0
  8. package/dist/client/_nuxt/builds/latest.json +1 -1
  9. package/dist/client/_nuxt/builds/meta/6161796c-413c-4c03-ac47-cad81a701b23.json +1 -0
  10. package/dist/client/_nuxt/{entry.CJckMUzn.css → entry.ipQkUTQD.css} +1 -1
  11. package/dist/client/_nuxt/error-404.BdjopNsg.css +1 -0
  12. package/dist/client/_nuxt/error-500.Bd7Z7Q7I.css +1 -0
  13. package/dist/client/index.html +10 -10
  14. package/dist/module.json +2 -2
  15. package/dist/module.mjs +9 -13
  16. package/dist/runtime/components/ScriptAriaLoadingIndicator.vue +5 -5
  17. package/dist/runtime/components/ScriptCarbonAds.vue +83 -83
  18. package/dist/runtime/components/ScriptCrisp.vue +94 -94
  19. package/dist/runtime/components/ScriptGoogleAdsense.vue +93 -93
  20. package/dist/runtime/components/ScriptGoogleMaps.vue +469 -469
  21. package/dist/runtime/components/ScriptIntercom.vue +103 -103
  22. package/dist/runtime/components/ScriptLemonSqueezy.vue +52 -52
  23. package/dist/runtime/components/ScriptLoadingIndicator.vue +22 -22
  24. package/dist/runtime/components/ScriptStripePricingTable.vue +74 -74
  25. package/dist/runtime/components/ScriptVimeoPlayer.vue +289 -289
  26. package/dist/runtime/components/ScriptYouTubePlayer.vue +215 -215
  27. package/dist/runtime/composables/useScript.d.ts +4 -4
  28. package/dist/runtime/composables/useScript.js +10 -59
  29. package/dist/runtime/registry/google-analytics.js +0 -3
  30. package/dist/runtime/registry/google-maps.d.ts +4 -10
  31. package/dist/runtime/registry/google-tag-manager.js +0 -3
  32. package/dist/runtime/registry/matomo-analytics.js +0 -4
  33. package/dist/runtime/registry/segment.js +0 -18
  34. package/dist/runtime/types.d.ts +5 -2
  35. package/dist/runtime/utils.d.ts +2 -2
  36. package/dist/runtime/validation/mock.d.ts +13 -13
  37. package/dist/runtime/validation/mock.js +7 -1
  38. package/package.json +33 -35
  39. package/dist/client/_nuxt/BqRljlc8.js +0 -21
  40. package/dist/client/_nuxt/CgFBdOe6.js +0 -1
  41. package/dist/client/_nuxt/builds/meta/a79d2e11-f9af-444c-b10e-0675b6cf7f55.json +0 -1
  42. package/dist/client/_nuxt/error-404.DrjQUyCj.css +0 -1
  43. package/dist/client/_nuxt/error-500.CIXIBnf9.css +0 -1
@@ -1,6 +1,6 @@
1
1
  import type { ObjectSchema } from 'valibot';
2
2
  import type { UseScriptInput } from '@unhead/vue';
3
- import type { EmptyOptionsSchema, InferIfSchema, NuxtUseScriptOptions, RegistryScriptInput, ScriptRegistry } from '#nuxt-scripts/types';
3
+ import type { EmptyOptionsSchema, InferIfSchema, NuxtUseScriptOptions, RegistryScriptInput, UseFunctionType, ScriptRegistry, UseScriptContext } from '#nuxt-scripts/types';
4
4
  export type MaybePromise<T> = Promise<T> | T;
5
5
  type OptionsFn<O> = (options: InferIfSchema<O>) => ({
6
6
  scriptInput?: UseScriptInput;
@@ -9,6 +9,6 @@ type OptionsFn<O> = (options: InferIfSchema<O>) => ({
9
9
  clientInit?: () => void;
10
10
  });
11
11
  export declare function scriptRuntimeConfig<T extends keyof ScriptRegistry>(key: T): ScriptRegistry[T];
12
- export declare function useRegistryScript<T extends Record<string | symbol, any>, O = EmptyOptionsSchema, U = {}>(registryKey: keyof ScriptRegistry | string, optionsFn: OptionsFn<O>, _userOptions?: RegistryScriptInput<O>): import("#nuxt-scripts/types").UseScriptContext<T>;
12
+ export declare function useRegistryScript<T extends Record<string | symbol, any>, O = EmptyOptionsSchema, U = {}>(registryKey: keyof ScriptRegistry | string, optionsFn: OptionsFn<O>, _userOptions?: RegistryScriptInput<O>): UseScriptContext<UseFunctionType<NuxtUseScriptOptions<T>, T>>;
13
13
  export declare function pick(obj: Record<string, any>, keys: string[]): Record<string, any>;
14
14
  export {};
@@ -1,39 +1,39 @@
1
1
  export declare const parse: (() => void) & {
2
- __unenv__: boolean;
2
+ __mock__: boolean;
3
3
  };
4
4
  export declare const object: (() => void) & {
5
- __unenv__: boolean;
5
+ __mock__: boolean;
6
6
  };
7
7
  export declare const array: (() => void) & {
8
- __unenv__: boolean;
8
+ __mock__: boolean;
9
9
  };
10
10
  export declare const string: (() => void) & {
11
- __unenv__: boolean;
11
+ __mock__: boolean;
12
12
  };
13
13
  export declare const number: (() => void) & {
14
- __unenv__: boolean;
14
+ __mock__: boolean;
15
15
  };
16
16
  export declare const boolean: (() => void) & {
17
- __unenv__: boolean;
17
+ __mock__: boolean;
18
18
  };
19
19
  export declare const optional: (() => void) & {
20
- __unenv__: boolean;
20
+ __mock__: boolean;
21
21
  };
22
22
  export declare const literal: (() => void) & {
23
- __unenv__: boolean;
23
+ __mock__: boolean;
24
24
  };
25
25
  export declare const union: (() => void) & {
26
- __unenv__: boolean;
26
+ __mock__: boolean;
27
27
  };
28
28
  export declare const record: (() => void) & {
29
- __unenv__: boolean;
29
+ __mock__: boolean;
30
30
  };
31
31
  export declare const any: (() => void) & {
32
- __unenv__: boolean;
32
+ __mock__: boolean;
33
33
  };
34
34
  export declare const minLength: (() => void) & {
35
- __unenv__: boolean;
35
+ __mock__: boolean;
36
36
  };
37
37
  export declare const pipe: (() => void) & {
38
- __unenv__: boolean;
38
+ __mock__: boolean;
39
39
  };
@@ -1,4 +1,10 @@
1
- import noop from "unenv/runtime/mock/noop";
1
+ const noop = Object.freeze(
2
+ Object.assign(
3
+ () => {
4
+ },
5
+ { __mock__: true }
6
+ )
7
+ );
2
8
  export const parse = noop;
3
9
  export const object = noop;
4
10
  export const array = noop;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nuxt/scripts",
3
3
  "type": "module",
4
- "version": "0.10.5",
4
+ "version": "0.11.1",
5
5
  "description": "Load third-party scripts with better performance, privacy and DX in Nuxt Apps.",
6
6
  "author": {
7
7
  "website": "https://harlanzw.com",
@@ -43,15 +43,18 @@
43
43
  "#build/modules/nuxt-scripts-ga",
44
44
  "@vimeo/player",
45
45
  "esbuild",
46
- "unimport"
46
+ "unimport",
47
+ "#nuxt-scripts/types",
48
+ "#nuxt-scripts-validator"
47
49
  ]
48
50
  },
49
51
  "peerDependencies": {
50
- "@stripe/stripe-js": "^5.6.0",
52
+ "@stripe/stripe-js": "^5.10.0",
51
53
  "@types/google.maps": "^3.58.1",
52
54
  "@types/vimeo__player": "^2.18.3",
53
55
  "@types/youtube": "^0.1.0",
54
- "@unhead/vue": "^1"
56
+ "@unhead/vue": "^2.0.0-rc.8",
57
+ "nuxt": "^3.16.0"
55
58
  },
56
59
  "peerDependenciesMeta": {
57
60
  "@stripe/stripe-js": {
@@ -68,60 +71,55 @@
68
71
  }
69
72
  },
70
73
  "dependencies": {
71
- "@nuxt/kit": "^3.15.4",
72
- "@vueuse/core": "^12.7.0",
74
+ "@nuxt/kit": "^3.16.0",
75
+ "@vueuse/core": "^12.8.2",
73
76
  "consola": "^3.4.0",
74
77
  "defu": "^6.1.4",
75
- "h3": "^1.15.0",
78
+ "h3": "^1.15.1",
76
79
  "magic-string": "^0.30.17",
77
80
  "ofetch": "^1.4.1",
78
- "ohash": "^1.1.4",
81
+ "ohash": "^2.0.11",
79
82
  "pathe": "^2.0.3",
80
- "pkg-types": "^1.3.1",
81
- "semver": "^7.7.1",
83
+ "pkg-types": "^2.1.0",
82
84
  "sirv": "^3.0.1",
83
- "std-env": "^3.8.0",
85
+ "std-env": "^3.8.1",
84
86
  "ufo": "^1.5.4",
85
87
  "unplugin": "^2.2.0",
86
- "unstorage": "^1.14.4",
87
- "valibot": "^1.0.0-rc.1"
88
+ "unstorage": "^1.15.0",
89
+ "valibot": "^1.0.0-rc.3"
88
90
  },
89
91
  "devDependencies": {
90
- "@nuxt/devtools-kit": "^2.1.0",
91
- "@nuxt/devtools-ui-kit": "^2.1.0",
92
+ "@nuxt/devtools-kit": "^2.2.1",
93
+ "@nuxt/devtools-ui-kit": "^2.2.1",
92
94
  "@nuxt/eslint-config": "^1.1.0",
93
95
  "@nuxt/module-builder": "^0.8.4",
94
- "@nuxt/test-utils": "3.15.4",
96
+ "@nuxt/test-utils": "3.17.1",
95
97
  "@types/semver": "^7.5.8",
96
- "@typescript-eslint/typescript-estree": "^8.24.1",
97
- "@unhead/schema": "^1.11.19",
98
+ "@typescript-eslint/typescript-estree": "^8.26.0",
99
+ "@unhead/ssr": "^1.11.20",
98
100
  "acorn-loose": "^8.4.0",
99
101
  "bumpp": "^10.0.3",
100
- "changelogen": "^0.5.7",
101
- "eslint": "9.19.0",
102
- "eslint-plugin-n": "^17.15.1",
103
- "happy-dom": "^17.1.1",
102
+ "changelogen": "^0.6.1",
103
+ "eslint": "9.21.0",
104
+ "eslint-plugin-n": "^17.16.2",
105
+ "happy-dom": "^17.4.0",
104
106
  "knitwork": "^1.2.0",
105
- "nuxt": "^3.15.4",
106
- "playwright-core": "^1.50.1",
107
- "shiki": "2.3.2",
108
- "typescript": "5.7.3",
109
- "vitest": "^3.0.6",
107
+ "nuxt": "^3.16.0",
108
+ "playwright-core": "^1.51.0",
109
+ "shiki": "2.5.0",
110
+ "typescript": "5.8.2",
111
+ "vitest": "^3.0.8",
110
112
  "vue": "^3.5.13",
111
113
  "vue-router": "^4.5.0",
112
- "vue-tsc": "^2.2.2"
114
+ "vue-tsc": "^2.2.8",
115
+ "@nuxt/scripts": "0.11.1"
113
116
  },
114
117
  "resolutions": {
115
118
  "@nuxt/schema": "catalog:",
116
119
  "@nuxt/scripts": "workspace:*",
117
- "@unhead/dom": "1.11.18",
118
- "@unhead/schema": "1.11.18",
119
- "@unhead/shared": "1.11.18",
120
- "@unhead/ssr": "1.11.18",
121
- "@unhead/vue": "1.11.18",
120
+ "@unhead/vue": "2.0.0-rc.8",
122
121
  "nuxt": "catalog:",
123
- "typescript": "5.6.3",
124
- "unhead": "1.11.18",
122
+ "typescript": "5.8.2",
125
123
  "vue": "^3.5.13",
126
124
  "vue-router": "^4.5.0"
127
125
  },