@nuxt/scripts 0.1.7 → 0.1.9
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 +5 -5
- package/dist/client/404.html +5 -5
- package/dist/client/_nuxt/{D1ek2jBE.js → 598pLFA2.js} +1 -1
- package/dist/client/_nuxt/{vqIOxd68.js → BAdl5pI-.js} +1 -1
- package/dist/client/_nuxt/{BVIyUFBp.js → C-ajRY17.js} +10 -10
- package/dist/client/_nuxt/{CV_REd8b.js → Cx7pcWFu.js} +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/5fdc85c0-58a5-4956-bedd-f94dc9ec3924.json +1 -0
- package/dist/client/index.html +5 -5
- package/dist/module.d.mts +1 -1
- package/dist/module.d.ts +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +3 -4
- package/dist/runtime/types.d.ts +6 -6
- package/package.json +5 -5
- package/dist/client/_nuxt/builds/meta/b5db882d-dfbd-4edf-87b5-38d1f0a456e3.json +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as i,u as a}from"./
|
|
1
|
+
import{_ as i,u as a}from"./598pLFA2.js";import{o as r,c as n,a as e,t as s,p as l,e as d}from"./C-ajRY17.js";const c=t=>(l("data-v-c967d9a9"),t=t(),d(),t),p={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white grid min-h-screen place-content-center overflow-hidden"},h=c(()=>e("div",{class:"fixed -bottom-1/2 left-0 right-0 h-1/2 spotlight"},null,-1)),f={class:"max-w-520px text-center"},m=["textContent"],g=["textContent"],x={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:500},statusMessage:{type:String,default:"Server error"},description:{type:String,default:"This page is temporarily unavailable."}},setup(t){const o=t;return a({title:`${o.statusCode} - ${o.statusMessage} | ${o.appName}`,script:[],style:[{children:'*,:before,:after{-webkit-box-sizing:border-box;box-sizing:border-box;border-width:0;border-style:solid;border-color:#e0e0e0}*{--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(14, 165, 233, .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000}:root{-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{margin:0;font-family:inherit;line-height:inherit}html{-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:1.5}h1,p{margin:0}h1{font-size:inherit;font-weight:inherit}'}]}),(b,u)=>(r(),n("div",p,[h,e("div",f,[e("h1",{class:"text-8xl sm:text-10xl font-medium mb-8",textContent:s(t.statusCode)},null,8,m),e("p",{class:"text-xl px-8 sm:px-0 sm:text-4xl font-light mb-16 leading-tight",textContent:s(t.description)},null,8,g)])]))}},y=i(x,[["__scopeId","data-v-c967d9a9"]]);export{y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"5fdc85c0-58a5-4956-bedd-f94dc9ec3924","timestamp":1712059997492}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"5fdc85c0-58a5-4956-bedd-f94dc9ec3924","timestamp":1712059997492,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|
package/dist/client/index.html
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!DOCTYPE html><html><head><meta charset="utf-8">
|
|
2
2
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
3
3
|
<link rel="stylesheet" href="/__nuxt-scripts/_nuxt/entry.D91GVkD7.css">
|
|
4
|
-
<link rel="modulepreload" as="script" crossorigin href="/__nuxt-scripts/_nuxt/
|
|
4
|
+
<link rel="modulepreload" as="script" crossorigin href="/__nuxt-scripts/_nuxt/C-ajRY17.js">
|
|
5
5
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/DXFkqnOI.js">
|
|
6
6
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/D6NljDpC.js">
|
|
7
7
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/CowR2XfX.js">
|
|
@@ -230,10 +230,10 @@
|
|
|
230
230
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/DggdVF2v.js">
|
|
231
231
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/A1WiD9SJ.js">
|
|
232
232
|
<link rel="prefetch" as="style" href="/__nuxt-scripts/_nuxt/error-404.ORekjfyJ.css">
|
|
233
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/
|
|
234
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/
|
|
233
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/BAdl5pI-.js">
|
|
234
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/598pLFA2.js">
|
|
235
235
|
<link rel="prefetch" as="style" href="/__nuxt-scripts/_nuxt/error-500.BIuFL0tW.css">
|
|
236
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/
|
|
237
|
-
<script type="module" src="/__nuxt-scripts/_nuxt/
|
|
236
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/Cx7pcWFu.js">
|
|
237
|
+
<script type="module" src="/__nuxt-scripts/_nuxt/C-ajRY17.js" crossorigin></script><script>"use strict";(()=>{const a=window,e=document.documentElement,c=window.localStorage,d=["dark","light"],n=c&&c.getItem&&c.getItem("nuxt-color-mode")||"system";let l=n==="system"?f():n;const i=e.getAttribute("data-color-mode-forced");i&&(l=i),r(l),a["__NUXT_COLOR_MODE__"]={preference:n,value:l,getColorScheme:f,addColorScheme:r,removeColorScheme:u};function r(o){const t=""+o+"",s="";e.classList?e.classList.add(t):e.className+=" "+t,s&&e.setAttribute("data-"+s,o)}function u(o){const t=""+o+"",s="";e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(t,"g"),""),s&&e.removeAttribute("data-"+s)}function m(o){return a.matchMedia("(prefers-color-scheme"+o+")")}function f(){if(a.matchMedia&&m("").media!=="not all"){for(const o of d)if(m(":"+o).matches)return o}return"light"}})();
|
|
238
238
|
</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" id="__NUXT_DATA__" data-ssr="false">[{"_errors":1,"serverRendered":2,"data":3,"state":4,"once":5},{},false,{},{},["Set"]]</script>
|
|
239
239
|
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-scripts",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
package/dist/module.d.mts
CHANGED
|
@@ -49,7 +49,7 @@ interface ModuleHooks {
|
|
|
49
49
|
/**
|
|
50
50
|
* Transform a script before it's registered.
|
|
51
51
|
*/
|
|
52
|
-
'scripts:registry': (registry: RegistryScripts) => Promise<void>;
|
|
52
|
+
'scripts:registry': (registry: RegistryScripts) => void | Promise<void>;
|
|
53
53
|
}
|
|
54
54
|
declare const _default: nuxt_schema.NuxtModule<ModuleOptions>;
|
|
55
55
|
|
package/dist/module.d.ts
CHANGED
|
@@ -49,7 +49,7 @@ interface ModuleHooks {
|
|
|
49
49
|
/**
|
|
50
50
|
* Transform a script before it's registered.
|
|
51
51
|
*/
|
|
52
|
-
'scripts:registry': (registry: RegistryScripts) => Promise<void>;
|
|
52
|
+
'scripts:registry': (registry: RegistryScripts) => void | Promise<void>;
|
|
53
53
|
}
|
|
54
54
|
declare const _default: nuxt_schema.NuxtModule<ModuleOptions>;
|
|
55
55
|
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -62,16 +62,15 @@ function NuxtScriptAssetBundlerTransformer(options) {
|
|
|
62
62
|
return createUnplugin(() => {
|
|
63
63
|
return {
|
|
64
64
|
name: "nuxt:scripts:asset-bundler-transformer",
|
|
65
|
-
enforce: "post",
|
|
66
65
|
transformInclude(id) {
|
|
67
66
|
const { pathname, search } = parseURL(decodeURIComponent(pathToFileURL(id).href));
|
|
68
67
|
const { type } = parseQuery(search);
|
|
68
|
+
if (pathname.includes("node_modules/@unhead") || pathname.includes("node_modules/vueuse"))
|
|
69
|
+
return false;
|
|
69
70
|
if (pathname.endsWith(".vue") && (type === "script" || !search))
|
|
70
71
|
return true;
|
|
71
72
|
if (pathname.match(/\.((c|m)?j|t)sx?$/g))
|
|
72
73
|
return true;
|
|
73
|
-
if (pathname.includes("node_modules/@unhead") || pathname.includes("node_modules/vueuse"))
|
|
74
|
-
return false;
|
|
75
74
|
return false;
|
|
76
75
|
},
|
|
77
76
|
async transform(code, id) {
|
|
@@ -104,7 +103,7 @@ function NuxtScriptAssetBundlerTransformer(options) {
|
|
|
104
103
|
} else {
|
|
105
104
|
const registryNode = options.registry?.find((i) => i.name === fnName);
|
|
106
105
|
if (!registryNode) {
|
|
107
|
-
console.
|
|
106
|
+
console.warn(`[Nuxt Scripts] Integration ${fnName} not found in registry. Used in ${id}.`);
|
|
108
107
|
return;
|
|
109
108
|
}
|
|
110
109
|
if (!registryNode.transform && !registryNode.src)
|
package/dist/runtime/types.d.ts
CHANGED
|
@@ -3,12 +3,12 @@ import type { UseScriptInput, VueScriptInstance } from '@unhead/vue';
|
|
|
3
3
|
import type { ComputedRef, Ref } from 'vue';
|
|
4
4
|
import type { Input, ObjectSchema } from 'valibot';
|
|
5
5
|
import type { Import } from 'unimport';
|
|
6
|
-
import type {
|
|
7
|
-
import type {
|
|
8
|
-
import type {
|
|
9
|
-
import type {
|
|
10
|
-
import type {
|
|
11
|
-
import type { IntercomOptions } from '
|
|
6
|
+
import type { SegmentOptions } from './registry/segment';
|
|
7
|
+
import type { CloudflareWebAnalyticsOptions } from './registry/cloudflare-web-analytics';
|
|
8
|
+
import type { FacebookPixelOptions } from './registry/facebook-pixel';
|
|
9
|
+
import type { FathomAnalyticsOptions } from './registry/fathom-analytics';
|
|
10
|
+
import type { HotjarOptions } from './registry/hotjar';
|
|
11
|
+
import type { IntercomOptions } from './registry/intercom';
|
|
12
12
|
export type NuxtUseScriptOptions<T = any> = Omit<UseScriptOptions<T>, 'trigger'> & {
|
|
13
13
|
/**
|
|
14
14
|
* The trigger to load the script:
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/scripts",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
5
|
-
"packageManager": "pnpm@8.15.
|
|
4
|
+
"version": "0.1.9",
|
|
5
|
+
"packageManager": "pnpm@8.15.6",
|
|
6
6
|
"description": "Next-gen Scripts for Nuxt",
|
|
7
7
|
"author": {
|
|
8
8
|
"website": "https://harlanzw.com",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@nuxt/devtools-kit": "^1.1.5",
|
|
42
42
|
"@nuxt/devtools-ui-kit": "^1.1.5",
|
|
43
43
|
"@nuxt/kit": "^3.11.1",
|
|
44
|
-
"@unhead/vue": "^1.9.
|
|
44
|
+
"@unhead/vue": "^1.9.4",
|
|
45
45
|
"consola": "^3.2.3",
|
|
46
46
|
"defu": "^6.1.4",
|
|
47
47
|
"estree-walker": "^3.0.3",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"ohash": "^1.1.3",
|
|
52
52
|
"pathe": "^1.1.2",
|
|
53
53
|
"pkg-types": "^1.0.3",
|
|
54
|
-
"shiki": "^1.2.
|
|
54
|
+
"shiki": "^1.2.3",
|
|
55
55
|
"sirv": "^2.0.4",
|
|
56
56
|
"ufo": "^1.5.3",
|
|
57
57
|
"unimport": "^3.7.1",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"@nuxt/devtools-ui-kit": "^1.1.5",
|
|
65
65
|
"@nuxt/module-builder": "^0.5.5",
|
|
66
66
|
"@nuxt/test-utils": "3.12.0",
|
|
67
|
-
"@unhead/schema": "^1.9.
|
|
67
|
+
"@unhead/schema": "^1.9.4",
|
|
68
68
|
"acorn-loose": "^8.4.0",
|
|
69
69
|
"bumpp": "^9.4.0",
|
|
70
70
|
"eslint": "8.57.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"id":"b5db882d-dfbd-4edf-87b5-38d1f0a456e3","timestamp":1711951597713,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|