@nuxt/scripts 1.0.0-beta.1 → 1.0.0-beta.13

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 (139) hide show
  1. package/README.md +6 -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/{DTDyDxvR.js → DP0kj6Xn.js} +1 -1
  8. package/dist/client/_nuxt/builds/latest.json +1 -1
  9. package/dist/client/_nuxt/builds/meta/0e95b1cc-8751-4000-8cb4-a6ef270b636f.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 +87 -2
  15. package/dist/module.d.ts +176 -0
  16. package/dist/module.json +1 -1
  17. package/dist/module.mjs +710 -273
  18. package/dist/registry.d.ts +6 -0
  19. package/dist/registry.mjs +42 -19
  20. package/dist/runtime/components/GoogleMaps/ScriptGoogleMaps.d.vue.ts +1 -1
  21. package/dist/runtime/components/GoogleMaps/ScriptGoogleMaps.vue +6 -6
  22. package/dist/runtime/components/GoogleMaps/ScriptGoogleMaps.vue.d.ts +1 -1
  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 +1 -1
  29. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarkerClusterer.vue +6 -6
  30. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarkerClusterer.vue.d.ts +1 -1
  31. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPinElement.vue +5 -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.vue +1 -1
  36. package/dist/runtime/components/ScriptGoogleAdsense.vue +1 -1
  37. package/dist/runtime/components/ScriptInstagramEmbed.d.vue.ts +53 -0
  38. package/dist/runtime/components/ScriptInstagramEmbed.vue +38 -0
  39. package/dist/runtime/components/ScriptInstagramEmbed.vue.d.ts +53 -0
  40. package/dist/runtime/components/ScriptIntercom.vue +4 -3
  41. package/dist/runtime/components/ScriptLoadingIndicator.d.vue.ts +1 -1
  42. package/dist/runtime/components/ScriptLoadingIndicator.vue.d.ts +1 -1
  43. package/dist/runtime/components/ScriptPayPalButtons.d.vue.ts +2 -2
  44. package/dist/runtime/components/ScriptPayPalButtons.vue +13 -11
  45. package/dist/runtime/components/ScriptPayPalButtons.vue.d.ts +2 -2
  46. package/dist/runtime/components/ScriptPayPalMarks.d.vue.ts +2 -2
  47. package/dist/runtime/components/ScriptPayPalMarks.vue +10 -8
  48. package/dist/runtime/components/ScriptPayPalMarks.vue.d.ts +2 -2
  49. package/dist/runtime/components/ScriptPayPalMessages.d.vue.ts +2 -2
  50. package/dist/runtime/components/ScriptPayPalMessages.vue +11 -9
  51. package/dist/runtime/components/ScriptPayPalMessages.vue.d.ts +2 -2
  52. package/dist/runtime/components/ScriptStripePricingTable.vue +2 -2
  53. package/dist/runtime/components/ScriptVimeoPlayer.vue +1 -1
  54. package/dist/runtime/components/ScriptXEmbed.d.vue.ts +82 -0
  55. package/dist/runtime/components/ScriptXEmbed.vue +76 -0
  56. package/dist/runtime/components/ScriptXEmbed.vue.d.ts +82 -0
  57. package/dist/runtime/components/ScriptYouTubePlayer.vue +7 -4
  58. package/dist/runtime/composables/useScript.js +32 -6
  59. package/dist/runtime/composables/useScriptEventPage.js +2 -2
  60. package/dist/runtime/composables/useScriptTriggerConsent.js +1 -1
  61. package/dist/runtime/composables/useScriptTriggerElement.js +1 -1
  62. package/dist/runtime/composables/useScriptTriggerIdleTimeout.js +1 -1
  63. package/dist/runtime/composables/useScriptTriggerServiceWorker.d.ts +7 -0
  64. package/dist/runtime/composables/useScriptTriggerServiceWorker.js +39 -0
  65. package/dist/runtime/registry/clarity.js +21 -25
  66. package/dist/runtime/registry/cloudflare-web-analytics.js +1 -1
  67. package/dist/runtime/registry/crisp.js +1 -1
  68. package/dist/runtime/registry/databuddy-analytics.js +1 -1
  69. package/dist/runtime/registry/fathom-analytics.js +1 -1
  70. package/dist/runtime/registry/google-adsense.js +1 -1
  71. package/dist/runtime/registry/google-analytics.js +2 -2
  72. package/dist/runtime/registry/google-maps.d.ts +1 -1
  73. package/dist/runtime/registry/google-maps.js +1 -1
  74. package/dist/runtime/registry/google-recaptcha.js +2 -2
  75. package/dist/runtime/registry/google-sign-in.js +1 -1
  76. package/dist/runtime/registry/google-tag-manager.d.ts +1 -1
  77. package/dist/runtime/registry/google-tag-manager.js +2 -2
  78. package/dist/runtime/registry/hotjar.js +1 -1
  79. package/dist/runtime/registry/instagram-embed.d.ts +23 -0
  80. package/dist/runtime/registry/instagram-embed.js +22 -0
  81. package/dist/runtime/registry/intercom.js +1 -1
  82. package/dist/runtime/registry/lemon-squeezy.d.ts +0 -1
  83. package/dist/runtime/registry/matomo-analytics.js +2 -2
  84. package/dist/runtime/registry/meta-pixel.js +1 -1
  85. package/dist/runtime/registry/npm.js +1 -1
  86. package/dist/runtime/registry/paypal.d.ts +1 -1
  87. package/dist/runtime/registry/paypal.js +2 -2
  88. package/dist/runtime/registry/plausible-analytics.js +15 -9
  89. package/dist/runtime/registry/posthog.d.ts +3 -2
  90. package/dist/runtime/registry/posthog.js +8 -12
  91. package/dist/runtime/registry/reddit-pixel.js +1 -1
  92. package/dist/runtime/registry/rybbit-analytics.js +5 -3
  93. package/dist/runtime/registry/segment.js +1 -1
  94. package/dist/runtime/registry/snapchat-pixel.js +1 -1
  95. package/dist/runtime/registry/stripe.d.ts +1 -1
  96. package/dist/runtime/registry/stripe.js +1 -1
  97. package/dist/runtime/registry/tiktok-pixel.d.ts +1 -0
  98. package/dist/runtime/registry/tiktok-pixel.js +2 -1
  99. package/dist/runtime/registry/umami-analytics.js +1 -1
  100. package/dist/runtime/registry/vimeo-player.d.ts +2 -2
  101. package/dist/runtime/registry/vimeo-player.js +1 -1
  102. package/dist/runtime/registry/x-embed.d.ts +77 -0
  103. package/dist/runtime/registry/x-embed.js +41 -0
  104. package/dist/runtime/registry/x-pixel.js +1 -1
  105. package/dist/runtime/registry/youtube-player.d.ts +7 -7
  106. package/dist/runtime/registry/youtube-player.js +1 -1
  107. package/dist/runtime/server/google-static-maps-proxy.js +1 -1
  108. package/dist/runtime/server/instagram-embed-asset.d.ts +2 -0
  109. package/dist/runtime/server/instagram-embed-asset.js +42 -0
  110. package/dist/runtime/server/instagram-embed-image.d.ts +2 -0
  111. package/dist/runtime/server/instagram-embed-image.js +54 -0
  112. package/dist/runtime/server/instagram-embed.d.ts +2 -0
  113. package/dist/runtime/server/instagram-embed.js +91 -0
  114. package/dist/runtime/server/proxy-handler.d.ts +6 -0
  115. package/dist/runtime/server/proxy-handler.js +264 -0
  116. package/dist/runtime/server/utils/privacy.d.ts +141 -0
  117. package/dist/runtime/server/utils/privacy.js +324 -0
  118. package/dist/runtime/server/x-embed-image.d.ts +2 -0
  119. package/dist/runtime/server/x-embed-image.js +53 -0
  120. package/dist/runtime/server/x-embed.d.ts +49 -0
  121. package/dist/runtime/server/x-embed.js +31 -0
  122. package/dist/runtime/types.d.ts +51 -22
  123. package/dist/runtime/utils/pure.d.ts +9 -0
  124. package/dist/runtime/utils/pure.js +0 -0
  125. package/dist/runtime/utils.d.ts +3 -3
  126. package/dist/runtime/utils.js +3 -2
  127. package/dist/shared/scripts.DLRgvHQg.mjs +288 -0
  128. package/dist/stats.d.mts +39 -0
  129. package/dist/stats.d.ts +39 -0
  130. package/dist/stats.mjs +711 -0
  131. package/dist/types.d.mts +1 -1
  132. package/package.json +48 -41
  133. package/dist/client/_nuxt/Bdf7Qtwg.js +0 -1
  134. package/dist/client/_nuxt/CoyZWCgl.js +0 -162
  135. package/dist/client/_nuxt/Ds1k3yKJ.js +0 -1
  136. package/dist/client/_nuxt/builds/meta/62574f80-71d4-4f9e-8b96-145c85230d99.json +0 -1
  137. package/dist/client/_nuxt/entry.BjfcJo5q.css +0 -1
  138. package/dist/client/_nuxt/error-404.D45Vtjcx.css +0 -1
  139. package/dist/client/_nuxt/error-500.BOm1rWQf.css +0 -1
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@nuxt/scripts",
3
3
  "type": "module",
4
- "version": "1.0.0-beta.1",
4
+ "version": "1.0.0-beta.13",
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
- "email": "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,9 +34,15 @@
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",
@@ -67,10 +72,10 @@
67
72
  "@googlemaps/markerclusterer": {
68
73
  "optional": true
69
74
  },
70
- "@stripe/stripe-js": {
75
+ "@paypal/paypal-js": {
71
76
  "optional": true
72
77
  },
73
- "@paypal/paypal-js": {
78
+ "@stripe/stripe-js": {
74
79
  "optional": true
75
80
  },
76
81
  "@types/google.maps": {
@@ -87,51 +92,52 @@
87
92
  }
88
93
  },
89
94
  "dependencies": {
90
- "@nuxt/kit": "^4.2.2",
91
- "@vueuse/core": "^14.1.0",
95
+ "@nuxt/devtools-kit": "^3.2.2",
96
+ "@nuxt/kit": "^4.3.1",
97
+ "@vueuse/core": "^14.2.1",
92
98
  "consola": "^3.4.2",
93
99
  "defu": "^6.1.4",
94
- "estree-walker": "^3.0.3",
95
100
  "h3": "^1.15.5",
96
101
  "magic-string": "^0.30.21",
97
102
  "ofetch": "^1.5.1",
98
103
  "ohash": "^2.0.11",
104
+ "oxc-parser": "^0.116.0",
105
+ "oxc-walker": "^0.7.0",
99
106
  "pathe": "^2.0.3",
100
107
  "pkg-types": "^2.3.0",
101
108
  "sirv": "^3.0.2",
102
109
  "std-env": "^3.10.0",
103
110
  "ufo": "^1.6.3",
104
- "unplugin": "^2.3.11",
111
+ "unplugin": "^3.0.0",
105
112
  "unstorage": "^1.17.4",
106
113
  "valibot": "^1.2.0"
107
114
  },
108
115
  "devDependencies": {
109
- "@nuxt/devtools-kit": "^3.1.1",
110
- "@nuxt/devtools-ui-kit": "^3.1.1",
111
- "@nuxt/eslint-config": "^1.12.1",
116
+ "@antfu/eslint-config": "^7.6.1",
117
+ "@nuxt/devtools-ui-kit": "^3.2.2",
112
118
  "@nuxt/module-builder": "^1.0.2",
113
- "@nuxt/test-utils": "3.19.2",
114
- "@paypal/paypal-js": "^9.2.0",
119
+ "@nuxt/test-utils": "^4.0.0",
120
+ "@nuxtjs/partytown": "^2.0.0",
121
+ "@paypal/paypal-js": "^9.4.0",
115
122
  "@types/semver": "^7.7.1",
116
- "@typescript-eslint/typescript-estree": "^8.53.1",
123
+ "@types/youtube": "^0.1.2",
124
+ "@typescript-eslint/typescript-estree": "^8.56.1",
117
125
  "@vue/test-utils": "^2.4.6",
118
- "acorn-loose": "^8.5.2",
119
- "bumpp": "^10.4.0",
120
- "changelogen": "^0.6.2",
121
- "eslint": "^9.39.2",
122
- "eslint-plugin-n": "^17.23.2",
123
- "happy-dom": "^20.3.4",
126
+ "bumpp": "^10.4.1",
127
+ "eslint": "^10.0.2",
128
+ "eslint-plugin-harlanzw": "^0.3.0",
129
+ "happy-dom": "^20.8.3",
124
130
  "knitwork": "^1.3.0",
125
- "nuxt": "^4.2.2",
126
- "playwright-core": "^1.57.0",
127
- "posthog-js": "^1.331.0",
128
- "shiki": "^3.21.0",
129
- "typescript": "5.9.3",
130
- "vitest": "^4.0.17",
131
- "vue": "^3.5.27",
132
- "vue-router": "^4.6.4",
133
- "vue-tsc": "^3.2.2",
134
- "@nuxt/scripts": "1.0.0-beta.1"
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.13"
135
141
  },
136
142
  "resolutions": {
137
143
  "@nuxt/scripts": "workspace:*"
@@ -142,14 +148,15 @@
142
148
  "client:dev": "nuxi dev client --port 3300",
143
149
  "dev": "nuxi dev playground",
144
150
  "dev:ssl": "nuxi dev playground --https",
145
- "prepare:fixtures": "nuxi prepare test/fixtures/basic && nuxi prepare test/fixtures/cdn && nuxi prepare test/fixtures/extend-registry",
146
- "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground && pnpm run prepare:fixtures",
147
- "typecheck": "vue-tsc --noEmit",
148
- "bump": "bumpp package.json --commit --push --tag",
149
- "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",
150
155
  "lint": "eslint .",
151
156
  "lint:fix": "eslint . --fix",
152
- "test": "pnpm dev:prepare && vitest --run",
157
+ "test": "vitest",
158
+ "test:run": "vitest run",
159
+ "test:e2e-dev": "vitest run --project e2e-dev",
153
160
  "test:types": "vitest run --project typecheck"
154
161
  }
155
162
  }
@@ -1 +0,0 @@
1
- import{_ as s,c as a,o as i,a as t,t as n,b as u,w as c,d as l,e as d}from"./CoyZWCgl.js";import{u as f}from"./DTDyDxvR.js";const p={class:"antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide"},m={class:"max-w-520px text-center"},h=["textContent"],g=["textContent"],b=["textContent"],x={class:"flex items-center justify-center w-full"},y={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},statusCode:{type:Number,default:404},statusMessage:{type:String,default:"Page not found"},description:{type:String,default:"Sorry, the page you are looking for could not be found."},backHome:{type:String,default:"Go back home"}},setup(e){const r=e;return f({title:`${r.statusCode} - ${r.statusMessage} | ${r.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:'*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(k,w)=>{const o=d;return i(),a("div",p,[t("div",m,[t("h1",{class:"font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]",textContent:n(e.statusCode)},null,8,h),t("h2",{class:"font-semibold mb-2 sm:text-3xl text-2xl",textContent:n(e.statusMessage)},null,8,g),t("p",{class:"mb-4 px-2 text-[#64748B] text-md",textContent:n(e.description)},null,8,b),t("div",x,[u(o,{to:"/",class:"font-medium hover:text-[#00DC82] text-sm underline underline-offset-3"},{default:c(()=>[l(n(e.backHome),1)]),_:1})])])])}}},v=s(y,[["__scopeId","data-v-75dfa5e6"]]);export{v as default};