@nuxt/scripts 0.1.3 → 0.1.4
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 +24 -23
- package/dist/client/200.html +5 -5
- package/dist/client/404.html +5 -5
- package/dist/client/_nuxt/{B7gLnlpM.js → B3yRAOXz.js} +1 -1
- package/dist/client/_nuxt/{CXVVb7oJ.js → BqAhYH0E.js} +10 -10
- package/dist/client/_nuxt/{Bw1vr1xi.js → C2uur0MR.js} +1 -1
- package/dist/client/_nuxt/{DnntiO6I.js → CO8u40Ut.js} +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/4e9eefe2-f4a5-46ff-889b-aa701f38d2cd.json +1 -0
- package/dist/client/index.html +5 -5
- package/dist/module.d.mts +4 -0
- package/dist/module.d.ts +4 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +4 -1
- package/dist/runtime/composables/useScript.mjs +5 -1
- 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 +34 -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 +37 -0
- package/dist/runtime/registry/fathom-analytics.d.ts +33 -0
- package/dist/runtime/registry/fathom-analytics.mjs +28 -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 +32 -0
- package/dist/runtime/registry/intercom.d.ts +31 -0
- package/dist/runtime/registry/intercom.mjs +34 -0
- package/dist/runtime/registry/segment.d.ts +25 -0
- package/dist/runtime/registry/segment.mjs +44 -0
- package/dist/runtime/types.d.ts +4 -0
- package/package.json +10 -8
- package/dist/client/_nuxt/builds/meta/dfbad358-c258-488d-9323-84d07e1f8acf.json +0 -1
package/README.md
CHANGED
|
@@ -59,32 +59,33 @@ 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
|
-
| `
|
|
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 | `useGoogleAnalytics` | [Nuxt Third Party Capital](https://github.com/nuxt/third-party-capital) |
|
|
77
|
+
| `google-tag-manager` | Google Tag Manager | `useGoogleTagManager` | [Nuxt Third Party Capital](https://github.com/nuxt/third-party-capital) |
|
|
78
|
+
| `cloudflare-turnstile` | CloudFlare Turnstile | `useCloudflareTurnstile` | [Nuxt Cloudflare Turnstile](https://github.com/nuxt-modules/turnstile) |
|
|
79
|
+
|
|
80
|
+
TODO | `twitter-pixel` | Twitter Pixel | `useTwitterPixel` |
|
|
81
|
+
TODO | `pinterest-tag` | Pinterest Tag | `usePinterestTag` |
|
|
82
|
+
TODO | `google-ads-conversion-tracking` | Google Ads Conversion Tracking | `useGoogleAdsConversionTracking` |
|
|
83
|
+
TODO | `google-ads-remarketing` | Google Ads Remarketing | `useGoogleAdsRemarketing` |
|
|
84
|
+
TODO | `plausible-analytics` | Plausible Analytics | `usePlausibleAnalytics` |
|
|
85
|
+
TODO | `simple-analytics` | Simple Analytics | `useSimpleAnalytics` |
|
|
86
|
+
TODO | `umami-analytics` | Umami Analytics | `useUmamiAnalytics` |
|
|
87
|
+
TODO | `cloudflare-web-analytics` | Cloudflare Web Analytics | `useCloudflareWebAnalytics` |
|
|
88
|
+
TODO | `matomo` | Matomo | `useMatomo` |
|
|
88
89
|
|
|
89
90
|
### Loading Scripts Globally
|
|
90
91
|
|
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/BqAhYH0E.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/CO8u40Ut.js">
|
|
233
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/B3yRAOXz.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/C2uur0MR.js">
|
|
236
|
+
<script type="module" src="/__nuxt-scripts/_nuxt/BqAhYH0E.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/BqAhYH0E.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/CO8u40Ut.js">
|
|
233
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/B3yRAOXz.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/C2uur0MR.js">
|
|
236
|
+
<script type="module" src="/__nuxt-scripts/_nuxt/BqAhYH0E.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{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"./BqAhYH0E.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};
|