@nuxt/scripts 0.1.3 → 0.1.5
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.
- package/README.md +26 -23
- package/dist/client/200.html +5 -5
- package/dist/client/404.html +5 -5
- package/dist/client/_nuxt/{DnntiO6I.js → BBafEUG8.js} +1 -1
- package/dist/client/_nuxt/{Bw1vr1xi.js → C6qP6ksw.js} +1 -1
- package/dist/client/_nuxt/{B7gLnlpM.js → D2oMNJSZ.js} +1 -1
- package/dist/client/_nuxt/{CXVVb7oJ.js → YkgnKQjM.js} +10 -10
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/72c1a85e-b70c-4e27-93ec-d6316f40b143.json +1 -0
- package/dist/client/index.html +5 -5
- package/dist/module.d.mts +43 -0
- package/dist/module.d.ts +43 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +107 -4
- package/dist/runtime/composables/useScript.d.ts +4 -2
- package/dist/runtime/composables/useScript.mjs +13 -1
- package/dist/runtime/composables/validateScriptInputSchema.d.ts +7 -0
- package/dist/runtime/composables/validateScriptInputSchema.mjs +12 -0
- package/dist/runtime/registry/cloudflare-turnstile.d.ts +1 -0
- package/dist/runtime/registry/cloudflare-turnstile.mjs +3 -0
- package/dist/runtime/registry/cloudflare-web-analytics.d.ts +33 -0
- package/dist/runtime/registry/cloudflare-web-analytics.mjs +37 -0
- package/dist/runtime/registry/confetti.d.ts +14 -0
- package/dist/runtime/registry/confetti.mjs +12 -0
- package/dist/runtime/registry/facebook-pixel.d.ts +42 -0
- package/dist/runtime/registry/facebook-pixel.mjs +36 -0
- package/dist/runtime/registry/fathom-analytics.d.ts +33 -0
- package/dist/runtime/registry/fathom-analytics.mjs +27 -0
- package/dist/runtime/registry/google-analytics.d.ts +1 -0
- package/dist/runtime/registry/google-analytics.mjs +3 -0
- package/dist/runtime/registry/google-tag-manager.d.ts +1 -0
- package/dist/runtime/registry/google-tag-manager.mjs +3 -0
- package/dist/runtime/registry/hotjar.d.ts +24 -0
- package/dist/runtime/registry/hotjar.mjs +30 -0
- package/dist/runtime/registry/intercom.d.ts +31 -0
- package/dist/runtime/registry/intercom.mjs +33 -0
- package/dist/runtime/registry/segment.d.ts +25 -0
- package/dist/runtime/registry/segment.mjs +43 -0
- package/dist/runtime/types.d.ts +17 -1
- package/package.json +15 -9
- package/dist/client/_nuxt/builds/meta/dfbad358-c258-488d-9323-84d07e1f8acf.json +0 -1
package/README.md
CHANGED
|
@@ -59,32 +59,35 @@ addConfetti({ emojis: ['🌈', '⚡️', '💥', '✨', '💫', '🌸'] })
|
|
|
59
59
|
|
|
60
60
|
### Using The Registry (TODO)
|
|
61
61
|
|
|
62
|
-
The registry is a collection of
|
|
63
|
-
by the module.
|
|
62
|
+
The registry is a collection of composables and Nuxt Modules that directly integrate with Nuxt Scripts.
|
|
64
63
|
|
|
65
|
-
To use a script from the registry, simply use the composable
|
|
64
|
+
To use a script from the registry, simply use the composable. Consult the
|
|
66
65
|
below table for the available scripts.
|
|
67
66
|
|
|
68
|
-
| Key
|
|
69
|
-
|
|
70
|
-
| `
|
|
71
|
-
| `
|
|
72
|
-
| `
|
|
73
|
-
| `
|
|
74
|
-
| `
|
|
75
|
-
| `
|
|
76
|
-
| `
|
|
77
|
-
| `
|
|
78
|
-
| `
|
|
79
|
-
| `google-
|
|
80
|
-
| `
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
| `
|
|
85
|
-
| `
|
|
86
|
-
| `
|
|
87
|
-
| `
|
|
67
|
+
| Key | Description | Composable | Source |
|
|
68
|
+
|----------|------------------------------------------------------------| --- | --- |
|
|
69
|
+
| `cloudflare-web-analytics` | Cloudflare Web Analytics | `useScriptCloudflareWebAnalytics` | Core |
|
|
70
|
+
| `confetti` | [JS Confetti](https://github.com/loonywizard/js-confetti) | `useScriptCloudflareAnalytics` | Core |
|
|
71
|
+
| `facebook-pixel` | Facebook Pixel | `useScriptFacebookPixel` | Core |
|
|
72
|
+
| `fathom-analytics` | Fathom Analytics | `useScriptFathomAnalytics` | Core |
|
|
73
|
+
| `hotjar` | Hotjar | `useScriptHotjar` | Core |
|
|
74
|
+
| `intercom` | Intercom | `useScriptIntercom` | Core |
|
|
75
|
+
| `segment` | Segment | `useScriptSegment` | Core |
|
|
76
|
+
| `google-analytics` | Google Analytics | `useScriptGoogleAnalytics` | [Nuxt Third Party Capital](https://github.com/nuxt/third-party-capital) |
|
|
77
|
+
| `google-tag-manager` | Google Tag Manager | `useScriptGoogleTagManager` | [Nuxt Third Party Capital](https://github.com/nuxt/third-party-capital) |
|
|
78
|
+
| `google-maps` | Google Maps | `useScriptGoogleMaps` | [Nuxt Third Party Capital](https://github.com/nuxt/third-party-capital) |
|
|
79
|
+
| `cloudflare-turnstile` | CloudFlare Turnstile | `useCloudflareTurnstile` | [Nuxt Cloudflare Turnstile](https://github.com/nuxt-modules/turnstile) |
|
|
80
|
+
|
|
81
|
+
More coming soon!
|
|
82
|
+
|
|
83
|
+
[//]: # (TODO | `twitter-pixel` | Twitter Pixel | `useTwitterPixel` |)
|
|
84
|
+
[//]: # (TODO | `pinterest-tag` | Pinterest Tag | `usePinterestTag` |)
|
|
85
|
+
[//]: # (TODO | `google-ads-conversion-tracking` | Google Ads Conversion Tracking | `useGoogleAdsConversionTracking` |)
|
|
86
|
+
[//]: # (TODO | `google-ads-remarketing` | Google Ads Remarketing | `useGoogleAdsRemarketing` |)
|
|
87
|
+
[//]: # (TODO | `plausible-analytics` | Plausible Analytics | `usePlausibleAnalytics` |)
|
|
88
|
+
[//]: # (TODO | `simple-analytics` | Simple Analytics | `useSimpleAnalytics` |)
|
|
89
|
+
[//]: # (TODO | `umami-analytics` | Umami Analytics | `useUmamiAnalytics` |)
|
|
90
|
+
[//]: # (TODO | `matomo` | Matomo | `useMatomo` |)
|
|
88
91
|
|
|
89
92
|
### Loading Scripts Globally
|
|
90
93
|
|
package/dist/client/200.html
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!DOCTYPE html><html><head><meta charset="utf-8">
|
|
2
2
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
3
3
|
<link rel="stylesheet" href="/__nuxt-scripts/_nuxt/entry.D91GVkD7.css">
|
|
4
|
-
<link rel="modulepreload" as="script" crossorigin href="/__nuxt-scripts/_nuxt/
|
|
4
|
+
<link rel="modulepreload" as="script" crossorigin href="/__nuxt-scripts/_nuxt/YkgnKQjM.js">
|
|
5
5
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/DXFkqnOI.js">
|
|
6
6
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/D6NljDpC.js">
|
|
7
7
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/CowR2XfX.js">
|
|
@@ -229,10 +229,10 @@
|
|
|
229
229
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/DggdVF2v.js">
|
|
230
230
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/A1WiD9SJ.js">
|
|
231
231
|
<link rel="prefetch" as="style" href="/__nuxt-scripts/_nuxt/error-404.ORekjfyJ.css">
|
|
232
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/
|
|
233
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/
|
|
232
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/BBafEUG8.js">
|
|
233
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/D2oMNJSZ.js">
|
|
234
234
|
<link rel="prefetch" as="style" href="/__nuxt-scripts/_nuxt/error-500.BIuFL0tW.css">
|
|
235
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/
|
|
236
|
-
<script type="module" src="/__nuxt-scripts/_nuxt/
|
|
235
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/C6qP6ksw.js">
|
|
236
|
+
<script type="module" src="/__nuxt-scripts/_nuxt/YkgnKQjM.js" crossorigin></script><script>"use strict";(()=>{const a=window,e=document.documentElement,c=window.localStorage,d=["dark","light"],n=c&&c.getItem&&c.getItem("nuxt-color-mode")||"system";let l=n==="system"?f():n;const i=e.getAttribute("data-color-mode-forced");i&&(l=i),r(l),a["__NUXT_COLOR_MODE__"]={preference:n,value:l,getColorScheme:f,addColorScheme:r,removeColorScheme:u};function r(o){const t=""+o+"",s="";e.classList?e.classList.add(t):e.className+=" "+t,s&&e.setAttribute("data-"+s,o)}function u(o){const t=""+o+"",s="";e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(t,"g"),""),s&&e.removeAttribute("data-"+s)}function m(o){return a.matchMedia("(prefers-color-scheme"+o+")")}function f(){if(a.matchMedia&&m("").media!=="not all"){for(const o of d)if(m(":"+o).matches)return o}return"light"}})();
|
|
237
237
|
</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" id="__NUXT_DATA__" data-ssr="false">[{"_errors":1,"serverRendered":2,"data":3,"state":4,"once":5},{},false,{},{},["Set"]]</script>
|
|
238
238
|
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-scripts",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
package/dist/client/404.html
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!DOCTYPE html><html><head><meta charset="utf-8">
|
|
2
2
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
3
3
|
<link rel="stylesheet" href="/__nuxt-scripts/_nuxt/entry.D91GVkD7.css">
|
|
4
|
-
<link rel="modulepreload" as="script" crossorigin href="/__nuxt-scripts/_nuxt/
|
|
4
|
+
<link rel="modulepreload" as="script" crossorigin href="/__nuxt-scripts/_nuxt/YkgnKQjM.js">
|
|
5
5
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/DXFkqnOI.js">
|
|
6
6
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/D6NljDpC.js">
|
|
7
7
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/CowR2XfX.js">
|
|
@@ -229,10 +229,10 @@
|
|
|
229
229
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/DggdVF2v.js">
|
|
230
230
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/A1WiD9SJ.js">
|
|
231
231
|
<link rel="prefetch" as="style" href="/__nuxt-scripts/_nuxt/error-404.ORekjfyJ.css">
|
|
232
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/
|
|
233
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/
|
|
232
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/BBafEUG8.js">
|
|
233
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/D2oMNJSZ.js">
|
|
234
234
|
<link rel="prefetch" as="style" href="/__nuxt-scripts/_nuxt/error-500.BIuFL0tW.css">
|
|
235
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/
|
|
236
|
-
<script type="module" src="/__nuxt-scripts/_nuxt/
|
|
235
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/C6qP6ksw.js">
|
|
236
|
+
<script type="module" src="/__nuxt-scripts/_nuxt/YkgnKQjM.js" crossorigin></script><script>"use strict";(()=>{const a=window,e=document.documentElement,c=window.localStorage,d=["dark","light"],n=c&&c.getItem&&c.getItem("nuxt-color-mode")||"system";let l=n==="system"?f():n;const i=e.getAttribute("data-color-mode-forced");i&&(l=i),r(l),a["__NUXT_COLOR_MODE__"]={preference:n,value:l,getColorScheme:f,addColorScheme:r,removeColorScheme:u};function r(o){const t=""+o+"",s="";e.classList?e.classList.add(t):e.className+=" "+t,s&&e.setAttribute("data-"+s,o)}function u(o){const t=""+o+"",s="";e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(t,"g"),""),s&&e.removeAttribute("data-"+s)}function m(o){return a.matchMedia("(prefers-color-scheme"+o+")")}function f(){if(a.matchMedia&&m("").media!=="not all"){for(const o of d)if(m(":"+o).matches)return o}return"light"}})();
|
|
237
237
|
</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" id="__NUXT_DATA__" data-ssr="false">[{"_errors":1,"serverRendered":2,"data":3,"state":4,"once":5},{},false,{},{},["Set"]]</script>
|
|
238
238
|
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-scripts",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as a,c as n,a as e,t as s,b as r,w as l,d,_ as c,p,e as m}from"./
|
|
1
|
+
import{o as a,c as n,a as e,t as s,b as r,w as l,d,_ as c,p,e as m}from"./YkgnKQjM.js";import{_ as f,u as h}from"./D2oMNJSZ.js";const x=t=>(p("data-v-05a2b8a3"),t=t(),m(),t),u={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white grid min-h-screen place-content-center overflow-hidden"},g=x(()=>e("div",{class:"fixed left-0 right-0 spotlight z-10"},null,-1)),b={class:"max-w-520px text-center z-20"},_=["textContent"],w=["textContent"],y={class:"w-full flex items-center justify-center"},S={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:404},statusMessage:{type:String,default:"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(t){const o=t;return h({title:`${o.statusCode} - ${o.statusMessage} | ${o.appName}`,script:[],style:[{children:'*,:before,:after{-webkit-box-sizing:border-box;box-sizing:border-box;border-width:0;border-style:solid;border-color:#e0e0e0}*{--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(14, 165, 233, .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000}:root{-moz-tab-size:4;-o-tab-size:4;tab-size:4}a{color:inherit;text-decoration:inherit}body{margin:0;font-family:inherit;line-height:inherit}html{-webkit-text-size-adjust:100%;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";line-height:1.5}h1,p{margin:0}h1{font-size:inherit;font-weight:inherit}'}]}),(k,N)=>{const i=c;return a(),n("div",u,[g,e("div",b,[e("h1",{class:"text-8xl sm:text-10xl font-medium mb-8",textContent:s(t.statusCode)},null,8,_),e("p",{class:"text-xl px-8 sm:px-0 sm:text-4xl font-light mb-16 leading-tight",textContent:s(t.description)},null,8,w),e("div",y,[r(i,{to:"/",class:"gradient-border text-md sm:text-xl py-2 px-4 sm:py-3 sm:px-6 cursor-pointer"},{default:l(()=>[d(s(t.backHome),1)]),_:1})])])])}}},C=f(S,[["__scopeId","data-v-05a2b8a3"]]);export{C as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as i,u as a}from"./
|
|
1
|
+
import{_ as i,u as a}from"./D2oMNJSZ.js";import{o as r,c as n,a as e,t as s,p as l,e as d}from"./YkgnKQjM.js";const c=t=>(l("data-v-c967d9a9"),t=t(),d(),t),p={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white grid min-h-screen place-content-center overflow-hidden"},h=c(()=>e("div",{class:"fixed -bottom-1/2 left-0 right-0 h-1/2 spotlight"},null,-1)),f={class:"max-w-520px text-center"},m=["textContent"],g=["textContent"],x={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:500},statusMessage:{type:String,default:"Server error"},description:{type:String,default:"This page is temporarily unavailable."}},setup(t){const o=t;return a({title:`${o.statusCode} - ${o.statusMessage} | ${o.appName}`,script:[],style:[{children:'*,:before,:after{-webkit-box-sizing:border-box;box-sizing:border-box;border-width:0;border-style:solid;border-color:#e0e0e0}*{--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(14, 165, 233, .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000}:root{-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{margin:0;font-family:inherit;line-height:inherit}html{-webkit-text-size-adjust:100%;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";line-height:1.5}h1,p{margin:0}h1{font-size:inherit;font-weight:inherit}'}]}),(b,u)=>(r(),n("div",p,[h,e("div",f,[e("h1",{class:"text-8xl sm:text-10xl font-medium mb-8",textContent:s(t.statusCode)},null,8,m),e("p",{class:"text-xl px-8 sm:px-0 sm:text-4xl font-light mb-16 leading-tight",textContent:s(t.description)},null,8,g)])]))}},y=i(x,[["__scopeId","data-v-c967d9a9"]]);export{y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as u,r as c,f,g as v,h as d,j as l,k as i,l as h,m as p}from"./
|
|
1
|
+
import{i as u,r as c,f,g as v,h as d,j as l,k as i,l as h,m as p}from"./YkgnKQjM.js";function g(t,a={}){const e=a.head||u();if(e)return e.ssr?e.push(t,a):m(e,t,a)}function m(t,a,e={}){const s=c(!1),n=c({});f(()=>{n.value=s.value?{}:h(a)});const r=t.push(n.value,e);return v(n,o=>{r.patch(o)}),p()&&(d(()=>{r.dispose()}),l(()=>{s.value=!0}),i(()=>{s.value=!1})),r}const I=(t,a)=>{const e=t.__vccOpts||t;for(const[s,n]of a)e[s]=n;return e};export{I as _,g as u};
|