@nuxt/scripts 1.0.4 → 1.0.6
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/dist/devtools-client/200.html +1 -1
- package/dist/devtools-client/404.html +1 -1
- package/dist/devtools-client/_nuxt/{DxyiGojb.js → CZp-OuKP.js} +1 -1
- package/dist/devtools-client/_nuxt/{13TuIchK.js → Djr8-0jV.js} +1 -1
- package/dist/devtools-client/_nuxt/DtB6K90V.js +188 -0
- package/dist/devtools-client/_nuxt/{C0p4l2Wy.js → DyyF3uw_.js} +1 -1
- package/dist/devtools-client/_nuxt/{CWELSfs5.js → GzJXdFDa.js} +1 -1
- package/dist/devtools-client/_nuxt/{32RpwIYg.js → W-xcwSaJ.js} +1 -1
- package/dist/devtools-client/_nuxt/{NMrm-PBR.js → YlRaZkPa.js} +1 -1
- package/dist/devtools-client/_nuxt/builds/latest.json +1 -1
- package/dist/devtools-client/_nuxt/builds/meta/57f43375-6c5e-40af-a5bc-9479e5286aac.json +1 -0
- package/dist/devtools-client/_nuxt/error-404.DsZYSkA7.css +1 -0
- package/dist/devtools-client/_nuxt/error-500.Cqipl6_j.css +1 -0
- package/dist/devtools-client/docs/index.html +1 -1
- package/dist/devtools-client/first-party/index.html +1 -1
- package/dist/devtools-client/index.html +1 -1
- package/dist/devtools-client/registry/index.html +1 -1
- package/dist/module.json +1 -1
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMaps.d.vue.ts +1 -1
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMaps.vue +18 -6
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMaps.vue.d.ts +1 -1
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsOverlayView.vue +4 -2
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsStaticMap.vue +1 -1
- package/dist/runtime/components/ScriptPayPalButtons.d.vue.ts +1 -1
- package/dist/runtime/components/ScriptPayPalButtons.vue.d.ts +1 -1
- package/dist/runtime/components/ScriptPayPalMessages.d.vue.ts +1 -1
- package/dist/runtime/components/ScriptPayPalMessages.vue.d.ts +1 -1
- package/dist/runtime/composables/useScript.js +1 -1
- package/dist/runtime/registry/google-analytics.js +6 -3
- package/dist/runtime/registry/google-recaptcha.js +1 -1
- package/dist/runtime/registry/google-sign-in.d.ts +27 -2
- package/dist/runtime/registry/google-sign-in.js +96 -1
- package/dist/runtime/registry/google-tag-manager.js +6 -3
- package/dist/runtime/registry/intercom.d.ts +1 -1
- package/dist/runtime/registry/paypal.d.ts +1 -1
- package/dist/runtime/registry/posthog.d.ts +1 -1
- package/dist/runtime/registry/schemas.d.ts +41 -6
- package/dist/runtime/registry/schemas.js +10 -5
- package/dist/runtime/registry/snapchat-pixel.d.ts +1 -1
- package/dist/runtime/registry/stripe.d.ts +1 -1
- package/dist/runtime/registry/vimeo-player.d.ts +1 -1
- package/dist/runtime/registry/youtube-player.d.ts +1 -1
- package/dist/runtime/types.d.ts +4 -0
- package/dist/runtime/utils.d.ts +1 -1
- package/dist/types-source.mjs +11 -6
- package/package.json +5 -5
- package/dist/devtools-client/_nuxt/BQOW0dqa.js +0 -188
- package/dist/devtools-client/_nuxt/builds/meta/41edb1f4-fb21-4848-be40-543a397dc212.json +0 -1
- package/dist/devtools-client/_nuxt/error-404.CmHnDJ22.css +0 -1
- package/dist/devtools-client/_nuxt/error-500.C0mC5XzU.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as A,o as r,c as o,h as d,i as p,a as t,b as c,j as C,d as m,k as R,t as a,F as u,r as x,g as S,w as I,n as v,l as z,m as b,p as D,v as T,q as K,_ as V}from"./
|
|
1
|
+
import{f as A,o as r,c as o,h as d,i as p,a as t,b as c,j as C,d as m,k as R,t as a,F as u,r as x,g as S,w as I,n as v,l as z,m as b,p as D,v as T,q as K,_ as V}from"./DtB6K90V.js";const $={class:"py-1"},B={key:0,class:"panel-grids rounded-xl flex flex-col items-center justify-center py-16 gap-4"},M={class:"w-14 h-14 rounded-2xl bg-(--color-surface-elevated) border border-(--color-border) flex items-center justify-center"},N={class:"hint-callout text-xs max-w-sm"},H={key:1,class:"stagger-children space-y-4"},U={class:"flex flex-wrap gap-2.5"},q={class:"stat-card"},E={class:"stat-value"},W={class:"stat-card"},Z={class:"stat-value"},G={class:"stat-card"},J={class:"stat-value"},O={class:"stat-card"},Q={class:"stat-value capitalize text-sm"},X={class:"flex items-center gap-2 text-xs text-(--color-text-subtle)"},Y={class:"px-1.5 py-0.5 rounded text-[11px] font-mono bg-(--color-surface-sunken) border border-(--color-border-subtle) text-(--color-text-muted)"},tt={class:"space-y-3"},et={class:"p-4"},st={class:"flex items-start justify-between gap-4"},rt={class:"flex items-center gap-2.5 min-w-0"},ot={class:"w-7 h-7 rounded-lg bg-(--color-surface-sunken) border border-(--color-border-subtle) flex items-center justify-center flex-shrink-0 overflow-hidden"},at=["innerHTML"],nt={class:"text-sm font-semibold tracking-tight"},lt={class:"ml-2 text-[10px] px-1.5 py-0.5 rounded-full bg-(--color-surface-sunken) text-(--color-text-subtle) font-medium"},it={class:"flex gap-0.5 flex-shrink-0"},ct={class:"flex items-center gap-1.5 mt-2.5 flex-wrap"},dt={key:0,class:"fp-badge fp-badge-info"},pt={key:1,class:"fp-badge fp-badge-warn"},ut={key:2,class:"fp-badge fp-badge-muted"},xt={key:0,class:"px-4 pb-3 flex items-center gap-1.5 flex-wrap"},bt={key:1,class:"border-t border-(--color-border-subtle)"},mt=["onClick"],vt={class:"flex items-center gap-1.5"},ft={key:0,class:"opacity-50"},yt={class:"border-t border-(--color-border-subtle)"},ht={style:{color:"oklch(55% 0.12 250)"},class:"min-w-0 truncate"},gt={class:"text-(--color-text-subtle) min-w-0 truncate"},_t={key:0,class:"border-t border-(--color-border-subtle) px-4 py-2"},kt={style:{color:"oklch(55% 0.12 300)"},class:"truncate"},wt={class:"text-(--color-text-subtle) truncate"},Pt={key:0,class:"card overflow-hidden"},Lt={class:"px-4 py-2.5 border-b border-(--color-border-subtle)"},Ft={class:"text-xs font-semibold uppercase tracking-wider text-(--color-text-subtle) flex items-center gap-1.5"},jt={class:"overflow-x-auto"},At={class:"w-full text-xs"},Ct={class:"border-b border-(--color-border-subtle)"},Rt={class:"px-4 py-2 font-medium whitespace-nowrap"},St={class:"px-2.5 py-2 text-center"},It=A({__name:"first-party",setup(zt){const y=["ip","userAgent","language","screen","timezone","hardware"],_={ip:"IP Address",userAgent:"User Agent",language:"Language",screen:"Screen",timezone:"Timezone",hardware:"Hardware"},k={ip:"IP",userAgent:"UA",language:"Lang",screen:"Screen",timezone:"TZ",hardware:"HW"},w={ip:"i-carbon-location",userAgent:"i-carbon-user-profile",language:"i-carbon-translate",screen:"i-carbon-screen",timezone:"i-carbon-time",hardware:"i-carbon-chip"},f=K({});function P(l){f[l]=!f[l]}function g(l){return l==="full"?"privacy-full":l==="partial"?"privacy-partial":"privacy-none"}function L(l){return l==="bundle-rewrite-intercept"?"mechanism-bundle":"mechanism-config"}function F(l){return l==="bundle-rewrite-intercept"?"Bundle + Rewrite":"Config Injection"}return(l,s)=>{const i=C,j=z;return r(),o("div",$,[d(p)?.enabled?(r(),o("div",H,[t("div",U,[s[7]||(s[7]=R('<div class="stat-card" data-v-97e4a274><div class="stat-label" data-v-97e4a274> Status </div><div class="flex items-center gap-1.5" data-v-97e4a274><span class="stat-dot stat-dot-active" data-v-97e4a274></span><span class="text-sm font-semibold" style="color:oklch(55% 0.18 145);" data-v-97e4a274>Active</span></div></div>',1)),t("div",q,[s[3]||(s[3]=t("div",{class:"stat-label"}," Scripts ",-1)),t("div",E,a(d(p).scripts.length),1)]),t("div",W,[s[4]||(s[4]=t("div",{class:"stat-label"}," Routes ",-1)),t("div",Z,a(d(p).totalRoutes),1)]),t("div",G,[s[5]||(s[5]=t("div",{class:"stat-label"}," Domains ",-1)),t("div",J,a(d(p).totalDomains),1)]),t("div",O,[s[6]||(s[6]=t("div",{class:"stat-label"}," Privacy ",-1)),t("div",Q,a(d(p).privacyMode),1)])]),t("div",X,[c(i,{name:"i-carbon-direction-fork",class:"text-sm"}),s[8]||(s[8]=m(" Proxy prefix: ",-1)),t("code",Y,a(d(p).proxyPrefix),1)]),t("div",tt,[(r(!0),o(u,null,x(d(p).scripts,e=>(r(),o("div",{key:e.registryKey,class:"card overflow-hidden"},[t("div",et,[t("div",st,[t("div",rt,[t("div",ot,[e.logo?(r(),o("div",{key:0,class:"w-5 h-5 flex items-center justify-center [&>svg]:max-w-5 [&>svg]:max-h-5",innerHTML:e.logo},null,8,at)):(r(),S(i,{key:1,name:"i-carbon-script",class:"text-sm text-(--color-text-subtle)"}))]),t("div",null,[t("span",nt,a(e.label),1),t("span",lt,a(e.category),1)])]),t("div",it,[(r(),o(u,null,x(y,n=>c(j,{key:n,text:`${_[n]}: ${e.privacy[n]?"Anonymised":"Passthrough"}`},{default:I(()=>[t("div",{class:v(["privacy-flag",e.privacy[n]?"privacy-flag-on":"privacy-flag-off"])},[c(i,{name:w[n],class:"text-xs"},null,8,["name"])],2)]),_:2},1032,["text"])),64))])]),t("div",ct,[t("span",{class:v(["fp-badge",L(e.mechanism)])},a(F(e.mechanism)),3),t("span",{class:v(["fp-badge",g(e.privacyLevel)])},a(e.privacyLevel==="full"?"Full Privacy":e.privacyLevel==="partial"?"Partial":"Passthrough"),3),e.hasAutoInject?(r(),o("span",dt," Auto-inject"+a(e.autoInjectField?`: ${e.autoInjectField}`:""),1)):b("",!0),e.canvasFingerprinting?(r(),o("span",pt," Canvas FP neutralized ")):b("",!0),e.hasSdkPatches?(r(),o("span",ut," SDK patches ")):b("",!0)])]),e.domains?.length?(r(),o("div",xt,[s[9]||(s[9]=t("span",{class:"text-[10px] text-(--color-text-subtle) mr-0.5"},"Proxying:",-1)),(r(!0),o(u,null,x(e.domains,n=>(r(),o("span",{key:n,class:"text-[10px] font-mono px-1.5 py-0.5 rounded bg-(--color-surface-sunken) text-(--color-text-muted) border border-(--color-border-subtle)"},a(n),1))),128))])):b("",!0),e.routes?.length?(r(),o("div",bt,[t("button",{class:"w-full px-4 py-2 flex items-center justify-between text-xs text-(--color-text-subtle) hover:text-(--color-text-muted) transition-colors cursor-pointer",onClick:n=>P(e.registryKey)},[t("span",vt,[c(i,{name:"i-carbon-arrows-horizontal",class:"text-xs"}),m(" "+a(e.routes.length)+" route"+a(e.routes.length>1?"s":"")+" ",1),e.interceptRules?.length?(r(),o("span",ft," · "+a(e.interceptRules.length)+" intercept rule"+a(e.interceptRules.length>1?"s":""),1)):b("",!0)]),c(i,{name:f[e.registryKey]?"i-carbon-chevron-up":"i-carbon-chevron-down",class:"text-xs transition-transform"},null,8,["name"])],8,mt),D(t("div",null,[t("div",yt,[(r(!0),o(u,null,x(e.routes,(n,h)=>(r(),o("div",{key:h,class:"px-4 py-1.5 flex items-center gap-2 text-[11px] font-mono hover:bg-(--color-surface-sunken) transition-colors"},[t("span",ht,a(n.local),1),c(i,{name:"i-carbon-arrow-right",class:"text-[9px] opacity-25 flex-shrink-0"}),t("span",gt,a(n.target),1)]))),128))]),e.interceptRules?.length?(r(),o("div",_t,[s[10]||(s[10]=t("div",{class:"text-[10px] uppercase tracking-wider text-(--color-text-subtle) mb-1 font-medium"}," Intercept Rules ",-1)),(r(!0),o(u,null,x(e.interceptRules,(n,h)=>(r(),o("div",{key:h,class:"py-1 flex items-center gap-2 text-[11px] font-mono"},[t("span",kt,a(n.pattern)+a(n.pathPrefix),1),c(i,{name:"i-carbon-arrow-right",class:"text-[9px] opacity-25 flex-shrink-0"}),t("span",wt,a(n.target),1)]))),128))])):b("",!0)],512),[[T,f[e.registryKey]]])])):b("",!0)]))),128))]),d(p).scripts.length>1?(r(),o("div",Pt,[t("div",Lt,[t("h4",Ft,[c(i,{name:"i-carbon-data-table",class:"text-sm"}),s[11]||(s[11]=m(" Privacy Matrix ",-1))])]),t("div",jt,[t("table",At,[t("thead",null,[t("tr",Ct,[s[12]||(s[12]=t("th",{class:"px-4 py-2 text-left font-medium text-(--color-text-subtle)"}," Script ",-1)),(r(),o(u,null,x(y,e=>t("th",{key:e,class:"px-2.5 py-2 text-center font-medium text-(--color-text-subtle) whitespace-nowrap"},a(k[e]),1)),64)),s[13]||(s[13]=t("th",{class:"px-2.5 py-2 text-center font-medium text-(--color-text-subtle)"}," Level ",-1))])]),t("tbody",null,[(r(!0),o(u,null,x(d(p).scripts,e=>(r(),o("tr",{key:e.registryKey,class:"border-b border-(--color-border-subtle) last:border-b-0 hover:bg-(--color-surface-sunken) transition-colors"},[t("td",Rt,a(e.label),1),(r(),o(u,null,x(y,n=>t("td",{key:n,class:"px-2.5 py-2 text-center"},[t("div",{class:v(["w-2.5 h-2.5 rounded-full mx-auto",e.privacy[n]?"matrix-dot-on":"matrix-dot-off"])},null,2)])),64)),t("td",St,[t("span",{class:v(["fp-badge text-[10px]",g(e.privacyLevel)])},a(e.privacyLevel),3)])]))),128))])])])])):b("",!0),s[14]||(s[14]=t("div",{class:"text-center pt-1 pb-3"},[t("a",{href:"https://scripts.nuxt.com/docs/guides/first-party",target:"_blank",class:"link-external text-xs"}," First-Party Mode: Privacy Focused Proxy ")],-1))])):(r(),o("div",B,[t("div",M,[c(i,{name:"i-carbon-security",class:"text-3xl text-(--color-text-subtle)"})]),s[1]||(s[1]=t("div",{class:"text-center space-y-1.5"},[t("p",{class:"text-sm font-semibold text-(--color-text-muted)"}," Privacy Proxy is not active "),t("p",{class:"text-xs text-(--color-text-subtle) max-w-sm"}," The reverse proxy is auto-enabled when scripts with proxy capabilities are configured in the registry. ")],-1)),t("div",N,[c(i,{name:"i-carbon-information",class:"hint-callout-icon text-base flex-shrink-0"}),s[0]||(s[0]=t("div",null,[m(" Check that your registry scripts have not set "),t("code",{class:"px-1 py-0.5 rounded text-[11px] font-mono bg-(--color-surface-sunken)"},"proxy: false"),m(" or "),t("code",{class:"px-1 py-0.5 rounded text-[11px] font-mono bg-(--color-surface-sunken)"},"bundle: false"),m(". ")],-1))]),s[2]||(s[2]=t("a",{href:"https://scripts.nuxt.com/docs/guides/first-party",target:"_blank",class:"link-external text-xs mt-1"}," View Documentation ",-1))]))])}}}),Tt=V(It,[["__scopeId","data-v-97e4a274"]]);export{Tt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as s,u as a,o as i,c as u,a as t,t as n,b as c,w as l,d,e as f}from"./
|
|
1
|
+
import{_ as s,u as a,o as i,c as u,a as t,t as n,b as c,w as l,d,e as f}from"./DtB6K90V.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"],b=["textContent"],x=["textContent"],g={class:"flex items-center justify-center w-full"},y={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},status:{type:Number,default:404},statusText:{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 a({title:`${r.status} - ${r.statusText} | ${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=f;return i(),u("div",p,[t("div",m,[t("h1",{class:"font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]",textContent:n(e.status)},null,8,h),t("h2",{class:"font-semibold mb-2 sm:text-3xl text-2xl",textContent:n(e.statusText)},null,8,b),t("p",{class:"mb-4 px-2 text-[#64748B] text-md",textContent:n(e.description)},null,8,x),t("div",g,[c(o,{to:"/",class:"font-medium hover:text-[#00DC82] text-sm underline underline-offset-3"},{default:l(()=>[d(n(e.backHome),1)]),_:1})])])])}}},v=s(y,[["__scopeId","data-v-1f96c937"]]);export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as s,o,c as n,a as l,_ as r,g as a}from"./
|
|
1
|
+
import{f as s,o,c as n,a as l,_ as r,g as a}from"./DtB6K90V.js";const _={class:"h-full max-h-full overflow-hidden"},u=["src","title"],i=s({__name:"DevtoolsDocs",props:{url:{}},setup(e){return(c,t)=>(o(),n("div",_,[l("iframe",{src:e.url,title:`Documentation - ${e.url}`,class:"w-full h-full border-none",style:{"min-height":"calc(100vh - 100px)"}},null,8,u)]))}}),f=Object.assign(i,{__name:"DevtoolsDocs"}),m={};function d(e,c){const t=f;return o(),a(t,{url:"https://scripts.nuxt.com"})}const p=r(m,[["render",d]]);export{p as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as j,o,c as s,h as m,s as p,a as t,b as n,j as C,F as d,k as N,r as u,g as v,t as r,m as k,w as _,n as w,l as L,d as y,_ as S}from"./
|
|
1
|
+
import{f as j,o,c as s,h as m,s as p,a as t,b as n,j as C,F as d,k as N,r as u,g as v,t as r,m as k,w as _,n as w,l as L,d as y,_ as S}from"./DtB6K90V.js";const T={class:"py-1"},V={key:0,class:"panel-grids rounded-xl flex flex-col items-center justify-center py-16 gap-3"},B={class:"w-12 h-12 rounded-xl bg-(--color-surface-elevated) border border-(--color-border) flex items-center justify-center"},M={class:"stagger-children space-y-1.5"},$={class:"px-3.5 py-2.5 flex items-center gap-3"},H={class:"w-7 h-7 rounded-lg bg-(--color-surface-sunken) border border-(--color-border-subtle) flex items-center justify-center flex-shrink-0 overflow-hidden"},D=["src"],P=["innerHTML"],A={class:"flex-1 min-w-0"},F={class:"flex items-center gap-2"},I={class:"text-[13px] font-semibold tracking-tight truncate"},U={class:"text-[10px] px-1.5 py-0.5 rounded-full bg-(--color-surface-sunken) text-(--color-text-subtle) font-medium flex-shrink-0"},W={key:0,class:"text-[10px] font-mono text-(--color-text-subtle) truncate mt-0.5"},q={key:1,class:"text-[10px] font-mono text-(--color-text-subtle) mt-0.5"},z={class:"flex items-center gap-1 flex-shrink-0"},E={class:"text-xs space-y-0.5"},R={class:"font-semibold"},G={class:"opacity-70"},J={class:"opacity-50 mt-1 max-w-48 text-[11px]"},K=["href"],O={key:0,class:"mt-5 card overflow-hidden"},Q={class:"px-4 py-2.5 border-b border-(--color-border-subtle)"},X={class:"text-xs font-semibold uppercase tracking-wider text-(--color-text-subtle) flex items-center gap-1.5"},Y={class:"overflow-x-auto"},Z={class:"w-full text-xs"},ee={class:"border-b border-(--color-border-subtle)"},te={class:"inline-flex items-center justify-center gap-1"},oe={class:"px-4 py-2 font-medium whitespace-nowrap"},se={class:"flex items-center gap-2"},ae=["src"],le=["innerHTML"],ne=j({__name:"registry",setup(re){const g=[{key:"bundle",label:"Bundle",icon:"i-carbon-archive",desc:"Downloaded at build time, served from your domain"},{key:"proxy",label:"Proxy",icon:"i-carbon-security",desc:"Collection requests routed through your server"},{key:"partytown",label:"Partytown",icon:"i-carbon-container-software",desc:"Can run in a web worker via Partytown"}];function f(c,a){return c.capabilities?.[a]?c.defaultCapability?.[a]?"active":"available":"off"}function h(c){return c==="active"?"Active by default":c==="available"?"Supported (opt-in)":"Not supported"}return(c,a)=>{const l=C,b=L;return o(),s("div",T,[m(p)?.length?(o(),s(d,{key:1},[a[3]||(a[3]=N('<div class="flex items-center gap-4 mb-3 px-0.5" data-v-3f8fca8a><div class="flex items-center gap-1.5 text-[10px] font-medium text-(--color-text-subtle)" data-v-3f8fca8a><span class="cap-dot cap-dot-active" data-v-3f8fca8a></span> Active by default </div><div class="flex items-center gap-1.5 text-[10px] font-medium text-(--color-text-subtle)" data-v-3f8fca8a><span class="cap-dot cap-dot-available" data-v-3f8fca8a></span> Supported (opt-in) </div><div class="flex items-center gap-1.5 text-[10px] font-medium text-(--color-text-subtle)" data-v-3f8fca8a><span class="cap-dot cap-dot-off" data-v-3f8fca8a></span> Not supported </div></div>',1)),t("div",M,[(o(!0),s(d,null,u(m(p),(e,x)=>(o(),s("div",{key:x,class:"registry-row group"},[t("div",$,[t("div",H,[e.logo&&typeof e.logo=="string"&&e.logo.startsWith("http")?(o(),s("img",{key:0,class:"w-5 h-5 object-contain",src:typeof e.logo=="object"?e.logo.dark||e.logo.light:e.logo,alt:""},null,8,D)):e.logo?(o(),s("div",{key:1,class:"w-5 h-5 flex items-center [&>svg]:max-h-5 [&>svg]:max-w-5",innerHTML:typeof e.logo=="object"?e.logo.dark||e.logo.light:e.logo},null,8,P)):(o(),v(l,{key:2,name:"i-carbon-script",class:"text-sm text-(--color-text-subtle)"}))]),t("div",A,[t("div",F,[t("span",I,r(e.label),1),t("span",U,r(e.category),1)]),e.src&&e.src!==!1?(o(),s("div",W,r(e.src),1)):e.src===!1?(o(),s("div",q," npm (no script download) ")):k("",!0)]),t("div",z,[(o(),s(d,null,u(g,i=>n(b,{key:i.key},{content:_(()=>[t("div",E,[t("div",R,r(i.label),1),t("div",G,r(h(f(e,i.key))),1),t("div",J,r(i.desc),1)])]),default:_(()=>[t("div",{class:w(["cap-indicator",`cap-${f(e,i.key)}`])},[n(l,{name:i.icon,class:"text-xs"},null,8,["name"])],2)]),_:2},1024)),64))]),t("a",{href:`https://scripts.nuxt.com/scripts/${e.label.toLowerCase().replace(/ /g,"-")}`,target:"_blank",class:"opacity-0 group-hover:opacity-60 focus-visible:opacity-60 transition-opacity flex-shrink-0","aria-label":"View documentation"},[n(l,{name:"i-carbon-launch",class:"text-sm"})],8,K)])]))),128))]),m(p).length>3?(o(),s("div",O,[t("div",Q,[t("h4",X,[n(l,{name:"i-carbon-data-table",class:"text-sm"}),a[1]||(a[1]=y(" Capability Matrix ",-1))])]),t("div",Y,[t("table",Z,[t("thead",null,[t("tr",ee,[a[2]||(a[2]=t("th",{class:"px-4 py-2 text-left font-medium text-(--color-text-subtle)"}," Script ",-1)),(o(),s(d,null,u(g,e=>t("th",{key:e.key,class:"px-3 py-2 text-center font-medium text-(--color-text-subtle) whitespace-nowrap"},[n(b,{text:e.desc},{default:_(()=>[t("span",te,[n(l,{name:e.icon,class:"text-xs"},null,8,["name"]),y(" "+r(e.label),1)])]),_:2},1032,["text"])])),64))])]),t("tbody",null,[(o(!0),s(d,null,u(m(p),e=>(o(),s("tr",{key:e.registryKey||e.label,class:"border-b border-(--color-border-subtle) last:border-b-0 hover:bg-(--color-surface-sunken) transition-colors"},[t("td",oe,[t("div",se,[e.logo&&typeof e.logo=="string"&&e.logo.startsWith("http")?(o(),s("img",{key:0,class:"w-4 h-4 object-contain",src:typeof e.logo=="object"?e.logo.dark||e.logo.light:e.logo,alt:""},null,8,ae)):e.logo?(o(),s("div",{key:1,class:"w-4 h-4 flex items-center [&>svg]:max-h-4 [&>svg]:max-w-4",innerHTML:typeof e.logo=="object"?e.logo.dark||e.logo.light:e.logo},null,8,le)):(o(),v(l,{key:2,name:"i-carbon-script",class:"text-xs text-(--color-text-subtle)"})),y(" "+r(e.label),1)])]),(o(),s(d,null,u(g,x=>t("td",{key:x.key,class:"px-3 py-2 text-center"},[n(b,{text:h(f(e,x.key))},{default:_(()=>[t("div",{class:w(["cap-dot mx-auto",`cap-dot-${f(e,x.key)}`])},null,2)]),_:2},1032,["text"])])),64))]))),128))])])])])):k("",!0)],64)):(o(),s("div",V,[t("div",B,[n(l,{name:"i-carbon-catalog",class:"text-2xl text-(--color-text-subtle)"})]),a[0]||(a[0]=t("p",{class:"text-sm font-medium text-(--color-text-muted)"}," No registry scripts available ",-1))]))])}}}),ie=S(ne,[["__scopeId","data-v-3f8fca8a"]]);export{ie as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"57f43375-6c5e-40af-a5bc-9479e5286aac","timestamp":1777796992753}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"57f43375-6c5e-40af-a5bc-9479e5286aac","timestamp":1777796992753,"prerendered":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.grid[data-v-1f96c937]{display:grid}.mb-2[data-v-1f96c937]{margin-bottom:.5rem}.mb-4[data-v-1f96c937]{margin-bottom:1rem}.max-w-520px[data-v-1f96c937]{max-width:520px}.min-h-screen[data-v-1f96c937]{min-height:100vh}.w-full[data-v-1f96c937]{width:100%}.flex[data-v-1f96c937]{display:flex}.place-content-center[data-v-1f96c937]{place-content:center}.items-center[data-v-1f96c937]{align-items:center}.justify-center[data-v-1f96c937]{justify-content:center}.overflow-hidden[data-v-1f96c937]{overflow:hidden}.bg-white[data-v-1f96c937]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-2[data-v-1f96c937]{padding-left:.5rem;padding-right:.5rem}.text-center[data-v-1f96c937]{text-align:center}.text-\[80px\][data-v-1f96c937]{font-size:80px}.text-2xl[data-v-1f96c937]{font-size:1.5rem;line-height:2rem}.text-sm[data-v-1f96c937]{font-size:.875rem;line-height:1.25rem}.text-\[\#020420\][data-v-1f96c937]{--un-text-opacity:1;color:rgb(2 4 32/var(--un-text-opacity))}.text-\[\#64748B\][data-v-1f96c937]{--un-text-opacity:1;color:rgb(100 116 139/var(--un-text-opacity))}.hover\:text-\[\#00DC82\][data-v-1f96c937]:hover{--un-text-opacity:1;color:rgb(0 220 130/var(--un-text-opacity))}.font-medium[data-v-1f96c937]{font-weight:500}.font-semibold[data-v-1f96c937]{font-weight:600}.leading-none[data-v-1f96c937]{line-height:1}.tracking-wide[data-v-1f96c937]{letter-spacing:.025em}.font-sans[data-v-1f96c937]{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}.tabular-nums[data-v-1f96c937]{--un-numeric-spacing:tabular-nums;font-variant-numeric:var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction)}.underline[data-v-1f96c937]{text-decoration-line:underline}.underline-offset-3[data-v-1f96c937]{text-underline-offset:3px}.antialiased[data-v-1f96c937]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media(prefers-color-scheme:dark){.dark\:bg-\[\#020420\][data-v-1f96c937]{--un-bg-opacity:1;background-color:rgb(2 4 32/var(--un-bg-opacity))}.dark\:text-white[data-v-1f96c937]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media(min-width:640px){.sm\:text-\[110px\][data-v-1f96c937]{font-size:110px}.sm\:text-3xl[data-v-1f96c937]{font-size:1.875rem;line-height:2.25rem}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.grid[data-v-135602f4]{display:grid}.mb-2[data-v-135602f4]{margin-bottom:.5rem}.mb-4[data-v-135602f4]{margin-bottom:1rem}.max-w-520px[data-v-135602f4]{max-width:520px}.min-h-screen[data-v-135602f4]{min-height:100vh}.place-content-center[data-v-135602f4]{place-content:center}.overflow-hidden[data-v-135602f4]{overflow:hidden}.bg-white[data-v-135602f4]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-2[data-v-135602f4]{padding-left:.5rem;padding-right:.5rem}.text-center[data-v-135602f4]{text-align:center}.text-\[80px\][data-v-135602f4]{font-size:80px}.text-2xl[data-v-135602f4]{font-size:1.5rem;line-height:2rem}.text-\[\#020420\][data-v-135602f4]{--un-text-opacity:1;color:rgb(2 4 32/var(--un-text-opacity))}.text-\[\#64748B\][data-v-135602f4]{--un-text-opacity:1;color:rgb(100 116 139/var(--un-text-opacity))}.font-semibold[data-v-135602f4]{font-weight:600}.leading-none[data-v-135602f4]{line-height:1}.tracking-wide[data-v-135602f4]{letter-spacing:.025em}.font-sans[data-v-135602f4]{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}.tabular-nums[data-v-135602f4]{--un-numeric-spacing:tabular-nums;font-variant-numeric:var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction)}.antialiased[data-v-135602f4]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media(prefers-color-scheme:dark){.dark\:bg-\[\#020420\][data-v-135602f4]{--un-bg-opacity:1;background-color:rgb(2 4 32/var(--un-bg-opacity))}.dark\:text-white[data-v-135602f4]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media(min-width:640px){.sm\:text-\[110px\][data-v-135602f4]{font-size:110px}.sm\:text-3xl[data-v-135602f4]{font-size:1.875rem;line-height:2.25rem}}
|
|
@@ -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.XOvcedFq.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-scripts/_nuxt/
|
|
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/DtB6K90V.js"><script type="module" src="/__nuxt-scripts/_nuxt/DtB6K90V.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:"57f43375-6c5e-40af-a5bc-9479e5286aac",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1777797001335,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.XOvcedFq.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-scripts/_nuxt/
|
|
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/DtB6K90V.js"><script type="module" src="/__nuxt-scripts/_nuxt/DtB6K90V.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:"57f43375-6c5e-40af-a5bc-9479e5286aac",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1777797001337,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.XOvcedFq.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-scripts/_nuxt/
|
|
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/DtB6K90V.js"><script type="module" src="/__nuxt-scripts/_nuxt/DtB6K90V.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:"57f43375-6c5e-40af-a5bc-9479e5286aac",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1777797001337,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.XOvcedFq.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-scripts/_nuxt/
|
|
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/DtB6K90V.js"><script type="module" src="/__nuxt-scripts/_nuxt/DtB6K90V.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:"57f43375-6c5e-40af-a5bc-9479e5286aac",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1777797001337,false]</script></body></html>
|
package/dist/module.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ElementScriptTrigger } from '#nuxt-scripts/types';
|
|
2
1
|
import type { HTMLAttributes, ReservedProps, ShallowRef } from 'vue';
|
|
2
|
+
import type { ElementScriptTrigger } from '#nuxt-scripts/types';
|
|
3
3
|
export { MAP_INJECTION_KEY } from './useGoogleMapsResource.js';
|
|
4
4
|
export interface ScriptGoogleMapsProps {
|
|
5
5
|
/**
|
|
@@ -3,12 +3,12 @@ export { MAP_INJECTION_KEY } from "./useGoogleMapsResource";
|
|
|
3
3
|
</script>
|
|
4
4
|
|
|
5
5
|
<script setup>
|
|
6
|
-
import { useScriptTriggerElement } from "#nuxt-scripts/composables/useScriptTriggerElement";
|
|
7
|
-
import { useScriptGoogleMaps } from "#nuxt-scripts/registry/google-maps";
|
|
8
|
-
import { scriptRuntimeConfig, scriptsPrefix } from "#nuxt-scripts/utils";
|
|
9
6
|
import { defu } from "defu";
|
|
10
7
|
import { tryUseNuxtApp, useHead, useRuntimeConfig } from "nuxt/app";
|
|
11
8
|
import { computed, nextTick, onBeforeUnmount, onMounted, provide, ref, shallowRef, toRaw, useAttrs, useTemplateRef, watch } from "vue";
|
|
9
|
+
import { useScriptTriggerElement } from "#nuxt-scripts/composables/useScriptTriggerElement";
|
|
10
|
+
import { useScriptGoogleMaps } from "#nuxt-scripts/registry/google-maps";
|
|
11
|
+
import { scriptRuntimeConfig, scriptsPrefix } from "#nuxt-scripts/utils";
|
|
12
12
|
import ScriptAriaLoadingIndicator from "../ScriptAriaLoadingIndicator.vue";
|
|
13
13
|
import { defineDeprecatedAlias, MAP_INJECTION_KEY, waitForMapsReady, warnDeprecatedTopLevelMapProps } from "./useGoogleMapsResource";
|
|
14
14
|
const props = defineProps({
|
|
@@ -93,6 +93,18 @@ const map = shallowRef();
|
|
|
93
93
|
function isLocationQuery(s) {
|
|
94
94
|
return typeof s === "string" && (s.split(",").length > 2 || s.includes("+"));
|
|
95
95
|
}
|
|
96
|
+
function getCenterWatchKey(center) {
|
|
97
|
+
const raw = toRaw(center);
|
|
98
|
+
if (!raw)
|
|
99
|
+
return void 0;
|
|
100
|
+
if (typeof raw === "string")
|
|
101
|
+
return `query:${raw}`;
|
|
102
|
+
const lat = typeof raw.lat === "function" ? raw.lat() : raw.lat;
|
|
103
|
+
const lng = typeof raw.lng === "function" ? raw.lng() : raw.lng;
|
|
104
|
+
if (lat != null && lng != null)
|
|
105
|
+
return `latlng:${lat},${lng}`;
|
|
106
|
+
return void 0;
|
|
107
|
+
}
|
|
96
108
|
const queryToLatLngCache = /* @__PURE__ */ new Map();
|
|
97
109
|
async function resolveQueryToLatLng(query) {
|
|
98
110
|
if (query && typeof query === "object")
|
|
@@ -230,14 +242,14 @@ onMounted(() => {
|
|
|
230
242
|
if (map.value && zoom != null)
|
|
231
243
|
map.value.setZoom(zoom);
|
|
232
244
|
});
|
|
233
|
-
watch([() => props.center, () => props.mapOptions?.center], () => {
|
|
245
|
+
watch([() => getCenterWatchKey(props.center), () => getCenterWatchKey(props.mapOptions?.center)], () => {
|
|
234
246
|
centerOverride.value = void 0;
|
|
235
247
|
});
|
|
236
|
-
watch([() => options.value.center, isMapReady, map], async (
|
|
248
|
+
watch([() => getCenterWatchKey(options.value.center), isMapReady, map], async () => {
|
|
237
249
|
if (!map.value) {
|
|
238
250
|
return;
|
|
239
251
|
}
|
|
240
|
-
let center = toRaw(
|
|
252
|
+
let center = toRaw(options.value.center);
|
|
241
253
|
if (center) {
|
|
242
254
|
if (isLocationQuery(center) && isMapReady.value) {
|
|
243
255
|
center = await resolveQueryToLatLng(center);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ElementScriptTrigger } from '#nuxt-scripts/types';
|
|
2
1
|
import type { HTMLAttributes, ReservedProps, ShallowRef } from 'vue';
|
|
2
|
+
import type { ElementScriptTrigger } from '#nuxt-scripts/types';
|
|
3
3
|
export { MAP_INJECTION_KEY } from './useGoogleMapsResource.js';
|
|
4
4
|
export interface ScriptGoogleMapsProps {
|
|
5
5
|
/**
|
|
@@ -101,11 +101,13 @@ function panMapToFitOverlay(el, map, padding) {
|
|
|
101
101
|
map.panBy(panX, panY);
|
|
102
102
|
}
|
|
103
103
|
function makeOverlayClass(mapsApi, map) {
|
|
104
|
+
let attachedEl = null;
|
|
104
105
|
return class CustomOverlay extends mapsApi.OverlayView {
|
|
105
106
|
onAdd() {
|
|
106
107
|
const panes = this.getPanes();
|
|
107
108
|
const el = overlayAnchor.value;
|
|
108
109
|
if (panes && el) {
|
|
110
|
+
attachedEl = el;
|
|
109
111
|
panes[pane].appendChild(el);
|
|
110
112
|
if (blockMapInteraction)
|
|
111
113
|
mapsApi.OverlayView.preventMapHitsAndGesturesFrom(el);
|
|
@@ -143,8 +145,8 @@ function makeOverlayClass(mapsApi, map) {
|
|
|
143
145
|
overlayPosition.value = { x: pos.x, y: pos.y };
|
|
144
146
|
}
|
|
145
147
|
onRemove() {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
+
attachedEl?.parentNode?.removeChild(attachedEl);
|
|
149
|
+
attachedEl = null;
|
|
148
150
|
}
|
|
149
151
|
};
|
|
150
152
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import { scriptRuntimeConfig } from "#nuxt-scripts/utils";
|
|
3
2
|
import { defu } from "defu";
|
|
4
3
|
import { useHead, useRuntimeConfig } from "nuxt/app";
|
|
5
4
|
import { withQuery } from "ufo";
|
|
6
5
|
import { computed, onMounted, ref } from "vue";
|
|
6
|
+
import { scriptRuntimeConfig } from "#nuxt-scripts/utils";
|
|
7
7
|
import { useScriptProxyUrl } from "../../composables/useScriptProxyUrl";
|
|
8
8
|
</script>
|
|
9
9
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ElementScriptTrigger } from '#nuxt-scripts/types';
|
|
2
1
|
import type { Components, PageTypes, SdkInstance } from '@paypal/paypal-js/sdk-v6';
|
|
3
2
|
import type { HTMLAttributes, ReservedProps } from 'vue';
|
|
3
|
+
import type { ElementScriptTrigger } from '#nuxt-scripts/types';
|
|
4
4
|
import type { PayPalInput } from '../registry/paypal.js';
|
|
5
5
|
type __VLS_Props = {
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ElementScriptTrigger } from '#nuxt-scripts/types';
|
|
2
1
|
import type { Components, PageTypes, SdkInstance } from '@paypal/paypal-js/sdk-v6';
|
|
3
2
|
import type { HTMLAttributes, ReservedProps } from 'vue';
|
|
3
|
+
import type { ElementScriptTrigger } from '#nuxt-scripts/types';
|
|
4
4
|
import type { PayPalInput } from '../registry/paypal.js';
|
|
5
5
|
type __VLS_Props = {
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ElementScriptTrigger } from '#nuxt-scripts/types';
|
|
2
1
|
import type { PageTypes, PayPalMessagesOptions, PayPalMessagesSession } from '@paypal/paypal-js/sdk-v6';
|
|
3
2
|
import type { HTMLAttributes, ReservedProps } from 'vue';
|
|
3
|
+
import type { ElementScriptTrigger } from '#nuxt-scripts/types';
|
|
4
4
|
import type { PayPalInput } from '../registry/paypal.js';
|
|
5
5
|
type __VLS_Props = {
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ElementScriptTrigger } from '#nuxt-scripts/types';
|
|
2
1
|
import type { PageTypes, PayPalMessagesOptions, PayPalMessagesSession } from '@paypal/paypal-js/sdk-v6';
|
|
3
2
|
import type { HTMLAttributes, ReservedProps } from 'vue';
|
|
3
|
+
import type { ElementScriptTrigger } from '#nuxt-scripts/types';
|
|
4
4
|
import type { PayPalInput } from '../registry/paypal.js';
|
|
5
5
|
type __VLS_Props = {
|
|
6
6
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { resolveTrigger } from "#build/nuxt-scripts-trigger-resolver";
|
|
2
1
|
import { useScript as _useScript } from "@unhead/vue/scripts";
|
|
3
2
|
import { defu } from "defu";
|
|
4
3
|
import { injectHead, onNuxtReady, useHead, useNuxtApp, useRuntimeConfig } from "nuxt/app";
|
|
5
4
|
import { markRaw, ref } from "vue";
|
|
5
|
+
import { resolveTrigger } from "#build/nuxt-scripts-trigger-resolver";
|
|
6
6
|
import { logger } from "../logger.js";
|
|
7
7
|
function resolveProxyPrefix() {
|
|
8
8
|
const devtoolsConfig = useRuntimeConfig().public["nuxt-scripts-devtools"];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useRegistryScript } from "#nuxt-scripts/utils";
|
|
2
1
|
import { withQuery } from "ufo";
|
|
2
|
+
import { useRegistryScript } from "#nuxt-scripts/utils";
|
|
3
3
|
import { GoogleAnalyticsOptions } from "./schemas.js";
|
|
4
4
|
export { GoogleAnalyticsOptions };
|
|
5
5
|
export function useScriptGoogleAnalytics(_options) {
|
|
@@ -24,8 +24,11 @@ export function useScriptGoogleAnalytics(_options) {
|
|
|
24
24
|
w.gtag = function() {
|
|
25
25
|
w[dataLayerName].push(arguments);
|
|
26
26
|
};
|
|
27
|
-
if (options?.defaultConsent)
|
|
28
|
-
|
|
27
|
+
if (options?.defaultConsent) {
|
|
28
|
+
const entries = Array.isArray(options.defaultConsent) ? options.defaultConsent : [options.defaultConsent];
|
|
29
|
+
for (const entry of entries)
|
|
30
|
+
w.gtag("consent", "default", entry);
|
|
31
|
+
}
|
|
29
32
|
_options?.onBeforeGtagStart?.(w.gtag);
|
|
30
33
|
w.gtag("js", /* @__PURE__ */ new Date());
|
|
31
34
|
if (options?.id) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useRegistryScript } from "#nuxt-scripts/utils";
|
|
2
1
|
import { withQuery } from "ufo";
|
|
2
|
+
import { useRegistryScript } from "#nuxt-scripts/utils";
|
|
3
3
|
import { GoogleRecaptchaOptions } from "./schemas.js";
|
|
4
4
|
export { GoogleRecaptchaOptions };
|
|
5
5
|
export function useScriptGoogleRecaptcha(_options) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RegistryScriptInput } from '#nuxt-scripts/types';
|
|
1
|
+
import type { RegistryScriptInput, UseScriptContext } from '#nuxt-scripts/types';
|
|
2
2
|
import { GoogleSignInOptions } from './schemas.js';
|
|
3
3
|
export interface CredentialResponse {
|
|
4
4
|
credential: string;
|
|
@@ -70,4 +70,29 @@ export interface GoogleSignInApi {
|
|
|
70
70
|
}
|
|
71
71
|
export { GoogleSignInOptions };
|
|
72
72
|
export type GoogleSignInInput = RegistryScriptInput<typeof GoogleSignInOptions>;
|
|
73
|
-
|
|
73
|
+
/**
|
|
74
|
+
* Helpers attached to the `useScriptGoogleSignIn()` instance.
|
|
75
|
+
*
|
|
76
|
+
* They merge schema options (passed to `useScriptGoogleSignIn(...)`) with the
|
|
77
|
+
* arguments below, ensure `accounts.id.initialize()` is called at most once
|
|
78
|
+
* across the page lifecycle (avoids the error Google emits on re-init after a
|
|
79
|
+
* button is rendered), and wait for the script to load.
|
|
80
|
+
*/
|
|
81
|
+
export interface GoogleSignInHelpers {
|
|
82
|
+
/**
|
|
83
|
+
* Initialize Google Identity Services. Schema options are used as defaults;
|
|
84
|
+
* pass a callback (and any other non-serializable config) here. Subsequent
|
|
85
|
+
* calls are a no-op so this is safe to invoke from a remounting component.
|
|
86
|
+
*/
|
|
87
|
+
initialize: (config?: Partial<IdConfiguration>) => void;
|
|
88
|
+
/**
|
|
89
|
+
* Render a personalized Google Sign-In button. Auto-initializes if needed.
|
|
90
|
+
* Safe to re-render on navigation or locale change.
|
|
91
|
+
*/
|
|
92
|
+
renderButton: (parent: HTMLElement, config?: GsiButtonConfiguration) => void;
|
|
93
|
+
/**
|
|
94
|
+
* Show the One Tap prompt. Auto-initializes if needed.
|
|
95
|
+
*/
|
|
96
|
+
prompt: (listener?: (notification: MomentNotification) => void) => void;
|
|
97
|
+
}
|
|
98
|
+
export declare function useScriptGoogleSignIn<T extends GoogleSignInApi>(_options?: GoogleSignInInput): UseScriptContext<T> & GoogleSignInHelpers;
|
|
@@ -2,7 +2,7 @@ import { useRegistryScript } from "#nuxt-scripts/utils";
|
|
|
2
2
|
import { GoogleSignInOptions } from "./schemas.js";
|
|
3
3
|
export { GoogleSignInOptions };
|
|
4
4
|
export function useScriptGoogleSignIn(_options) {
|
|
5
|
-
|
|
5
|
+
const instance = useRegistryScript(_options?.key || "googleSignIn", (options) => {
|
|
6
6
|
return {
|
|
7
7
|
scriptInput: {
|
|
8
8
|
src: "https://accounts.google.com/gsi/client",
|
|
@@ -24,7 +24,102 @@ export function useScriptGoogleSignIn(_options) {
|
|
|
24
24
|
w.google = w.google || {};
|
|
25
25
|
w.google.accounts = w.google.accounts || {};
|
|
26
26
|
w.google.accounts.id = w.google.accounts.id || {};
|
|
27
|
+
const key2 = _options?.key || "googleSignIn";
|
|
28
|
+
w.__nuxtScriptsGsi = w.__nuxtScriptsGsi || {};
|
|
29
|
+
const cached = w.__nuxtScriptsGsi[key2] = w.__nuxtScriptsGsi[key2] || { initialized: false };
|
|
30
|
+
cached.schemaConfig = mapSchemaToIdConfig(options);
|
|
31
|
+
cached.runtimeConfig ||= {};
|
|
27
32
|
}
|
|
28
33
|
};
|
|
29
34
|
}, _options);
|
|
35
|
+
const key = _options?.key || "googleSignIn";
|
|
36
|
+
const getState = () => {
|
|
37
|
+
if (!import.meta.client)
|
|
38
|
+
return null;
|
|
39
|
+
const w = window;
|
|
40
|
+
w.__nuxtScriptsGsi = w.__nuxtScriptsGsi || {};
|
|
41
|
+
const state = w.__nuxtScriptsGsi[key] = w.__nuxtScriptsGsi[key] || {
|
|
42
|
+
initialized: false,
|
|
43
|
+
schemaConfig: mapSchemaToIdConfig(_options),
|
|
44
|
+
runtimeConfig: {}
|
|
45
|
+
};
|
|
46
|
+
state.schemaConfig ||= mapSchemaToIdConfig(_options);
|
|
47
|
+
state.runtimeConfig ||= {};
|
|
48
|
+
return state;
|
|
49
|
+
};
|
|
50
|
+
const ensureInit = (extra) => {
|
|
51
|
+
const state = getState();
|
|
52
|
+
if (!state)
|
|
53
|
+
return false;
|
|
54
|
+
if (state.initialized)
|
|
55
|
+
return true;
|
|
56
|
+
const merged = { ...state.schemaConfig, ...state.runtimeConfig, ...extra };
|
|
57
|
+
if (!merged.client_id)
|
|
58
|
+
return false;
|
|
59
|
+
if (merged.ux_mode !== "redirect" && typeof merged.callback !== "function")
|
|
60
|
+
return false;
|
|
61
|
+
const gid = window.google?.accounts?.id;
|
|
62
|
+
if (!gid)
|
|
63
|
+
return false;
|
|
64
|
+
if (merged.ux_mode !== "redirect") {
|
|
65
|
+
state.callbackProxy ||= (response) => {
|
|
66
|
+
const current = getState()?.runtimeConfig.callback;
|
|
67
|
+
current?.(response);
|
|
68
|
+
};
|
|
69
|
+
merged.callback = state.callbackProxy;
|
|
70
|
+
}
|
|
71
|
+
gid.initialize(merged);
|
|
72
|
+
state.initialized = true;
|
|
73
|
+
return true;
|
|
74
|
+
};
|
|
75
|
+
instance.initialize = (config) => {
|
|
76
|
+
if (!import.meta.client)
|
|
77
|
+
return;
|
|
78
|
+
if (config)
|
|
79
|
+
Object.assign(getState().runtimeConfig, config);
|
|
80
|
+
instance.onLoaded(() => {
|
|
81
|
+
ensureInit();
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
instance.renderButton = (parent, config = {}) => {
|
|
85
|
+
instance.onLoaded(({ accounts }) => {
|
|
86
|
+
if (!ensureInit())
|
|
87
|
+
return;
|
|
88
|
+
accounts.id.renderButton(parent, config);
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
instance.prompt = (listener) => {
|
|
92
|
+
instance.onLoaded(({ accounts }) => {
|
|
93
|
+
if (!ensureInit())
|
|
94
|
+
return;
|
|
95
|
+
accounts.id.prompt(listener);
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
return instance;
|
|
99
|
+
}
|
|
100
|
+
function mapSchemaToIdConfig(options) {
|
|
101
|
+
if (!options)
|
|
102
|
+
return {};
|
|
103
|
+
const cfg = {};
|
|
104
|
+
if (options.clientId)
|
|
105
|
+
cfg.client_id = options.clientId;
|
|
106
|
+
if (options.autoSelect != null)
|
|
107
|
+
cfg.auto_select = options.autoSelect;
|
|
108
|
+
if (options.context)
|
|
109
|
+
cfg.context = options.context;
|
|
110
|
+
if (options.useFedcmForPrompt != null)
|
|
111
|
+
cfg.use_fedcm_for_prompt = options.useFedcmForPrompt;
|
|
112
|
+
if (options.cancelOnTapOutside != null)
|
|
113
|
+
cfg.cancel_on_tap_outside = options.cancelOnTapOutside;
|
|
114
|
+
if (options.uxMode)
|
|
115
|
+
cfg.ux_mode = options.uxMode;
|
|
116
|
+
if (options.loginUri)
|
|
117
|
+
cfg.login_uri = options.loginUri;
|
|
118
|
+
if (options.itpSupport != null)
|
|
119
|
+
cfg.itp_support = options.itpSupport;
|
|
120
|
+
if (options.allowedParentOrigin)
|
|
121
|
+
cfg.allowed_parent_origin = options.allowedParentOrigin;
|
|
122
|
+
if (options.hd)
|
|
123
|
+
cfg.hd = options.hd;
|
|
124
|
+
return cfg;
|
|
30
125
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useRegistryScript } from "#nuxt-scripts/utils";
|
|
2
1
|
import { withQuery } from "ufo";
|
|
2
|
+
import { useRegistryScript } from "#nuxt-scripts/utils";
|
|
3
3
|
import { GoogleTagManagerOptions } from "./schemas.js";
|
|
4
4
|
export { GoogleTagManagerOptions };
|
|
5
5
|
export function useScriptGoogleTagManager(options) {
|
|
@@ -37,9 +37,12 @@ export function useScriptGoogleTagManager(options) {
|
|
|
37
37
|
window[dataLayerName].push(args);
|
|
38
38
|
}
|
|
39
39
|
window.gtag = gtag;
|
|
40
|
+
if (opts.defaultConsent) {
|
|
41
|
+
const entries = Array.isArray(opts.defaultConsent) ? opts.defaultConsent : [opts.defaultConsent];
|
|
42
|
+
for (const entry of entries)
|
|
43
|
+
gtag("consent", "default", entry);
|
|
44
|
+
}
|
|
40
45
|
options?.onBeforeGtmStart?.(gtag);
|
|
41
|
-
if (opts.defaultConsent)
|
|
42
|
-
gtag("consent", "default", opts.defaultConsent);
|
|
43
46
|
window[dataLayerName].push({
|
|
44
47
|
"gtm.start": Date.now(),
|
|
45
48
|
"event": "gtm.js"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { RegistryScriptInput } from '#nuxt-scripts/types';
|
|
2
1
|
import type { InferInput } from 'valibot';
|
|
2
|
+
import type { RegistryScriptInput } from '#nuxt-scripts/types';
|
|
3
3
|
import { IntercomOptions } from './schemas.js';
|
|
4
4
|
export { IntercomOptions };
|
|
5
5
|
export type IntercomInput = RegistryScriptInput<typeof IntercomOptions, true, false>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { RegistryScriptInput } from '#nuxt-scripts/types';
|
|
2
1
|
import type { PayPalV6Namespace } from '@paypal/paypal-js/sdk-v6';
|
|
2
|
+
import type { RegistryScriptInput } from '#nuxt-scripts/types';
|
|
3
3
|
import { PayPalOptions } from './schemas.js';
|
|
4
4
|
export { PayPalOptions };
|
|
5
5
|
export interface PayPalApi {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { RegistryScriptInput, UseScriptContext } from '#nuxt-scripts/types';
|
|
2
1
|
import type { PostHog, PostHogConfig } from 'posthog-js';
|
|
2
|
+
import type { RegistryScriptInput, UseScriptContext } from '#nuxt-scripts/types';
|
|
3
3
|
import { PostHogOptions } from './schemas.js';
|
|
4
4
|
export { PostHogOptions };
|
|
5
5
|
export type PostHogInput = Omit<RegistryScriptInput<typeof PostHogOptions, false, true>, 'config'> & {
|