@nuxt/scripts 1.0.3 → 1.0.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.
Files changed (25) hide show
  1. package/dist/devtools-client/200.html +1 -1
  2. package/dist/devtools-client/404.html +1 -1
  3. package/dist/devtools-client/_nuxt/{BKha4otU.js → 13TuIchK.js} +1 -1
  4. package/dist/devtools-client/_nuxt/{DXbMEK4S.js → 32RpwIYg.js} +1 -1
  5. package/dist/devtools-client/_nuxt/{B5UH0Ds3.js → BQOW0dqa.js} +5 -5
  6. package/dist/devtools-client/_nuxt/{D1-tSGjF.js → C0p4l2Wy.js} +1 -1
  7. package/dist/devtools-client/_nuxt/{BNnOFEgA.js → CWELSfs5.js} +1 -1
  8. package/dist/devtools-client/_nuxt/{DZC4fp-D.js → DxyiGojb.js} +1 -1
  9. package/dist/devtools-client/_nuxt/{CK-VPzWc.js → NMrm-PBR.js} +1 -1
  10. package/dist/devtools-client/_nuxt/builds/latest.json +1 -1
  11. package/dist/devtools-client/_nuxt/builds/meta/41edb1f4-fb21-4848-be40-543a397dc212.json +1 -0
  12. package/dist/devtools-client/_nuxt/{entry.By2_NhVg.css → entry.XOvcedFq.css} +1 -1
  13. package/dist/devtools-client/docs/index.html +1 -1
  14. package/dist/devtools-client/first-party/index.html +1 -1
  15. package/dist/devtools-client/index.html +1 -1
  16. package/dist/devtools-client/registry/index.html +1 -1
  17. package/dist/module.json +1 -1
  18. package/dist/module.mjs +1 -1
  19. package/dist/registry.mjs +16 -3
  20. package/dist/runtime/components/GoogleMaps/ScriptGoogleMaps.vue +6 -0
  21. package/dist/runtime/server/proxy-handler.js +2 -1
  22. package/dist/runtime/server/utils/match-domain.d.ts +1 -0
  23. package/dist/runtime/server/utils/match-domain.js +20 -0
  24. package/package.json +1 -1
  25. package/dist/devtools-client/_nuxt/builds/meta/6689578b-eedf-440f-89c7-1c51715a9fd2.json +0 -1
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-scripts/_nuxt/entry.By2_NhVg.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-scripts/_nuxt/B5UH0Ds3.js"><script type="module" src="/__nuxt-scripts/_nuxt/B5UH0Ds3.js" crossorigin></script><script>"use strict";(()=>{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-scripts",buildId:"6689578b-eedf-440f-89c7-1c51715a9fd2",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1777347177695,false]</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-scripts/_nuxt/entry.XOvcedFq.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-scripts/_nuxt/BQOW0dqa.js"><script type="module" src="/__nuxt-scripts/_nuxt/BQOW0dqa.js" crossorigin></script><script>"use strict";(()=>{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-scripts",buildId:"41edb1f4-fb21-4848-be40-543a397dc212",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1777422591483,false]</script></body></html>
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-scripts/_nuxt/entry.By2_NhVg.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-scripts/_nuxt/B5UH0Ds3.js"><script type="module" src="/__nuxt-scripts/_nuxt/B5UH0Ds3.js" crossorigin></script><script>"use strict";(()=>{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-scripts",buildId:"6689578b-eedf-440f-89c7-1c51715a9fd2",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1777347177696,false]</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-scripts/_nuxt/entry.XOvcedFq.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-scripts/_nuxt/BQOW0dqa.js"><script type="module" src="/__nuxt-scripts/_nuxt/BQOW0dqa.js" crossorigin></script><script>"use strict";(()=>{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-scripts",buildId:"41edb1f4-fb21-4848-be40-543a397dc212",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1777422591484,false]</script></body></html>
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-scripts/_nuxt/entry.By2_NhVg.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-scripts/_nuxt/B5UH0Ds3.js"><script type="module" src="/__nuxt-scripts/_nuxt/B5UH0Ds3.js" crossorigin></script><script>"use strict";(()=>{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-scripts",buildId:"6689578b-eedf-440f-89c7-1c51715a9fd2",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1777347177697,false]</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-scripts/_nuxt/entry.XOvcedFq.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-scripts/_nuxt/BQOW0dqa.js"><script type="module" src="/__nuxt-scripts/_nuxt/BQOW0dqa.js" crossorigin></script><script>"use strict";(()=>{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-scripts",buildId:"41edb1f4-fb21-4848-be40-543a397dc212",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1777422591484,false]</script></body></html>
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-scripts/_nuxt/entry.By2_NhVg.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-scripts/_nuxt/B5UH0Ds3.js"><script type="module" src="/__nuxt-scripts/_nuxt/B5UH0Ds3.js" crossorigin></script><script>"use strict";(()=>{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-scripts",buildId:"6689578b-eedf-440f-89c7-1c51715a9fd2",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1777347177696,false]</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-scripts/_nuxt/entry.XOvcedFq.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-scripts/_nuxt/BQOW0dqa.js"><script type="module" src="/__nuxt-scripts/_nuxt/BQOW0dqa.js" crossorigin></script><script>"use strict";(()=>{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-scripts",buildId:"41edb1f4-fb21-4848-be40-543a397dc212",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1777422591484,false]</script></body></html>
package/dist/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=3.16"
6
6
  },
7
- "version": "1.0.3",
7
+ "version": "1.0.4",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.2",
10
10
  "unbuild": "3.6.1"
package/dist/module.mjs CHANGED
@@ -1060,7 +1060,7 @@ function NuxtScriptBundleTransformer(options = {
1060
1060
  const hasReverseProxy = !!script?.proxy;
1061
1061
  const proxyConfigKey = hasReverseProxy ? typeof script?.proxy === "string" ? script.proxy : registryKey : void 0;
1062
1062
  const proxyConfig = !firstPartyOptOut && proxyConfigKey ? options.proxyConfigs?.[proxyConfigKey] : void 0;
1063
- const proxyRewrites = proxyConfig?.domains?.map((domain) => ({
1063
+ const proxyRewrites = proxyConfig?.domains?.filter((domain) => !domain.includes("*")).map((domain) => ({
1064
1064
  from: domain,
1065
1065
  to: `${options.proxyPrefix}/${domain}`
1066
1066
  }));
package/dist/registry.mjs CHANGED
@@ -266,7 +266,11 @@ async function registry(resolve) {
266
266
  const host = region === "eu" ? "eu.i.posthog.com" : "us.i.posthog.com";
267
267
  return `${proxyPrefix}/${host}`;
268
268
  }
269
- }
269
+ },
270
+ // PostHog supports `apiHost` for self-hosted instances and custom
271
+ // reverse proxies. Without this, custom-host users are 403'd through
272
+ // the proxy because only the SaaS US/EU hosts are allowlisted.
273
+ configDomainFields: ["apiHost"]
270
274
  }
271
275
  }),
272
276
  def("fathomAnalytics", {
@@ -508,7 +512,13 @@ async function registry(resolve) {
508
512
  }
509
513
  },
510
514
  proxy: {
511
- domains: ["www.clarity.ms", "scripts.clarity.ms", "d.clarity.ms", "e.clarity.ms", "k.clarity.ms", "c.clarity.ms", "a.clarity.ms", "b.clarity.ms"],
515
+ // Clarity buckets visitors across letter/hash-prefixed shards (a/b/c/d/e/k/...).
516
+ // Microsoft adds shards over time, so an enumerated list silently 403s
517
+ // through the proxy when an unlisted letter is rolled out (#728-class bug).
518
+ // `*.clarity.ms` covers the full surface at runtime; `www.clarity.ms` is
519
+ // kept literal so the build-time URL rewrite (which filters wildcards)
520
+ // can still rewrite `https://www.clarity.ms/tag/<id>` in bundled SDKs.
521
+ domains: ["www.clarity.ms", "*.clarity.ms"],
512
522
  privacy: PRIVACY_HEATMAP
513
523
  },
514
524
  partytown: { forwards: ["clarity"] }
@@ -667,7 +677,10 @@ async function registry(resolve) {
667
677
  }
668
678
  },
669
679
  proxy: {
670
- domains: ["www.google-analytics.com", "analytics.google.com", "stats.g.doubleclick.net", "pagead2.googlesyndication.com", "www.googleadservices.com", "googleads.g.doubleclick.net", "www.google.com", "www.googletagmanager.com"],
680
+ // `www.google.com` covers static URLs (www.google.com/g/collect) rewritten at build time;
681
+ // `www.google.*` covers the geo-localized ga-audiences beacon, which gtag.js dynamically
682
+ // fires to the visitor's local Google cctld (www.google.com.tw, www.google.co.jp, ...).
683
+ domains: ["www.google-analytics.com", "analytics.google.com", "stats.g.doubleclick.net", "pagead2.googlesyndication.com", "www.googleadservices.com", "googleads.g.doubleclick.net", "www.google.com", "www.google.*", "www.googletagmanager.com"],
671
684
  privacy: PRIVACY_HEATMAP
672
685
  },
673
686
  partytown: { forwards: ["dataLayer.push", "gtag"] }
@@ -207,6 +207,8 @@ onMounted(() => {
207
207
  return;
208
208
  const center = map.value.getCenter();
209
209
  const zoom = map.value.getZoom();
210
+ if (center)
211
+ centerOverride.value = { lat: center.lat(), lng: center.lng() };
210
212
  map.value.unbindAll();
211
213
  map.value = void 0;
212
214
  slotMounted.value = false;
@@ -222,11 +224,15 @@ onMounted(() => {
222
224
  };
223
225
  map.value = new mapsApi.value.Map(mapEl.value, _options);
224
226
  slotMounted.value = true;
227
+ emits("ready", exposed);
225
228
  });
226
229
  watch(() => options.value.zoom, (zoom) => {
227
230
  if (map.value && zoom != null)
228
231
  map.value.setZoom(zoom);
229
232
  });
233
+ watch([() => props.center, () => props.mapOptions?.center], () => {
234
+ centerOverride.value = void 0;
235
+ });
230
236
  watch([() => options.value.center, isMapReady, map], async (next) => {
231
237
  if (!map.value) {
232
238
  return;
@@ -1,5 +1,6 @@
1
1
  import { createError, defineEventHandler, getHeaders, getQuery, getRequestIP, getRequestWebStream, readBody, setResponseHeader, setResponseStatus } from "h3";
2
2
  import { useNitroApp, useRuntimeConfig } from "nitropack/runtime";
3
+ import { matchDomain } from "./utils/match-domain.js";
3
4
  import {
4
5
  anonymizeIP,
5
6
  mergePrivacy,
@@ -51,7 +52,7 @@ export default defineEventHandler(async (event) => {
51
52
  }
52
53
  let perScriptInput;
53
54
  for (const [configDomain, privacyInput] of Object.entries(domainPrivacy)) {
54
- if (domain === configDomain || domain.endsWith(`.${configDomain}`)) {
55
+ if (matchDomain(domain, configDomain)) {
55
56
  perScriptInput = privacyInput;
56
57
  break;
57
58
  }
@@ -0,0 +1 @@
1
+ export declare function matchDomain(domain: string, pattern: string): boolean;
@@ -0,0 +1,20 @@
1
+ const TLD_WILDCARD_RE = /^(?:com|[a-z]{2}|(?:com|co)\.[a-z]{2})$/i;
2
+ const SUBDOMAIN_LABEL_RE = /^[^.]+$/;
3
+ export function matchDomain(domain, pattern) {
4
+ if (!pattern.includes("*"))
5
+ return domain === pattern || domain.endsWith(`.${pattern}`);
6
+ if (pattern.startsWith("*.") && pattern.indexOf("*") === 0) {
7
+ const suffix = pattern.slice(2);
8
+ if (!domain.endsWith(`.${suffix}`))
9
+ return false;
10
+ const label = domain.slice(0, -(suffix.length + 1));
11
+ return SUBDOMAIN_LABEL_RE.test(label);
12
+ }
13
+ if (!pattern.endsWith("*") || pattern.indexOf("*") !== pattern.length - 1)
14
+ return false;
15
+ const prefix = pattern.slice(0, -1);
16
+ if (!domain.startsWith(prefix))
17
+ return false;
18
+ const tld = domain.slice(prefix.length);
19
+ return TLD_WILDCARD_RE.test(tld);
20
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nuxt/scripts",
3
3
  "type": "module",
4
- "version": "1.0.3",
4
+ "version": "1.0.4",
5
5
  "description": "Load third-party scripts with better performance, privacy and DX in Nuxt Apps.",
6
6
  "author": {
7
7
  "name": "Harlan Wilton",
@@ -1 +0,0 @@
1
- {"id":"6689578b-eedf-440f-89c7-1c51715a9fd2","timestamp":1777347169090,"prerendered":[]}