@vendure-io/docs-provider 0.10.0 → 0.10.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/browser.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./manifest-BkO3d77g.cjs"),a=require("./slug-utils-DUQgikEz.cjs");exports.BreadcrumbItemSchema=e.BreadcrumbItemSchema;exports.DocPageMetaSchema=e.DocPageMetaSchema;exports.DocPageSchema=e.DocPageSchema;exports.DocsPackageManifestInputSchema=e.DocsPackageManifestInputSchema;exports.DocsPackageManifestSchema=e.DocsPackageManifestSchema;exports.FlatNavigationNodeSchema=e.FlatNavigationNodeSchema;exports.GitHubConfigSchema=e.GitHubConfigSchema;exports.LoadedDocsPackageSchema=e.LoadedDocsPackageSchema;exports.ManifestValidationError=e.ManifestValidationError;exports.NavigationNodeInputSchema=e.NavigationNodeInputSchema;exports.NavigationNodeSchema=e.NavigationNodeSchema;exports.SearchConfigSchema=e.SearchConfigSchema;exports.VendureVersionSchema=e.VendureVersionSchema;exports.buildBreadcrumbs=e.buildBreadcrumbs;exports.findNavigationNode=e.findNavigationNode;exports.flattenNavigation=e.flattenNavigation;exports.getLeafNodes=e.getLeafNodes;exports.getNodesAtDepth=e.getNodesAtDepth;exports.getPrevNextNodes=e.getPrevNextNodes;exports.isNodeActive=e.isNodeActive;exports.validateManifest=e.validateManifest;exports.filterVisibleNavigation=a.filterVisibleNavigation;exports.getAllFilePaths=a.getAllFilePaths;exports.slugFromFilename=a.slugFromFilename;exports.titleFromFilename=a.titleFromFilename;exports.toSlug=a.toSlug;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./manifest-BTgLk3DA.cjs"),a=require("./slug-utils-DUQgikEz.cjs");exports.BreadcrumbItemSchema=e.BreadcrumbItemSchema;exports.DocPageMetaSchema=e.DocPageMetaSchema;exports.DocPageSchema=e.DocPageSchema;exports.DocsPackageManifestInputSchema=e.DocsPackageManifestInputSchema;exports.DocsPackageManifestSchema=e.DocsPackageManifestSchema;exports.FlatNavigationNodeSchema=e.FlatNavigationNodeSchema;exports.GitHubConfigSchema=e.GitHubConfigSchema;exports.LoadedDocsPackageSchema=e.LoadedDocsPackageSchema;exports.ManifestValidationError=e.ManifestValidationError;exports.NavigationNodeInputSchema=e.NavigationNodeInputSchema;exports.NavigationNodeSchema=e.NavigationNodeSchema;exports.SearchConfigSchema=e.SearchConfigSchema;exports.VendureVersionSchema=e.VendureVersionSchema;exports.buildBreadcrumbs=e.buildBreadcrumbs;exports.findNavigationNode=e.findNavigationNode;exports.flattenNavigation=e.flattenNavigation;exports.getLeafNodes=e.getLeafNodes;exports.getNodesAtDepth=e.getNodesAtDepth;exports.getPrevNextNodes=e.getPrevNextNodes;exports.isNodeActive=e.isNodeActive;exports.validateManifest=e.validateManifest;exports.filterVisibleNavigation=a.filterVisibleNavigation;exports.getAllFilePaths=a.getAllFilePaths;exports.slugFromFilename=a.slugFromFilename;exports.titleFromFilename=a.titleFromFilename;exports.toSlug=a.toSlug;
package/dist/browser.js CHANGED
@@ -1,4 +1,4 @@
1
- import { B as s, D as t, a as i, b as o, c, F as g, G as m, L as n, M as d, N as r, d as h, S as N, V as l, e as S, f, g as v, h as u, i as D, j as F, k as P, v as b } from "./manifest-DlSWyjsA.js";
1
+ import { B as s, D as t, a as i, b as o, c, F as g, G as m, L as n, M as d, N as r, d as h, S as N, V as l, e as S, f, g as v, h as u, i as D, j as F, k as P, v as b } from "./manifest-DGVvC75a.js";
2
2
  import { f as p, g as V, s as k, t as x, a as A } from "./slug-utils-DVKYe9h8.js";
3
3
  export {
4
4
  s as BreadcrumbItemSchema,
@@ -1,3 +1,3 @@
1
- "use strict";var m=Object.defineProperty;var u=(a,t,r)=>t in a?m(a,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[t]=r;var s=(a,t,r)=>u(a,typeof t!="symbol"?t+"":t,r);const i=require("gray-matter"),d=require("./manifest-BkO3d77g.cjs");class o extends Error{constructor(r,e,n){super(r);s(this,"filePath");s(this,"originalError");this.name="FrontmatterParseError",this.filePath=e,this.originalError=n}}function F(a,t){try{const{data:r,content:e}=i(a);return{meta:c(r,t),content:e.trim()}}catch(r){throw r instanceof o?r:new o(`Failed to parse frontmatter${t?` in ${t}`:""}`,t,r)}}function c(a,t){const r=d.DocPageMetaSchema.safeParse(a);if(!r.success){const e=r.error.issues.map(n=>` - ${n.path.join(".")}: ${n.message}`).join(`
1
+ "use strict";var m=Object.defineProperty;var u=(a,t,r)=>t in a?m(a,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[t]=r;var s=(a,t,r)=>u(a,typeof t!="symbol"?t+"":t,r);const i=require("gray-matter"),d=require("./manifest-BTgLk3DA.cjs");class o extends Error{constructor(r,e,n){super(r);s(this,"filePath");s(this,"originalError");this.name="FrontmatterParseError",this.filePath=e,this.originalError=n}}function F(a,t){try{const{data:r,content:e}=i(a);return{meta:c(r,t),content:e.trim()}}catch(r){throw r instanceof o?r:new o(`Failed to parse frontmatter${t?` in ${t}`:""}`,t,r)}}function c(a,t){const r=d.DocPageMetaSchema.safeParse(a);if(!r.success){const e=r.error.issues.map(n=>` - ${n.path.join(".")}: ${n.message}`).join(`
2
2
  `);throw new o(`Invalid frontmatter${t?` in ${t}`:""}:
3
3
  ${e}`,t,r.error)}return r.data}function h(a){return a.trimStart().startsWith("---")}function f(a){const{data:t}=i(a);return t}exports.FrontmatterParseError=o;exports.extractFrontmatterData=f;exports.hasFrontmatter=h;exports.parseFrontmatter=F;exports.validateFrontmatter=c;
@@ -2,7 +2,7 @@ var c = Object.defineProperty;
2
2
  var m = (a, t, r) => t in a ? c(a, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : a[t] = r;
3
3
  var o = (a, t, r) => m(a, typeof t != "symbol" ? t + "" : t, r);
4
4
  import i from "gray-matter";
5
- import { D as u } from "./manifest-DlSWyjsA.js";
5
+ import { D as u } from "./manifest-DGVvC75a.js";
6
6
  class s extends Error {
7
7
  constructor(r, e, n) {
8
8
  super(r);
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var _=Object.defineProperty;var z=(e,t,r)=>t in e?_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var y=(e,t,r)=>z(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./manifest-BkO3d77g.cjs"),F=require("./frontmatter-QFErVd9b.cjs"),u=require("./slug-utils-DUQgikEz.cjs"),w=require("fs"),S=require("path"),U=require("node:child_process"),H=require("node:util"),k=require("node:fs/promises"),x=require("node:path"),V=(e,t)=>e.order!==t.order?e.order-t.order:e.title.localeCompare(t.title);function J(e,t={}){const{extensions:r=[".mdx",".md"],filter:i,sort:n=V}=t,a=R(e,r);return(i?a.filter(i):a).sort(n).map(c=>({title:c.title,slug:c.slug,file:c.path}))}function K(e,t={}){return W(e,t,0)}function W(e,t,r){const{extensions:i=[".mdx",".md"],filter:n,sort:a=V,maxDepth:o=1/0,folderFilter:l}=t,c=w.readdirSync(e,{withFileTypes:!0}),d=[],m=R(e,i),p=(n?m.filter(n):m).sort(a);for(const h of p)d.push({title:h.title,slug:h.slug,file:h.path});if(r<o){const h=c.filter(g=>g.isDirectory());for(const g of h){if(l){const f=S.join(e,g.name);if(!l(g.name,f))continue}const v=S.join(e,g.name),N=W(v,t,r+1);if(N.length>0){const f=Q(v,i);d.push({title:(f==null?void 0:f.title)||u.titleFromFilename(g.name),slug:u.slugFromFilename(g.name),file:f==null?void 0:f.path,children:N.filter(b=>!(f&&b.file===f.path))})}}}return d.sort((h,g)=>{var j,C;const v=p.find(P=>P.slug===h.slug),N=p.find(P=>P.slug===g.slug);if(v&&N)return a(v,N);const f=!!h.file&&!((j=h.children)!=null&&j.length),b=!!g.file&&!((C=g.children)!=null&&C.length);return f!==b?f?-1:1:(h.title||"").localeCompare(g.title||"")})}function R(e,t){try{const r=w.readdirSync(e,{withFileTypes:!0}),i=[];for(const n of r){if(!n.isFile())continue;const a=t.find(d=>n.name.toLowerCase().endsWith(d));if(!a||n.name.slice(0,-a.length).toLowerCase()==="index")continue;const l=S.join(e,n.name),c=q(l,n.name,a);i.push(c)}return i}catch{return[]}}function q(e,t,r){let i={},n=u.titleFromFilename(t),a=1/0;try{const o=w.readFileSync(e,"utf-8");i=F.extractFrontmatterData(o),i.title&&typeof i.title=="string"&&(n=i.title),typeof i.order=="number"&&(a=i.order)}catch{}return{path:e,filename:t,extension:r,frontmatter:i,order:a,title:n,slug:u.slugFromFilename(t)}}function Q(e,t){for(const r of t){const i=S.join(e,`index${r}`);try{if(w.statSync(i).isFile())return q(i,`index${r}`,r)}catch{}}}class D extends Error{constructor(r,i,n,a){super(r);y(this,"nodePath");y(this,"filePath");y(this,"originalError");this.name="ManifestResolutionError",this.nodePath=i,this.filePath=n,this.originalError=a}}function X(e,t={}){const{strict:r=!0}=t,i=M(e.navigation,"",r);return{id:e.id,name:e.name,version:e.version,vendureVersion:e.vendureVersion,navigation:i,search:e.search,github:e.github,basePath:e.basePath}}function M(e,t,r){return e.map((i,n)=>Y(i,t,n,r))}function Y(e,t,r,i){const n=t?`${t}[${r}]`:`navigation[${r}]`;if(e.title&&e.slug)return{title:e.title,slug:e.slug,file:e.file,children:e.children?M(e.children,`${n}.children`,i):void 0,badge:e.badge,hidden:e.hidden};let a=e.title,o=e.slug;if(e.file&&(o||(o=u.slugFromFilename(e.file)),a||(a=Z(e.file,n,i))),!a){if(i)throw new D(`Navigation node at ${n} is missing title and has no file to derive it from`,n,e.file);a=o||`Unknown (${r})`}if(!o){if(i)throw new D(`Navigation node at ${n} is missing slug and has no file to derive it from`,n,e.file);o=a?u.slugFromFilename(a):`node-${r}`}return{title:a,slug:o,file:e.file,children:e.children?M(e.children,`${n}.children`,i):void 0,badge:e.badge,hidden:e.hidden}}function Z(e,t,r){try{const i=w.readFileSync(e,"utf-8"),n=F.extractFrontmatterData(i);return n.title&&typeof n.title=="string"?n.title:u.titleFromFilename(e)}catch(i){if(r)throw new D(`Failed to read file for title derivation at ${t}: ${e}`,t,e,i);return u.titleFromFilename(e)}}function ee(e){return A(e.navigation)}function A(e){for(const t of e)if(!t.title||!t.slug||t.children&&A(t.children))return!0;return!1}const B=H.promisify(U.exec);async function I(e=process.cwd()){try{return await B("git rev-parse --git-dir",{cwd:e}),!0}catch{return!1}}async function T(e,t={}){const r=t.cwd??process.cwd();try{const{stdout:i}=await B(`git log -1 --format=%cI -- "${e}"`,{cwd:r}),n=i.trim();return n||null}catch{return null}}async function O(e,t={}){const r=t.cwd??process.cwd(),i={},n=[];return await I(r)?(await Promise.all(e.map(async a=>{const o=await T(a,t);o?i[a]=o:n.push(a)})),{dates:i,skipped:n}):{dates:{},skipped:e}}async function te(e,t){const r=[];async function i(n){const a=await k.readdir(n,{withFileTypes:!0});for(const o of a){const l=x.join(n,o.name);o.isDirectory()?!o.name.startsWith(".")&&o.name!=="node_modules"&&await i(l):o.isFile()&&t.some(d=>o.name.endsWith(d))&&r.push(l)}}return await i(e),r}async function ie(e){const{docsDir:t,outputPath:r,extensions:i=[".mdx",".md"]}=e,n=e.gitCwd??x.join(t,"..");if(!await I(n))return console.warn("Warning: Not a git repository. Generating empty dates file."),await G(r),{filesWithDates:0,filesSkipped:0,outputPath:r};const a=await te(t,i);if(a.length===0)return console.warn(`Warning: No files found in ${t} with extensions ${i.join(", ")}`),await G(r),{filesWithDates:0,filesSkipped:0,outputPath:r};const o=a.map(m=>x.relative(n,m)),{dates:l,skipped:c}=await O(o,{cwd:n}),d=ne(l);return await k.writeFile(r,d,"utf-8"),{filesWithDates:Object.keys(l).length,filesSkipped:c.length,outputPath:r}}async function G(e){const t=`// dates.generated.ts (auto-generated, do not edit)
1
+ "use strict";var _=Object.defineProperty;var z=(e,t,r)=>t in e?_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var y=(e,t,r)=>z(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./manifest-BTgLk3DA.cjs"),F=require("./frontmatter-DJJguSGP.cjs"),u=require("./slug-utils-DUQgikEz.cjs"),w=require("fs"),S=require("path"),U=require("node:child_process"),H=require("node:util"),k=require("node:fs/promises"),x=require("node:path"),V=(e,t)=>e.order!==t.order?e.order-t.order:e.title.localeCompare(t.title);function J(e,t={}){const{extensions:r=[".mdx",".md"],filter:i,sort:n=V}=t,a=R(e,r);return(i?a.filter(i):a).sort(n).map(c=>({title:c.title,slug:c.slug,file:c.path}))}function K(e,t={}){return W(e,t,0)}function W(e,t,r){const{extensions:i=[".mdx",".md"],filter:n,sort:a=V,maxDepth:o=1/0,folderFilter:l}=t,c=w.readdirSync(e,{withFileTypes:!0}),d=[],m=R(e,i),p=(n?m.filter(n):m).sort(a);for(const h of p)d.push({title:h.title,slug:h.slug,file:h.path});if(r<o){const h=c.filter(g=>g.isDirectory());for(const g of h){if(l){const f=S.join(e,g.name);if(!l(g.name,f))continue}const v=S.join(e,g.name),N=W(v,t,r+1);if(N.length>0){const f=Q(v,i);d.push({title:(f==null?void 0:f.title)||u.titleFromFilename(g.name),slug:u.slugFromFilename(g.name),file:f==null?void 0:f.path,children:N.filter(b=>!(f&&b.file===f.path))})}}}return d.sort((h,g)=>{var j,C;const v=p.find(P=>P.slug===h.slug),N=p.find(P=>P.slug===g.slug);if(v&&N)return a(v,N);const f=!!h.file&&!((j=h.children)!=null&&j.length),b=!!g.file&&!((C=g.children)!=null&&C.length);return f!==b?f?-1:1:(h.title||"").localeCompare(g.title||"")})}function R(e,t){try{const r=w.readdirSync(e,{withFileTypes:!0}),i=[];for(const n of r){if(!n.isFile())continue;const a=t.find(d=>n.name.toLowerCase().endsWith(d));if(!a||n.name.slice(0,-a.length).toLowerCase()==="index")continue;const l=S.join(e,n.name),c=q(l,n.name,a);i.push(c)}return i}catch{return[]}}function q(e,t,r){let i={},n=u.titleFromFilename(t),a=1/0;try{const o=w.readFileSync(e,"utf-8");i=F.extractFrontmatterData(o),i.title&&typeof i.title=="string"&&(n=i.title),typeof i.order=="number"&&(a=i.order)}catch{}return{path:e,filename:t,extension:r,frontmatter:i,order:a,title:n,slug:u.slugFromFilename(t)}}function Q(e,t){for(const r of t){const i=S.join(e,`index${r}`);try{if(w.statSync(i).isFile())return q(i,`index${r}`,r)}catch{}}}class D extends Error{constructor(r,i,n,a){super(r);y(this,"nodePath");y(this,"filePath");y(this,"originalError");this.name="ManifestResolutionError",this.nodePath=i,this.filePath=n,this.originalError=a}}function X(e,t={}){const{strict:r=!0}=t,i=M(e.navigation,"",r);return{id:e.id,name:e.name,version:e.version,vendureVersion:e.vendureVersion,navigation:i,search:e.search,github:e.github,basePath:e.basePath}}function M(e,t,r){return e.map((i,n)=>Y(i,t,n,r))}function Y(e,t,r,i){const n=t?`${t}[${r}]`:`navigation[${r}]`;if(e.title&&e.slug)return{title:e.title,slug:e.slug,file:e.file,children:e.children?M(e.children,`${n}.children`,i):void 0,badge:e.badge,hidden:e.hidden};let a=e.title,o=e.slug;if(e.file&&(o||(o=u.slugFromFilename(e.file)),a||(a=Z(e.file,n,i))),!a){if(i)throw new D(`Navigation node at ${n} is missing title and has no file to derive it from`,n,e.file);a=o||`Unknown (${r})`}if(!o){if(i)throw new D(`Navigation node at ${n} is missing slug and has no file to derive it from`,n,e.file);o=a?u.slugFromFilename(a):`node-${r}`}return{title:a,slug:o,file:e.file,children:e.children?M(e.children,`${n}.children`,i):void 0,badge:e.badge,hidden:e.hidden}}function Z(e,t,r){try{const i=w.readFileSync(e,"utf-8"),n=F.extractFrontmatterData(i);return n.title&&typeof n.title=="string"?n.title:u.titleFromFilename(e)}catch(i){if(r)throw new D(`Failed to read file for title derivation at ${t}: ${e}`,t,e,i);return u.titleFromFilename(e)}}function ee(e){return A(e.navigation)}function A(e){for(const t of e)if(!t.title||!t.slug||t.children&&A(t.children))return!0;return!1}const B=H.promisify(U.exec);async function I(e=process.cwd()){try{return await B("git rev-parse --git-dir",{cwd:e}),!0}catch{return!1}}async function T(e,t={}){const r=t.cwd??process.cwd();try{const{stdout:i}=await B(`git log -1 --format=%cI -- "${e}"`,{cwd:r}),n=i.trim();return n||null}catch{return null}}async function O(e,t={}){const r=t.cwd??process.cwd(),i={},n=[];return await I(r)?(await Promise.all(e.map(async a=>{const o=await T(a,t);o?i[a]=o:n.push(a)})),{dates:i,skipped:n}):{dates:{},skipped:e}}async function te(e,t){const r=[];async function i(n){const a=await k.readdir(n,{withFileTypes:!0});for(const o of a){const l=x.join(n,o.name);o.isDirectory()?!o.name.startsWith(".")&&o.name!=="node_modules"&&await i(l):o.isFile()&&t.some(d=>o.name.endsWith(d))&&r.push(l)}}return await i(e),r}async function ie(e){const{docsDir:t,outputPath:r,extensions:i=[".mdx",".md"]}=e,n=e.gitCwd??x.join(t,"..");if(!await I(n))return console.warn("Warning: Not a git repository. Generating empty dates file."),await G(r),{filesWithDates:0,filesSkipped:0,outputPath:r};const a=await te(t,i);if(a.length===0)return console.warn(`Warning: No files found in ${t} with extensions ${i.join(", ")}`),await G(r),{filesWithDates:0,filesSkipped:0,outputPath:r};const o=a.map(m=>x.relative(n,m)),{dates:l,skipped:c}=await O(o,{cwd:n}),d=ne(l);return await k.writeFile(r,d,"utf-8"),{filesWithDates:Object.keys(l).length,filesSkipped:c.length,outputPath:r}}async function G(e){const t=`// dates.generated.ts (auto-generated, do not edit)
2
2
  // Generated at: ${new Date().toISOString()}
3
3
  // Warning: Git repository not available, no dates extracted
4
4
 
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  var A = Object.defineProperty;
2
2
  var U = (e, t, r) => t in e ? A(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
3
  var v = (e, t, r) => U(e, typeof t != "symbol" ? t + "" : t, r);
4
- import { B as ye, D as Ne, a as Se, b as $e, c as xe, F as be, G as De, L as Pe, M as Me, N as ke, d as Ee, S as Ie, V as We, e as je, f as Ce, g as Ge, h as Le, i as Ve, j as Re, k as Te, v as Be } from "./manifest-DlSWyjsA.js";
5
- import { e as I } from "./frontmatter-B5d9WZzh.js";
6
- import { F as ze, h as Ae, p as Ue, v as He } from "./frontmatter-B5d9WZzh.js";
4
+ import { B as ye, D as Ne, a as Se, b as $e, c as xe, F as be, G as De, L as Pe, M as Me, N as ke, d as Ee, S as Ie, V as We, e as je, f as Ce, g as Ge, h as Le, i as Ve, j as Re, k as Te, v as Be } from "./manifest-DGVvC75a.js";
5
+ import { e as I } from "./frontmatter-Dd7D5fcG.js";
6
+ import { F as ze, h as Ae, p as Ue, v as He } from "./frontmatter-Dd7D5fcG.js";
7
7
  import { s as F, t as w } from "./slug-utils-DVKYe9h8.js";
8
8
  import { f as qe, g as Je, a as Ke } from "./slug-utils-DVKYe9h8.js";
9
9
  import { readdirSync as W, readFileSync as j, statSync as H } from "fs";
package/dist/loader.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var f=Object.defineProperty;var g=(e,r,t)=>r in e?f(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;var i=(e,r,t)=>g(e,typeof r!="symbol"?r+"":r,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("fs/promises"),P=require("module"),m=require("./frontmatter-QFErVd9b.cjs"),p=require("./manifest-BkO3d77g.cjs");var c=typeof document<"u"?document.currentScript:null;class a extends Error{constructor(t,n){super(t);i(this,"packageName");this.name="DocsPackageLoadError",this.packageName=n}}async function $(e,r={}){try{const t=r.resolver?await r.resolver(e):u(e),n=await import(e);if(!n.manifest)throw new a(`Package "${e}" does not export a manifest`,e);return{manifest:p.validateManifest(n.manifest),basePath:t}}catch(t){throw t instanceof a?t:new a(`Failed to load docs package "${e}": ${t instanceof Error?t.message:String(t)}`,e)}}function u(e){try{return P.createRequire(typeof document>"u"?require("url").pathToFileURL(__filename).href:c&&c.tagName.toUpperCase()==="SCRIPT"&&c.src||new URL("loader.cjs",document.baseURI).href).resolve(`${e}/package.json`).replace(/\/package\.json$/,"")}catch{throw new a(`Cannot resolve package "${e}". Make sure it is installed.`,e)}}async function l(e,r){try{const t=`${e.basePath}/${r}`,n=await h.readFile(t,"utf-8"),{meta:o,content:s}=m.parseFrontmatter(n,r);return{meta:o,content:s,filePath:r}}catch(t){throw new a(`Failed to load doc page "${r}": ${t instanceof Error?t.message:String(t)}`,e.manifest.id)}}async function v(e,r){const t=d(e.manifest.navigation,r.split("/"));if(t!=null&&t.file)return l(e,t.file)}function d(e,r){if(r.length===0)return;const[t,...n]=r,o=e.find(s=>s.slug===t);if(o){if(n.length===0)return o;if(o.children)return d(o.children,n)}}function y(e,r){if(r.file)return`${e.basePath}/${r.file}`}function w(e){try{return u(e),!0}catch{return!1}}exports.DocsPackageLoadError=a;exports.isDocsPackageInstalled=w;exports.loadDocPage=l;exports.loadDocPageBySlug=v;exports.loadDocsPackage=$;exports.resolveFilePath=y;
1
+ "use strict";var f=Object.defineProperty;var g=(e,r,t)=>r in e?f(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;var i=(e,r,t)=>g(e,typeof r!="symbol"?r+"":r,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("fs/promises"),P=require("module"),m=require("./frontmatter-DJJguSGP.cjs"),p=require("./manifest-BTgLk3DA.cjs");var c=typeof document<"u"?document.currentScript:null;class a extends Error{constructor(t,n){super(t);i(this,"packageName");this.name="DocsPackageLoadError",this.packageName=n}}async function $(e,r={}){try{const t=r.resolver?await r.resolver(e):u(e),n=await import(e);if(!n.manifest)throw new a(`Package "${e}" does not export a manifest`,e);return{manifest:p.validateManifest(n.manifest),basePath:t}}catch(t){throw t instanceof a?t:new a(`Failed to load docs package "${e}": ${t instanceof Error?t.message:String(t)}`,e)}}function u(e){try{return P.createRequire(typeof document>"u"?require("url").pathToFileURL(__filename).href:c&&c.tagName.toUpperCase()==="SCRIPT"&&c.src||new URL("loader.cjs",document.baseURI).href).resolve(`${e}/package.json`).replace(/\/package\.json$/,"")}catch{throw new a(`Cannot resolve package "${e}". Make sure it is installed.`,e)}}async function l(e,r){try{const t=`${e.basePath}/${r}`,n=await h.readFile(t,"utf-8"),{meta:o,content:s}=m.parseFrontmatter(n,r);return{meta:o,content:s,filePath:r}}catch(t){throw new a(`Failed to load doc page "${r}": ${t instanceof Error?t.message:String(t)}`,e.manifest.id)}}async function v(e,r){const t=d(e.manifest.navigation,r.split("/"));if(t!=null&&t.file)return l(e,t.file)}function d(e,r){if(r.length===0)return;const[t,...n]=r,o=e.find(s=>s.slug===t);if(o){if(n.length===0)return o;if(o.children)return d(o.children,n)}}function y(e,r){if(r.file)return`${e.basePath}/${r.file}`}function w(e){try{return u(e),!0}catch{return!1}}exports.DocsPackageLoadError=a;exports.isDocsPackageInstalled=w;exports.loadDocPage=l;exports.loadDocPageBySlug=v;exports.loadDocsPackage=$;exports.resolveFilePath=y;
package/dist/loader.js CHANGED
@@ -3,8 +3,8 @@ var l = (t, e, r) => e in t ? u(t, e, { enumerable: !0, configurable: !0, writab
3
3
  var i = (t, e, r) => l(t, typeof e != "symbol" ? e + "" : e, r);
4
4
  import { readFile as d } from "fs/promises";
5
5
  import { createRequire as h } from "module";
6
- import { p as g } from "./frontmatter-B5d9WZzh.js";
7
- import { v as m } from "./manifest-DlSWyjsA.js";
6
+ import { p as g } from "./frontmatter-Dd7D5fcG.js";
7
+ import { v as m } from "./manifest-DGVvC75a.js";
8
8
  class a extends Error {
9
9
  constructor(r, n) {
10
10
  super(r);
@@ -0,0 +1 @@
1
+ "use strict";var D=Object.defineProperty;var M=(n,t,i)=>t in n?D(n,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[t]=i;var h=(n,t,i)=>M(n,typeof t!="symbol"?t+"":t,i);const e=require("zod"),d=e.z.enum(["v1","v2","v3"]),g=e.z.object({indexFields:e.z.array(e.z.enum(["title","description","content","keywords"])),boosts:e.z.record(e.z.string(),e.z.number()).optional()}),u=e.z.object({repository:e.z.string().regex(/^[^/]+\/[^/]+$/,'Repository must be in format "owner/repo"'),branch:e.z.string().optional(),docsPath:e.z.string().optional()}),l=e.z.lazy(()=>e.z.object({title:e.z.string().min(1,"Navigation title is required"),slug:e.z.string().min(1,"Navigation slug is required"),file:e.z.string().optional(),children:e.z.array(l).optional(),badge:e.z.string().optional(),hidden:e.z.boolean().optional(),lastModified:e.z.string().datetime({offset:!0}).optional()})),f=e.z.object({id:e.z.string().min(1,"Package ID is required"),name:e.z.string().min(1,"Package name is required"),version:e.z.string().regex(/^\d+\.\d+\.\d+/,"Version must be valid semver"),vendureVersion:d,navigation:e.z.array(l),search:g.optional(),github:u.optional(),basePath:e.z.string().optional()}),p=e.z.object({title:e.z.string().min(1,"Page title is required"),metaTitle:e.z.string().optional(),metaDescription:e.z.string().optional(),description:e.z.string().optional(),keywords:e.z.array(e.z.string()).optional(),sidebarLabel:e.z.string().optional(),hidden:e.z.boolean().optional(),order:e.z.number().int().optional(),lastModified:e.z.string().datetime({offset:!0}).optional()}),j=e.z.object({meta:p,content:e.z.string(),filePath:e.z.string()}),k=e.z.object({manifest:f,basePath:e.z.string()}),I=e.z.object({title:e.z.string(),slug:e.z.string(),path:e.z.string()}),V=e.z.object({title:e.z.string(),slug:e.z.string(),file:e.z.string().optional(),children:e.z.array(e.z.lazy(()=>l)).optional(),badge:e.z.string().optional(),hidden:e.z.boolean().optional(),lastModified:e.z.string().datetime({offset:!0}).optional(),path:e.z.string(),depth:e.z.number().int().min(0),parentPath:e.z.string().optional()}),z=e.z.lazy(()=>e.z.object({title:e.z.string().min(1).optional(),slug:e.z.string().min(1).optional(),file:e.z.string().optional(),children:e.z.array(z).optional(),badge:e.z.string().optional(),hidden:e.z.boolean().optional(),lastModified:e.z.string().datetime({offset:!0}).optional()})),x=e.z.object({id:e.z.string().min(1,"Package ID is required"),name:e.z.string().min(1,"Package name is required"),version:e.z.string().regex(/^\d+\.\d+\.\d+/,"Version must be valid semver"),vendureVersion:d,navigation:e.z.array(z),search:g.optional(),github:u.optional(),basePath:e.z.string().optional()});class b extends Error{constructor(i,o){super(i);h(this,"issues");this.name="ManifestValidationError",this.issues=o}}function q(n){const t=f.safeParse(n);if(!t.success){const i=t.error.issues.map(o=>`${o.path.join(".")}: ${o.message}`);throw new b("Invalid manifest",i)}return t.data}function B(n,t){const i=t.split("/").filter(Boolean);return v(n.navigation,i)}function v(n,t){if(t.length===0)return;const[i,...o]=t,a=n.find(r=>r.slug===i);if(a){if(o.length===0)return a;if(a.children)return v(a.children,o)}}function m(n){const t=[];return N(n.navigation,"",0,void 0,t),t}function N(n,t,i,o,a){for(const r of n){const s=t?`${t}/${r.slug}`:r.slug;a.push({...r,path:s,depth:i,parentPath:o}),r.children&&r.children.length>0&&N(r.children,s,i+1,s,a)}}function $(n,t){const i=t.split("/").filter(Boolean),o=[];let a=n.navigation,r="";for(const s of i){const c=a.find(y=>y.slug===s);if(!c)break;r=r?`${r}/${s}`:s,o.push({title:c.title,slug:c.slug,path:r,file:c.file}),a=c.children??[]}return o}function S(n){return m(n).filter(t=>t.file!==void 0)}function w(n,t){const i=S(n),o=i.findIndex(a=>a.path===t);return o===-1?{}:{prev:o>0?i[o-1]:void 0,next:o<i.length-1?i[o+1]:void 0}}function P(n,t){const i=t.split("/").filter(Boolean);if(i.length===0)return!1;if(n.slug===i[0]){if(i.length===1)return!0;if(n.children){const o=i.slice(1).join("/");return n.children.some(a=>P(a,o))}}return!1}function L(n,t){return m(n).filter(i=>i.depth===t)}exports.BreadcrumbItemSchema=I;exports.DocPageMetaSchema=p;exports.DocPageSchema=j;exports.DocsPackageManifestInputSchema=x;exports.DocsPackageManifestSchema=f;exports.FlatNavigationNodeSchema=V;exports.GitHubConfigSchema=u;exports.LoadedDocsPackageSchema=k;exports.ManifestValidationError=b;exports.NavigationNodeInputSchema=z;exports.NavigationNodeSchema=l;exports.SearchConfigSchema=g;exports.VendureVersionSchema=d;exports.buildBreadcrumbs=$;exports.findNavigationNode=B;exports.flattenNavigation=m;exports.getLeafNodes=S;exports.getNodesAtDepth=L;exports.getPrevNextNodes=w;exports.isNodeActive=P;exports.validateManifest=q;
@@ -19,7 +19,7 @@ const g = t.enum(["v1", "v2", "v3"]), u = t.object({
19
19
  hidden: t.boolean().optional(),
20
20
  lastModified: t.string().datetime({ offset: !0 }).optional()
21
21
  })
22
- ), h = t.object({
22
+ ), m = t.object({
23
23
  id: t.string().min(1, "Package ID is required"),
24
24
  name: t.string().min(1, "Package name is required"),
25
25
  version: t.string().regex(/^\d+\.\d+\.\d+/, "Version must be valid semver"),
@@ -30,6 +30,8 @@ const g = t.enum(["v1", "v2", "v3"]), u = t.object({
30
30
  basePath: t.string().optional()
31
31
  }), y = t.object({
32
32
  title: t.string().min(1, "Page title is required"),
33
+ metaTitle: t.string().optional(),
34
+ metaDescription: t.string().optional(),
33
35
  description: t.string().optional(),
34
36
  keywords: t.array(t.string()).optional(),
35
37
  sidebarLabel: t.string().optional(),
@@ -41,7 +43,7 @@ const g = t.enum(["v1", "v2", "v3"]), u = t.object({
41
43
  content: t.string(),
42
44
  filePath: t.string()
43
45
  }), I = t.object({
44
- manifest: h,
46
+ manifest: m,
45
47
  basePath: t.string()
46
48
  }), q = t.object({
47
49
  title: t.string(),
@@ -58,12 +60,12 @@ const g = t.enum(["v1", "v2", "v3"]), u = t.object({
58
60
  path: t.string(),
59
61
  depth: t.number().int().min(0),
60
62
  parentPath: t.string().optional()
61
- }), m = t.lazy(
63
+ }), p = t.lazy(
62
64
  () => t.object({
63
65
  title: t.string().min(1).optional(),
64
66
  slug: t.string().min(1).optional(),
65
67
  file: t.string().optional(),
66
- children: t.array(m).optional(),
68
+ children: t.array(p).optional(),
67
69
  badge: t.string().optional(),
68
70
  hidden: t.boolean().optional(),
69
71
  lastModified: t.string().datetime({ offset: !0 }).optional()
@@ -73,7 +75,7 @@ const g = t.enum(["v1", "v2", "v3"]), u = t.object({
73
75
  name: t.string().min(1, "Package name is required"),
74
76
  version: t.string().regex(/^\d+\.\d+\.\d+/, "Version must be valid semver"),
75
77
  vendureVersion: g,
76
- navigation: t.array(m),
78
+ navigation: t.array(p),
77
79
  search: u.optional(),
78
80
  github: f.optional(),
79
81
  basePath: t.string().optional()
@@ -86,7 +88,7 @@ class j extends Error {
86
88
  }
87
89
  }
88
90
  function w(i) {
89
- const e = h.safeParse(i);
91
+ const e = m.safeParse(i);
90
92
  if (!e.success) {
91
93
  const n = e.error.issues.map((o) => `${o.path.join(".")}: ${o.message}`);
92
94
  throw new j("Invalid manifest", n);
@@ -95,15 +97,15 @@ function w(i) {
95
97
  }
96
98
  function z(i, e) {
97
99
  const n = e.split("/").filter(Boolean);
98
- return p(i.navigation, n);
100
+ return h(i.navigation, n);
99
101
  }
100
- function p(i, e) {
102
+ function h(i, e) {
101
103
  if (e.length === 0) return;
102
104
  const [n, ...o] = e, a = i.find((s) => s.slug === n);
103
105
  if (a) {
104
106
  if (o.length === 0) return a;
105
107
  if (a.children)
106
- return p(a.children, o);
108
+ return h(a.children, o);
107
109
  }
108
110
  }
109
111
  function b(i) {
@@ -168,12 +170,12 @@ export {
168
170
  f as G,
169
171
  I as L,
170
172
  j as M,
171
- m as N,
173
+ p as N,
172
174
  u as S,
173
175
  g as V,
174
176
  V as a,
175
177
  $ as b,
176
- h as c,
178
+ m as c,
177
179
  c as d,
178
180
  L as e,
179
181
  z as f,
package/dist/schema.d.ts CHANGED
@@ -2,20 +2,23 @@ import { z } from 'zod';
2
2
  /**
3
3
  * Schema for supported Vendure versions
4
4
  */
5
- export declare const VendureVersionSchema: z.ZodEnum<["v1", "v2", "v3"]>;
5
+ export declare const VendureVersionSchema: z.ZodEnum<{
6
+ v1: "v1";
7
+ v2: "v2";
8
+ v3: "v3";
9
+ }>;
6
10
  /**
7
11
  * Schema for search configuration
8
12
  */
9
13
  export declare const SearchConfigSchema: z.ZodObject<{
10
- indexFields: z.ZodArray<z.ZodEnum<["title", "description", "content", "keywords"]>, "many">;
14
+ indexFields: z.ZodArray<z.ZodEnum<{
15
+ title: "title";
16
+ description: "description";
17
+ content: "content";
18
+ keywords: "keywords";
19
+ }>>;
11
20
  boosts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
12
- }, "strip", z.ZodTypeAny, {
13
- indexFields: ("title" | "description" | "content" | "keywords")[];
14
- boosts?: Record<string, number> | undefined;
15
- }, {
16
- indexFields: ("title" | "description" | "content" | "keywords")[];
17
- boosts?: Record<string, number> | undefined;
18
- }>;
21
+ }, z.core.$strip>;
19
22
  /**
20
23
  * Schema for GitHub repository configuration
21
24
  */
@@ -23,15 +26,7 @@ export declare const GitHubConfigSchema: z.ZodObject<{
23
26
  repository: z.ZodString;
24
27
  branch: z.ZodOptional<z.ZodString>;
25
28
  docsPath: z.ZodOptional<z.ZodString>;
26
- }, "strip", z.ZodTypeAny, {
27
- repository: string;
28
- branch?: string | undefined;
29
- docsPath?: string | undefined;
30
- }, {
31
- repository: string;
32
- branch?: string | undefined;
33
- docsPath?: string | undefined;
34
- }>;
29
+ }, z.core.$strip>;
35
30
  /**
36
31
  * Schema for navigation nodes (recursive)
37
32
  */
@@ -51,7 +46,11 @@ export declare const DocsPackageManifestSchema: z.ZodObject<{
51
46
  id: z.ZodString;
52
47
  name: z.ZodString;
53
48
  version: z.ZodString;
54
- vendureVersion: z.ZodEnum<["v1", "v2", "v3"]>;
49
+ vendureVersion: z.ZodEnum<{
50
+ v1: "v1";
51
+ v2: "v2";
52
+ v3: "v3";
53
+ }>;
55
54
  navigation: z.ZodArray<z.ZodType<{
56
55
  title: string;
57
56
  slug: string;
@@ -60,7 +59,7 @@ export declare const DocsPackageManifestSchema: z.ZodObject<{
60
59
  badge?: string;
61
60
  hidden?: boolean;
62
61
  lastModified?: string;
63
- }, z.ZodTypeDef, {
62
+ }, unknown, z.core.$ZodTypeInternals<{
64
63
  title: string;
65
64
  slug: string;
66
65
  file?: string;
@@ -68,164 +67,55 @@ export declare const DocsPackageManifestSchema: z.ZodObject<{
68
67
  badge?: string;
69
68
  hidden?: boolean;
70
69
  lastModified?: string;
71
- }>, "many">;
70
+ }, unknown>>>;
72
71
  search: z.ZodOptional<z.ZodObject<{
73
- indexFields: z.ZodArray<z.ZodEnum<["title", "description", "content", "keywords"]>, "many">;
72
+ indexFields: z.ZodArray<z.ZodEnum<{
73
+ title: "title";
74
+ description: "description";
75
+ content: "content";
76
+ keywords: "keywords";
77
+ }>>;
74
78
  boosts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
75
- }, "strip", z.ZodTypeAny, {
76
- indexFields: ("title" | "description" | "content" | "keywords")[];
77
- boosts?: Record<string, number> | undefined;
78
- }, {
79
- indexFields: ("title" | "description" | "content" | "keywords")[];
80
- boosts?: Record<string, number> | undefined;
81
- }>>;
79
+ }, z.core.$strip>>;
82
80
  github: z.ZodOptional<z.ZodObject<{
83
81
  repository: z.ZodString;
84
82
  branch: z.ZodOptional<z.ZodString>;
85
83
  docsPath: z.ZodOptional<z.ZodString>;
86
- }, "strip", z.ZodTypeAny, {
87
- repository: string;
88
- branch?: string | undefined;
89
- docsPath?: string | undefined;
90
- }, {
91
- repository: string;
92
- branch?: string | undefined;
93
- docsPath?: string | undefined;
94
- }>>;
84
+ }, z.core.$strip>>;
95
85
  basePath: z.ZodOptional<z.ZodString>;
96
- }, "strip", z.ZodTypeAny, {
97
- id: string;
98
- name: string;
99
- version: string;
100
- vendureVersion: "v1" | "v2" | "v3";
101
- navigation: {
102
- title: string;
103
- slug: string;
104
- file?: string;
105
- children?: unknown[];
106
- badge?: string;
107
- hidden?: boolean;
108
- lastModified?: string;
109
- }[];
110
- search?: {
111
- indexFields: ("title" | "description" | "content" | "keywords")[];
112
- boosts?: Record<string, number> | undefined;
113
- } | undefined;
114
- github?: {
115
- repository: string;
116
- branch?: string | undefined;
117
- docsPath?: string | undefined;
118
- } | undefined;
119
- basePath?: string | undefined;
120
- }, {
121
- id: string;
122
- name: string;
123
- version: string;
124
- vendureVersion: "v1" | "v2" | "v3";
125
- navigation: {
126
- title: string;
127
- slug: string;
128
- file?: string;
129
- children?: unknown[];
130
- badge?: string;
131
- hidden?: boolean;
132
- lastModified?: string;
133
- }[];
134
- search?: {
135
- indexFields: ("title" | "description" | "content" | "keywords")[];
136
- boosts?: Record<string, number> | undefined;
137
- } | undefined;
138
- github?: {
139
- repository: string;
140
- branch?: string | undefined;
141
- docsPath?: string | undefined;
142
- } | undefined;
143
- basePath?: string | undefined;
144
- }>;
86
+ }, z.core.$strip>;
145
87
  /**
146
88
  * Schema for documentation page frontmatter/metadata
147
89
  */
148
90
  export declare const DocPageMetaSchema: z.ZodObject<{
149
91
  title: z.ZodString;
92
+ metaTitle: z.ZodOptional<z.ZodString>;
93
+ metaDescription: z.ZodOptional<z.ZodString>;
150
94
  description: z.ZodOptional<z.ZodString>;
151
- keywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
95
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
152
96
  sidebarLabel: z.ZodOptional<z.ZodString>;
153
97
  hidden: z.ZodOptional<z.ZodBoolean>;
154
98
  order: z.ZodOptional<z.ZodNumber>;
155
99
  lastModified: z.ZodOptional<z.ZodString>;
156
- }, "strip", z.ZodTypeAny, {
157
- title: string;
158
- description?: string | undefined;
159
- keywords?: string[] | undefined;
160
- hidden?: boolean | undefined;
161
- lastModified?: string | undefined;
162
- sidebarLabel?: string | undefined;
163
- order?: number | undefined;
164
- }, {
165
- title: string;
166
- description?: string | undefined;
167
- keywords?: string[] | undefined;
168
- hidden?: boolean | undefined;
169
- lastModified?: string | undefined;
170
- sidebarLabel?: string | undefined;
171
- order?: number | undefined;
172
- }>;
100
+ }, z.core.$strip>;
173
101
  /**
174
102
  * Schema for a loaded documentation page
175
103
  */
176
104
  export declare const DocPageSchema: z.ZodObject<{
177
105
  meta: z.ZodObject<{
178
106
  title: z.ZodString;
107
+ metaTitle: z.ZodOptional<z.ZodString>;
108
+ metaDescription: z.ZodOptional<z.ZodString>;
179
109
  description: z.ZodOptional<z.ZodString>;
180
- keywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
110
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
181
111
  sidebarLabel: z.ZodOptional<z.ZodString>;
182
112
  hidden: z.ZodOptional<z.ZodBoolean>;
183
113
  order: z.ZodOptional<z.ZodNumber>;
184
114
  lastModified: z.ZodOptional<z.ZodString>;
185
- }, "strip", z.ZodTypeAny, {
186
- title: string;
187
- description?: string | undefined;
188
- keywords?: string[] | undefined;
189
- hidden?: boolean | undefined;
190
- lastModified?: string | undefined;
191
- sidebarLabel?: string | undefined;
192
- order?: number | undefined;
193
- }, {
194
- title: string;
195
- description?: string | undefined;
196
- keywords?: string[] | undefined;
197
- hidden?: boolean | undefined;
198
- lastModified?: string | undefined;
199
- sidebarLabel?: string | undefined;
200
- order?: number | undefined;
201
- }>;
115
+ }, z.core.$strip>;
202
116
  content: z.ZodString;
203
117
  filePath: z.ZodString;
204
- }, "strip", z.ZodTypeAny, {
205
- content: string;
206
- meta: {
207
- title: string;
208
- description?: string | undefined;
209
- keywords?: string[] | undefined;
210
- hidden?: boolean | undefined;
211
- lastModified?: string | undefined;
212
- sidebarLabel?: string | undefined;
213
- order?: number | undefined;
214
- };
215
- filePath: string;
216
- }, {
217
- content: string;
218
- meta: {
219
- title: string;
220
- description?: string | undefined;
221
- keywords?: string[] | undefined;
222
- hidden?: boolean | undefined;
223
- lastModified?: string | undefined;
224
- sidebarLabel?: string | undefined;
225
- order?: number | undefined;
226
- };
227
- filePath: string;
228
- }>;
118
+ }, z.core.$strip>;
229
119
  /**
230
120
  * Schema for loaded docs package result
231
121
  */
@@ -234,7 +124,11 @@ export declare const LoadedDocsPackageSchema: z.ZodObject<{
234
124
  id: z.ZodString;
235
125
  name: z.ZodString;
236
126
  version: z.ZodString;
237
- vendureVersion: z.ZodEnum<["v1", "v2", "v3"]>;
127
+ vendureVersion: z.ZodEnum<{
128
+ v1: "v1";
129
+ v2: "v2";
130
+ v3: "v3";
131
+ }>;
238
132
  navigation: z.ZodArray<z.ZodType<{
239
133
  title: string;
240
134
  slug: string;
@@ -243,7 +137,7 @@ export declare const LoadedDocsPackageSchema: z.ZodObject<{
243
137
  badge?: string;
244
138
  hidden?: boolean;
245
139
  lastModified?: string;
246
- }, z.ZodTypeDef, {
140
+ }, unknown, z.core.$ZodTypeInternals<{
247
141
  title: string;
248
142
  slug: string;
249
143
  file?: string;
@@ -251,136 +145,25 @@ export declare const LoadedDocsPackageSchema: z.ZodObject<{
251
145
  badge?: string;
252
146
  hidden?: boolean;
253
147
  lastModified?: string;
254
- }>, "many">;
148
+ }, unknown>>>;
255
149
  search: z.ZodOptional<z.ZodObject<{
256
- indexFields: z.ZodArray<z.ZodEnum<["title", "description", "content", "keywords"]>, "many">;
150
+ indexFields: z.ZodArray<z.ZodEnum<{
151
+ title: "title";
152
+ description: "description";
153
+ content: "content";
154
+ keywords: "keywords";
155
+ }>>;
257
156
  boosts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
258
- }, "strip", z.ZodTypeAny, {
259
- indexFields: ("title" | "description" | "content" | "keywords")[];
260
- boosts?: Record<string, number> | undefined;
261
- }, {
262
- indexFields: ("title" | "description" | "content" | "keywords")[];
263
- boosts?: Record<string, number> | undefined;
264
- }>>;
157
+ }, z.core.$strip>>;
265
158
  github: z.ZodOptional<z.ZodObject<{
266
159
  repository: z.ZodString;
267
160
  branch: z.ZodOptional<z.ZodString>;
268
161
  docsPath: z.ZodOptional<z.ZodString>;
269
- }, "strip", z.ZodTypeAny, {
270
- repository: string;
271
- branch?: string | undefined;
272
- docsPath?: string | undefined;
273
- }, {
274
- repository: string;
275
- branch?: string | undefined;
276
- docsPath?: string | undefined;
277
- }>>;
162
+ }, z.core.$strip>>;
278
163
  basePath: z.ZodOptional<z.ZodString>;
279
- }, "strip", z.ZodTypeAny, {
280
- id: string;
281
- name: string;
282
- version: string;
283
- vendureVersion: "v1" | "v2" | "v3";
284
- navigation: {
285
- title: string;
286
- slug: string;
287
- file?: string;
288
- children?: unknown[];
289
- badge?: string;
290
- hidden?: boolean;
291
- lastModified?: string;
292
- }[];
293
- search?: {
294
- indexFields: ("title" | "description" | "content" | "keywords")[];
295
- boosts?: Record<string, number> | undefined;
296
- } | undefined;
297
- github?: {
298
- repository: string;
299
- branch?: string | undefined;
300
- docsPath?: string | undefined;
301
- } | undefined;
302
- basePath?: string | undefined;
303
- }, {
304
- id: string;
305
- name: string;
306
- version: string;
307
- vendureVersion: "v1" | "v2" | "v3";
308
- navigation: {
309
- title: string;
310
- slug: string;
311
- file?: string;
312
- children?: unknown[];
313
- badge?: string;
314
- hidden?: boolean;
315
- lastModified?: string;
316
- }[];
317
- search?: {
318
- indexFields: ("title" | "description" | "content" | "keywords")[];
319
- boosts?: Record<string, number> | undefined;
320
- } | undefined;
321
- github?: {
322
- repository: string;
323
- branch?: string | undefined;
324
- docsPath?: string | undefined;
325
- } | undefined;
326
- basePath?: string | undefined;
327
- }>;
164
+ }, z.core.$strip>;
328
165
  basePath: z.ZodString;
329
- }, "strip", z.ZodTypeAny, {
330
- basePath: string;
331
- manifest: {
332
- id: string;
333
- name: string;
334
- version: string;
335
- vendureVersion: "v1" | "v2" | "v3";
336
- navigation: {
337
- title: string;
338
- slug: string;
339
- file?: string;
340
- children?: unknown[];
341
- badge?: string;
342
- hidden?: boolean;
343
- lastModified?: string;
344
- }[];
345
- search?: {
346
- indexFields: ("title" | "description" | "content" | "keywords")[];
347
- boosts?: Record<string, number> | undefined;
348
- } | undefined;
349
- github?: {
350
- repository: string;
351
- branch?: string | undefined;
352
- docsPath?: string | undefined;
353
- } | undefined;
354
- basePath?: string | undefined;
355
- };
356
- }, {
357
- basePath: string;
358
- manifest: {
359
- id: string;
360
- name: string;
361
- version: string;
362
- vendureVersion: "v1" | "v2" | "v3";
363
- navigation: {
364
- title: string;
365
- slug: string;
366
- file?: string;
367
- children?: unknown[];
368
- badge?: string;
369
- hidden?: boolean;
370
- lastModified?: string;
371
- }[];
372
- search?: {
373
- indexFields: ("title" | "description" | "content" | "keywords")[];
374
- boosts?: Record<string, number> | undefined;
375
- } | undefined;
376
- github?: {
377
- repository: string;
378
- branch?: string | undefined;
379
- docsPath?: string | undefined;
380
- } | undefined;
381
- basePath?: string | undefined;
382
- };
383
- }>;
166
+ }, z.core.$strip>;
384
167
  /**
385
168
  * Schema for breadcrumb items
386
169
  */
@@ -388,15 +171,7 @@ export declare const BreadcrumbItemSchema: z.ZodObject<{
388
171
  title: z.ZodString;
389
172
  slug: z.ZodString;
390
173
  path: z.ZodString;
391
- }, "strip", z.ZodTypeAny, {
392
- title: string;
393
- path: string;
394
- slug: string;
395
- }, {
396
- title: string;
397
- path: string;
398
- slug: string;
399
- }>;
174
+ }, z.core.$strip>;
400
175
  /**
401
176
  * Schema for flattened navigation nodes
402
177
  */
@@ -412,7 +187,7 @@ export declare const FlatNavigationNodeSchema: z.ZodObject<{
412
187
  badge?: string;
413
188
  hidden?: boolean;
414
189
  lastModified?: string;
415
- }, z.ZodTypeDef, {
190
+ }, unknown, z.core.$ZodTypeInternals<{
416
191
  title: string;
417
192
  slug: string;
418
193
  file?: string;
@@ -420,52 +195,14 @@ export declare const FlatNavigationNodeSchema: z.ZodObject<{
420
195
  badge?: string;
421
196
  hidden?: boolean;
422
197
  lastModified?: string;
423
- }>>, "many">>;
198
+ }, unknown>>>>>;
424
199
  badge: z.ZodOptional<z.ZodString>;
425
200
  hidden: z.ZodOptional<z.ZodBoolean>;
426
201
  lastModified: z.ZodOptional<z.ZodString>;
427
202
  path: z.ZodString;
428
203
  depth: z.ZodNumber;
429
204
  parentPath: z.ZodOptional<z.ZodString>;
430
- }, "strip", z.ZodTypeAny, {
431
- title: string;
432
- path: string;
433
- slug: string;
434
- depth: number;
435
- file?: string | undefined;
436
- children?: {
437
- title: string;
438
- slug: string;
439
- file?: string;
440
- children?: unknown[];
441
- badge?: string;
442
- hidden?: boolean;
443
- lastModified?: string;
444
- }[] | undefined;
445
- badge?: string | undefined;
446
- hidden?: boolean | undefined;
447
- lastModified?: string | undefined;
448
- parentPath?: string | undefined;
449
- }, {
450
- title: string;
451
- path: string;
452
- slug: string;
453
- depth: number;
454
- file?: string | undefined;
455
- children?: {
456
- title: string;
457
- slug: string;
458
- file?: string;
459
- children?: unknown[];
460
- badge?: string;
461
- hidden?: boolean;
462
- lastModified?: string;
463
- }[] | undefined;
464
- badge?: string | undefined;
465
- hidden?: boolean | undefined;
466
- lastModified?: string | undefined;
467
- parentPath?: string | undefined;
468
- }>;
205
+ }, z.core.$strip>;
469
206
  /**
470
207
  * Schema for navigation node input (with optional title/slug)
471
208
  */
@@ -485,7 +222,11 @@ export declare const DocsPackageManifestInputSchema: z.ZodObject<{
485
222
  id: z.ZodString;
486
223
  name: z.ZodString;
487
224
  version: z.ZodString;
488
- vendureVersion: z.ZodEnum<["v1", "v2", "v3"]>;
225
+ vendureVersion: z.ZodEnum<{
226
+ v1: "v1";
227
+ v2: "v2";
228
+ v3: "v3";
229
+ }>;
489
230
  navigation: z.ZodArray<z.ZodType<{
490
231
  title?: string;
491
232
  slug?: string;
@@ -494,7 +235,7 @@ export declare const DocsPackageManifestInputSchema: z.ZodObject<{
494
235
  badge?: string;
495
236
  hidden?: boolean;
496
237
  lastModified?: string;
497
- }, z.ZodTypeDef, {
238
+ }, unknown, z.core.$ZodTypeInternals<{
498
239
  title?: string;
499
240
  slug?: string;
500
241
  file?: string;
@@ -502,80 +243,23 @@ export declare const DocsPackageManifestInputSchema: z.ZodObject<{
502
243
  badge?: string;
503
244
  hidden?: boolean;
504
245
  lastModified?: string;
505
- }>, "many">;
246
+ }, unknown>>>;
506
247
  search: z.ZodOptional<z.ZodObject<{
507
- indexFields: z.ZodArray<z.ZodEnum<["title", "description", "content", "keywords"]>, "many">;
248
+ indexFields: z.ZodArray<z.ZodEnum<{
249
+ title: "title";
250
+ description: "description";
251
+ content: "content";
252
+ keywords: "keywords";
253
+ }>>;
508
254
  boosts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
509
- }, "strip", z.ZodTypeAny, {
510
- indexFields: ("title" | "description" | "content" | "keywords")[];
511
- boosts?: Record<string, number> | undefined;
512
- }, {
513
- indexFields: ("title" | "description" | "content" | "keywords")[];
514
- boosts?: Record<string, number> | undefined;
515
- }>>;
255
+ }, z.core.$strip>>;
516
256
  github: z.ZodOptional<z.ZodObject<{
517
257
  repository: z.ZodString;
518
258
  branch: z.ZodOptional<z.ZodString>;
519
259
  docsPath: z.ZodOptional<z.ZodString>;
520
- }, "strip", z.ZodTypeAny, {
521
- repository: string;
522
- branch?: string | undefined;
523
- docsPath?: string | undefined;
524
- }, {
525
- repository: string;
526
- branch?: string | undefined;
527
- docsPath?: string | undefined;
528
- }>>;
260
+ }, z.core.$strip>>;
529
261
  basePath: z.ZodOptional<z.ZodString>;
530
- }, "strip", z.ZodTypeAny, {
531
- id: string;
532
- name: string;
533
- version: string;
534
- vendureVersion: "v1" | "v2" | "v3";
535
- navigation: {
536
- title?: string;
537
- slug?: string;
538
- file?: string;
539
- children?: unknown[];
540
- badge?: string;
541
- hidden?: boolean;
542
- lastModified?: string;
543
- }[];
544
- search?: {
545
- indexFields: ("title" | "description" | "content" | "keywords")[];
546
- boosts?: Record<string, number> | undefined;
547
- } | undefined;
548
- github?: {
549
- repository: string;
550
- branch?: string | undefined;
551
- docsPath?: string | undefined;
552
- } | undefined;
553
- basePath?: string | undefined;
554
- }, {
555
- id: string;
556
- name: string;
557
- version: string;
558
- vendureVersion: "v1" | "v2" | "v3";
559
- navigation: {
560
- title?: string;
561
- slug?: string;
562
- file?: string;
563
- children?: unknown[];
564
- badge?: string;
565
- hidden?: boolean;
566
- lastModified?: string;
567
- }[];
568
- search?: {
569
- indexFields: ("title" | "description" | "content" | "keywords")[];
570
- boosts?: Record<string, number> | undefined;
571
- } | undefined;
572
- github?: {
573
- repository: string;
574
- branch?: string | undefined;
575
- docsPath?: string | undefined;
576
- } | undefined;
577
- basePath?: string | undefined;
578
- }>;
262
+ }, z.core.$strip>;
579
263
  export type VendureVersionInferred = z.infer<typeof VendureVersionSchema>;
580
264
  export type SearchConfigInferred = z.infer<typeof SearchConfigSchema>;
581
265
  export type GitHubConfigInferred = z.infer<typeof GitHubConfigSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;GAEG;AACH,eAAO,MAAM,oBAAoB,+BAA6B,CAAA;AAE9D;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;EAG7B,CAAA;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;EAI7B,CAAA;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,CAAC,CAAC,OAAO,CAAC;IAC3C,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAUA,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;;;eAtB7B,MAAM;cACP,MAAM;eACL,MAAM;mBACF,OAAO,EAAE;gBACZ,MAAM;iBACL,OAAO;uBACD,MAAM;;eANd,MAAM;cACP,MAAM;eACL,MAAM;mBACF,OAAO,EAAE;gBACZ,MAAM;iBACL,OAAO;uBACD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eANd,MAAM;cACP,MAAM;eACL,MAAM;mBACF,OAAO,EAAE;gBACZ,MAAM;iBACL,OAAO;uBACD,MAAM;;;;;;;;;;;;;;;;;;eANd,MAAM;cACP,MAAM;eACL,MAAM;mBACF,OAAO,EAAE;gBACZ,MAAM;iBACL,OAAO;uBACD,MAAM;;;;;;;;;;;;EAyBrB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,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AACzE,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA;AACjF,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;AACnF,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAA"}
package/dist/testing.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("@mdx-js/mdx"),C=require("rehype-slug"),M=require("remark-directive"),O=require("remark-gfm"),$=require("unist-util-visit"),_=require("fs/promises"),y=require("./manifest-BkO3d77g.cjs"),k=require("node:fs"),T=require("node:path"),w=require("./frontmatter-QFErVd9b.cjs"),L={info:"info",note:"note",tip:"tip",warning:"warning",caution:"caution",danger:"danger"},U={info:"Info",note:"Note",tip:"Tip",warning:"Warning",caution:"Caution",danger:"Danger"},V=()=>s=>{$.visit(s,"containerDirective",e=>{var u;const t=e.name.toLowerCase();if(!(t in L))return;const n=L[t];let r;if(e.children.length>0){const l=e.children[0];if(l.type==="paragraph"&&"data"in l&&((u=l.data)==null?void 0:u.directiveLabel)===!0){const c=[];for(const d of l.children)d.type==="text"&&c.push(d.value);c.length>0&&(r=c.join("")),e.children=e.children.slice(1)}}const a=r||U[t],i=e.data||(e.data={});i.hName="Callout",i.hProperties={type:n,title:a}})};function z(){return s=>{$.visit(s,"code",e=>{if(!e.meta)return;const t=e.meta.match(/(?:title|filename)=["']([^"']+)["']/);if(!t)return;const n=t[1];e.value.trim().startsWith("// filename:")||(e.value=`// filename: ${n}
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("@mdx-js/mdx"),C=require("rehype-slug"),M=require("remark-directive"),O=require("remark-gfm"),$=require("unist-util-visit"),_=require("fs/promises"),y=require("./manifest-BTgLk3DA.cjs"),k=require("node:fs"),T=require("node:path"),w=require("./frontmatter-DJJguSGP.cjs"),L={info:"info",note:"note",tip:"tip",warning:"warning",caution:"caution",danger:"danger"},U={info:"Info",note:"Note",tip:"Tip",warning:"Warning",caution:"Caution",danger:"Danger"},V=()=>s=>{$.visit(s,"containerDirective",e=>{var u;const t=e.name.toLowerCase();if(!(t in L))return;const n=L[t];let r;if(e.children.length>0){const l=e.children[0];if(l.type==="paragraph"&&"data"in l&&((u=l.data)==null?void 0:u.directiveLabel)===!0){const c=[];for(const d of l.children)d.type==="text"&&c.push(d.value);c.length>0&&(r=c.join("")),e.children=e.children.slice(1)}}const a=r||U[t],i=e.data||(e.data={});i.hName="Callout",i.hProperties={type:n,title:a}})};function z(){return s=>{$.visit(s,"code",e=>{if(!e.meta)return;const t=e.meta.match(/(?:title|filename)=["']([^"']+)["']/);if(!t)return;const n=t[1];e.value.trim().startsWith("// filename:")||(e.value=`// filename: ${n}
2
2
  ${e.value}`)})}}const G=()=>s=>{const e=[];$.visit(s,"html",(t,n,r)=>{n!==void 0&&r&&typeof t.value=="string"&&t.value.trim().startsWith("<!--")&&t.value.trim().endsWith("-->")&&e.push(n)});for(const t of e.reverse())s.children.splice(t,1)},B=["@theme/Tabs","@theme/TabItem"],W=()=>s=>{const e=[];$.visit(s,"mdxjsEsm",t=>{const n=t.value;B.some(a=>n.includes(`from '${a}'`)||n.includes(`from "${a}"`))&&e.push(t)});for(const t of e){const n=s.children.indexOf(t);n!==-1&&s.children.splice(n,1)}};function F(){return[O,M,V,z,W,G]}function E(){return[C]}async function A(s,e,t){var i,u,l,c;const n=performance.now(),r=(t==null?void 0:t.remarkPlugins)??F(),a=(t==null?void 0:t.rehypePlugins)??E();try{return await q.compile(s,{remarkPlugins:r,rehypePlugins:a,outputFormat:"function-body",development:!1}),{filePath:e,success:!0,compilationTime:performance.now()-n}}catch(d){const o=performance.now()-n;let h="Unknown compilation error",f,g;if(d instanceof Error){h=d.message;const m=d;if(m.line!==void 0?f=m.line:((u=(i=m.position)==null?void 0:i.start)==null?void 0:u.line)!==void 0&&(f=m.position.start.line),m.column!==void 0?g=m.column:((c=(l=m.position)==null?void 0:l.start)==null?void 0:c.column)!==void 0&&(g=m.position.start.column),f===void 0){const p=h.match(/\((\d+):(\d+)\)/);p&&(f=parseInt(p[1],10),g=parseInt(p[2],10))}}return{filePath:e,success:!1,error:h,line:f,column:g,compilationTime:o}}}async function j(s,e){const t=performance.now(),n=y.getLeafNodes(s),r=[];let a=0,i=0;for(let u=0;u<n.length;u++){const l=n[u];if(!l.file)continue;const c=l.file;try{const d=await _.readFile(c,"utf-8"),o=await A(d,l.file,{remarkPlugins:e==null?void 0:e.remarkPlugins,rehypePlugins:e==null?void 0:e.rehypePlugins});if(r.push(o),o.success?a++:i++,e!=null&&e.onProgress&&e.onProgress(u+1,n.length,o),e!=null&&e.failFast&&!o.success)break}catch(d){const o=d instanceof Error?d.message:"Unknown error reading file",h={filePath:l.file,success:!1,error:`Failed to read file: ${o}`,compilationTime:0};if(r.push(h),i++,e!=null&&e.onProgress&&e.onProgress(u+1,n.length,h),e!=null&&e.failFast)break}}return{packageId:s.id,totalFiles:r.length,passed:a,failed:i,results:r,totalTime:performance.now()-t}}const P=["warning","info","tip","note","caution","danger"],I=new RegExp(`^:::(${P.join("|")}) ([A-Z].*)$`);function S(s,e){const t=performance.now(),n=[],r=y.getLeafNodes(s);let a=0;for(const i of r){if(!i.file)continue;a++;const l=k.readFileSync(i.file,"utf-8").split(`
3
3
  `);for(let c=0;c<l.length;c++){const d=l[c],o=d.match(I);if(o){const[,h,f]=o,g={file:s.basePath?T.relative(s.basePath,i.file):i.file,absolutePath:i.file,line:c+1,column:1,content:d.trim(),admonitionType:h,label:f,suggestion:`:::${h}[${f}]`};if(n.push(g),e!=null&&e.onError&&e.onError(g),e!=null&&e.failFast&&n.length>0)return{packageId:s.id,filesScanned:a,errors:n,totalTime:performance.now()-t}}}}return{packageId:s.id,filesScanned:a,errors:n,totalTime:performance.now()-t}}function X(s){const e=[];if(e.push(""),e.push(`Admonition Syntax Report: ${s.packageId}`),e.push("=".repeat(50)),e.push(""),e.push(`Files scanned: ${s.filesScanned}`),e.push(`Errors found: ${s.errors.length}`),e.push(`Total time: ${s.totalTime.toFixed(2)}ms`),e.push(""),s.errors.length===0)return e.push("All admonitions use correct bracket syntax!"),e.push(""),e.join(`
4
4
  `);e.push("Errors:"),e.push("-".repeat(50)),e.push("");for(const t of s.errors)e.push(` ${t.file}:${t.line}`),e.push(` ${t.content}`),e.push(` Fix: ${t.suggestion}`),e.push("");return e.push("Admonitions with custom titles must use bracket syntax:"),e.push(" Before: :::warning Deprecated"),e.push(" After: :::warning[Deprecated]"),e.push(""),e.push("See: https://github.com/remarkjs/remark-directive"),e.push(""),e.join(`
package/dist/testing.js CHANGED
@@ -4,10 +4,10 @@ import E from "remark-directive";
4
4
  import j from "remark-gfm";
5
5
  import { visit as v } from "unist-util-visit";
6
6
  import { readFile as P } from "fs/promises";
7
- import { h as k } from "./manifest-DlSWyjsA.js";
7
+ import { h as k } from "./manifest-DGVvC75a.js";
8
8
  import { readFileSync as x } from "node:fs";
9
9
  import { relative as y } from "node:path";
10
- import { p as A, F as I } from "./frontmatter-B5d9WZzh.js";
10
+ import { p as A, F as I } from "./frontmatter-Dd7D5fcG.js";
11
11
  const T = {
12
12
  info: "info",
13
13
  note: "note",
package/dist/types.d.ts CHANGED
@@ -68,6 +68,10 @@ export interface DocsPackageManifest {
68
68
  export interface DocPageMeta {
69
69
  /** Page title */
70
70
  title: string;
71
+ /** Override title for HTML meta tags (SEO). Falls back to `title` if not set. */
72
+ metaTitle?: string;
73
+ /** Override description for HTML meta tags (SEO). Falls back to `description` if not set. */
74
+ metaDescription?: string;
71
75
  /** Page description for SEO and previews */
72
76
  description?: string;
73
77
  /** Keywords for search indexing */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"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+D;IAC/D,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,2EAA2E;IAC3E,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,gFAAgF;IAChF,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC,wEAAwE;IACxE,EAAE,EAAE,MAAM,CAAA;IACV,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,+BAA+B;IAC/B,OAAO,EAAE,MAAM,CAAA;IACf,iDAAiD;IACjD,cAAc,EAAE,cAAc,CAAA;IAC9B,sEAAsE;IACtE,UAAU,EAAE,mBAAmB,EAAE,CAAA;IACjC,0CAA0C;IAC1C,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,kFAAkF;IAClF,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB"}
@@ -25,6 +25,8 @@ Your content here...
25
25
  ```typescript
26
26
  interface DocPageMeta {
27
27
  title: string
28
+ metaTitle?: string
29
+ metaDescription?: string
28
30
  description?: string
29
31
  keywords?: string[]
30
32
  sidebarLabel?: string
@@ -41,10 +43,11 @@ interface DocPageMeta {
41
43
 
42
44
  The page title. This is used for:
43
45
 
44
- - The `<title>` HTML element
46
+ - The page `<h1>` heading
45
47
  - Navigation display (unless overridden by `sidebarLabel`)
46
48
  - Search indexing
47
- - Open Graph metadata
49
+ - The `<title>` HTML element (unless overridden by `metaTitle`)
50
+ - Open Graph metadata (unless overridden by `metaTitle`)
48
51
 
49
52
  ```yaml
50
53
  ---
@@ -56,6 +59,43 @@ title: Getting Started with My Plugin
56
59
 
57
60
  ## Optional Fields
58
61
 
62
+ ### metaTitle
63
+
64
+ **Type:** `string` (optional)
65
+
66
+ An override for the HTML `<title>` tag and Open Graph title. When set, this value is used for SEO metadata instead of `title`. The page `<h1>` heading still uses `title`.
67
+
68
+ This is useful when you want a longer, descriptive heading on the page but a shorter, keyword-rich title in search results.
69
+
70
+ ```yaml
71
+ ---
72
+ title: Comprehensive Guide to Building Custom Payment Provider Integrations
73
+ metaTitle: Custom Payment Providers
74
+ ---
75
+ ```
76
+
77
+ ### metaDescription
78
+
79
+ **Type:** `string` (optional)
80
+
81
+ An override for the HTML meta description and Open Graph description. When set, this value is used for SEO metadata instead of `description`.
82
+
83
+ This is useful when you want a different description optimized for search engine snippets vs. what appears on the page itself.
84
+
85
+ ```yaml
86
+ ---
87
+ title: Installation Guide
88
+ description: This guide walks you through every step of installing Vendure, from prerequisites to running your first server.
89
+ metaDescription: Install and configure Vendure in minutes. Covers prerequisites, setup, and first run.
90
+ ---
91
+ ```
92
+
93
+ **Best practices:**
94
+
95
+ - Keep meta descriptions between 120-160 characters for optimal search display
96
+ - Front-load important keywords
97
+ - Write as a compelling call-to-action for searchers
98
+
59
99
  ### description
60
100
 
61
101
  **Type:** `string` (optional)
@@ -178,7 +218,9 @@ order: 3
178
218
  ```yaml
179
219
  ---
180
220
  title: Building Custom Payment Providers
221
+ metaTitle: Custom Payment Providers
181
222
  description: A comprehensive guide to creating custom payment integrations for your Vendure storefront
223
+ metaDescription: Create custom Vendure payment integrations with Stripe, PayPal, and more.
182
224
  keywords:
183
225
  - payment
184
226
  - integration
@@ -380,6 +422,8 @@ import { z } from 'zod'
380
422
 
381
423
  const DocPageMetaSchema = z.object({
382
424
  title: z.string().min(1, 'Page title is required'),
425
+ metaTitle: z.string().optional(),
426
+ metaDescription: z.string().optional(),
383
427
  description: z.string().optional(),
384
428
  keywords: z.array(z.string()).optional(),
385
429
  sidebarLabel: z.string().optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vendure-io/docs-provider",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "description": "Contract types and utilities for Vendure documentation packages",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -69,7 +69,7 @@
69
69
  "remark-directive": "^4.0.0",
70
70
  "remark-gfm": "^4.0.1",
71
71
  "unist-util-visit": "^5.0.0",
72
- "zod": "^3.24.2"
72
+ "zod": "^4.0"
73
73
  },
74
74
  "devDependencies": {
75
75
  "@types/mdast": "^4.0.4",
@@ -1 +0,0 @@
1
- "use strict";var M=Object.defineProperty;var D=(n,t,i)=>t in n?M(n,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[t]=i;var m=(n,t,i)=>D(n,typeof t!="symbol"?t+"":t,i);const e=require("zod"),d=e.z.enum(["v1","v2","v3"]),g=e.z.object({indexFields:e.z.array(e.z.enum(["title","description","content","keywords"])),boosts:e.z.record(e.z.string(),e.z.number()).optional()}),u=e.z.object({repository:e.z.string().regex(/^[^/]+\/[^/]+$/,'Repository must be in format "owner/repo"'),branch:e.z.string().optional(),docsPath:e.z.string().optional()}),l=e.z.lazy(()=>e.z.object({title:e.z.string().min(1,"Navigation title is required"),slug:e.z.string().min(1,"Navigation slug is required"),file:e.z.string().optional(),children:e.z.array(l).optional(),badge:e.z.string().optional(),hidden:e.z.boolean().optional(),lastModified:e.z.string().datetime({offset:!0}).optional()})),f=e.z.object({id:e.z.string().min(1,"Package ID is required"),name:e.z.string().min(1,"Package name is required"),version:e.z.string().regex(/^\d+\.\d+\.\d+/,"Version must be valid semver"),vendureVersion:d,navigation:e.z.array(l),search:g.optional(),github:u.optional(),basePath:e.z.string().optional()}),p=e.z.object({title:e.z.string().min(1,"Page title is required"),description:e.z.string().optional(),keywords:e.z.array(e.z.string()).optional(),sidebarLabel:e.z.string().optional(),hidden:e.z.boolean().optional(),order:e.z.number().int().optional(),lastModified:e.z.string().datetime({offset:!0}).optional()}),j=e.z.object({meta:p,content:e.z.string(),filePath:e.z.string()}),k=e.z.object({manifest:f,basePath:e.z.string()}),I=e.z.object({title:e.z.string(),slug:e.z.string(),path:e.z.string()}),V=e.z.object({title:e.z.string(),slug:e.z.string(),file:e.z.string().optional(),children:e.z.array(e.z.lazy(()=>l)).optional(),badge:e.z.string().optional(),hidden:e.z.boolean().optional(),lastModified:e.z.string().datetime({offset:!0}).optional(),path:e.z.string(),depth:e.z.number().int().min(0),parentPath:e.z.string().optional()}),z=e.z.lazy(()=>e.z.object({title:e.z.string().min(1).optional(),slug:e.z.string().min(1).optional(),file:e.z.string().optional(),children:e.z.array(z).optional(),badge:e.z.string().optional(),hidden:e.z.boolean().optional(),lastModified:e.z.string().datetime({offset:!0}).optional()})),x=e.z.object({id:e.z.string().min(1,"Package ID is required"),name:e.z.string().min(1,"Package name is required"),version:e.z.string().regex(/^\d+\.\d+\.\d+/,"Version must be valid semver"),vendureVersion:d,navigation:e.z.array(z),search:g.optional(),github:u.optional(),basePath:e.z.string().optional()});class b extends Error{constructor(i,o){super(i);m(this,"issues");this.name="ManifestValidationError",this.issues=o}}function q(n){const t=f.safeParse(n);if(!t.success){const i=t.error.issues.map(o=>`${o.path.join(".")}: ${o.message}`);throw new b("Invalid manifest",i)}return t.data}function B(n,t){const i=t.split("/").filter(Boolean);return v(n.navigation,i)}function v(n,t){if(t.length===0)return;const[i,...o]=t,a=n.find(r=>r.slug===i);if(a){if(o.length===0)return a;if(a.children)return v(a.children,o)}}function h(n){const t=[];return N(n.navigation,"",0,void 0,t),t}function N(n,t,i,o,a){for(const r of n){const s=t?`${t}/${r.slug}`:r.slug;a.push({...r,path:s,depth:i,parentPath:o}),r.children&&r.children.length>0&&N(r.children,s,i+1,s,a)}}function $(n,t){const i=t.split("/").filter(Boolean),o=[];let a=n.navigation,r="";for(const s of i){const c=a.find(y=>y.slug===s);if(!c)break;r=r?`${r}/${s}`:s,o.push({title:c.title,slug:c.slug,path:r,file:c.file}),a=c.children??[]}return o}function S(n){return h(n).filter(t=>t.file!==void 0)}function w(n,t){const i=S(n),o=i.findIndex(a=>a.path===t);return o===-1?{}:{prev:o>0?i[o-1]:void 0,next:o<i.length-1?i[o+1]:void 0}}function P(n,t){const i=t.split("/").filter(Boolean);if(i.length===0)return!1;if(n.slug===i[0]){if(i.length===1)return!0;if(n.children){const o=i.slice(1).join("/");return n.children.some(a=>P(a,o))}}return!1}function L(n,t){return h(n).filter(i=>i.depth===t)}exports.BreadcrumbItemSchema=I;exports.DocPageMetaSchema=p;exports.DocPageSchema=j;exports.DocsPackageManifestInputSchema=x;exports.DocsPackageManifestSchema=f;exports.FlatNavigationNodeSchema=V;exports.GitHubConfigSchema=u;exports.LoadedDocsPackageSchema=k;exports.ManifestValidationError=b;exports.NavigationNodeInputSchema=z;exports.NavigationNodeSchema=l;exports.SearchConfigSchema=g;exports.VendureVersionSchema=d;exports.buildBreadcrumbs=$;exports.findNavigationNode=B;exports.flattenNavigation=h;exports.getLeafNodes=S;exports.getNodesAtDepth=L;exports.getPrevNextNodes=w;exports.isNodeActive=P;exports.validateManifest=q;