nuxt-schema-org 3.1.8 → 3.2.1
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/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/ee95e106-6a84-4c8a-a243-ab39a1480d4a.json +1 -0
- package/dist/client/_nuxt/{entry.dda64b8a.js → entry.c11b689f.js} +2 -2
- package/dist/client/_nuxt/{error-404.b36f165f.js → error-404.1cce7bb5.js} +1 -1
- package/dist/client/_nuxt/{error-500.98394863.js → error-500.b6dba74c.js} +1 -1
- package/dist/client/_nuxt/{vue.f36acd1f.7e9a73fe.js → vue.f36acd1f.c7ad5a91.js} +1 -1
- package/dist/client/index.html +5 -5
- package/dist/module.d.mts +7 -0
- package/dist/module.d.ts +7 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +7 -1
- package/dist/runtime/types.d.ts +1 -1
- package/dist/runtime/useSchemaOrg.mjs +4 -3
- package/package.json +16 -11
- package/dist/client/_nuxt/builds/meta/cbfb877b-1b53-4ae9-80d3-c0255a00236f.json +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as a,o as n,c as r,a as e,t as s,b as l,w as d,d as c,e as p,p as f,f as m}from"./entry.
|
|
1
|
+
import{_ as a,o as n,c as r,a as e,t as s,b as l,w as d,d as c,e as p,p as f,f as m}from"./entry.c11b689f.js";import{u as x}from"./vue.f36acd1f.c7ad5a91.js";const h=t=>(f("data-v-05a2b8a3"),t=t(),m(),t),u={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white grid min-h-screen place-content-center overflow-hidden"},g=h(()=>e("div",{class:"fixed left-0 right-0 spotlight z-10"},null,-1)),b={class:"max-w-520px text-center z-20"},_=["textContent"],w=["textContent"],y={class:"w-full flex items-center justify-center"},S={__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 o=t;return x({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}a{color:inherit;text-decoration:inherit}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}'}]}),(k,v)=>{const i=p;return n(),r("div",u,[g,e("div",b,[e("h1",{class:"text-8xl sm:text-10xl font-medium mb-8",textContent:s(t.statusCode)},null,8,_),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,w),e("div",y,[l(i,{to:"/",class:"gradient-border text-md sm:text-xl py-2 px-4 sm:py-3 sm:px-6 cursor-pointer"},{default:d(()=>[c(s(t.backHome),1)]),_:1})])])])}}},C=a(S,[["__scopeId","data-v-05a2b8a3"]]);export{C as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as i}from"./vue.f36acd1f.
|
|
1
|
+
import{u as i}from"./vue.f36acd1f.c7ad5a91.js";import{_ as a,o as r,c as n,a as e,t as s,p as l,f as d}from"./entry.c11b689f.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 i({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}'}]}),(u,b)=>(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=a(x,[["__scopeId","data-v-c967d9a9"]]);export{y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as o,r as u,g as f,h as d,j as v,k as l,l as i,m as h,n as m}from"./entry.
|
|
1
|
+
import{i as o,r as u,g as f,h as d,j as v,k as l,l as i,m as h,n as m}from"./entry.c11b689f.js";function U(t,a={}){const e=a.head||o();if(e)return e.ssr?e.push(t,a):p(e,t,a)}function p(t,a,e={}){const s=u(!1),n=u({});f(()=>{n.value=s.value?{}:h(a)});const r=t.push(n.value,e);return d(n,c=>{r.patch(c)}),m()&&(v(()=>{r.dispose()}),l(()=>{s.value=!0}),i(()=>{s.value=!1})),r}export{U as u};
|
package/dist/client/index.html
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
<head><meta charset="utf-8">
|
|
4
4
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
5
5
|
<link rel="stylesheet" href="/__nuxt-schema-org/_nuxt/entry.ebf51734.css">
|
|
6
|
-
<link rel="modulepreload" as="script" crossorigin href="/__nuxt-schema-org/_nuxt/entry.
|
|
6
|
+
<link rel="modulepreload" as="script" crossorigin href="/__nuxt-schema-org/_nuxt/entry.c11b689f.js">
|
|
7
7
|
<link rel="prefetch" as="style" href="/__nuxt-schema-org/_nuxt/error-404.b751fa02.css">
|
|
8
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-schema-org/_nuxt/error-404.
|
|
9
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-schema-org/_nuxt/vue.f36acd1f.
|
|
8
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-schema-org/_nuxt/error-404.1cce7bb5.js">
|
|
9
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-schema-org/_nuxt/vue.f36acd1f.c7ad5a91.js">
|
|
10
10
|
<link rel="prefetch" as="style" href="/__nuxt-schema-org/_nuxt/error-500.69009e70.css">
|
|
11
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-schema-org/_nuxt/error-500.
|
|
12
|
-
<script type="module" src="/__nuxt-schema-org/_nuxt/entry.
|
|
11
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-schema-org/_nuxt/error-500.b6dba74c.js">
|
|
12
|
+
<script type="module" src="/__nuxt-schema-org/_nuxt/entry.c11b689f.js" crossorigin></script><script>"use strict";(()=>{const a=window,e=document.documentElement,m=["dark","light"],c=window&&window.localStorage&&window.localStorage.getItem&&window.localStorage.getItem("nuxt-color-mode")||"system";let n=c==="system"?d():c;const l=e.getAttribute("data-color-mode-forced");l&&(n=l),i(n),a["__NUXT_COLOR_MODE__"]={preference:c,value:n,getColorScheme:d,addColorScheme:i,removeColorScheme:f};function i(o){const t=""+o+"",s="";e.classList?e.classList.add(t):e.className+=" "+t,s&&e.setAttribute("data-"+s,o)}function f(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 r(o){return a.matchMedia("(prefers-color-scheme"+o+")")}function d(){if(a.matchMedia&&r("").media!=="not all"){for(const o of m)if(r(":"+o).matches)return o}return"light"}})();
|
|
13
13
|
</script></head>
|
|
14
14
|
<body ><div id="__nuxt"></div><script type="application/json" id="__NUXT_DATA__" data-ssr="false">[{"_errors":1,"serverRendered":2,"data":3,"state":4},{},false,{},{}]</script>
|
|
15
15
|
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-schema-org",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body>
|
package/dist/module.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { NuxtModule } from '@nuxt/schema';
|
|
2
2
|
import { MetaInput } from '@unhead/schema-org';
|
|
3
|
+
import { ScriptBase, TagUserProperties } from '@unhead/schema';
|
|
3
4
|
|
|
4
5
|
interface ModuleOptions {
|
|
5
6
|
/**
|
|
@@ -20,6 +21,12 @@ interface ModuleOptions {
|
|
|
20
21
|
* @default `process.dev || !nuxt.options.ssr`
|
|
21
22
|
*/
|
|
22
23
|
reactive: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Attributes to apply to the script tag containing the LD+JSON Schema.org snippet.
|
|
26
|
+
*
|
|
27
|
+
* By default, will apply an `id` of `schema-org-graph`. Set to `false` to apply no attributes.
|
|
28
|
+
*/
|
|
29
|
+
scriptAttributes?: (ScriptBase & TagUserProperties) | false;
|
|
23
30
|
/**
|
|
24
31
|
* Enables debug logs.
|
|
25
32
|
*
|
package/dist/module.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { NuxtModule } from '@nuxt/schema';
|
|
2
2
|
import { MetaInput } from '@unhead/schema-org';
|
|
3
|
+
import { ScriptBase, TagUserProperties } from '@unhead/schema';
|
|
3
4
|
|
|
4
5
|
interface ModuleOptions {
|
|
5
6
|
/**
|
|
@@ -20,6 +21,12 @@ interface ModuleOptions {
|
|
|
20
21
|
* @default `process.dev || !nuxt.options.ssr`
|
|
21
22
|
*/
|
|
22
23
|
reactive: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Attributes to apply to the script tag containing the LD+JSON Schema.org snippet.
|
|
26
|
+
*
|
|
27
|
+
* By default, will apply an `id` of `schema-org-graph`. Set to `false` to apply no attributes.
|
|
28
|
+
*/
|
|
29
|
+
scriptAttributes?: (ScriptBase & TagUserProperties) | false;
|
|
23
30
|
/**
|
|
24
31
|
* Enables debug logs.
|
|
25
32
|
*
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { schemaOrgAutoImports, schemaOrgComponents } from '@unhead/schema-org/vu
|
|
|
3
3
|
import { installNuxtSiteConfig } from 'nuxt-site-config-kit';
|
|
4
4
|
import { existsSync } from 'node:fs';
|
|
5
5
|
|
|
6
|
-
const version = "3.1
|
|
6
|
+
const version = "3.2.1";
|
|
7
7
|
|
|
8
8
|
const DEVTOOLS_UI_ROUTE = "/__nuxt-schema-org";
|
|
9
9
|
const DEVTOOLS_UI_LOCAL_PORT = 3030;
|
|
@@ -73,11 +73,17 @@ const module = defineNuxtModule({
|
|
|
73
73
|
}
|
|
74
74
|
if (!nuxt.options.ssr && nuxt.options.dev)
|
|
75
75
|
logger.warn("You are using Schema.org with SSR disabled. This is not recommended, Google may not detect your Schema.org, and it adds extra page weight");
|
|
76
|
+
if (typeof config.scriptAttributes === "undefined") {
|
|
77
|
+
config.scriptAttributes = {
|
|
78
|
+
id: "schema-org-graph"
|
|
79
|
+
};
|
|
80
|
+
}
|
|
76
81
|
const { resolve } = createResolver(import.meta.url);
|
|
77
82
|
await installNuxtSiteConfig();
|
|
78
83
|
const runtimeConfig = {
|
|
79
84
|
reactive: config.reactive,
|
|
80
85
|
minify: config.minify,
|
|
86
|
+
scriptAttributes: config.scriptAttributes,
|
|
81
87
|
version
|
|
82
88
|
};
|
|
83
89
|
if (config.reactive)
|
package/dist/runtime/types.d.ts
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { useHead, useRuntimeConfig, useServerHead } from "#imports";
|
|
2
2
|
export function useSchemaOrg(input) {
|
|
3
|
+
const config = useRuntimeConfig()["nuxt-schema-org"] || useRuntimeConfig().public["nuxt-schema-org"];
|
|
3
4
|
const script = {
|
|
4
5
|
type: "application/ld+json",
|
|
5
6
|
key: "schema-org-graph",
|
|
6
|
-
nodes: input
|
|
7
|
+
nodes: input,
|
|
8
|
+
...config?.scriptAttributes || {}
|
|
7
9
|
};
|
|
8
10
|
if (import.meta.server) {
|
|
9
11
|
return useServerHead({
|
|
10
12
|
script: [script]
|
|
11
13
|
});
|
|
12
14
|
} else {
|
|
13
|
-
|
|
14
|
-
if (runtimeConfig?.reactive) {
|
|
15
|
+
if (config?.reactive) {
|
|
15
16
|
return useHead({
|
|
16
17
|
script: [script]
|
|
17
18
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-schema-org",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.1
|
|
4
|
+
"version": "3.2.1",
|
|
5
5
|
"packageManager": "pnpm@8.10.5",
|
|
6
6
|
"description": "Schema.org for Nuxt",
|
|
7
7
|
"author": "Harlan Wilton <harlan@harlanzw.com>",
|
|
@@ -35,31 +35,36 @@
|
|
|
35
35
|
"dist"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@nuxt/devtools-kit": "^1.0.
|
|
39
|
-
"@nuxt/devtools-ui-kit": "^1.0.
|
|
40
|
-
"@nuxt/kit": "^3.8.
|
|
41
|
-
"@unhead/schema-org": "^1.8.
|
|
42
|
-
"nuxt-site-config": "^1.
|
|
43
|
-
"nuxt-site-config-kit": "^1.
|
|
38
|
+
"@nuxt/devtools-kit": "^1.0.3",
|
|
39
|
+
"@nuxt/devtools-ui-kit": "^1.0.3",
|
|
40
|
+
"@nuxt/kit": "^3.8.2",
|
|
41
|
+
"@unhead/schema-org": "^1.8.5",
|
|
42
|
+
"nuxt-site-config": "^1.6.0",
|
|
43
|
+
"nuxt-site-config-kit": "^1.6.0",
|
|
44
44
|
"pathe": "^1.1.1",
|
|
45
45
|
"shiki-es": "^0.14.0",
|
|
46
46
|
"sirv": "^2.0.3"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@antfu/eslint-config": "^
|
|
49
|
+
"@antfu/eslint-config": "^2.0.0",
|
|
50
50
|
"@nuxt/module-builder": "^0.5.4",
|
|
51
|
-
"@nuxt/schema": "^3.8.
|
|
51
|
+
"@nuxt/schema": "^3.8.2",
|
|
52
52
|
"@nuxt/test-utils": "^3.8.1",
|
|
53
53
|
"@nuxt/ui": "^2.10.0",
|
|
54
54
|
"@nuxtjs/eslint-config-typescript": "^12.1.0",
|
|
55
55
|
"@nuxtjs/i18n": "^8.0.0-rc.5",
|
|
56
56
|
"bumpp": "^9.2.0",
|
|
57
57
|
"cheerio": "1.0.0-rc.12",
|
|
58
|
-
"eslint": "8.
|
|
59
|
-
"nuxt": "^3.8.
|
|
58
|
+
"eslint": "8.54.0",
|
|
59
|
+
"nuxt": "^3.8.2",
|
|
60
60
|
"nuxt-icon": "^0.6.6",
|
|
61
61
|
"vitest": "0.34.6"
|
|
62
62
|
},
|
|
63
|
+
"build": {
|
|
64
|
+
"externals": [
|
|
65
|
+
"@unhead/schema"
|
|
66
|
+
]
|
|
67
|
+
},
|
|
63
68
|
"scripts": {
|
|
64
69
|
"lint": "eslint . --fix",
|
|
65
70
|
"client:build": "nuxi generate client",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"id":"cbfb877b-1b53-4ae9-80d3-c0255a00236f","timestamp":1700052611503,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|