@nuxt/scripts 0.13.2 → 1.0.0-beta.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. package/README.md +15 -0
  2. package/dist/client/200.html +1 -1
  3. package/dist/client/404.html +1 -1
  4. package/dist/client/_nuxt/48AF9EJD.js +1 -0
  5. package/dist/client/_nuxt/Bk6ed9rg.js +1 -0
  6. package/dist/client/_nuxt/C4Cj8gBr.js +162 -0
  7. package/dist/client/_nuxt/{Bje-0OHL.js → DP0kj6Xn.js} +1 -1
  8. package/dist/client/_nuxt/builds/latest.json +1 -1
  9. package/dist/client/_nuxt/builds/meta/919b81d8-ed3a-4222-8a40-df0031cc3b99.json +1 -0
  10. package/dist/client/_nuxt/entry.D45OuV0w.css +1 -0
  11. package/dist/client/_nuxt/error-404.B57D-jUQ.css +1 -0
  12. package/dist/client/_nuxt/error-500.DTHUW7BI.css +1 -0
  13. package/dist/client/index.html +1 -1
  14. package/dist/module.d.mts +113 -4
  15. package/dist/module.d.ts +176 -0
  16. package/dist/module.json +1 -1
  17. package/dist/module.mjs +780 -299
  18. package/dist/registry.d.ts +6 -0
  19. package/dist/registry.mjs +94 -18
  20. package/dist/runtime/components/GoogleMaps/ScriptGoogleMaps.d.vue.ts +30 -2
  21. package/dist/runtime/components/GoogleMaps/ScriptGoogleMaps.vue +40 -15
  22. package/dist/runtime/components/GoogleMaps/ScriptGoogleMaps.vue.d.ts +30 -2
  23. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsAdvancedMarkerElement.vue +6 -6
  24. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsCircle.vue +7 -7
  25. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsHeatmapLayer.vue +6 -6
  26. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsInfoWindow.vue +12 -12
  27. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarker.vue +6 -6
  28. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarkerClusterer.d.vue.ts +21 -9
  29. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarkerClusterer.vue +8 -8
  30. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarkerClusterer.vue.d.ts +21 -9
  31. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPinElement.vue +11 -5
  32. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPolygon.vue +7 -7
  33. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPolyline.vue +7 -7
  34. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsRectangle.vue +7 -7
  35. package/dist/runtime/components/ScriptCrisp.d.vue.ts +1 -1
  36. package/dist/runtime/components/ScriptCrisp.vue +1 -1
  37. package/dist/runtime/components/ScriptCrisp.vue.d.ts +1 -1
  38. package/dist/runtime/components/ScriptGoogleAdsense.vue +1 -1
  39. package/dist/runtime/components/ScriptInstagramEmbed.d.vue.ts +53 -0
  40. package/dist/runtime/components/ScriptInstagramEmbed.vue +38 -0
  41. package/dist/runtime/components/ScriptInstagramEmbed.vue.d.ts +53 -0
  42. package/dist/runtime/components/ScriptIntercom.d.vue.ts +1 -1
  43. package/dist/runtime/components/ScriptIntercom.vue +4 -3
  44. package/dist/runtime/components/ScriptIntercom.vue.d.ts +1 -1
  45. package/dist/runtime/components/ScriptPayPalButtons.d.vue.ts +2 -2
  46. package/dist/runtime/components/ScriptPayPalButtons.vue +13 -11
  47. package/dist/runtime/components/ScriptPayPalButtons.vue.d.ts +2 -2
  48. package/dist/runtime/components/ScriptPayPalMarks.d.vue.ts +2 -2
  49. package/dist/runtime/components/ScriptPayPalMarks.vue +10 -8
  50. package/dist/runtime/components/ScriptPayPalMarks.vue.d.ts +2 -2
  51. package/dist/runtime/components/ScriptPayPalMessages.d.vue.ts +2 -2
  52. package/dist/runtime/components/ScriptPayPalMessages.vue +11 -9
  53. package/dist/runtime/components/ScriptPayPalMessages.vue.d.ts +2 -2
  54. package/dist/runtime/components/ScriptStripePricingTable.vue +2 -2
  55. package/dist/runtime/components/ScriptVimeoPlayer.d.vue.ts +2 -2
  56. package/dist/runtime/components/ScriptVimeoPlayer.vue +1 -1
  57. package/dist/runtime/components/ScriptVimeoPlayer.vue.d.ts +2 -2
  58. package/dist/runtime/components/ScriptXEmbed.d.vue.ts +82 -0
  59. package/dist/runtime/components/ScriptXEmbed.vue +76 -0
  60. package/dist/runtime/components/ScriptXEmbed.vue.d.ts +82 -0
  61. package/dist/runtime/components/ScriptYouTubePlayer.d.vue.ts +12 -1
  62. package/dist/runtime/components/ScriptYouTubePlayer.vue +44 -16
  63. package/dist/runtime/components/ScriptYouTubePlayer.vue.d.ts +12 -1
  64. package/dist/runtime/composables/useScript.js +36 -5
  65. package/dist/runtime/composables/useScriptEventPage.js +2 -2
  66. package/dist/runtime/composables/useScriptTriggerConsent.js +1 -1
  67. package/dist/runtime/composables/useScriptTriggerElement.js +1 -1
  68. package/dist/runtime/composables/useScriptTriggerIdleTimeout.js +1 -1
  69. package/dist/runtime/composables/useScriptTriggerServiceWorker.d.ts +7 -0
  70. package/dist/runtime/composables/useScriptTriggerServiceWorker.js +39 -0
  71. package/dist/runtime/npm-script-stub.d.ts +20 -0
  72. package/dist/runtime/npm-script-stub.js +73 -0
  73. package/dist/runtime/registry/clarity.js +21 -25
  74. package/dist/runtime/registry/cloudflare-web-analytics.js +1 -1
  75. package/dist/runtime/registry/crisp.js +1 -1
  76. package/dist/runtime/registry/databuddy-analytics.js +1 -1
  77. package/dist/runtime/registry/fathom-analytics.js +1 -1
  78. package/dist/runtime/registry/google-adsense.js +1 -1
  79. package/dist/runtime/registry/google-analytics.js +2 -2
  80. package/dist/runtime/registry/google-maps.d.ts +1 -1
  81. package/dist/runtime/registry/google-maps.js +1 -1
  82. package/dist/runtime/registry/google-recaptcha.d.ts +27 -0
  83. package/dist/runtime/registry/google-recaptcha.js +45 -0
  84. package/dist/runtime/registry/google-sign-in.d.ts +84 -0
  85. package/dist/runtime/registry/google-sign-in.js +50 -0
  86. package/dist/runtime/registry/google-tag-manager.d.ts +4 -2
  87. package/dist/runtime/registry/google-tag-manager.js +16 -6
  88. package/dist/runtime/registry/hotjar.js +1 -1
  89. package/dist/runtime/registry/instagram-embed.d.ts +23 -0
  90. package/dist/runtime/registry/instagram-embed.js +22 -0
  91. package/dist/runtime/registry/intercom.js +1 -1
  92. package/dist/runtime/registry/lemon-squeezy.d.ts +0 -1
  93. package/dist/runtime/registry/matomo-analytics.js +3 -3
  94. package/dist/runtime/registry/meta-pixel.js +1 -1
  95. package/dist/runtime/registry/npm.js +1 -1
  96. package/dist/runtime/registry/paypal.d.ts +1 -1
  97. package/dist/runtime/registry/paypal.js +2 -2
  98. package/dist/runtime/registry/plausible-analytics.js +21 -13
  99. package/dist/runtime/registry/posthog.d.ts +27 -0
  100. package/dist/runtime/registry/posthog.js +88 -0
  101. package/dist/runtime/registry/reddit-pixel.js +1 -1
  102. package/dist/runtime/registry/rybbit-analytics.js +41 -9
  103. package/dist/runtime/registry/segment.js +1 -1
  104. package/dist/runtime/registry/snapchat-pixel.js +1 -1
  105. package/dist/runtime/registry/stripe.d.ts +1 -1
  106. package/dist/runtime/registry/stripe.js +1 -1
  107. package/dist/runtime/registry/tiktok-pixel.d.ts +44 -0
  108. package/dist/runtime/registry/tiktok-pixel.js +44 -0
  109. package/dist/runtime/registry/umami-analytics.js +1 -1
  110. package/dist/runtime/registry/vimeo-player.d.ts +2 -2
  111. package/dist/runtime/registry/vimeo-player.js +1 -1
  112. package/dist/runtime/registry/x-embed.d.ts +77 -0
  113. package/dist/runtime/registry/x-embed.js +41 -0
  114. package/dist/runtime/registry/x-pixel.js +1 -1
  115. package/dist/runtime/registry/youtube-player.d.ts +7 -7
  116. package/dist/runtime/registry/youtube-player.js +1 -1
  117. package/dist/runtime/server/google-static-maps-proxy.d.ts +2 -0
  118. package/dist/runtime/server/google-static-maps-proxy.js +54 -0
  119. package/dist/runtime/server/instagram-embed-asset.d.ts +2 -0
  120. package/dist/runtime/server/instagram-embed-asset.js +42 -0
  121. package/dist/runtime/server/instagram-embed-image.d.ts +2 -0
  122. package/dist/runtime/server/instagram-embed-image.js +54 -0
  123. package/dist/runtime/server/instagram-embed.d.ts +2 -0
  124. package/dist/runtime/server/instagram-embed.js +91 -0
  125. package/dist/runtime/server/proxy-handler.d.ts +6 -0
  126. package/dist/runtime/server/proxy-handler.js +264 -0
  127. package/dist/runtime/server/utils/privacy.d.ts +141 -0
  128. package/dist/runtime/server/utils/privacy.js +324 -0
  129. package/dist/runtime/server/x-embed-image.d.ts +2 -0
  130. package/dist/runtime/server/x-embed-image.js +53 -0
  131. package/dist/runtime/server/x-embed.d.ts +49 -0
  132. package/dist/runtime/server/x-embed.js +31 -0
  133. package/dist/runtime/types.d.ts +61 -20
  134. package/dist/runtime/utils/pure.d.ts +9 -0
  135. package/dist/runtime/utils/pure.js +0 -0
  136. package/dist/runtime/utils.d.ts +5 -4
  137. package/dist/runtime/utils.js +12 -2
  138. package/dist/shared/scripts.DLRgvHQg.mjs +288 -0
  139. package/dist/stats.d.mts +39 -0
  140. package/dist/stats.d.ts +39 -0
  141. package/dist/stats.mjs +711 -0
  142. package/dist/types.d.mts +1 -1
  143. package/package.json +59 -46
  144. package/dist/client/_nuxt/DMut0W-e.js +0 -162
  145. package/dist/client/_nuxt/builds/meta/5e0206fe-a683-423c-8d59-2596d0b16fee.json +0 -1
  146. package/dist/client/_nuxt/entry.BjfcJo5q.css +0 -1
  147. package/dist/client/_nuxt/error-404.B0ZhSNwd.css +0 -1
  148. package/dist/client/_nuxt/error-500.D4MdgPaC.css +0 -1
  149. package/dist/client/_nuxt/iNmKC7TZ.js +0 -1
  150. package/dist/client/_nuxt/rttsH3SL.js +0 -1
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@nuxt/scripts",
3
3
  "type": "module",
4
- "version": "0.13.2",
4
+ "version": "1.0.0-beta.12",
5
5
  "description": "Load third-party scripts with better performance, privacy and DX in Nuxt Apps.",
6
6
  "author": {
7
- "website": "https://harlanzw.com",
8
7
  "name": "Harlan Wilton",
9
- "url": "harlan@harlanzw.com"
8
+ "email": "harlan@harlanzw.com",
9
+ "url": "https://harlanzw.com"
10
10
  },
11
11
  "license": "MIT",
12
12
  "repository": {
@@ -22,12 +22,11 @@
22
22
  "types": "./dist/types.d.mts",
23
23
  "import": "./dist/module.mjs"
24
24
  },
25
- "./registry": "./dist/registry.mjs"
25
+ "./registry": "./dist/registry.mjs",
26
+ "./stats": "./dist/stats.mjs"
26
27
  },
27
28
  "main": "./dist/module.mjs",
28
- "files": [
29
- "dist"
30
- ],
29
+ "types": "./dist/types.d.mts",
31
30
  "typesVersions": {
32
31
  "*": {
33
32
  ".": [
@@ -35,22 +34,28 @@
35
34
  ],
36
35
  "registry": [
37
36
  "./dist/registry.d.mts"
37
+ ],
38
+ "stats": [
39
+ "./dist/stats.d.mts"
38
40
  ]
39
41
  }
40
42
  },
43
+ "files": [
44
+ "dist"
45
+ ],
41
46
  "build": {
42
47
  "externals": [
43
48
  "@unhead/vue",
44
49
  "@unhead/schema",
45
50
  "knitwork",
46
- "estree-walker",
47
51
  "#build/modules/nuxt-scripts-gtm",
48
52
  "#build/modules/nuxt-scripts-ga",
49
53
  "@vimeo/player",
50
54
  "esbuild",
51
55
  "unimport",
52
56
  "#nuxt-scripts/types",
53
- "#nuxt-scripts-validator"
57
+ "#nuxt-scripts-validator",
58
+ "posthog-js"
54
59
  ]
55
60
  },
56
61
  "peerDependencies": {
@@ -60,16 +65,17 @@
60
65
  "@types/google.maps": "^3.58.1",
61
66
  "@types/vimeo__player": "^2.18.3",
62
67
  "@types/youtube": "^0.1.0",
63
- "@unhead/vue": "^2.0.3"
68
+ "@unhead/vue": "^2.0.3",
69
+ "posthog-js": "^1.0.0"
64
70
  },
65
71
  "peerDependenciesMeta": {
66
72
  "@googlemaps/markerclusterer": {
67
73
  "optional": true
68
74
  },
69
- "@stripe/stripe-js": {
75
+ "@paypal/paypal-js": {
70
76
  "optional": true
71
77
  },
72
- "@paypal/paypal-js": {
78
+ "@stripe/stripe-js": {
73
79
  "optional": true
74
80
  },
75
81
  "@types/google.maps": {
@@ -80,52 +86,58 @@
80
86
  },
81
87
  "@types/youtube": {
82
88
  "optional": true
89
+ },
90
+ "posthog-js": {
91
+ "optional": true
83
92
  }
84
93
  },
85
94
  "dependencies": {
86
- "@nuxt/kit": "^4.2.2",
87
- "@vueuse/core": "^14.1.0",
95
+ "@nuxt/devtools-kit": "^3.2.2",
96
+ "@nuxt/kit": "^4.3.1",
97
+ "@vueuse/core": "^14.2.1",
88
98
  "consola": "^3.4.2",
89
99
  "defu": "^6.1.4",
90
- "h3": "^1.15.4",
100
+ "h3": "^1.15.5",
91
101
  "magic-string": "^0.30.21",
92
102
  "ofetch": "^1.5.1",
93
103
  "ohash": "^2.0.11",
104
+ "oxc-parser": "^0.116.0",
105
+ "oxc-walker": "^0.7.0",
94
106
  "pathe": "^2.0.3",
95
107
  "pkg-types": "^2.3.0",
96
108
  "sirv": "^3.0.2",
97
109
  "std-env": "^3.10.0",
98
- "ufo": "^1.6.1",
99
- "unplugin": "^2.3.11",
100
- "unstorage": "^1.17.3",
110
+ "ufo": "^1.6.3",
111
+ "unplugin": "^3.0.0",
112
+ "unstorage": "^1.17.4",
101
113
  "valibot": "^1.2.0"
102
114
  },
103
115
  "devDependencies": {
104
- "@nuxt/devtools-kit": "^3.1.1",
105
- "@nuxt/devtools-ui-kit": "^3.1.1",
106
- "@nuxt/eslint-config": "^1.12.1",
116
+ "@antfu/eslint-config": "^7.6.1",
117
+ "@nuxt/devtools-ui-kit": "^3.2.2",
107
118
  "@nuxt/module-builder": "^1.0.2",
108
- "@nuxt/test-utils": "3.19.2",
109
- "@paypal/paypal-js": "^9.1.0",
119
+ "@nuxt/test-utils": "^4.0.0",
120
+ "@nuxtjs/partytown": "^2.0.0",
121
+ "@paypal/paypal-js": "^9.4.0",
110
122
  "@types/semver": "^7.7.1",
111
- "@typescript-eslint/typescript-estree": "^8.50.0",
123
+ "@types/youtube": "^0.1.2",
124
+ "@typescript-eslint/typescript-estree": "^8.56.1",
112
125
  "@vue/test-utils": "^2.4.6",
113
- "acorn-loose": "^8.5.2",
114
- "bumpp": "^10.3.2",
115
- "changelogen": "^0.6.2",
116
- "eslint": "^9.39.2",
117
- "eslint-plugin-n": "^17.23.1",
118
- "happy-dom": "^20.0.11",
126
+ "bumpp": "^10.4.1",
127
+ "eslint": "^10.0.2",
128
+ "eslint-plugin-harlanzw": "^0.3.0",
129
+ "happy-dom": "^20.8.3",
119
130
  "knitwork": "^1.3.0",
120
- "nuxt": "^4.2.2",
121
- "playwright-core": "^1.57.0",
122
- "shiki": "^3.20.0",
123
- "typescript": "5.9.3",
124
- "vitest": "^4.0.16",
125
- "vue": "^3.5.26",
126
- "vue-router": "^4.6.4",
127
- "vue-tsc": "^3.1.8",
128
- "@nuxt/scripts": "0.13.2"
131
+ "nuxt": "^4.3.1",
132
+ "playwright-core": "^1.58.2",
133
+ "posthog-js": "^1.358.0",
134
+ "shiki": "^4.0.1",
135
+ "typescript": "^5.9.3",
136
+ "vitest": "^4.0.18",
137
+ "vue": "^3.5.29",
138
+ "vue-router": "^5.0.3",
139
+ "vue-tsc": "^3.2.5",
140
+ "@nuxt/scripts": "1.0.0-beta.12"
129
141
  },
130
142
  "resolutions": {
131
143
  "@nuxt/scripts": "workspace:*"
@@ -136,14 +148,15 @@
136
148
  "client:dev": "nuxi dev client --port 3300",
137
149
  "dev": "nuxi dev playground",
138
150
  "dev:ssl": "nuxi dev playground --https",
139
- "prepare:fixtures": "nuxi prepare test/fixtures/basic && nuxi prepare test/fixtures/cdn && nuxi prepare test/fixtures/extend-registry",
140
- "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground && pnpm run prepare:fixtures",
141
- "typecheck": "vue-tsc --noEmit",
142
- "bump": "bumpp package.json --commit --push --tag",
143
- "release": "pnpm build && bumpp -x \"npx changelogen --output=CHANGELOG.md\"",
151
+ "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground && pnpm prepare:fixtures",
152
+ "prepare:fixtures": "nuxi prepare test/fixtures/basic && nuxi prepare test/fixtures/cdn && nuxi prepare test/fixtures/extend-registry && nuxi prepare test/fixtures/partytown && nuxi prepare test/fixtures/first-party",
153
+ "typecheck": "nuxt typecheck",
154
+ "release": "pnpm build && bumpp --output=CHANGELOG.md",
144
155
  "lint": "eslint .",
145
156
  "lint:fix": "eslint . --fix",
146
- "test": "pnpm dev:prepare && vitest --run",
147
- "test:types": "echo 'broken due to type regeneration, use pnpm typecheck' && npx nuxi typecheck"
157
+ "test": "vitest",
158
+ "test:run": "vitest run",
159
+ "test:e2e-dev": "vitest run --project e2e-dev",
160
+ "test:types": "vitest run --project typecheck"
148
161
  }
149
162
  }