@nuxt/scripts 0.4.6 → 0.4.8

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 (59) hide show
  1. package/dist/client/200.html +13 -13
  2. package/dist/client/404.html +13 -13
  3. package/dist/client/_nuxt/{D6NljDpC.js → BigF1UXR.js} +1 -1
  4. package/dist/client/_nuxt/Bn0B8vkx.js +1 -0
  5. package/dist/client/_nuxt/BvCdDh2R.js +1 -0
  6. package/dist/client/_nuxt/BvlfuC5v.js +31 -0
  7. package/dist/client/_nuxt/{Gn7Sk0ke.js → DMNuDhJC.js} +1 -1
  8. package/dist/client/_nuxt/DOHBU7tp.js +1 -0
  9. package/dist/client/_nuxt/builds/latest.json +1 -1
  10. package/dist/client/_nuxt/builds/meta/ed70e2f7-3856-4e68-bd3e-1ebb17fef5ec.json +1 -0
  11. package/dist/client/_nuxt/entry.8LvBfYHJ.css +1 -0
  12. package/dist/client/_nuxt/error-404.Dbi768NS.css +1 -0
  13. package/dist/client/_nuxt/error-500.C23YdqXl.css +1 -0
  14. package/dist/client/_nuxt/{ixTSYuOP.js → jmWmhCGR.js} +1 -1
  15. package/dist/client/index.html +13 -13
  16. package/dist/module.d.mts +7 -2
  17. package/dist/module.d.ts +7 -2
  18. package/dist/module.json +2 -2
  19. package/dist/module.mjs +179 -7
  20. package/dist/registry.mjs +19 -24
  21. package/dist/runtime/components/ScriptCarbonAds.vue +70 -0
  22. package/dist/runtime/components/ScriptGoogleMaps.vue +1 -1
  23. package/dist/runtime/components/ScriptVimeoPlayer.vue +3 -6
  24. package/dist/runtime/composables/useAnalyticsPageEvent.d.ts +1 -4
  25. package/dist/runtime/composables/useElementScriptTrigger.js +0 -1
  26. package/dist/runtime/registry/clarity.d.ts +44 -0
  27. package/dist/runtime/registry/clarity.js +30 -0
  28. package/dist/runtime/registry/cloudflare-web-analytics.d.ts +3 -6
  29. package/dist/runtime/registry/cloudflare-web-analytics.js +2 -2
  30. package/dist/runtime/registry/fathom-analytics.d.ts +6 -12
  31. package/dist/runtime/registry/google-adsense.d.ts +2 -4
  32. package/dist/runtime/registry/google-maps.d.ts +9 -10
  33. package/dist/runtime/registry/hotjar.d.ts +3 -6
  34. package/dist/runtime/registry/intercom.d.ts +11 -20
  35. package/dist/runtime/registry/matomo-analytics.d.ts +5 -10
  36. package/dist/runtime/registry/meta-pixel.d.ts +2 -4
  37. package/dist/runtime/registry/npm.d.ts +5 -10
  38. package/dist/runtime/registry/plausible-analytics.d.ts +3 -6
  39. package/dist/runtime/registry/segment.d.ts +3 -6
  40. package/dist/runtime/registry/stripe.d.ts +2 -4
  41. package/dist/runtime/registry/vimeo-player.d.ts +2 -1
  42. package/dist/runtime/registry/x-pixel.d.ts +3 -6
  43. package/dist/runtime/types.d.ts +8 -8
  44. package/dist/runtime/utils.d.ts +3 -3
  45. package/dist/types.d.mts +1 -0
  46. package/dist/types.d.ts +1 -0
  47. package/package.json +23 -19
  48. package/dist/client/_nuxt/B6ZnTe72.js +0 -1
  49. package/dist/client/_nuxt/BB1wM0JV.js +0 -1
  50. package/dist/client/_nuxt/D3J95Otb.js +0 -31
  51. package/dist/client/_nuxt/MN12aA4C.js +0 -1
  52. package/dist/client/_nuxt/builds/meta/e7e8b021-1e94-4c86-ad2e-d6ac965b2190.json +0 -1
  53. package/dist/client/_nuxt/entry.D91GVkD7.css +0 -1
  54. package/dist/client/_nuxt/error-404.BRldFSII.css +0 -1
  55. package/dist/client/_nuxt/error-500.D8yw_IbC.css +0 -1
  56. package/dist/runtime/registry/google-analytics.d.ts +0 -23
  57. package/dist/runtime/registry/google-analytics.js +0 -38
  58. package/dist/runtime/registry/google-tag-manager.d.ts +0 -21
  59. package/dist/runtime/registry/google-tag-manager.js +0 -30
package/dist/types.d.ts CHANGED
@@ -2,6 +2,7 @@
2
2
  import type { ModuleOptions, ModuleHooks } from './module'
3
3
 
4
4
 
5
+
5
6
  declare module '@nuxt/schema' {
6
7
  interface NuxtConfig { ['scripts']?: Partial<ModuleOptions> }
7
8
  interface NuxtOptions { ['scripts']?: ModuleOptions }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@nuxt/scripts",
3
3
  "type": "module",
4
- "version": "0.4.6",
5
- "packageManager": "pnpm@9.1.4",
4
+ "version": "0.4.8",
5
+ "packageManager": "pnpm@9.3.0",
6
6
  "description": "Load third-party scripts with better performance, privacy and DX in Nuxt Apps.",
7
7
  "author": {
8
8
  "website": "https://harlanzw.com",
@@ -44,6 +44,7 @@
44
44
  "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
45
45
  "typecheck": "pnpm dlx vue-tsc --noEmit",
46
46
  "release": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags",
47
+ "release:minor": "npm run lint && npm run test && npm run prepack && changelogen --minor --release && npm publish && git push --follow-tags",
47
48
  "lint": "eslint .",
48
49
  "lint:fix": "eslint . --fix",
49
50
  "test": "vitest",
@@ -54,63 +55,66 @@
54
55
  "@unhead/vue",
55
56
  "@unhead/schema",
56
57
  "#nuxt-scripts",
57
- "#nuxt-scripts-validator"
58
+ "#nuxt-scripts-validator",
59
+ "third-party-capital",
60
+ "knitwork"
58
61
  ]
59
62
  },
60
63
  "dependencies": {
61
- "@nuxt/devtools-kit": "^1.3.2",
62
- "@nuxt/devtools-ui-kit": "^1.3.2",
63
- "@nuxt/kit": "^3.11.2",
64
+ "@nuxt/devtools-kit": "^1.3.3",
65
+ "@nuxt/devtools-ui-kit": "^1.3.3",
66
+ "@nuxt/kit": "^3.12.1",
64
67
  "@types/google.maps": "^3.55.9",
65
68
  "@types/stripe-v3": "^3.1.33",
66
69
  "@types/vimeo__player": "^2.18.3",
67
70
  "@types/youtube": "^0.0.50",
68
71
  "@unhead/vue": "^1.9.12",
69
- "@vueuse/core": "^10.10.0",
72
+ "@vueuse/core": "^10.10.1",
70
73
  "consola": "^3.2.3",
71
74
  "defu": "^6.1.4",
72
75
  "estree-walker": "^3.0.3",
73
76
  "h3": "^1.11.1",
74
77
  "magic-string": "^0.30.10",
75
- "mlly": "^1.7.0",
78
+ "mlly": "^1.7.1",
76
79
  "ofetch": "^1.3.4",
77
80
  "ohash": "^1.1.3",
78
81
  "pathe": "^1.1.2",
79
82
  "pkg-types": "^1.1.1",
80
83
  "semver": "^7.6.2",
81
- "shiki": "^1.6.2",
84
+ "shiki": "^1.6.4",
82
85
  "sirv": "^2.0.4",
83
86
  "std-env": "^3.7.0",
84
- "third-party-capital": "^1.0.28",
87
+ "third-party-capital": "^1.0.30",
85
88
  "ufo": "^1.5.3",
86
89
  "unimport": "^3.7.2",
87
90
  "unplugin": "^1.10.1",
88
91
  "unstorage": "^1.10.2",
89
- "valibot": "^0.30.0"
92
+ "valibot": "^0.31.1"
90
93
  },
91
94
  "devDependencies": {
92
- "@antfu/eslint-config": "2.19.1",
93
- "@nuxt/devtools-ui-kit": "^1.3.2",
94
- "@nuxt/module-builder": "^0.7.0",
95
+ "@nuxt/devtools-ui-kit": "^1.3.3",
96
+ "@nuxt/eslint-config": "^0.3.13",
97
+ "@nuxt/module-builder": "^0.7.1",
95
98
  "@nuxt/test-utils": "3.13.1",
96
99
  "@types/semver": "^7.5.8",
97
100
  "@unhead/schema": "^1.9.12",
98
101
  "acorn-loose": "^8.4.0",
99
102
  "bumpp": "^9.4.1",
100
103
  "changelogen": "^0.5.5",
101
- "eslint": "9.3.0",
102
- "nuxt": "^3.11.2",
104
+ "eslint": "9.4.0",
105
+ "knitwork": "^1.1.0",
106
+ "nuxt": "^3.12.1",
103
107
  "playwright-core": "^1.44.1",
104
108
  "typescript": "^5.4.5",
105
109
  "vitest": "^1.6.0",
106
110
  "vue": "^3.4.27",
107
- "vue-router": "^4.3.2"
111
+ "vue-router": "^4.3.3"
108
112
  },
109
113
  "resolutions": {
110
114
  "@nuxt/scripts": "workspace:*",
111
- "nuxt": "^3.11.2",
115
+ "nuxt": "^3.12.1",
112
116
  "nuxt-scripts-devtools": "workspace:*",
113
117
  "vue": "^3.4.27",
114
- "vue-router": "^4.3.2"
118
+ "vue-router": "^4.3.3"
115
119
  }
116
120
  }
@@ -1 +0,0 @@
1
- const e=Object.freeze({displayName:"Pascal",fileTypes:["pas","p","pp","dfm","fmx","dpr","dpk","lfm","lpr"],name:"pascal",patterns:[{match:"\\b(?i:(absolute|abstract|add|all|and_then|array|as|asc|asm|assembler|async|attribute|autoreleasepool|await|begin|bindable|block|by|case|cdecl|class|concat|const|constref|copy|cppdecl|contains|default|delegate|deprecated|desc|distinct|div|each|else|empty|end|ensure|enum|equals|event|except|export|exports|extension|external|far|file|finalization|finalizer|finally|flags|forward|from|future|generic|goto|group|has|helper|if|implements|implies|import|in|index|inherited|initialization|inline|interrupt|into|invariants|is|iterator|label|library|join|lazy|lifetimestrategy|locked|locking|loop|mapped|matching|method|mod|module|name|namespace|near|nested|new|nostackframe|not|notify|nullable|object|of|old|oldfpccall|on|only|operator|optional|or_else|order|otherwise|out|override|package|packed|parallel|params|partial|pascal|pinned|platform|pow|private|program|protected|public|published|interface|implementation|qualified|queryable|raises|read|readonly|record|reference|register|remove|resident|require|requires|resourcestring|restricted|result|reverse|safecall|sealed|segment|select|selector|sequence|set|shl|shr|skip|specialize|soft|static|stored|stdcall|step|strict|strong|take|then|threadvar|to|try|tuple|type|unconstrained|unit|unmanaged|unretained|unsafe|uses|using|var|view|virtual|volatile|weak|dynamic|overload|reintroduce|where|with|write|xor|yield))\\b",name:"keyword.pascal"},{captures:{1:{name:"storage.type.prototype.pascal"},2:{name:"entity.name.function.prototype.pascal"}},match:"\\b(?i:(function|procedure|constructor|destructor))\\b\\s+(\\w+(\\.\\w+)?)(\\(.*?\\))?;\\s*(?=(?i:attribute|forward|external))",name:"meta.function.prototype.pascal"},{captures:{1:{name:"storage.type.function.pascal"},2:{name:"entity.name.function.pascal"}},match:"\\b(?i:(function|procedure|constructor|destructor|property|read|write))\\b\\s+(\\w+(\\.\\w+)?)",name:"meta.function.pascal"},{match:"\\b(?i:(self|result))\\b",name:"token.variable"},{match:"\\b(?i:(and|or))\\b",name:"keyword.operator.pascal"},{match:"\\b(?i:(break|continue|exit|abort|while|do|downto|for|raise|repeat|until))\\b",name:"keyword.control.pascal"},{begin:"\\{\\$",captures:{0:{name:"string.regexp"}},end:"\\}",name:"string.regexp"},{match:"\\b(?i:(ansichar|ansistring|boolean|byte|cardinal|char|comp|currency|double|dword|extended|file|integer|int8|int16|int32|int64|longint|longword|nativeint|nativeuint|olevariant|pansichar|pchar|pwidechar|pointer|real|shortint|shortstring|single|smallint|string|uint8|uint16|uint32|uint64|variant|widechar|widestring|word|wordbool|uintptr|intptr))\\b",name:"storage.support.type.pascal"},{match:"\\b(\\d+)|(\\d*\\.\\d+([eE][\\-+]?\\d+)?)\\b",name:"constant.numeric.pascal"},{match:"\\$[0-9a-fA-F]{1,16}\\b",name:"constant.numeric.hex.pascal"},{match:"\\b(?i:(true|false|nil))\\b",name:"constant.language.pascal"},{match:"\\b(?i:(Assert))\\b",name:"keyword.control"},{begin:"(^[ \\t]+)?(?=//)",beginCaptures:{1:{name:"punctuation.whitespace.comment.leading.pascal"}},end:"(?!\\G)",patterns:[{begin:"//",beginCaptures:{0:{name:"punctuation.definition.comment.pascal"}},end:"\\n",name:"comment.line.double-slash.pascal.two"}]},{begin:"\\(\\*",captures:{0:{name:"punctuation.definition.comment.pascal"}},end:"\\*\\)",name:"comment.block.pascal.one"},{begin:"\\{(?!\\$)",captures:{0:{name:"punctuation.definition.comment.pascal"}},end:"\\}",name:"comment.block.pascal.two"},{begin:"'",beginCaptures:{0:{name:"punctuation.definition.string.begin.pascal"}},end:"'",endCaptures:{0:{name:"punctuation.definition.string.end.pascal"}},name:"string.quoted.single.pascal",patterns:[{match:"''",name:"constant.character.escape.apostrophe.pascal"}]},{match:"\\#\\d+",name:"string.other.pascal"}],scopeName:"source.pascal"});var a=[e];export{a as default};
@@ -1 +0,0 @@
1
- import{i as d,u as f,r as i,f as h,g as p,h as v,j as m,k as y,l as g}from"./D3J95Otb.js";let _;function b(){return _}function j(e){return typeof e=="function"?e():f(e)}function s(e,a=""){if(e instanceof Promise)return e;const t=j(e);return!e||!t?t:Array.isArray(t)?t.map(n=>s(n,a)):typeof t=="object"?Object.fromEntries(Object.entries(t).map(([n,o])=>n==="titleTemplate"||n.startsWith("on")?[n,f(o)]:[n,s(o,n)])):t}const w="usehead",u=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},c="__unhead_injection_handler__";function H(){if(c in u)return u[c]();const e=d(w);return e||b()}function T(e,a={}){const t=a.head||H();if(t)return t.ssr?t.push(e,a):x(t,e,a)}function x(e,a,t={}){const n=i(!1),o=i({});h(()=>{o.value=n.value?{}:s(a)});const r=e.push(o.value,t);return p(o,l=>{r.patch(l)}),g()&&(v(()=>{r.dispose()}),m(()=>{n.value=!0}),y(()=>{n.value=!1})),r}const I=(e,a)=>{const t=e.__vccOpts||e;for(const[n,o]of a)t[n]=o;return t};export{I as _,T as u};