@nuxt/scripts 0.11.2 → 0.11.3
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/client/200.html +8 -8
- package/dist/client/404.html +8 -8
- package/dist/client/_nuxt/{XZaFTD3R.js → Bo1SWr6k.js} +1 -1
- package/dist/client/_nuxt/BojlM8av.js +21 -0
- package/dist/client/_nuxt/{gy_iwf94.js → BwFnCI0m.js} +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/4c86029b-49d8-417d-817c-09c5117d4d78.json +1 -0
- package/dist/client/_nuxt/error-404.BiTeRF3j.css +1 -0
- package/dist/client/_nuxt/error-500.Be1AE5oK.css +1 -0
- package/dist/client/_nuxt/{CJaqyBTv.js → yRslIvSb.js} +1 -1
- package/dist/client/index.html +8 -8
- package/dist/module.json +1 -1
- package/dist/module.mjs +21 -19
- package/dist/registry.d.mts +3 -2
- package/dist/registry.d.ts +3 -2
- package/dist/registry.mjs +37 -26
- package/dist/runtime/components/ScriptGoogleMaps.vue +38 -13
- package/dist/runtime/composables/useScript.js +6 -3
- package/dist/runtime/registry/google-analytics.d.ts +57 -13
- package/dist/runtime/registry/google-analytics.js +30 -28
- package/dist/runtime/registry/google-tag-manager.d.ts +83 -21
- package/dist/runtime/registry/google-tag-manager.js +65 -24
- package/dist/runtime/utils.d.ts +1 -1
- package/package.json +16 -15
- package/dist/client/_nuxt/BwTzWwlf.js +0 -21
- package/dist/client/_nuxt/builds/meta/ccdd3650-9466-4597-a4e4-6464577f0b3e.json +0 -1
- package/dist/client/_nuxt/error-404.kHO_CZtx.css +0 -1
- package/dist/client/_nuxt/error-500.CICk5yq7.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as s,c as a,o as i,a as e,t as o}from"./
|
|
1
|
+
import{_ as s,c as a,o as i,a as e,t as o}from"./BojlM8av.js";import{u}from"./Bo1SWr6k.js";const l={class:"antialiased bg-white dark:bg-black dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-black"},c={class:"max-w-520px text-center"},d=["textContent"],p=["textContent"],f={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:500},statusMessage:{type:String,default:"Server error"},description:{type:String,default:"This page is temporarily unavailable."}},setup(t){const r=t;return u({title:`${r.statusCode} - ${r.statusMessage} | ${r.appName}`,script:[{children:`!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:[{children:'*,: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{font-size:inherit;font-weight:inherit}h1,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: }'}]}),(g,n)=>(i(),a("div",l,[n[0]||(n[0]=e("div",{class:"-bottom-1/2 fixed h-1/2 left-0 right-0 spotlight"},null,-1)),e("div",c,[e("h1",{class:"font-medium mb-8 sm:text-10xl text-8xl",textContent:o(t.statusCode)},null,8,d),e("p",{class:"font-light leading-tight mb-16 px-8 sm:px-0 sm:text-4xl text-xl",textContent:o(t.description)},null,8,p)])]))}},b=s(f,[["__scopeId","data-v-5bcfd8e7"]]);export{b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"4c86029b-49d8-417d-817c-09c5117d4d78","timestamp":1742932483959}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"4c86029b-49d8-417d-817c-09c5117d4d78","timestamp":1742932483959,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.spotlight[data-v-db2b6f21]{background:linear-gradient(45deg,#00dc82,#36e4da 50%,#0047e1);bottom:-30vh;filter:blur(20vh);height:40vh}.gradient-border[data-v-db2b6f21]{-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-radius:.5rem;position:relative}@media (prefers-color-scheme:light){.gradient-border[data-v-db2b6f21]{background-color:#ffffff4d}.gradient-border[data-v-db2b6f21]:before{background:linear-gradient(90deg,#e2e2e2,#e2e2e2 25%,#00dc82,#36e4da 75%,#0047e1)}}@media (prefers-color-scheme:dark){.gradient-border[data-v-db2b6f21]{background-color:#1414144d}.gradient-border[data-v-db2b6f21]:before{background:linear-gradient(90deg,#303030,#303030 25%,#00dc82,#36e4da 75%,#0047e1)}}.gradient-border[data-v-db2b6f21]:before{background-size:400% auto;border-radius:.5rem;bottom:0;content:"";left:0;-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;opacity:.5;padding:2px;position:absolute;right:0;top:0;transition:background-position .3s ease-in-out,opacity .2s ease-in-out;width:100%}.gradient-border[data-v-db2b6f21]:hover:before{background-position:-50% 0;opacity:1}.fixed[data-v-db2b6f21]{position:fixed}.left-0[data-v-db2b6f21]{left:0}.right-0[data-v-db2b6f21]{right:0}.z-10[data-v-db2b6f21]{z-index:10}.z-20[data-v-db2b6f21]{z-index:20}.grid[data-v-db2b6f21]{display:grid}.mb-16[data-v-db2b6f21]{margin-bottom:4rem}.mb-8[data-v-db2b6f21]{margin-bottom:2rem}.max-w-520px[data-v-db2b6f21]{max-width:520px}.min-h-screen[data-v-db2b6f21]{min-height:100vh}.w-full[data-v-db2b6f21]{width:100%}.flex[data-v-db2b6f21]{display:flex}.cursor-pointer[data-v-db2b6f21]{cursor:pointer}.place-content-center[data-v-db2b6f21]{place-content:center}.items-center[data-v-db2b6f21]{align-items:center}.justify-center[data-v-db2b6f21]{justify-content:center}.overflow-hidden[data-v-db2b6f21]{overflow:hidden}.bg-white[data-v-db2b6f21]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-4[data-v-db2b6f21]{padding-left:1rem;padding-right:1rem}.px-8[data-v-db2b6f21]{padding-left:2rem;padding-right:2rem}.py-2[data-v-db2b6f21]{padding-bottom:.5rem;padding-top:.5rem}.text-center[data-v-db2b6f21]{text-align:center}.text-8xl[data-v-db2b6f21]{font-size:6rem;line-height:1}.text-xl[data-v-db2b6f21]{font-size:1.25rem;line-height:1.75rem}.text-black[data-v-db2b6f21]{--un-text-opacity:1;color:rgb(0 0 0/var(--un-text-opacity))}.font-light[data-v-db2b6f21]{font-weight:300}.font-medium[data-v-db2b6f21]{font-weight:500}.leading-tight[data-v-db2b6f21]{line-height:1.25}.font-sans[data-v-db2b6f21]{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}.antialiased[data-v-db2b6f21]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (prefers-color-scheme:dark){.dark\:bg-black[data-v-db2b6f21]{--un-bg-opacity:1;background-color:rgb(0 0 0/var(--un-bg-opacity))}.dark\:text-white[data-v-db2b6f21]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media (min-width:640px){.sm\:px-0[data-v-db2b6f21]{padding-left:0;padding-right:0}.sm\:px-6[data-v-db2b6f21]{padding-left:1.5rem;padding-right:1.5rem}.sm\:py-3[data-v-db2b6f21]{padding-bottom:.75rem;padding-top:.75rem}.sm\:text-4xl[data-v-db2b6f21]{font-size:2.25rem;line-height:2.5rem}.sm\:text-xl[data-v-db2b6f21]{font-size:1.25rem;line-height:1.75rem}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.spotlight[data-v-5bcfd8e7]{background:linear-gradient(45deg,#00dc82,#36e4da 50%,#0047e1);filter:blur(20vh)}.fixed[data-v-5bcfd8e7]{position:fixed}.-bottom-1\/2[data-v-5bcfd8e7]{bottom:-50%}.left-0[data-v-5bcfd8e7]{left:0}.right-0[data-v-5bcfd8e7]{right:0}.grid[data-v-5bcfd8e7]{display:grid}.mb-16[data-v-5bcfd8e7]{margin-bottom:4rem}.mb-8[data-v-5bcfd8e7]{margin-bottom:2rem}.h-1\/2[data-v-5bcfd8e7]{height:50%}.max-w-520px[data-v-5bcfd8e7]{max-width:520px}.min-h-screen[data-v-5bcfd8e7]{min-height:100vh}.place-content-center[data-v-5bcfd8e7]{place-content:center}.overflow-hidden[data-v-5bcfd8e7]{overflow:hidden}.bg-white[data-v-5bcfd8e7]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-8[data-v-5bcfd8e7]{padding-left:2rem;padding-right:2rem}.text-center[data-v-5bcfd8e7]{text-align:center}.text-8xl[data-v-5bcfd8e7]{font-size:6rem;line-height:1}.text-xl[data-v-5bcfd8e7]{font-size:1.25rem;line-height:1.75rem}.text-black[data-v-5bcfd8e7]{--un-text-opacity:1;color:rgb(0 0 0/var(--un-text-opacity))}.font-light[data-v-5bcfd8e7]{font-weight:300}.font-medium[data-v-5bcfd8e7]{font-weight:500}.leading-tight[data-v-5bcfd8e7]{line-height:1.25}.font-sans[data-v-5bcfd8e7]{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}.antialiased[data-v-5bcfd8e7]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (prefers-color-scheme:dark){.dark\:bg-black[data-v-5bcfd8e7]{--un-bg-opacity:1;background-color:rgb(0 0 0/var(--un-bg-opacity))}.dark\:text-white[data-v-5bcfd8e7]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media (min-width:640px){.sm\:px-0[data-v-5bcfd8e7]{padding-left:0;padding-right:0}.sm\:text-4xl[data-v-5bcfd8e7]{font-size:2.25rem;line-height:2.5rem}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as a,c as i,o as u,a as e,t as r,b as c,w as l,d,e as p}from"./
|
|
1
|
+
import{_ as a,c as i,o as u,a as e,t as r,b as c,w as l,d,e as p}from"./BojlM8av.js";import{u as f}from"./Bo1SWr6k.js";const m={class:"antialiased bg-white dark:bg-black dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-black"},g={class:"max-w-520px text-center z-20"},h=["textContent"],b=["textContent"],x={class:"flex items-center justify-center w-full"},y={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:404},statusMessage:{type:String,default:"Not Found"},description:{type:String,default:"Sorry, the page you are looking for could not be found."},backHome:{type:String,default:"Go back home"}},setup(t){const n=t;return f({title:`${n.statusCode} - ${n.statusMessage} | ${n.appName}`,script:[{children:`!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:[{children:'*,: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{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}h1,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,o)=>{const s=p;return u(),i("div",m,[o[0]||(o[0]=e("div",{class:"fixed left-0 right-0 spotlight z-10"},null,-1)),e("div",g,[e("h1",{class:"font-medium mb-8 sm:text-10xl text-8xl",textContent:r(t.statusCode)},null,8,h),e("p",{class:"font-light leading-tight mb-16 px-8 sm:px-0 sm:text-4xl text-xl",textContent:r(t.description)},null,8,b),e("div",x,[c(s,{to:"/",class:"cursor-pointer gradient-border px-4 py-2 sm:px-6 sm:py-3 sm:text-xl text-md"},{default:l(()=>[d(r(t.backHome),1)]),_:1})])])])}}},v=a(y,[["__scopeId","data-v-db2b6f21"]]);export{v as default};
|
package/dist/client/index.html
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
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.CJckMUzn.css" crossorigin>
|
|
4
|
-
<link rel="modulepreload" as="script" crossorigin href="/__nuxt-scripts/_nuxt/
|
|
5
|
-
<link rel="prefetch" as="style" crossorigin href="/__nuxt-scripts/_nuxt/error-404.
|
|
6
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/
|
|
7
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/
|
|
8
|
-
<link rel="prefetch" as="style" crossorigin href="/__nuxt-scripts/_nuxt/error-500.
|
|
9
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/
|
|
10
|
-
<script type="module" src="/__nuxt-scripts/_nuxt/
|
|
11
|
-
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-scripts",buildId:"
|
|
4
|
+
<link rel="modulepreload" as="script" crossorigin href="/__nuxt-scripts/_nuxt/BojlM8av.js">
|
|
5
|
+
<link rel="prefetch" as="style" crossorigin href="/__nuxt-scripts/_nuxt/error-404.BiTeRF3j.css">
|
|
6
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/yRslIvSb.js">
|
|
7
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/Bo1SWr6k.js">
|
|
8
|
+
<link rel="prefetch" as="style" crossorigin href="/__nuxt-scripts/_nuxt/error-500.Be1AE5oK.css">
|
|
9
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/BwFnCI0m.js">
|
|
10
|
+
<script type="module" src="/__nuxt-scripts/_nuxt/BojlM8av.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1742932487543,false]</script>
|
|
11
|
+
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-scripts",buildId:"4c86029b-49d8-417d-817c-09c5117d4d78",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -21,8 +21,8 @@ import { registry } from './registry.mjs';
|
|
|
21
21
|
const DEVTOOLS_UI_ROUTE = "/__nuxt-scripts";
|
|
22
22
|
const DEVTOOLS_UI_LOCAL_PORT = 3300;
|
|
23
23
|
|
|
24
|
-
function setupDevToolsUI(options, resolve, nuxt = useNuxt()) {
|
|
25
|
-
const clientPath = resolve("./client");
|
|
24
|
+
async function setupDevToolsUI(options, resolve, nuxt = useNuxt()) {
|
|
25
|
+
const clientPath = await resolve("./client");
|
|
26
26
|
const isProductionBuild = existsSync(clientPath);
|
|
27
27
|
if (isProductionBuild) {
|
|
28
28
|
nuxt.hook("vite:serverCreated", async (server) => {
|
|
@@ -557,10 +557,10 @@ const module = defineNuxtModule({
|
|
|
557
557
|
debug: false
|
|
558
558
|
},
|
|
559
559
|
async setup(config, nuxt) {
|
|
560
|
-
const {
|
|
561
|
-
const { version, name } = await readPackageJSON(
|
|
562
|
-
nuxt.options.alias["#nuxt-scripts-validator"] =
|
|
563
|
-
nuxt.options.alias["#nuxt-scripts"] =
|
|
560
|
+
const { resolvePath } = createResolver(import.meta.url);
|
|
561
|
+
const { version, name } = await readPackageJSON(await resolvePath("../package.json"));
|
|
562
|
+
nuxt.options.alias["#nuxt-scripts-validator"] = await resolvePath(`./runtime/validation/${nuxt.options.dev || nuxt.options._prepare ? "valibot" : "mock"}`);
|
|
563
|
+
nuxt.options.alias["#nuxt-scripts"] = await resolvePath("./runtime");
|
|
564
564
|
logger.level = config.debug || nuxt.options.debug ? 4 : 3;
|
|
565
565
|
if (!config.enabled) {
|
|
566
566
|
logger.debug("The module is disabled, skipping setup.");
|
|
@@ -579,25 +579,27 @@ const module = defineNuxtModule({
|
|
|
579
579
|
defaultScriptOptions: config.defaultScriptOptions
|
|
580
580
|
};
|
|
581
581
|
addImportsDir([
|
|
582
|
-
|
|
583
|
-
// auto-imports aren't working without this for some reason
|
|
584
|
-
// TODO find solution as we're double-registering
|
|
585
|
-
resolve("./runtime/registry")
|
|
582
|
+
await resolvePath("./runtime/composables")
|
|
586
583
|
]);
|
|
587
584
|
addComponentsDir({
|
|
588
|
-
path:
|
|
585
|
+
path: await resolvePath("./runtime/components")
|
|
589
586
|
});
|
|
590
|
-
const scripts = registry(
|
|
587
|
+
const scripts = await registry(resolvePath);
|
|
588
|
+
for (const script of scripts) {
|
|
589
|
+
if (script.import?.name) {
|
|
590
|
+
addImports({ priority: 2, ...script.import });
|
|
591
|
+
script._importRegistered = true;
|
|
592
|
+
}
|
|
593
|
+
}
|
|
591
594
|
nuxt.hooks.hook("modules:done", async () => {
|
|
592
595
|
const registryScripts = [...scripts];
|
|
593
596
|
await nuxt.hooks.callHook("scripts:registry", registryScripts);
|
|
597
|
+
for (const script of registryScripts) {
|
|
598
|
+
if (script.import?.name && !script._importRegistered) {
|
|
599
|
+
addImports({ priority: 3, ...script.import });
|
|
600
|
+
}
|
|
601
|
+
}
|
|
594
602
|
const registryScriptsWithImport = registryScripts.filter((i) => !!i.import?.name);
|
|
595
|
-
addImports(registryScriptsWithImport.map((i) => {
|
|
596
|
-
return {
|
|
597
|
-
priority: -1,
|
|
598
|
-
...i.import
|
|
599
|
-
};
|
|
600
|
-
}));
|
|
601
603
|
const newScripts = registryScriptsWithImport.filter((i) => !scripts.some((r) => r.import?.name === i.import.name));
|
|
602
604
|
extendTypes(name, async ({ typesPath }) => {
|
|
603
605
|
let types = `
|
|
@@ -659,7 +661,7 @@ ${newScripts.map((i) => {
|
|
|
659
661
|
});
|
|
660
662
|
});
|
|
661
663
|
if (nuxt.options.dev)
|
|
662
|
-
setupDevToolsUI(config,
|
|
664
|
+
setupDevToolsUI(config, resolvePath);
|
|
663
665
|
}
|
|
664
666
|
});
|
|
665
667
|
|
package/dist/registry.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ResolvePathOptions } from '@nuxt/kit';
|
|
2
|
+
import { RegistryScript } from '../dist/runtime/types.js';
|
|
2
3
|
|
|
3
|
-
declare
|
|
4
|
+
declare function registry(resolve?: (path: string, opts?: ResolvePathOptions | undefined) => Promise<string>): Promise<RegistryScript[]>;
|
|
4
5
|
|
|
5
6
|
export { registry };
|
package/dist/registry.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ResolvePathOptions } from '@nuxt/kit';
|
|
2
|
+
import { RegistryScript } from '../dist/runtime/types.js';
|
|
2
3
|
|
|
3
|
-
declare
|
|
4
|
+
declare function registry(resolve?: (path: string, opts?: ResolvePathOptions | undefined) => Promise<string>): Promise<RegistryScript[]>;
|
|
4
5
|
|
|
5
6
|
export { registry };
|
package/dist/registry.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { joinURL, withQuery, withBase } from 'ufo';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
resolve = resolve || ((s) => s);
|
|
3
|
+
async function registry(resolve) {
|
|
4
|
+
resolve = resolve || ((s) => Promise.resolve(s));
|
|
5
5
|
return [
|
|
6
6
|
{
|
|
7
7
|
label: "Plausible Analytics",
|
|
@@ -13,7 +13,7 @@ const registry = (resolve) => {
|
|
|
13
13
|
logo: `<svg height="32" id="Layer_2" viewBox="0 0 46 60" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><linearGradient id="New_Gradient_Swatch_1" x1="14.841" y1="22.544" x2="27.473" y2="44.649" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#909cf7"/><stop offset="1" stop-color="#4b38d8"/></linearGradient><linearGradient id="New_Gradient_Swatch_1-2" x1="7.984" y1="-1.358" x2="21.001" y2="21.422" xlink:href="#New_Gradient_Swatch_1"/><style>.cls-3{stroke-width:0;fill:#1f2961}</style></defs><g id="Plausible_-_Branding"><g id="Gradient_Logo_-_Purple_Gradient_on_White"><g id="Symbol_-_Purple_Gradient"><path d="M45.246 22.603C44.155 33.059 35.013 40.83 24.5 40.83h-4.047v9.57a9.6 9.6 0 0 1-9.6 9.6H3.36A3.36 3.36 0 0 1 0 56.64V36.938l5.038-7.07a3.362 3.362 0 0 1 4.037-1.149l2.866 1.2a3.353 3.353 0 0 0 4.025-1.145l6.717-9.417a3.34 3.34 0 0 1 4.014-1.14l5.52 2.32a3.347 3.347 0 0 0 4.022-1.142l6.46-9.063c2.025 3.56 3.014 7.789 2.547 12.27Z" style="stroke-width:0;fill:url(#New_Gradient_Swatch_1)"/><path d="M3.292 28.873c.823-1.155 2.021-2.044 3.414-2.312a5.41 5.41 0 0 1 3.147.316l2.865 1.2a1.357 1.357 0 0 0 1.62-.464l6.594-9.245c.823-1.154 2.02-2.041 3.412-2.309a5.368 5.368 0 0 1 3.128.314l5.52 2.32a1.35 1.35 0 0 0 1.619-.46l6.919-9.707C37.827 3.364 31.78 0 24.945 0H3.36A3.36 3.36 0 0 0 0 3.36v30.132l3.292-4.62Z" style="fill:url(#New_Gradient_Swatch_1-2);stroke-width:0"/></g></g></g></svg>`,
|
|
14
14
|
import: {
|
|
15
15
|
name: "useScriptPlausibleAnalytics",
|
|
16
|
-
from: resolve("./runtime/registry/plausible-analytics")
|
|
16
|
+
from: await resolve("./runtime/registry/plausible-analytics")
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
{
|
|
@@ -23,7 +23,7 @@ const registry = (resolve) => {
|
|
|
23
23
|
logo: `<svg xmlns="http://www.w3.org/2000/svg" width="70.02" height="32" viewBox="0 0 256 117"><path fill="#FBAD41" d="M205.52 50.813c-.858 0-1.705.03-2.551.058c-.137.007-.272.04-.398.094a1.424 1.424 0 0 0-.92.994l-3.628 12.672c-1.565 5.449-.983 10.48 1.646 14.174c2.41 3.416 6.42 5.421 11.289 5.655l19.679 1.194c.585.03 1.092.312 1.4.776a1.92 1.92 0 0 1 .2 1.692a2.496 2.496 0 0 1-2.134 1.662l-20.448 1.193c-11.11.515-23.062 9.58-27.255 20.633l-1.474 3.9a1.092 1.092 0 0 0 .967 1.49h70.425a1.872 1.872 0 0 0 1.81-1.365A51.172 51.172 0 0 0 256 101.828c0-28.16-22.582-50.984-50.449-50.984"/><path fill="#F6821F" d="m174.782 115.362l1.303-4.583c1.568-5.449.987-10.48-1.639-14.173c-2.418-3.417-6.424-5.422-11.296-5.656l-92.312-1.193a1.822 1.822 0 0 1-1.459-.776a1.919 1.919 0 0 1-.203-1.693a2.496 2.496 0 0 1 2.154-1.662l93.173-1.193c11.063-.511 23.015-9.58 27.208-20.633l5.313-14.04c.214-.596.27-1.238.156-1.86C191.126 20.51 166.91 0 137.96 0C111.269 0 88.626 17.403 80.5 41.596a26.996 26.996 0 0 0-19.156-5.359C48.549 37.524 38.25 47.946 36.979 60.88a27.905 27.905 0 0 0 .702 9.642C16.773 71.145 0 88.454 0 109.726c0 1.923.137 3.818.413 5.667c.115.897.879 1.57 1.783 1.568h170.48a2.223 2.223 0 0 0 2.106-1.63"/></svg>`,
|
|
24
24
|
import: {
|
|
25
25
|
name: "useScriptCloudflareWebAnalytics",
|
|
26
|
-
from: resolve("./runtime/registry/cloudflare-web-analytics")
|
|
26
|
+
from: await resolve("./runtime/registry/cloudflare-web-analytics")
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
{
|
|
@@ -34,7 +34,7 @@ const registry = (resolve) => {
|
|
|
34
34
|
logo: `<svg width="32" height="32" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><circle cx="512" cy="512" r="512" style="fill:#9187ff"/><path d="M558.62 256c-36.31.16-78.78 10-129.45 28.4-170.71 62.15-206.9 139.74-144.79 310.45s139.73 206.89 310.45 144.76S801.74 599.88 739.6 429.16c-43.69-120-95-173.55-181-173.17zm59.1 140.16h26.73a5.33 5.33 0 0 1 5.16 6.72l-59.26 220.48a5.34 5.34 0 0 1-5.15 4h-26.75a5.33 5.33 0 0 1-5.16-6.72l3.6-13.4 2.63-9.75 53-197.38a5.33 5.33 0 0 1 5.14-3.94zM421.79 413.4h10.75a5.33 5.33 0 0 1 5.33 5.33v18a5.33 5.33 0 0 1-5.33 5.33h-9.13a36.76 36.76 0 0 0-5.51.24 4.7 4.7 0 0 0-2.56 1 4.19 4.19 0 0 0-1 1.66 18.91 18.91 0 0 0-.92 6.72v13.67h19.16a5.33 5.33 0 0 1 5.33 5.33v18a5.34 5.34 0 0 1-5.33 5.33h-19.21v108.71a5.34 5.34 0 0 1-5.34 5.34H387a5.33 5.33 0 0 1-5.33-5.34V448.48a36.74 36.74 0 0 1 3.6-16.64 29.76 29.76 0 0 1 9.73-11.16c7.9-5.48 17.62-7.27 26.82-7.31zm82.14 50c16.37 0 30.27 4.65 40.17 13.27s15.47 21.21 15.42 35.59v35.91l-16.11 59.92h-10.24a5.33 5.33 0 0 1-5.33-5.34v-4a39.13 39.13 0 0 1-4.76 3.56c-7.14 4.55-16.85 7.51-29.65 7.51a62.65 62.65 0 0 1-28.52-6.18 40.49 40.49 0 0 1-18.84-19.35 46.81 46.81 0 0 1-4-19.54 40.72 40.72 0 0 1 5.23-21.12 36.78 36.78 0 0 1 13.78-13.18c11.09-6.25 24.75-8.45 38.14-10.24 7.3-1 13.14-1.61 17.64-2.2a42 42 0 0 0 9.2-1.88 3.16 3.16 0 0 0 1.39-.86l.24-.48a6.77 6.77 0 0 0 .16-1.84v-.73a17.24 17.24 0 0 0-5.85-13.6c-3.8-3.31-9.77-5.55-18.07-5.57s-14.64 2.26-19 5.59a17.51 17.51 0 0 0-7.21 12.54 5.33 5.33 0 0 1-5.31 4.86h-22.25a5.33 5.33 0 0 1-5.33-5.57 45.64 45.64 0 0 1 17.6-34c10.47-8.34 24.85-13.12 41.49-13.12zm23.92 80.71c-1.92.48-4 1-6.31 1.45-6.47 1.28-14.29 2.41-21.87 3.48a61 61 0 0 0-14.76 3.65c-4.18 1.75-7.1 4-8.68 6.57a12.12 12.12 0 0 0-1.71 6.54v.2a12.93 12.93 0 0 0 1.32 5.87 11.81 11.81 0 0 0 3.76 4.22c3.41 2.45 9.13 4.14 16.85 4.14 11.95 0 19.52-3.5 24.32-8.32s7-11.56 7.08-19.11v-8.65zm0 0" style="fill:#fff"/></svg>`,
|
|
35
35
|
import: {
|
|
36
36
|
name: "useScriptFathomAnalytics",
|
|
37
|
-
from: resolve("./runtime/registry/fathom-analytics")
|
|
37
|
+
from: await resolve("./runtime/registry/fathom-analytics")
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
{
|
|
@@ -45,7 +45,7 @@ const registry = (resolve) => {
|
|
|
45
45
|
logo: `<svg xmlns="http://www.w3.org/2000/svg" width="56.5" height="32" viewBox="0 0 256 145"><defs><path id="logosMatomoIcon0" d="m105.426 70.887l.035-.021l-.663-1.01c-.1-.153-.2-.313-.303-.46L58.935 0L0 43.91l43.078 66.305c.185.281.36.566.55.847l.229.35l.025-.016c6.676 9.471 17.678 15.673 30.144 15.673c20.373 0 36.889-16.513 36.889-36.89c0-7.083-2.029-13.675-5.489-19.292"/><path id="logosMatomoIcon1" fill="#000" d="M64.549 19.33c0-20.374-16.517-36.89-36.89-36.89S-9.23-1.044-9.23 19.33a36.686 36.686 0 0 0 6.08 20.263c-.003 0-.003 0-.003-.003l-.019.003L-31.179 0h-.04c-6.499-10.524-18.101-17.56-31.376-17.56c-13.275 0-24.877 7.036-31.376 17.56h-.037l-44.61 69.525c6.633-9.8 17.848-16.235 30.57-16.235c13.39 0 25.077 7.158 31.54 17.832h.047l29.15 40.921h.047c6.718 9.1 17.486 15.026 29.663 15.026c12.181 0 22.95-5.927 29.666-15.026h.05l.297-.46a36.949 36.949 0 0 0 2.116-3.312l43.675-68.256v.003A36.747 36.747 0 0 0 64.55 19.33M2.372 46.141c.213.204.435.397.654.594c-.22-.197-.438-.39-.654-.594m3.28 2.745c.243.181.48.369.728.544c-.247-.175-.485-.363-.729-.544m8.096 4.598c.306.128.628.228.94.347c-.312-.12-.634-.22-.94-.347m8.28 2.263c.428.065.853.143 1.287.197c-.434-.054-.856-.132-1.287-.197m9.93.203c.438-.05.869-.135 1.303-.197c-.434.062-.862.147-1.303.197m8.368-2.01c.393-.144.797-.275 1.184-.434c-.387.159-.788.29-1.185.434m8.368-4.326c.313-.216.61-.456.916-.684c-.307.228-.603.465-.916.684m6.258-5.526c.259-.285.528-.563.778-.857c-.25.294-.519.572-.778.857"/><path id="logosMatomoIcon2" fill="#95C748" d="m250.511 88.448l.035-.022l-.663-1.01c-.1-.153-.2-.312-.303-.46L204.02 17.56l-58.935 43.91l43.078 66.305c.185.281.36.566.55.847l.229.35l.025-.016c6.676 9.471 17.678 15.673 30.144 15.673c20.373 0 36.889-16.513 36.889-36.89c0-7.083-2.029-13.675-5.489-19.291"/><filter id="logosMatomoIcon3" width="106.9%" height="109.7%" x="-3.4%" y="-3.5%" filterUnits="objectBoundingBox"><feOffset dy="2" in="SourceAlpha" result="shadowOffsetOuter1"/><feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="2"/><feColorMatrix in="shadowBlurOuter1" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0"/></filter></defs><use href="#logosMatomoIcon2"/><path fill="#35BFC0" d="M73.779 107.74c0-20.374-16.516-36.89-36.89-36.89C16.516 70.85 0 87.366 0 107.74c0 20.376 16.516 36.892 36.89 36.892c20.373 0 36.889-16.52 36.889-36.893"/><path fill="#3253A0" d="M172.744 0c20.373 0 36.89 16.516 36.89 36.89a36.747 36.747 0 0 1-6.346 20.688v-.003l-43.675 68.256a36.949 36.949 0 0 1-2.116 3.313l-.297.46h-.05c-6.717 9.098-17.485 15.025-29.666 15.025c-12.177 0-22.945-5.927-29.663-15.026h-.046l-29.15-40.921h-.047C62.114 78.008 50.427 70.85 37.036 70.85c-12.721 0-23.936 6.436-30.569 16.235l44.61-69.525h.037C57.613 7.036 69.215 0 82.49 0c13.275 0 24.877 7.036 31.376 17.56h.04l28.006 39.593l.02-.003c0 .003 0 .003.002.003a36.684 36.684 0 0 1-6.08-20.264C135.855 16.516 152.372 0 172.745 0"/><use href="#logosMatomoIcon2"/><g transform="translate(145.085 17.56)"><mask id="logosMatomoIcon4" fill="#fff"><use href="#logosMatomoIcon0"/></mask><g mask="url(#logosMatomoIcon4)"><use filter="url(#logosMatomoIcon3)" href="#logosMatomoIcon1"/></g></g><path fill="#F38334" d="M209.487 36.89c0-20.374-16.516-36.89-36.89-36.89c-20.373 0-36.89 16.516-36.89 36.89c0 20.373 16.517 36.889 36.89 36.889c20.374 0 36.89-16.516 36.89-36.89"/><path fill="#3152A0" d="M172.597 73.782c-12.887 0-24.214-6.617-30.81-16.629h-.021L113.759 17.56h-.04C107.22 7.04 95.618.003 82.343.003C69.068.003 57.466 7.04 50.967 17.56h-.037L6.323 87.085c6.63-9.796 17.848-16.232 30.566-16.232c13.39 0 25.08 7.155 31.545 17.829h.047l29.15 40.921h.044c6.72 9.096 17.488 15.029 29.665 15.029c12.178 0 22.946-5.93 29.663-15.029h.05l.297-.462a37.588 37.588 0 0 0 2.12-3.307l43.672-68.256c-6.636 9.774-17.839 16.204-30.545 16.204"/></svg>`,
|
|
46
46
|
import: {
|
|
47
47
|
name: "useScriptMatomoAnalytics",
|
|
48
|
-
from: resolve("./runtime/registry/matomo-analytics")
|
|
48
|
+
from: await resolve("./runtime/registry/matomo-analytics")
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
{
|
|
@@ -57,7 +57,7 @@ const registry = (resolve) => {
|
|
|
57
57
|
category: "tracking",
|
|
58
58
|
import: {
|
|
59
59
|
name: "useScriptSegment",
|
|
60
|
-
from: resolve("./runtime/registry/segment")
|
|
60
|
+
from: await resolve("./runtime/registry/segment")
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
63
|
{
|
|
@@ -67,7 +67,7 @@ const registry = (resolve) => {
|
|
|
67
67
|
logo: `<svg xmlns="http://www.w3.org/2000/svg" width="47.91" height="32" viewBox="0 0 256 171"><defs><linearGradient id="logosMetaIcon0" x1="13.878%" x2="89.144%" y1="55.934%" y2="58.694%"><stop offset="0%" stop-color="#0064E1"/><stop offset="40%" stop-color="#0064E1"/><stop offset="83%" stop-color="#0073EE"/><stop offset="100%" stop-color="#0082FB"/></linearGradient><linearGradient id="logosMetaIcon1" x1="54.315%" x2="54.315%" y1="82.782%" y2="39.307%"><stop offset="0%" stop-color="#0082FB"/><stop offset="100%" stop-color="#0064E0"/></linearGradient></defs><path fill="#0081FB" d="M27.651 112.136c0 9.775 2.146 17.28 4.95 21.82c3.677 5.947 9.16 8.466 14.751 8.466c7.211 0 13.808-1.79 26.52-19.372c10.185-14.092 22.186-33.874 30.26-46.275l13.675-21.01c9.499-14.591 20.493-30.811 33.1-41.806C161.196 4.985 172.298 0 183.47 0c18.758 0 36.625 10.87 50.3 31.257C248.735 53.584 256 81.707 256 110.729c0 17.253-3.4 29.93-9.187 39.946c-5.591 9.686-16.488 19.363-34.818 19.363v-27.616c15.695 0 19.612-14.422 19.612-30.927c0-23.52-5.484-49.623-17.564-68.273c-8.574-13.23-19.684-21.313-31.907-21.313c-13.22 0-23.859 9.97-35.815 27.75c-6.356 9.445-12.882 20.956-20.208 33.944l-8.066 14.289c-16.203 28.728-20.307 35.271-28.408 46.07c-14.2 18.91-26.324 26.076-42.287 26.076c-18.935 0-30.91-8.2-38.325-20.556C2.973 139.413 0 126.202 0 111.148z"/><path fill="url(#logosMetaIcon0)" d="M21.802 33.206C34.48 13.666 52.774 0 73.757 0C85.91 0 97.99 3.597 110.605 13.897c13.798 11.261 28.505 29.805 46.853 60.368l6.58 10.967c15.881 26.459 24.917 40.07 30.205 46.49c6.802 8.243 11.565 10.7 17.752 10.7c15.695 0 19.612-14.422 19.612-30.927l24.393-.766c0 17.253-3.4 29.93-9.187 39.946c-5.591 9.686-16.488 19.363-34.818 19.363c-11.395 0-21.49-2.475-32.654-13.007c-8.582-8.083-18.615-22.443-26.334-35.352l-22.96-38.352C118.528 64.08 107.96 49.73 101.845 43.23c-6.578-6.988-15.036-15.428-28.532-15.428c-10.923 0-20.2 7.666-27.963 19.39z"/><path fill="url(#logosMetaIcon1)" d="M73.312 27.802c-10.923 0-20.2 7.666-27.963 19.39c-10.976 16.568-17.698 41.245-17.698 64.944c0 9.775 2.146 17.28 4.95 21.82L9.027 149.482C2.973 139.413 0 126.202 0 111.148C0 83.772 7.514 55.24 21.802 33.206C34.48 13.666 52.774 0 73.757 0z"/></svg>`,
|
|
68
68
|
import: {
|
|
69
69
|
name: "useScriptMetaPixel",
|
|
70
|
-
from: resolve("./runtime/registry/meta-pixel")
|
|
70
|
+
from: await resolve("./runtime/registry/meta-pixel")
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
73
|
{
|
|
@@ -80,7 +80,7 @@ const registry = (resolve) => {
|
|
|
80
80
|
},
|
|
81
81
|
import: {
|
|
82
82
|
name: "useScriptXPixel",
|
|
83
|
-
from: resolve("./runtime/registry/x-pixel")
|
|
83
|
+
from: await resolve("./runtime/registry/x-pixel")
|
|
84
84
|
}
|
|
85
85
|
},
|
|
86
86
|
{
|
|
@@ -90,7 +90,7 @@ const registry = (resolve) => {
|
|
|
90
90
|
logo: '<svg width="50" height="50" viewBox="147.353 39.286 514.631 514.631" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve"><path style="fill:#FFFC00;" d="M147.553,423.021v0.023c0.308,11.424,0.403,22.914,2.33,34.268 c2.042,12.012,4.961,23.725,10.53,34.627c7.529,14.756,17.869,27.217,30.921,37.396c9.371,7.309,19.608,13.111,30.94,16.771 c16.524,5.33,33.571,7.373,50.867,7.473c10.791,0.068,21.575,0.338,32.37,0.293c78.395-0.33,156.792,0.566,235.189-0.484 c10.403-0.141,20.636-1.41,30.846-3.277c19.569-3.582,36.864-11.932,51.661-25.133c17.245-15.381,28.88-34.205,34.132-56.924 c3.437-14.85,4.297-29.916,4.444-45.035v-3.016c0-1.17-0.445-256.892-0.486-260.272c-0.115-9.285-0.799-18.5-2.54-27.636 c-2.117-11.133-5.108-21.981-10.439-32.053c-5.629-10.641-12.68-20.209-21.401-28.57c-13.359-12.81-28.775-21.869-46.722-26.661 c-16.21-4.327-32.747-5.285-49.405-5.27c-0.027-0.004-0.09-0.173-0.094-0.255H278.56c-0.005,0.086-0.008,0.172-0.014,0.255 c-9.454,0.173-18.922,0.102-28.328,1.268c-10.304,1.281-20.509,3.21-30.262,6.812c-15.362,5.682-28.709,14.532-40.11,26.347 c-12.917,13.386-22.022,28.867-26.853,46.894c-4.31,16.084-5.248,32.488-5.271,49.008"/><path style="fill:#FFFFFF;" d="M407.001,473.488c-1.068,0-2.087-0.039-2.862-0.076c-0.615,0.053-1.25,0.076-1.886,0.076 c-22.437,0-37.439-10.607-50.678-19.973c-9.489-6.703-18.438-13.031-28.922-14.775c-5.149-0.854-10.271-1.287-15.22-1.287 c-8.917,0-15.964,1.383-21.109,2.389c-3.166,0.617-5.896,1.148-8.006,1.148c-2.21,0-4.895-0.49-6.014-4.311 c-0.887-3.014-1.523-5.934-2.137-8.746c-1.536-7.027-2.65-11.316-5.281-11.723c-28.141-4.342-44.768-10.738-48.08-18.484 c-0.347-0.814-0.541-1.633-0.584-2.443c-0.129-2.309,1.501-4.334,3.777-4.711c22.348-3.68,42.219-15.492,59.064-35.119 c13.049-15.195,19.457-29.713,20.145-31.316c0.03-0.072,0.065-0.148,0.101-0.217c3.247-6.588,3.893-12.281,1.926-16.916 c-3.626-8.551-15.635-12.361-23.58-14.882c-1.976-0.625-3.845-1.217-5.334-1.808c-7.043-2.782-18.626-8.66-17.083-16.773 c1.124-5.916,8.949-10.036,15.273-10.036c1.756,0,3.312,0.308,4.622,0.923c7.146,3.348,13.575,5.045,19.104,5.045 c6.876,0,10.197-2.618,11-3.362c-0.198-3.668-0.44-7.546-0.674-11.214c0-0.004-0.005-0.048-0.005-0.048 c-1.614-25.675-3.627-57.627,4.546-75.95c24.462-54.847,76.339-59.112,91.651-59.112c0.408,0,6.674-0.062,6.674-0.062 c0.283-0.005,0.59-0.009,0.908-0.009c15.354,0,67.339,4.27,91.816,59.15c8.173,18.335,6.158,50.314,4.539,76.016l-0.076,1.23 c-0.222,3.49-0.427,6.793-0.6,9.995c0.756,0.696,3.795,3.096,9.978,3.339c5.271-0.202,11.328-1.891,17.998-5.014 c2.062-0.968,4.345-1.169,5.895-1.169c2.343,0,4.727,0.456,6.714,1.285l0.106,0.041c5.66,2.009,9.367,6.024,9.447,10.242 c0.071,3.932-2.851,9.809-17.223,15.485c-1.472,0.583-3.35,1.179-5.334,1.808c-7.952,2.524-19.951,6.332-23.577,14.878 c-1.97,4.635-1.322,10.326,1.926,16.912c0.036,0.072,0.067,0.145,0.102,0.221c1,2.344,25.205,57.535,79.209,66.432 c2.275,0.379,3.908,2.406,3.778,4.711c-0.048,0.828-0.248,1.656-0.598,2.465c-3.289,7.703-19.915,14.09-48.064,18.438 c-2.642,0.408-3.755,4.678-5.277,11.668c-0.63,2.887-1.271,5.717-2.146,8.691c-0.819,2.797-2.641,4.164-5.567,4.164h-0.441 c-1.905,0-4.604-0.346-8.008-1.012c-5.95-1.158-12.623-2.236-21.109-2.236c-4.948,0-10.069,0.434-15.224,1.287 c-10.473,1.744-19.421,8.062-28.893,14.758C444.443,462.88,429.436,473.488,407.001,473.488"/><path style="fill:#020202;" d="M408.336,124.235c14.455,0,64.231,3.883,87.688,56.472c7.724,17.317,5.744,48.686,4.156,73.885 c-0.248,3.999-0.494,7.875-0.694,11.576l-0.084,1.591l1.062,1.185c0.429,0.476,4.444,4.672,13.374,5.017l0.144,0.008l0.15-0.003 c5.904-0.225,12.554-2.059,19.776-5.442c1.064-0.498,2.48-0.741,3.978-0.741c1.707,0,3.521,0.321,5.017,0.951l0.226,0.09 c3.787,1.327,6.464,3.829,6.505,6.093c0.022,1.28-0.935,5.891-14.359,11.194c-1.312,0.518-3.039,1.069-5.041,1.7 c-8.736,2.774-21.934,6.96-26.376,17.427c-2.501,5.896-1.816,12.854,2.034,20.678c1.584,3.697,26.52,59.865,82.631,69.111 c-0.011,0.266-0.079,0.557-0.229,0.9c-0.951,2.24-6.996,9.979-44.612,15.783c-5.886,0.902-7.328,7.5-9,15.17 c-0.604,2.746-1.218,5.518-2.062,8.381c-0.258,0.865-0.306,0.914-1.233,0.914c-0.128,0-0.278,0-0.442,0 c-1.668,0-4.2-0.346-7.135-0.922c-5.345-1.041-12.647-2.318-21.982-2.318c-5.21,0-10.577,0.453-15.962,1.352 c-11.511,1.914-20.872,8.535-30.786,15.543c-13.314,9.408-27.075,19.143-48.071,19.143c-0.917,0-1.812-0.031-2.709-0.076 l-0.236-0.01l-0.237,0.018c-0.515,0.045-1.034,0.068-1.564,0.068c-20.993,0-34.76-9.732-48.068-19.143 c-9.916-7.008-19.282-13.629-30.791-15.543c-5.38-0.896-10.752-1.352-15.959-1.352c-9.333,0-16.644,1.428-21.978,2.471 c-2.935,0.574-5.476,1.066-7.139,1.066c-1.362,0-1.388-0.08-1.676-1.064c-0.844-2.865-1.461-5.703-2.062-8.445 c-1.676-7.678-3.119-14.312-9.002-15.215c-37.613-5.809-43.659-13.561-44.613-15.795c-0.149-0.352-0.216-0.652-0.231-0.918 c56.11-9.238,81.041-65.408,82.63-69.119c3.857-7.818,4.541-14.775,2.032-20.678c-4.442-10.461-17.638-14.653-26.368-17.422 c-2.007-0.635-3.735-1.187-5.048-1.705c-11.336-4.479-14.823-8.991-14.305-11.725c0.601-3.153,6.067-6.359,10.837-6.359 c1.072,0,2.012,0.173,2.707,0.498c7.747,3.631,14.819,5.472,21.022,5.472c9.751,0,14.091-4.537,14.557-5.055l1.057-1.182 l-0.085-1.583c-0.197-3.699-0.44-7.574-0.696-11.565c-1.583-25.205-3.563-56.553,4.158-73.871 c23.37-52.396,72.903-56.435,87.525-56.435c0.36,0,6.717-0.065,6.717-0.065C407.744,124.239,408.033,124.235,408.336,124.235 M408.336,115.197h-0.017c-0.333,0-0.646,0-0.944,0.004c-2.376,0.024-6.282,0.062-6.633,0.066c-8.566,0-25.705,1.21-44.115,9.336 c-10.526,4.643-19.994,10.921-28.14,18.66c-9.712,9.221-17.624,20.59-23.512,33.796c-8.623,19.336-6.576,51.905-4.932,78.078 l0.006,0.041c0.176,2.803,0.361,5.73,0.53,8.582c-1.265,0.581-3.316,1.194-6.339,1.194c-4.864,0-10.648-1.555-17.187-4.619 c-1.924-0.896-4.12-1.349-6.543-1.349c-3.893,0-7.997,1.146-11.557,3.239c-4.479,2.63-7.373,6.347-8.159,10.468 c-0.518,2.726-0.493,8.114,5.492,13.578c3.292,3.008,8.128,5.782,14.37,8.249c1.638,0.645,3.582,1.261,5.641,1.914 c7.145,2.271,17.959,5.702,20.779,12.339c1.429,3.365,0.814,7.793-1.823,13.145c-0.069,0.146-0.138,0.289-0.201,0.439 c-0.659,1.539-6.807,15.465-19.418,30.152c-7.166,8.352-15.059,15.332-23.447,20.752c-10.238,6.617-21.316,10.943-32.923,12.855 c-4.558,0.748-7.813,4.809-7.559,9.424c0.078,1.33,0.39,2.656,0.931,3.939c0.004,0.008,0.009,0.016,0.013,0.023 c1.843,4.311,6.116,7.973,13.063,11.203c8.489,3.943,21.185,7.26,37.732,9.855c0.836,1.59,1.704,5.586,2.305,8.322 c0.629,2.908,1.285,5.898,2.22,9.074c1.009,3.441,3.626,7.553,10.349,7.553c2.548,0,5.478-0.574,8.871-1.232 c4.969-0.975,11.764-2.305,20.245-2.305c4.702,0,9.575,0.414,14.48,1.229c9.455,1.574,17.606,7.332,27.037,14 c13.804,9.758,29.429,20.803,53.302,20.803c0.651,0,1.304-0.021,1.949-0.066c0.789,0.037,1.767,0.066,2.799,0.066 c23.88,0,39.501-11.049,53.29-20.799l0.022-0.02c9.433-6.66,17.575-12.41,27.027-13.984c4.903-0.814,9.775-1.229,14.479-1.229 c8.102,0,14.517,1.033,20.245,2.15c3.738,0.736,6.643,1.09,8.872,1.09l0.218,0.004h0.226c4.917,0,8.53-2.699,9.909-7.422 c0.916-3.109,1.57-6.029,2.215-8.986c0.562-2.564,1.46-6.674,2.296-8.281c16.558-2.6,29.249-5.91,37.739-9.852 c6.931-3.215,11.199-6.873,13.053-11.166c0.556-1.287,0.881-2.621,0.954-3.979c0.261-4.607-2.999-8.676-7.56-9.424 c-51.585-8.502-74.824-61.506-75.785-63.758c-0.062-0.148-0.132-0.295-0.205-0.438c-2.637-5.354-3.246-9.777-1.816-13.148 c2.814-6.631,13.621-10.062,20.771-12.332c2.07-0.652,4.021-1.272,5.646-1.914c7.039-2.78,12.07-5.796,15.389-9.221 c3.964-4.083,4.736-7.995,4.688-10.555c-0.121-6.194-4.856-11.698-12.388-14.393c-2.544-1.052-5.445-1.607-8.399-1.607 c-2.011,0-4.989,0.276-7.808,1.592c-6.035,2.824-11.441,4.368-16.082,4.588c-2.468-0.125-4.199-0.66-5.32-1.171 c0.141-2.416,0.297-4.898,0.458-7.486l0.067-1.108c1.653-26.19,3.707-58.784-4.92-78.134c-5.913-13.253-13.853-24.651-23.604-33.892 c-8.178-7.744-17.678-14.021-28.242-18.661C434.052,116.402,416.914,115.197,408.336,115.197"/><rect x="147.553" y="39.443" style="fill:none;" width="514.231" height="514.23"/></svg>',
|
|
91
91
|
import: {
|
|
92
92
|
name: "useScriptSnapchatPixel",
|
|
93
|
-
from: resolve("./runtime/registry/snapchat-pixel")
|
|
93
|
+
from: await resolve("./runtime/registry/snapchat-pixel")
|
|
94
94
|
}
|
|
95
95
|
},
|
|
96
96
|
// ads
|
|
@@ -105,7 +105,7 @@ const registry = (resolve) => {
|
|
|
105
105
|
logo: `<svg xmlns="http://www.w3.org/2000/svg" width="36.09" height="32" viewBox="0 0 256 227"><path fill="#FBBC04" d="M161.8 62.158c11.581-19.822 4.705-45.154-15.355-56.603C126.376-5.878 100.723.899 89.142 20.72c-.51.888-.99 1.794-1.44 2.715L48.553 90.41a49.41 49.41 0 0 0-2.401 4.112L5.495 164.681l72.65 40.721l40.45-69.566a40.013 40.013 0 0 0 2.402-4.112l39.15-66.983a45.769 45.769 0 0 0 1.654-2.583"/><path fill="#34A853" d="M78.483 205.189c-11.515 20.142-37.49 27.553-57.434 15.931c-19.954-11.63-27.036-36.847-15.513-56.982c11.523-20.134 37.267-27.578 57.22-15.956c19.954 11.63 27.241 36.872 15.727 56.998"/><path fill="#4285F4" d="M235.257 75.417c-19.83-11.429-45.17-4.661-56.661 15.134l-41.478 71.67c-11.428 19.755-4.678 45.033 15.076 56.46l.107.062c19.835 11.433 45.18 4.66 56.67-15.142l41.469-71.663c11.426-19.76 4.67-45.042-15.09-56.468z"/></svg>`,
|
|
106
106
|
import: {
|
|
107
107
|
name: "useScriptGoogleAdsense",
|
|
108
|
-
from: resolve("./runtime/registry/google-adsense")
|
|
108
|
+
from: await resolve("./runtime/registry/google-adsense")
|
|
109
109
|
}
|
|
110
110
|
},
|
|
111
111
|
{
|
|
@@ -124,7 +124,7 @@ const registry = (resolve) => {
|
|
|
124
124
|
category: "support",
|
|
125
125
|
import: {
|
|
126
126
|
name: "useScriptIntercom",
|
|
127
|
-
from: resolve("./runtime/registry/intercom")
|
|
127
|
+
from: await resolve("./runtime/registry/intercom")
|
|
128
128
|
}
|
|
129
129
|
},
|
|
130
130
|
{
|
|
@@ -138,7 +138,7 @@ const registry = (resolve) => {
|
|
|
138
138
|
category: "marketing",
|
|
139
139
|
import: {
|
|
140
140
|
name: "useScriptHotjar",
|
|
141
|
-
from: resolve("./runtime/registry/hotjar")
|
|
141
|
+
from: await resolve("./runtime/registry/hotjar")
|
|
142
142
|
}
|
|
143
143
|
},
|
|
144
144
|
{
|
|
@@ -150,7 +150,7 @@ const registry = (resolve) => {
|
|
|
150
150
|
category: "marketing",
|
|
151
151
|
import: {
|
|
152
152
|
name: "useScriptClarity",
|
|
153
|
-
from: resolve("./runtime/registry/clarity")
|
|
153
|
+
from: await resolve("./runtime/registry/clarity")
|
|
154
154
|
}
|
|
155
155
|
},
|
|
156
156
|
// payments
|
|
@@ -161,7 +161,7 @@ const registry = (resolve) => {
|
|
|
161
161
|
logo: `<svg xmlns="http://www.w3.org/2000/svg" width="76.57" height="32" viewBox="0 0 512 214"><path fill="#635BFF" d="M512 110.08c0-36.409-17.636-65.138-51.342-65.138c-33.85 0-54.33 28.73-54.33 64.854c0 42.808 24.179 64.426 58.88 64.426c16.925 0 29.725-3.84 39.396-9.244v-28.445c-9.67 4.836-20.764 7.823-34.844 7.823c-13.796 0-26.027-4.836-27.591-21.618h69.547c0-1.85.284-9.245.284-12.658m-70.258-13.511c0-16.071 9.814-22.756 18.774-22.756c8.675 0 17.92 6.685 17.92 22.756zm-90.31-51.627c-13.939 0-22.899 6.542-27.876 11.094l-1.85-8.818h-31.288v165.83l35.555-7.537l.143-40.249c5.12 3.698 12.657 8.96 25.173 8.96c25.458 0 48.64-20.48 48.64-65.564c-.142-41.245-23.609-63.716-48.498-63.716m-8.534 97.991c-8.391 0-13.37-2.986-16.782-6.684l-.143-52.765c3.698-4.124 8.818-6.968 16.925-6.968c12.942 0 21.902 14.506 21.902 33.137c0 19.058-8.818 33.28-21.902 33.28M241.493 36.551l35.698-7.68V0l-35.698 7.538zm0 10.809h35.698v124.444h-35.698zm-38.257 10.524L200.96 47.36h-30.72v124.444h35.556V87.467c8.39-10.951 22.613-8.96 27.022-7.396V47.36c-4.551-1.707-21.191-4.836-29.582 10.524m-71.112-41.386l-34.702 7.395l-.142 113.92c0 21.05 15.787 36.551 36.836 36.551c11.662 0 20.195-2.133 24.888-4.693V140.8c-4.55 1.849-27.022 8.391-27.022-12.658V77.653h27.022V47.36h-27.022zM35.982 83.484c0-5.546 4.551-7.68 12.09-7.68c10.808 0 24.461 3.272 35.27 9.103V51.484c-11.804-4.693-23.466-6.542-35.27-6.542C19.2 44.942 0 60.018 0 85.192c0 39.252 54.044 32.995 54.044 49.92c0 6.541-5.688 8.675-13.653 8.675c-11.804 0-26.88-4.836-38.827-11.378v33.849c13.227 5.689 26.596 8.106 38.827 8.106c29.582 0 49.92-14.648 49.92-40.106c-.142-42.382-54.329-34.845-54.329-50.774"/></svg>`,
|
|
162
162
|
import: {
|
|
163
163
|
name: "useScriptStripe",
|
|
164
|
-
from: resolve("./runtime/registry/stripe")
|
|
164
|
+
from: await resolve("./runtime/registry/stripe")
|
|
165
165
|
}
|
|
166
166
|
},
|
|
167
167
|
{
|
|
@@ -172,7 +172,7 @@ const registry = (resolve) => {
|
|
|
172
172
|
logo: `<svg width="21" height="28" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="m6.929 17.186 7.511 3.472a3.846 3.846 0 0 1 1.943 1.983c.898 2.099-.33 4.246-2.255 5.018-1.926.772-3.979.275-4.912-1.908l-3.27-7.664c-.253-.595.384-1.178.983-.901ZM7.38 14.938l7.753-2.931c2.577-.974 5.392.869 5.354 3.547l-.003.105c-.055 2.608-2.792 4.36-5.312 3.438l-7.786-2.85a.694.694 0 0 1-.007-1.31ZM6.945 13.922l7.622-3.238C17.1 9.607 17.743 6.377 15.76 4.51a9.026 9.026 0 0 0-.078-.073c-1.945-1.805-5.16-1.17-6.267 1.208l-3.42 7.347c-.274.585.343 1.189.951.93ZM4.983 12.643l2.772-7.599a3.678 3.678 0 0 0-.076-2.732C6.78.214 4.344-.464 2.42.31.493 1.083-.595 2.84.34 5.023l3.29 7.656c.255.593 1.132.57 1.352-.036Z" fill="#FFC233"/></svg>`,
|
|
173
173
|
import: {
|
|
174
174
|
name: "useScriptLemonSqueezy",
|
|
175
|
-
from: resolve("./runtime/registry/lemon-squeezy")
|
|
175
|
+
from: await resolve("./runtime/registry/lemon-squeezy")
|
|
176
176
|
}
|
|
177
177
|
},
|
|
178
178
|
// content
|
|
@@ -182,7 +182,7 @@ const registry = (resolve) => {
|
|
|
182
182
|
logo: `<svg xmlns="http://www.w3.org/2000/svg" width="36.74" height="32" viewBox="0 0 256 223"><path fill="#32B8E8" d="M255.876 51.662c-1.139 24.968-18.545 59.157-52.209 102.55c-34.806 45.327-64.254 67.989-88.343 67.989c-14.918 0-27.551-13.799-37.863-41.406c-6.892-25.306-13.775-50.61-20.664-75.915c-7.663-27.592-15.878-41.406-24.661-41.406c-1.915 0-8.617 4.038-20.091 12.081L0 60.008a3257.325 3257.325 0 0 0 37.36-33.38C54.21 12.038 66.86 4.366 75.29 3.59c19.925-1.917 32.187 11.728 36.79 40.938c4.974 31.514 8.415 51.116 10.35 58.788c5.742 26.145 12.06 39.201 18.965 39.201c5.358 0 13.407-8.478 24.138-25.436c10.722-16.963 16.464-29.868 17.24-38.733c1.525-14.638-4.22-21.975-17.24-21.975c-6.128 0-12.447 1.413-18.946 4.206c12.58-41.29 36.618-61.343 72.1-60.199c26.304.773 38.705 17.867 37.19 51.282"/></svg>`,
|
|
183
183
|
import: {
|
|
184
184
|
name: "useScriptVimeoPlayer",
|
|
185
|
-
from: resolve("./runtime/registry/vimeo-player")
|
|
185
|
+
from: await resolve("./runtime/registry/vimeo-player")
|
|
186
186
|
}
|
|
187
187
|
},
|
|
188
188
|
{
|
|
@@ -191,7 +191,7 @@ const registry = (resolve) => {
|
|
|
191
191
|
logo: `<svg xmlns="http://www.w3.org/2000/svg" width="45.52" height="32" viewBox="0 0 256 180"><path fill="red" d="M250.346 28.075A32.18 32.18 0 0 0 227.69 5.418C207.824 0 127.87 0 127.87 0S47.912.164 28.046 5.582A32.18 32.18 0 0 0 5.39 28.24c-6.009 35.298-8.34 89.084.165 122.97a32.18 32.18 0 0 0 22.656 22.657c19.866 5.418 99.822 5.418 99.822 5.418s79.955 0 99.82-5.418a32.18 32.18 0 0 0 22.657-22.657c6.338-35.348 8.291-89.1-.164-123.134"/><path fill="#FFF" d="m102.421 128.06l66.328-38.418l-66.328-38.418z"/></svg>`,
|
|
192
192
|
import: {
|
|
193
193
|
name: "useScriptYouTubePlayer",
|
|
194
|
-
from: resolve("./runtime/registry/youtube-player")
|
|
194
|
+
from: await resolve("./runtime/registry/youtube-player")
|
|
195
195
|
}
|
|
196
196
|
},
|
|
197
197
|
{
|
|
@@ -200,7 +200,7 @@ const registry = (resolve) => {
|
|
|
200
200
|
logo: `<svg xmlns="http://www.w3.org/2000/svg" width="22.33" height="32" viewBox="0 0 256 367"><path fill="#34A853" d="M70.585 271.865a370.712 370.712 0 0 1 28.911 42.642c7.374 13.982 10.448 23.463 15.837 40.31c3.305 9.308 6.292 12.086 12.714 12.086c6.998 0 10.173-4.726 12.626-12.035c5.094-15.91 9.091-28.052 15.397-39.525c12.374-22.15 27.75-41.833 42.858-60.75c4.09-5.354 30.534-36.545 42.439-61.156c0 0 14.632-27.035 14.632-64.792c0-35.318-14.43-59.813-14.43-59.813l-41.545 11.126l-25.23 66.451l-6.242 9.163l-1.248 1.66l-1.66 2.078l-2.914 3.319l-4.164 4.163l-22.467 18.304l-56.17 32.432z"/><path fill="#FBBC04" d="M12.612 188.892c13.709 31.313 40.145 58.839 58.031 82.995l95.001-112.534s-13.384 17.504-37.662 17.504c-27.043 0-48.89-21.595-48.89-48.825c0-18.673 11.234-31.501 11.234-31.501l-64.489 17.28z"/><path fill="#4285F4" d="M166.705 5.787c31.552 10.173 58.558 31.53 74.893 63.023l-75.925 90.478s11.234-13.06 11.234-31.617c0-27.864-23.463-48.68-48.81-48.68c-23.969 0-37.735 17.475-37.735 17.475v-57z"/><path fill="#1A73E8" d="M30.015 45.765C48.86 23.218 82.02 0 127.736 0c22.18 0 38.89 5.823 38.89 5.823L90.29 96.516H36.205z"/><path fill="#EA4335" d="M12.612 188.892S0 164.194 0 128.414c0-33.817 13.146-63.377 30.015-82.649l60.318 50.759z"/></svg>`,
|
|
201
201
|
import: {
|
|
202
202
|
name: "useScriptGoogleMaps",
|
|
203
|
-
from: resolve("./runtime/registry/google-maps")
|
|
203
|
+
from: await resolve("./runtime/registry/google-maps")
|
|
204
204
|
}
|
|
205
205
|
},
|
|
206
206
|
// chat
|
|
@@ -213,7 +213,7 @@ const registry = (resolve) => {
|
|
|
213
213
|
},
|
|
214
214
|
import: {
|
|
215
215
|
name: "useScriptCrisp",
|
|
216
|
-
from: resolve("./runtime/registry/crisp")
|
|
216
|
+
from: await resolve("./runtime/registry/crisp")
|
|
217
217
|
}
|
|
218
218
|
},
|
|
219
219
|
// other
|
|
@@ -227,7 +227,7 @@ const registry = (resolve) => {
|
|
|
227
227
|
import: {
|
|
228
228
|
name: "useScriptNpm",
|
|
229
229
|
// key is based on package name
|
|
230
|
-
from: resolve("./runtime/registry/npm")
|
|
230
|
+
from: await resolve("./runtime/registry/npm")
|
|
231
231
|
}
|
|
232
232
|
},
|
|
233
233
|
{
|
|
@@ -235,11 +235,22 @@ const registry = (resolve) => {
|
|
|
235
235
|
category: "tracking",
|
|
236
236
|
import: {
|
|
237
237
|
name: "useScriptGoogleTagManager",
|
|
238
|
-
from: resolve("./runtime/registry/google-tag-manager")
|
|
238
|
+
from: await resolve("./runtime/registry/google-tag-manager")
|
|
239
239
|
},
|
|
240
240
|
logo: `<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 256 256"><path fill="#8AB4F8" d="m150.262 245.516l-44.437-43.331l95.433-97.454l46.007 45.091z"/><path fill="#4285F4" d="M150.45 53.938L106.176 8.731L9.36 104.629c-12.48 12.48-12.48 32.713 0 45.207l95.36 95.986l45.09-42.182l-72.654-76.407z"/><path fill="#8AB4F8" d="m246.625 105.37l-96-96c-12.494-12.494-32.756-12.494-45.25 0c-12.495 12.495-12.495 32.757 0 45.252l96 96c12.494 12.494 32.756 12.494 45.25 0c12.495-12.495 12.495-32.757 0-45.251"/><circle cx="127.265" cy="224.731" r="31.273" fill="#246FDB"/></svg>`,
|
|
241
241
|
scriptBundling(options) {
|
|
242
|
-
return withQuery("https://www.googletagmanager.com/
|
|
242
|
+
return withQuery("https://www.googletagmanager.com/gtm.js", {
|
|
243
|
+
id: options.id,
|
|
244
|
+
l: options.l,
|
|
245
|
+
gtm_auth: options.auth,
|
|
246
|
+
gtm_preview: options.preview,
|
|
247
|
+
gtm_cookies_win: options.cookiesWin ? "x" : void 0,
|
|
248
|
+
gtm_debug: options.debug ? "x" : void 0,
|
|
249
|
+
gtm_npa: options.npa ? "1" : void 0,
|
|
250
|
+
gtm_data_layer: options.dataLayer,
|
|
251
|
+
gtm_env: options.envName,
|
|
252
|
+
gtm_auth_referrer_policy: options.authReferrerPolicy
|
|
253
|
+
});
|
|
243
254
|
}
|
|
244
255
|
},
|
|
245
256
|
{
|
|
@@ -247,7 +258,7 @@ const registry = (resolve) => {
|
|
|
247
258
|
category: "analytics",
|
|
248
259
|
import: {
|
|
249
260
|
name: "useScriptGoogleAnalytics",
|
|
250
|
-
from: resolve("./runtime/registry/google-analytics")
|
|
261
|
+
from: await resolve("./runtime/registry/google-analytics")
|
|
251
262
|
},
|
|
252
263
|
logo: `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" width="192px" height="192px" viewBox="0 0 192 192" enable-background="new 0 0 192 192" xml:space="preserve"><rect x="0" y="0" fill="none" width="192" height="192"/><g><g><path fill="#F9AB00" d="M130,29v132c0,14.77,10.19,23,21,23c10,0,21-7,21-23V30c0-13.54-10-22-21-22S130,17.33,130,29z"/></g><g><path fill="#E37400" d="M75,96v65c0,14.77,10.19,23,21,23c10,0,21-7,21-23V97c0-13.54-10-22-21-22S75,84.33,75,96z"/></g><g><circle fill="#E37400" cx="41" cy="163" r="21"/></g></g></svg>`,
|
|
253
264
|
scriptBundling(options) {
|
|
@@ -260,10 +271,10 @@ const registry = (resolve) => {
|
|
|
260
271
|
logo: `<svg xmlns="http://www.w3.org/2000/svg" width="96" height="96" viewBox="0 0 24 24"><path fill="currentColor" d="M2.203 8.611H.857a.845.845 0 0 0-.841.841v.858a13 13 0 0 0-.016.6c0 6.627 5.373 12 12 12c6.527 0 11.837-5.212 11.996-11.701c0-.025.004-.05.004-.075V9.452a.845.845 0 0 0-.841-.841h-1.346c-1.159-4.329-5.112-7.521-9.805-7.521S3.363 4.282 2.203 8.611m18.444 0H3.37c1.127-3.702 4.57-6.399 8.638-6.399c4.069 0 7.512 2.697 8.639 6.399"/></svg>`,
|
|
261
272
|
import: {
|
|
262
273
|
name: "useScriptUmamiAnalytics",
|
|
263
|
-
from: resolve("./runtime/registry/umami-analytics")
|
|
274
|
+
from: await resolve("./runtime/registry/umami-analytics")
|
|
264
275
|
}
|
|
265
276
|
}
|
|
266
277
|
];
|
|
267
|
-
}
|
|
278
|
+
}
|
|
268
279
|
|
|
269
280
|
export { registry };
|
|
@@ -62,6 +62,18 @@ const props = withDefaults(defineProps<{
|
|
|
62
62
|
* Options for the map.
|
|
63
63
|
*/
|
|
64
64
|
mapOptions?: google.maps.MapOptions
|
|
65
|
+
/**
|
|
66
|
+
* Defines the region of the map.
|
|
67
|
+
*/
|
|
68
|
+
region?: string
|
|
69
|
+
/**
|
|
70
|
+
* Defines the language of the map
|
|
71
|
+
*/
|
|
72
|
+
language?: string
|
|
73
|
+
/**
|
|
74
|
+
* Defines the version of google maps js API
|
|
75
|
+
*/
|
|
76
|
+
version?: string
|
|
65
77
|
/**
|
|
66
78
|
* Defines the width of the map.
|
|
67
79
|
*/
|
|
@@ -121,7 +133,9 @@ const { load, status, onLoaded } = useScriptGoogleMaps({
|
|
|
121
133
|
scriptOptions: {
|
|
122
134
|
trigger,
|
|
123
135
|
},
|
|
124
|
-
|
|
136
|
+
region: props.region,
|
|
137
|
+
language: props.language,
|
|
138
|
+
v: props.version,
|
|
125
139
|
})
|
|
126
140
|
|
|
127
141
|
const options = computed(() => {
|
|
@@ -152,27 +166,38 @@ function resetMapMarkerMap(_marker: google.maps.marker.AdvancedMarkerElement | P
|
|
|
152
166
|
})
|
|
153
167
|
}
|
|
154
168
|
|
|
169
|
+
function normalizeAdvancedMapMarkerOptions(_options?: google.maps.marker.AdvancedMarkerElementOptions | `${string},${string}`) {
|
|
170
|
+
const opts = typeof _options === 'string'
|
|
171
|
+
? {
|
|
172
|
+
position: {
|
|
173
|
+
lat: Number.parseFloat(_options.split(',')[0] || '0'),
|
|
174
|
+
lng: Number.parseFloat(_options.split(',')[1] || '0'),
|
|
175
|
+
},
|
|
176
|
+
}
|
|
177
|
+
: _options
|
|
178
|
+
if (!opts.position) {
|
|
179
|
+
// set default
|
|
180
|
+
opts.position = {
|
|
181
|
+
lat: 0,
|
|
182
|
+
lng: 0,
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
155
187
|
async function createAdvancedMapMarker(_options?: google.maps.marker.AdvancedMarkerElementOptions | `${string},${string}`) {
|
|
156
188
|
if (!_options)
|
|
157
189
|
return
|
|
158
|
-
const
|
|
190
|
+
const normalizedOptions = normalizeAdvancedMapMarkerOptions(_options)
|
|
191
|
+
const key = hash({ position: normalizedOptions.position })
|
|
159
192
|
if (mapMarkers.value.has(key))
|
|
160
193
|
return mapMarkers.value.get(key)
|
|
161
194
|
// eslint-disable-next-line no-async-promise-executor
|
|
162
195
|
const p = new Promise<google.maps.marker.AdvancedMarkerElement>(async (resolve) => {
|
|
163
196
|
const lib = await importLibrary('marker')
|
|
164
|
-
const
|
|
165
|
-
? {
|
|
166
|
-
position: {
|
|
167
|
-
lat: Number.parseFloat(_options.split(',')[0] || '0'),
|
|
168
|
-
lng: Number.parseFloat(_options.split(',')[1] || '0'),
|
|
169
|
-
},
|
|
170
|
-
}
|
|
171
|
-
: _options
|
|
172
|
-
const mapMarkerOptions = defu(toRaw(options), {
|
|
197
|
+
const mapMarkerOptions = defu(toRaw(normalizedOptions), {
|
|
173
198
|
map: toRaw(map.value!),
|
|
174
199
|
// @ts-expect-error unified API for maps and markers
|
|
175
|
-
position:
|
|
200
|
+
position: normalizedOptions.location,
|
|
176
201
|
})
|
|
177
202
|
resolve(new lib.AdvancedMarkerElement(mapMarkerOptions))
|
|
178
203
|
})
|
|
@@ -270,7 +295,7 @@ onMounted(() => {
|
|
|
270
295
|
}
|
|
271
296
|
// mapMarkers is a map where we hash the next array entry as the map key
|
|
272
297
|
// we need to do a diff to see what we remove or add
|
|
273
|
-
const nextMap = new Map((props.markers || []).map(m => [hash(m), m]))
|
|
298
|
+
const nextMap = new Map((props.markers || []).map(m => [hash({ position: normalizeAdvancedMapMarkerOptions(m).position }), m]))
|
|
274
299
|
// compare idsToMatch in nextMap, if we're missing an id, we need to remove it
|
|
275
300
|
const toRemove = new Set([
|
|
276
301
|
...mapMarkers.value.keys(),
|
|
@@ -13,7 +13,10 @@ export function useScript(input, options) {
|
|
|
13
13
|
options = defu(options, useNuxtScriptRuntimeConfig()?.defaultScriptOptions);
|
|
14
14
|
const id = String(resolveScriptKey(input));
|
|
15
15
|
const nuxtApp = useNuxtApp();
|
|
16
|
-
|
|
16
|
+
options.head = options.head || injectHead();
|
|
17
|
+
if (!options.head) {
|
|
18
|
+
throw new Error("useScript() has been called without Nuxt context.");
|
|
19
|
+
}
|
|
17
20
|
nuxtApp.$scripts = nuxtApp.$scripts || reactive({});
|
|
18
21
|
const exists = !!nuxtApp.$scripts?.[id];
|
|
19
22
|
if (options.trigger === "onNuxtReady" || options.trigger === "client") {
|
|
@@ -47,7 +50,7 @@ export function useScript(input, options) {
|
|
|
47
50
|
};
|
|
48
51
|
nuxtApp._scripts = nuxtApp._scripts || {};
|
|
49
52
|
if (!nuxtApp._scripts[instance.id]) {
|
|
50
|
-
head.hooks.hook("script:updated", (ctx) => {
|
|
53
|
+
options.head.hooks.hook("script:updated", (ctx) => {
|
|
51
54
|
if (ctx.script.id !== instance.id)
|
|
52
55
|
return;
|
|
53
56
|
payload.events.push({
|
|
@@ -58,7 +61,7 @@ export function useScript(input, options) {
|
|
|
58
61
|
payload.$script = instance;
|
|
59
62
|
syncScripts();
|
|
60
63
|
});
|
|
61
|
-
head.hooks.hook("script:instance-fn", (ctx) => {
|
|
64
|
+
options.head.hooks.hook("script:instance-fn", (ctx) => {
|
|
62
65
|
if (ctx.script.id !== instance.id || String(ctx.fn).startsWith("__v_"))
|
|
63
66
|
return;
|
|
64
67
|
payload.events.push({
|