@blackwork/docs 0.4.2 → 0.6.0
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/README.md +55 -25
- package/dist/_virtual/_rolldown/runtime.cjs +1 -1
- package/dist/config/defaults.cjs +1 -1
- package/dist/config/defaults.mjs +1 -1
- package/dist/config/define-config.cjs +2 -2
- package/dist/config/define-config.mjs +2 -2
- package/dist/config/define-docs-config.cjs +1 -1
- package/dist/config/define-docs-config.mjs +1 -1
- package/dist/config/load-content-config.cjs +2 -2
- package/dist/config/load-content-config.mjs +2 -2
- package/dist/config/types.d.mts +34 -3
- package/dist/config/types.d.ts +34 -3
- package/dist/export/process-exported-docs.cjs +1 -1
- package/dist/export/process-exported-docs.mjs +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.mjs +2 -2
- package/dist/mdx/default-docs-components.cjs +3 -2
- package/dist/mdx/default-docs-components.mjs +3 -2
- package/dist/mdx/merge-docs-components.cjs +1 -1
- package/dist/mdx/merge-docs-components.mjs +1 -1
- package/dist/metadata/create-doc-metadata.cjs +1 -1
- package/dist/metadata/create-doc-metadata.mjs +1 -1
- package/dist/navigation/build-header-nav.cjs +9 -0
- package/dist/navigation/build-header-nav.d.mts +20 -0
- package/dist/navigation/build-header-nav.d.ts +20 -0
- package/dist/navigation/build-header-nav.mjs +9 -0
- package/dist/navigation/build-locale-links.cjs +1 -1
- package/dist/navigation/build-locale-links.mjs +1 -1
- package/dist/navigation/build-pager.cjs +1 -1
- package/dist/navigation/build-pager.mjs +1 -1
- package/dist/navigation/build-sidebar.cjs +1 -1
- package/dist/navigation/build-sidebar.mjs +1 -1
- package/dist/navigation/resolve-sidebar.cjs +1 -1
- package/dist/navigation/resolve-sidebar.mjs +1 -1
- package/dist/next/context.cjs +1 -1
- package/dist/next/context.mjs +1 -1
- package/dist/next/document-lang-sync.cjs +1 -1
- package/dist/next/document-lang-sync.mjs +1 -1
- package/dist/next/load-doc-content.cjs +2 -2
- package/dist/next/load-doc-content.mjs +2 -2
- package/dist/next/load-generated-manifest.cjs +1 -1
- package/dist/next/load-generated-manifest.mjs +1 -1
- package/dist/next/metadata.cjs +1 -1
- package/dist/next/metadata.mjs +1 -1
- package/dist/next/page.cjs +1 -1
- package/dist/next/page.mjs +1 -1
- package/dist/next/render-route.cjs +2 -2
- package/dist/next/render-route.mjs +2 -2
- package/dist/next/resolve-document-lang.cjs +1 -1
- package/dist/next/resolve-document-lang.mjs +1 -1
- package/dist/next/root-layout.cjs +2 -2
- package/dist/next/root-layout.d.mts +2 -2
- package/dist/next/root-layout.d.ts +2 -2
- package/dist/next/root-layout.mjs +2 -2
- package/dist/next-plugin/generate.cjs +1 -1
- package/dist/next-plugin/generate.mjs +1 -1
- package/dist/next.cjs +1 -1
- package/dist/next.mjs +1 -1
- package/dist/routing/build-static-params.cjs +1 -1
- package/dist/routing/build-static-params.mjs +1 -1
- package/dist/routing/resolve-docs-route.cjs +1 -1
- package/dist/routing/resolve-docs-route.mjs +1 -1
- package/dist/runtime.cjs +1 -1
- package/dist/runtime.mjs +1 -1
- package/dist/source/build-docs-source.cjs +1 -1
- package/dist/source/build-docs-source.mjs +1 -1
- package/dist/source/collect-docs-manifest.cjs +1 -1
- package/dist/source/collect-docs-manifest.mjs +1 -1
- package/dist/source/create-docs-source-from-manifest.cjs +1 -1
- package/dist/source/create-docs-source-from-manifest.mjs +1 -1
- package/dist/source/create-docs-source.cjs +1 -1
- package/dist/source/create-docs-source.mjs +1 -1
- package/dist/tailwind.css +2 -0
- package/dist/theme/components/content-layout.cjs +1 -1
- package/dist/theme/components/content-layout.mjs +1 -1
- package/dist/theme/components/content-shell.cjs +2 -2
- package/dist/theme/components/content-shell.mjs +2 -2
- package/dist/theme/components/docs-rail-scroll-state.cjs +1 -1
- package/dist/theme/components/docs-rail-scroll-state.mjs +1 -1
- package/dist/theme/components/docs-rail-scroll.cjs +1 -1
- package/dist/theme/components/docs-rail-scroll.mjs +1 -1
- package/dist/theme/components/docs-scroll-reset.cjs +1 -1
- package/dist/theme/components/docs-scroll-reset.mjs +1 -1
- package/dist/theme/components/docs-scroll-to-top.cjs +2 -2
- package/dist/theme/components/docs-scroll-to-top.mjs +2 -2
- package/dist/theme/components/docs-shell.cjs +2 -2
- package/dist/theme/components/docs-shell.mjs +2 -2
- package/dist/theme/components/docs-toc-geometry.cjs +1 -1
- package/dist/theme/components/docs-toc-geometry.mjs +1 -1
- package/dist/theme/components/docs-toc.cjs +2 -2
- package/dist/theme/components/docs-toc.mjs +2 -2
- package/dist/theme/components/floating-actions.cjs +1 -1
- package/dist/theme/components/floating-actions.mjs +1 -1
- package/dist/theme/components/footer.cjs +2 -2
- package/dist/theme/components/footer.mjs +2 -2
- package/dist/theme/components/header.cjs +2 -2
- package/dist/theme/components/header.d.mts +5 -0
- package/dist/theme/components/header.d.ts +5 -0
- package/dist/theme/components/header.mjs +2 -2
- package/dist/theme/components/home-shell.cjs +2 -2
- package/dist/theme/components/home-shell.mjs +2 -2
- package/dist/theme/components/link.cjs +1 -1
- package/dist/theme/components/link.mjs +1 -1
- package/dist/theme/components/shell-shared.cjs +2 -2
- package/dist/theme/components/shell-shared.d.mts +22 -0
- package/dist/theme/components/shell-shared.d.ts +22 -0
- package/dist/theme/components/shell-shared.mjs +2 -2
- package/dist/theme/create-home-data.cjs +2 -2
- package/dist/theme/create-home-data.mjs +2 -2
- package/dist/theme/slots.cjs +2 -2
- package/dist/theme/slots.mjs +2 -2
- package/dist/theme/types.d.mts +33 -9
- package/dist/theme/types.d.ts +33 -9
- package/dist/theme.cjs +2 -2
- package/dist/theme.d.mts +3 -3
- package/dist/theme.d.ts +3 -3
- package/dist/theme.mjs +2 -2
- package/package.json +15 -9
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* name: @blackwork/docs
|
|
3
|
-
* version: v0.
|
|
3
|
+
* version: v0.6.0
|
|
4
4
|
* description: Next-first documentation framework for Blackwork projects.
|
|
5
5
|
* author: chengpeiquan <chengpeiquan@chengpeiquan.com>
|
|
6
6
|
* homepage: https://chengpeiquan.com
|
|
7
7
|
* license: MIT
|
|
8
8
|
*/
|
|
9
|
-
const e={layout:`docs`,sidebar:`auto`},t=e=>e.site.title||`Documentation`,n=(e,t)=>e.site.description||t.description||`Browse the available documentation.`,r=(e,t,n)=>typeof e==`string`?e:e?.[t]??n,i=(e,t)=>({collapseLabel:r(e.theme.toc?.collapseLabel,t,`Collapse outline`),expandLabel:r(e.theme.toc?.expandLabel,t,`Expand outline`),openLabel:r(e.theme.toc?.openLabel,t,`Open outline`),title:r(e.theme.toc?.title,t,`On This Page`)}),a=(e,t
|
|
9
|
+
const e={layout:`docs`,sidebar:`auto`},t=e=>e.site.title||`Documentation`,n=(e,t)=>e.site.description||t.description||`Browse the available documentation.`,r=(e,t,n)=>typeof e==`string`?e:e?.[t]??n,i=(e,t)=>({collapseLabel:r(e.theme.toc?.collapseLabel,t,`Collapse outline`),expandLabel:r(e.theme.toc?.expandLabel,t,`Expand outline`),openLabel:r(e.theme.toc?.openLabel,t,`Open outline`),title:r(e.theme.toc?.title,t,`On This Page`)}),a=(e,t)=>({changeLanguage:r(e.theme.labels?.changeLanguage,t,`Change language`),documentationPages:r(e.theme.labels?.documentationPages,t,`Documentation pages`),documentPager:r(e.theme.labels?.documentPager,t,`Document pager`),next:r(e.theme.labels?.next,t,`Next`),openSectionNavigation:r(e.theme.labels?.openSectionNavigation,t,`Open section navigation`),openSiteNavigation:r(e.theme.labels?.openSiteNavigation,t,`Open site navigation`),previous:r(e.theme.labels?.previous,t,`Previous`),primaryNavigation:r(e.theme.labels?.primaryNavigation,t,`Primary navigation`),scrollToTop:r(e.theme.labels?.scrollToTop,t,`Scroll to top`),sections:r(e.theme.labels?.sections,t,`Sections`),toggleTheme:r(e.theme.labels?.toggleTheme,t,`Toggle theme`)}),o=new Set([`github`,`x`,`twitter`,`instagram`,`zhihu`,`rss`]),s=(e,t)=>Array.isArray(e.theme.socialLinks)?e.theme.socialLinks.flatMap(e=>!e||typeof e.link!=`string`||e.link.length===0||!o.has(e.type)?[]:[{type:e.type,link:e.link,...e.label?{label:r(e.label,t,``)}:{},...e.ariaLabel?{ariaLabel:r(e.ariaLabel,t,``)}:{}}]):[],c=e=>e.flatMap(e=>{let t=e.children?c(e.children):[];return(e.depth??0)<=1?t:[{depth:e.depth??2,id:e.id,title:e.value??e.id},...t]}),l=e=>e.slugSegments[0],u=(e,t)=>{let n=l(t);return n?e.filter(e=>e.slugSegments[0]===n):e},d=(t,n)=>{let r=l(n);if(!r)return e;let i=t.content?.sections?.[r],a=i?.layout??e.layout;return{layout:a,sidebar:i?.sidebar??(a===`content`?!1:e.sidebar)}},f=e=>e?.trim(),p=e=>{let t=e.split(/[-_]/u).map(e=>f(e)).filter(e=>!!e);return{language:t[0]?.toLowerCase(),region:t.slice(1).find(e=>/^(?:[A-Za-z]{2}|\d{3})$/u.test(e))?.toUpperCase()}},m=({kind:e=`docs`,layout:t,locale:n,section:r})=>{let{language:i,region:a}=p(n);return{kind:e,locale:n,...i?{language:i}:{},...a?{region:a}:{},...r?{section:r}:{},...t?{layout:t}:{}}},h=e=>Object.entries(e).map(([e,t])=>`${e}:${t}`);export{d as getEntrySectionConfig,l as getEntrySectionKey,n as getFooterDescription,h as getPagefindFilterEntries,m as getPagefindFilters,u as getSectionEntries,t as getSiteTitle,a as getThemeLabels,s as getThemeSocialLinks,c as getTocHeadings,i as getTocLabels};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* name: @blackwork/docs
|
|
3
|
-
* version: v0.
|
|
3
|
+
* version: v0.6.0
|
|
4
4
|
* description: Next-first documentation framework for Blackwork projects.
|
|
5
5
|
* author: chengpeiquan <chengpeiquan@chengpeiquan.com>
|
|
6
6
|
* homepage: https://chengpeiquan.com
|
|
7
7
|
* license: MIT
|
|
8
8
|
*/
|
|
9
|
-
const e=require(`../config/define-config.cjs`),t=e=>typeof e==`object`&&!!e,n=e=>typeof e==`string`&&e.trim()||void 0,r=e=>{if(e!==!1)return n(e)},i=e=>{let t=e.search(/[?#]/u);return t<0?{pathname:e,suffix:``}:{pathname:e.slice(0,t),suffix:e.slice(t)}},
|
|
9
|
+
const e=require(`../config/define-config.cjs`),t=e=>typeof e==`object`&&!!e,n=e=>typeof e==`string`&&e.trim()||void 0,r=(e,r)=>t(e)?n(e[r]):n(e),i=(e,t)=>{if(e!==!1)return r(e,t)},a=(e,i)=>{if(e!==!1){if(t(e)&&`src`in e){let t=r(e.alt,i),a=n(e.href),o=n(e.src);return!t||!o?void 0:{alt:t,...a?{href:a}:{},src:o}}return r(e,i)}},o=e=>{let t=e.search(/[?#]/u);return t<0?{pathname:e,suffix:``}:{pathname:e.slice(0,t),suffix:e.slice(t)}},s=(e,t)=>{let[,n]=e.match(/^\/([^/]+)(?:\/|$)/u)??[];return t.getLocaleCodes().find(e=>e===n)},c=(e,t,n)=>{if(!e.startsWith(`/`)||e.startsWith(`//`))return e;let{pathname:r,suffix:i}=o(e);if(s(r,n))return e;let a=n.getDefaultLocale(),c=a?n.getEntries(a).find(e=>e.href===r):n.getLocaleCodes().flatMap(e=>n.getEntries(e)).find(e=>e.href===r);if(!c)return e;let l=n.getEntry(t,c.slugSegments);return l?`${l.href}${i}`:e},l=(e,i,a)=>{if(!t(e))return;let o=n(e.href),s=r(e.label,i);if(!(!o||!s))return{href:c(o,i,a),label:s}},u=(e,i,a)=>{if(e===!1)return[];if(Array.isArray(e))return e.flatMap(e=>{if(!t(e))return[];let o=n(e.href),s=r(e.title,i),l=r(e.description,i);return o&&s&&l?[{href:c(o,i,a),title:s,description:l}]:[]})},d=e=>e.site.title||`Documentation`,f=(e,t,n)=>{let r=n.getEntries(t),i=n.getCanonicalHref(t,[]),a=n.getEntry(t,[])??r[0],o=r.find(e=>e.href!==a?.href),s=e.site.description||a?.description||`Browse the available documentation.`;return{mode:`auto`,badge:`${r.length} page${r.length===1?``:`s`}`,eyebrow:a?.title||`Documentation`,title:d(e),description:s,homeHref:i,primaryAction:{href:a?.href??i,label:a?`Read ${a.title}`:`Browse docs`},...o?{secondaryAction:{href:o.href,label:o.title}}:{},highlights:[]}},p=e=>[e.badge,e.eyebrow,e.title,e.description,e.primaryAction,e.secondaryAction,e.highlights].some(e=>e!==void 0);function m({config:t,locale:n,source:o}){let s=e.defineConfig(t),c=f(s,n,o);return p(s.home)?{...c,mode:`configured`,badge:a(s.home.badge,n),eyebrow:i(s.home.eyebrow,n),title:r(s.home.title,n)||c.title,description:r(s.home.description,n)||c.description,primaryAction:l(s.home.primaryAction,n,o)||c.primaryAction,secondaryAction:l(s.home.secondaryAction,n,o)||c.secondaryAction,highlights:u(s.home.highlights,n,o)??[]}:c}exports.createHomeData=m;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* name: @blackwork/docs
|
|
3
|
-
* version: v0.
|
|
3
|
+
* version: v0.6.0
|
|
4
4
|
* description: Next-first documentation framework for Blackwork projects.
|
|
5
5
|
* author: chengpeiquan <chengpeiquan@chengpeiquan.com>
|
|
6
6
|
* homepage: https://chengpeiquan.com
|
|
7
7
|
* license: MIT
|
|
8
8
|
*/
|
|
9
|
-
import{defineConfig as e}from"../config/define-config.mjs";const t=e=>typeof e==`object`&&!!e,n=e=>typeof e==`string`&&e.trim()||void 0,r=e=>{if(e!==!1)return n(e)},i=e=>{let t=e.search(/[?#]/u);return t<0?{pathname:e,suffix:``}:{pathname:e.slice(0,t),suffix:e.slice(t)}},
|
|
9
|
+
import{defineConfig as e}from"../config/define-config.mjs";const t=e=>typeof e==`object`&&!!e,n=e=>typeof e==`string`&&e.trim()||void 0,r=(e,r)=>t(e)?n(e[r]):n(e),i=(e,t)=>{if(e!==!1)return r(e,t)},a=(e,i)=>{if(e!==!1){if(t(e)&&`src`in e){let t=r(e.alt,i),a=n(e.href),o=n(e.src);return!t||!o?void 0:{alt:t,...a?{href:a}:{},src:o}}return r(e,i)}},o=e=>{let t=e.search(/[?#]/u);return t<0?{pathname:e,suffix:``}:{pathname:e.slice(0,t),suffix:e.slice(t)}},s=(e,t)=>{let[,n]=e.match(/^\/([^/]+)(?:\/|$)/u)??[];return t.getLocaleCodes().find(e=>e===n)},c=(e,t,n)=>{if(!e.startsWith(`/`)||e.startsWith(`//`))return e;let{pathname:r,suffix:i}=o(e);if(s(r,n))return e;let a=n.getDefaultLocale(),c=a?n.getEntries(a).find(e=>e.href===r):n.getLocaleCodes().flatMap(e=>n.getEntries(e)).find(e=>e.href===r);if(!c)return e;let l=n.getEntry(t,c.slugSegments);return l?`${l.href}${i}`:e},l=(e,i,a)=>{if(!t(e))return;let o=n(e.href),s=r(e.label,i);if(!(!o||!s))return{href:c(o,i,a),label:s}},u=(e,i,a)=>{if(e===!1)return[];if(Array.isArray(e))return e.flatMap(e=>{if(!t(e))return[];let o=n(e.href),s=r(e.title,i),l=r(e.description,i);return o&&s&&l?[{href:c(o,i,a),title:s,description:l}]:[]})},d=e=>e.site.title||`Documentation`,f=(e,t,n)=>{let r=n.getEntries(t),i=n.getCanonicalHref(t,[]),a=n.getEntry(t,[])??r[0],o=r.find(e=>e.href!==a?.href),s=e.site.description||a?.description||`Browse the available documentation.`;return{mode:`auto`,badge:`${r.length} page${r.length===1?``:`s`}`,eyebrow:a?.title||`Documentation`,title:d(e),description:s,homeHref:i,primaryAction:{href:a?.href??i,label:a?`Read ${a.title}`:`Browse docs`},...o?{secondaryAction:{href:o.href,label:o.title}}:{},highlights:[]}},p=e=>[e.badge,e.eyebrow,e.title,e.description,e.primaryAction,e.secondaryAction,e.highlights].some(e=>e!==void 0);function m({config:t,locale:n,source:o}){let s=e(t),c=f(s,n,o);return p(s.home)?{...c,mode:`configured`,badge:a(s.home.badge,n),eyebrow:i(s.home.eyebrow,n),title:r(s.home.title,n)||c.title,description:r(s.home.description,n)||c.description,primaryAction:l(s.home.primaryAction,n,o)||c.primaryAction,secondaryAction:l(s.home.secondaryAction,n,o)||c.secondaryAction,highlights:u(s.home.highlights,n,o)??[]}:c}export{m as createHomeData};
|
package/dist/theme/slots.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* name: @blackwork/docs
|
|
3
|
-
* version: v0.
|
|
3
|
+
* version: v0.6.0
|
|
4
4
|
* description: Next-first documentation framework for Blackwork projects.
|
|
5
5
|
* author: chengpeiquan <chengpeiquan@chengpeiquan.com>
|
|
6
6
|
* homepage: https://chengpeiquan.com
|
|
7
7
|
* license: MIT
|
|
8
8
|
*/
|
|
9
|
-
const e=e=>typeof e==`object`&&!!e,t=e=>typeof e==`function`,n=e=>typeof e==`function`,r=e=>typeof e==`function`,i=e=>typeof e==`function`;function a(a){return e(a)?{...r(a.contentHeaderMeta)?{contentHeaderMeta:a.contentHeaderMeta}:{},...t(a.footer)?{footer:a.footer}:{},...n(a.headerActions)?{headerActions:a.headerActions}:{},...i(a.link)?{link:a.link}:{}}:{}}exports.resolveThemeSlots=a;
|
|
9
|
+
const e=e=>typeof e==`object`&&!!e,t=e=>typeof e==`function`,n=e=>typeof e==`function`,r=e=>typeof e==`function`,i=e=>typeof e==`function`;function a(a){return e(a)?{...typeof a.homePreview==`function`?{homePreview:a.homePreview}:{},...r(a.contentHeaderMeta)?{contentHeaderMeta:a.contentHeaderMeta}:{},...t(a.footer)?{footer:a.footer}:{},...n(a.headerActions)?{headerActions:a.headerActions}:{},...i(a.link)?{link:a.link}:{}}:{}}exports.resolveThemeSlots=a;
|
package/dist/theme/slots.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* name: @blackwork/docs
|
|
3
|
-
* version: v0.
|
|
3
|
+
* version: v0.6.0
|
|
4
4
|
* description: Next-first documentation framework for Blackwork projects.
|
|
5
5
|
* author: chengpeiquan <chengpeiquan@chengpeiquan.com>
|
|
6
6
|
* homepage: https://chengpeiquan.com
|
|
7
7
|
* license: MIT
|
|
8
8
|
*/
|
|
9
|
-
const e=e=>typeof e==`object`&&!!e,t=e=>typeof e==`function`,n=e=>typeof e==`function`,r=e=>typeof e==`function`,i=e=>typeof e==`function`;function a(a){return e(a)?{...r(a.contentHeaderMeta)?{contentHeaderMeta:a.contentHeaderMeta}:{},...t(a.footer)?{footer:a.footer}:{},...n(a.headerActions)?{headerActions:a.headerActions}:{},...i(a.link)?{link:a.link}:{}}:{}}export{a as resolveThemeSlots};
|
|
9
|
+
const e=e=>typeof e==`object`&&!!e,t=e=>typeof e==`function`,n=e=>typeof e==`function`,r=e=>typeof e==`function`,i=e=>typeof e==`function`;function a(a){return e(a)?{...typeof a.homePreview==`function`?{homePreview:a.homePreview}:{},...r(a.contentHeaderMeta)?{contentHeaderMeta:a.contentHeaderMeta}:{},...t(a.footer)?{footer:a.footer}:{},...n(a.headerActions)?{headerActions:a.headerActions}:{},...i(a.link)?{link:a.link}:{}}:{}}export{a as resolveThemeSlots};
|
package/dist/theme/types.d.mts
CHANGED
|
@@ -37,7 +37,11 @@ interface DocsThemeHeaderActionsProps {
|
|
|
37
37
|
interface DocsThemeContentHeaderMetaProps {
|
|
38
38
|
entry: DocEntry;
|
|
39
39
|
}
|
|
40
|
+
interface DocsThemeHomePreviewProps {
|
|
41
|
+
locale: string;
|
|
42
|
+
}
|
|
40
43
|
interface DocsThemeSlots {
|
|
44
|
+
homePreview?: ComponentType<DocsThemeHomePreviewProps>;
|
|
41
45
|
contentHeaderMeta?: ComponentType<DocsThemeContentHeaderMetaProps>;
|
|
42
46
|
footer?: ComponentType<DocsThemeFooterSlotProps>;
|
|
43
47
|
headerActions?: ComponentType<DocsThemeHeaderActionsProps>;
|
|
@@ -52,8 +56,13 @@ interface DocsThemeHomeHighlight {
|
|
|
52
56
|
title: string;
|
|
53
57
|
description: string;
|
|
54
58
|
}
|
|
59
|
+
interface DocsThemeHomeBadgeImage {
|
|
60
|
+
alt: string;
|
|
61
|
+
href?: string;
|
|
62
|
+
src: string;
|
|
63
|
+
}
|
|
55
64
|
interface DocsThemeHomeData {
|
|
56
|
-
badge?: string;
|
|
65
|
+
badge?: string | DocsThemeHomeBadgeImage;
|
|
57
66
|
description: string;
|
|
58
67
|
eyebrow?: string;
|
|
59
68
|
highlights: DocsThemeHomeHighlight[];
|
|
@@ -63,15 +72,30 @@ interface DocsThemeHomeData {
|
|
|
63
72
|
secondaryAction?: DocsThemeHomeAction;
|
|
64
73
|
title: string;
|
|
65
74
|
}
|
|
75
|
+
type DocsThemeLocalizedText = string | Record<string, string>;
|
|
76
|
+
interface DocsHomeBadgeImageConfig {
|
|
77
|
+
alt: DocsThemeLocalizedText;
|
|
78
|
+
href?: string;
|
|
79
|
+
src: string;
|
|
80
|
+
}
|
|
81
|
+
interface DocsHomeActionConfig {
|
|
82
|
+
href: string;
|
|
83
|
+
label: DocsThemeLocalizedText;
|
|
84
|
+
}
|
|
85
|
+
interface DocsHomeHighlightConfig {
|
|
86
|
+
href: string;
|
|
87
|
+
title: DocsThemeLocalizedText;
|
|
88
|
+
description: DocsThemeLocalizedText;
|
|
89
|
+
}
|
|
66
90
|
interface DocsHomeConfig {
|
|
67
|
-
badge?:
|
|
68
|
-
eyebrow?:
|
|
69
|
-
title?:
|
|
70
|
-
description?:
|
|
71
|
-
primaryAction?:
|
|
72
|
-
secondaryAction?:
|
|
73
|
-
highlights?:
|
|
91
|
+
badge?: DocsHomeBadgeImageConfig | DocsThemeLocalizedText | false;
|
|
92
|
+
eyebrow?: DocsThemeLocalizedText | false;
|
|
93
|
+
title?: DocsThemeLocalizedText;
|
|
94
|
+
description?: DocsThemeLocalizedText;
|
|
95
|
+
primaryAction?: DocsHomeActionConfig;
|
|
96
|
+
secondaryAction?: DocsHomeActionConfig;
|
|
97
|
+
highlights?: DocsHomeHighlightConfig[] | false;
|
|
74
98
|
}
|
|
75
99
|
type DocsSlotsConfig = DocsThemeSlots;
|
|
76
100
|
//#endregion
|
|
77
|
-
export { DocsHomeConfig, DocsSlotsConfig, DocsThemeContentHeaderMetaProps, DocsThemeFooterSlotProps, DocsThemeHeaderActionsProps, DocsThemeHomeAction, DocsThemeHomeData, DocsThemeHomeHighlight, DocsThemeLinkComponent, DocsThemeLinkProps, DocsThemeLocaleLink, DocsThemeNavItem, DocsThemeSlots };
|
|
101
|
+
export { DocsHomeConfig, DocsSlotsConfig, DocsThemeContentHeaderMetaProps, DocsThemeFooterSlotProps, DocsThemeHeaderActionsProps, DocsThemeHomeAction, DocsThemeHomeData, DocsThemeHomeHighlight, DocsThemeHomePreviewProps, DocsThemeLinkComponent, DocsThemeLinkProps, DocsThemeLocaleLink, DocsThemeLocalizedText, DocsThemeNavItem, DocsThemeSlots };
|
package/dist/theme/types.d.ts
CHANGED
|
@@ -37,7 +37,11 @@ interface DocsThemeHeaderActionsProps {
|
|
|
37
37
|
interface DocsThemeContentHeaderMetaProps {
|
|
38
38
|
entry: DocEntry;
|
|
39
39
|
}
|
|
40
|
+
interface DocsThemeHomePreviewProps {
|
|
41
|
+
locale: string;
|
|
42
|
+
}
|
|
40
43
|
interface DocsThemeSlots {
|
|
44
|
+
homePreview?: ComponentType<DocsThemeHomePreviewProps>;
|
|
41
45
|
contentHeaderMeta?: ComponentType<DocsThemeContentHeaderMetaProps>;
|
|
42
46
|
footer?: ComponentType<DocsThemeFooterSlotProps>;
|
|
43
47
|
headerActions?: ComponentType<DocsThemeHeaderActionsProps>;
|
|
@@ -52,8 +56,13 @@ interface DocsThemeHomeHighlight {
|
|
|
52
56
|
title: string;
|
|
53
57
|
description: string;
|
|
54
58
|
}
|
|
59
|
+
interface DocsThemeHomeBadgeImage {
|
|
60
|
+
alt: string;
|
|
61
|
+
href?: string;
|
|
62
|
+
src: string;
|
|
63
|
+
}
|
|
55
64
|
interface DocsThemeHomeData {
|
|
56
|
-
badge?: string;
|
|
65
|
+
badge?: string | DocsThemeHomeBadgeImage;
|
|
57
66
|
description: string;
|
|
58
67
|
eyebrow?: string;
|
|
59
68
|
highlights: DocsThemeHomeHighlight[];
|
|
@@ -63,15 +72,30 @@ interface DocsThemeHomeData {
|
|
|
63
72
|
secondaryAction?: DocsThemeHomeAction;
|
|
64
73
|
title: string;
|
|
65
74
|
}
|
|
75
|
+
type DocsThemeLocalizedText = string | Record<string, string>;
|
|
76
|
+
interface DocsHomeBadgeImageConfig {
|
|
77
|
+
alt: DocsThemeLocalizedText;
|
|
78
|
+
href?: string;
|
|
79
|
+
src: string;
|
|
80
|
+
}
|
|
81
|
+
interface DocsHomeActionConfig {
|
|
82
|
+
href: string;
|
|
83
|
+
label: DocsThemeLocalizedText;
|
|
84
|
+
}
|
|
85
|
+
interface DocsHomeHighlightConfig {
|
|
86
|
+
href: string;
|
|
87
|
+
title: DocsThemeLocalizedText;
|
|
88
|
+
description: DocsThemeLocalizedText;
|
|
89
|
+
}
|
|
66
90
|
interface DocsHomeConfig {
|
|
67
|
-
badge?:
|
|
68
|
-
eyebrow?:
|
|
69
|
-
title?:
|
|
70
|
-
description?:
|
|
71
|
-
primaryAction?:
|
|
72
|
-
secondaryAction?:
|
|
73
|
-
highlights?:
|
|
91
|
+
badge?: DocsHomeBadgeImageConfig | DocsThemeLocalizedText | false;
|
|
92
|
+
eyebrow?: DocsThemeLocalizedText | false;
|
|
93
|
+
title?: DocsThemeLocalizedText;
|
|
94
|
+
description?: DocsThemeLocalizedText;
|
|
95
|
+
primaryAction?: DocsHomeActionConfig;
|
|
96
|
+
secondaryAction?: DocsHomeActionConfig;
|
|
97
|
+
highlights?: DocsHomeHighlightConfig[] | false;
|
|
74
98
|
}
|
|
75
99
|
type DocsSlotsConfig = DocsThemeSlots;
|
|
76
100
|
//#endregion
|
|
77
|
-
export { DocsHomeConfig, DocsSlotsConfig, DocsThemeContentHeaderMetaProps, DocsThemeFooterSlotProps, DocsThemeHeaderActionsProps, DocsThemeHomeAction, DocsThemeHomeData, DocsThemeHomeHighlight, DocsThemeLinkComponent, DocsThemeLinkProps, DocsThemeLocaleLink, DocsThemeNavItem, DocsThemeSlots };
|
|
101
|
+
export { DocsHomeConfig, DocsSlotsConfig, DocsThemeContentHeaderMetaProps, DocsThemeFooterSlotProps, DocsThemeHeaderActionsProps, DocsThemeHomeAction, DocsThemeHomeData, DocsThemeHomeHighlight, DocsThemeHomePreviewProps, DocsThemeLinkComponent, DocsThemeLinkProps, DocsThemeLocaleLink, DocsThemeLocalizedText, DocsThemeNavItem, DocsThemeSlots };
|
package/dist/theme.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* name: @blackwork/docs
|
|
3
|
-
* version: v0.
|
|
3
|
+
* version: v0.6.0
|
|
4
4
|
* description: Next-first documentation framework for Blackwork projects.
|
|
5
5
|
* author: chengpeiquan <chengpeiquan@chengpeiquan.com>
|
|
6
6
|
* homepage: https://chengpeiquan.com
|
|
7
7
|
* license: MIT
|
|
8
8
|
*/
|
|
9
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./theme/components/
|
|
9
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./theme/components/footer.cjs`),t=require(`./theme/components/link.cjs`),n=require(`./theme/components/header.cjs`),r=require(`./theme/components/docs-toc.cjs`),i=require(`./theme/components/content-layout.cjs`),a=require(`./theme/slots.cjs`),o=require(`./theme/components/content-shell.cjs`),s=require(`./theme/components/docs-shell.cjs`),c=require(`./theme/create-home-data.cjs`),l=require(`./theme/components/home-shell.cjs`);exports.DefaultContentLayout=i.DefaultContentLayout,exports.DefaultContentShell=o.DefaultContentShell,exports.DefaultDocsFooter=e.DefaultDocsFooter,exports.DefaultDocsHeader=n.DefaultDocsHeader,exports.DefaultDocsLink=t.DefaultDocsLink,exports.DefaultDocsShell=s.DefaultDocsShell,exports.DefaultDocsToc=r.DefaultDocsToc,exports.DefaultHomeShell=l.DefaultHomeShell,exports.MobileDocsToc=r.MobileDocsToc,exports.createHomeData=c.createHomeData,exports.resolveThemeSlots=a.resolveThemeSlots;
|
package/dist/theme.d.mts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
|
|
2
|
-
import { DocsHomeConfig, DocsSlotsConfig, DocsThemeContentHeaderMetaProps, DocsThemeFooterSlotProps, DocsThemeHeaderActionsProps, DocsThemeHomeAction, DocsThemeHomeData, DocsThemeHomeHighlight, DocsThemeLinkComponent, DocsThemeLinkProps, DocsThemeLocaleLink, DocsThemeNavItem, DocsThemeSlots } from "./theme/types.mjs";
|
|
2
|
+
import { DocsHomeConfig, DocsSlotsConfig, DocsThemeContentHeaderMetaProps, DocsThemeFooterSlotProps, DocsThemeHeaderActionsProps, DocsThemeHomeAction, DocsThemeHomeData, DocsThemeHomeHighlight, DocsThemeHomePreviewProps, DocsThemeLinkComponent, DocsThemeLinkProps, DocsThemeLocaleLink, DocsThemeNavItem, DocsThemeSlots } from "./theme/types.mjs";
|
|
3
3
|
import { DefaultDocsFooter, DefaultDocsFooterProps } from "./theme/components/footer.mjs";
|
|
4
|
+
import { DefaultDocsToc, DefaultDocsTocProps, DocsTocHeading, MobileDocsToc, MobileDocsTocProps } from "./theme/components/docs-toc.mjs";
|
|
4
5
|
import { DefaultDocsHeader, DefaultDocsHeaderProps } from "./theme/components/header.mjs";
|
|
5
6
|
import { DefaultDocsLink, DefaultDocsLinkProps } from "./theme/components/link.mjs";
|
|
6
|
-
import { DefaultDocsToc, DefaultDocsTocProps, DocsTocHeading, MobileDocsToc, MobileDocsTocProps } from "./theme/components/docs-toc.mjs";
|
|
7
7
|
import { DefaultContentLayout, DefaultContentLayoutProps } from "./theme/components/content-layout.mjs";
|
|
8
8
|
import { DefaultContentShell, DefaultContentShellProps } from "./theme/components/content-shell.mjs";
|
|
9
9
|
import { DefaultDocsShell, DefaultDocsShellProps } from "./theme/components/docs-shell.mjs";
|
|
10
10
|
import { DefaultHomeShell, DefaultHomeShellProps } from "./theme/components/home-shell.mjs";
|
|
11
11
|
import { CreateHomeDataOptions, createHomeData } from "./theme/create-home-data.mjs";
|
|
12
12
|
import { resolveThemeSlots } from "./theme/slots.mjs";
|
|
13
|
-
export { type CreateHomeDataOptions, DefaultContentLayout, type DefaultContentLayoutProps, DefaultContentShell, type DefaultContentShellProps, DefaultDocsFooter, type DefaultDocsFooterProps, DefaultDocsHeader, type DefaultDocsHeaderProps, DefaultDocsLink, type DefaultDocsLinkProps, DefaultDocsShell, type DefaultDocsShellProps, DefaultDocsToc, type DefaultDocsTocProps, DefaultHomeShell, type DefaultHomeShellProps, type DocsHomeConfig, type DocsSlotsConfig, type DocsThemeContentHeaderMetaProps, type DocsThemeFooterSlotProps, type DocsThemeHeaderActionsProps, type DocsThemeHomeAction, type DocsThemeHomeData, type DocsThemeHomeHighlight, type DocsThemeLinkComponent, type DocsThemeLinkProps, type DocsThemeLocaleLink, type DocsThemeNavItem, type DocsThemeSlots, type DocsTocHeading, MobileDocsToc, type MobileDocsTocProps, createHomeData, resolveThemeSlots };
|
|
13
|
+
export { type CreateHomeDataOptions, DefaultContentLayout, type DefaultContentLayoutProps, DefaultContentShell, type DefaultContentShellProps, DefaultDocsFooter, type DefaultDocsFooterProps, DefaultDocsHeader, type DefaultDocsHeaderProps, DefaultDocsLink, type DefaultDocsLinkProps, DefaultDocsShell, type DefaultDocsShellProps, DefaultDocsToc, type DefaultDocsTocProps, DefaultHomeShell, type DefaultHomeShellProps, type DocsHomeConfig, type DocsSlotsConfig, type DocsThemeContentHeaderMetaProps, type DocsThemeFooterSlotProps, type DocsThemeHeaderActionsProps, type DocsThemeHomeAction, type DocsThemeHomeData, type DocsThemeHomeHighlight, type DocsThemeHomePreviewProps, type DocsThemeLinkComponent, type DocsThemeLinkProps, type DocsThemeLocaleLink, type DocsThemeNavItem, type DocsThemeSlots, type DocsTocHeading, MobileDocsToc, type MobileDocsTocProps, createHomeData, resolveThemeSlots };
|
package/dist/theme.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
|
|
2
|
-
import { DocsHomeConfig, DocsSlotsConfig, DocsThemeContentHeaderMetaProps, DocsThemeFooterSlotProps, DocsThemeHeaderActionsProps, DocsThemeHomeAction, DocsThemeHomeData, DocsThemeHomeHighlight, DocsThemeLinkComponent, DocsThemeLinkProps, DocsThemeLocaleLink, DocsThemeNavItem, DocsThemeSlots } from "./theme/types.js";
|
|
2
|
+
import { DocsHomeConfig, DocsSlotsConfig, DocsThemeContentHeaderMetaProps, DocsThemeFooterSlotProps, DocsThemeHeaderActionsProps, DocsThemeHomeAction, DocsThemeHomeData, DocsThemeHomeHighlight, DocsThemeHomePreviewProps, DocsThemeLinkComponent, DocsThemeLinkProps, DocsThemeLocaleLink, DocsThemeNavItem, DocsThemeSlots } from "./theme/types.js";
|
|
3
3
|
import { DefaultDocsFooter, DefaultDocsFooterProps } from "./theme/components/footer.js";
|
|
4
|
+
import { DefaultDocsToc, DefaultDocsTocProps, DocsTocHeading, MobileDocsToc, MobileDocsTocProps } from "./theme/components/docs-toc.js";
|
|
4
5
|
import { DefaultDocsHeader, DefaultDocsHeaderProps } from "./theme/components/header.js";
|
|
5
6
|
import { DefaultDocsLink, DefaultDocsLinkProps } from "./theme/components/link.js";
|
|
6
|
-
import { DefaultDocsToc, DefaultDocsTocProps, DocsTocHeading, MobileDocsToc, MobileDocsTocProps } from "./theme/components/docs-toc.js";
|
|
7
7
|
import { DefaultContentLayout, DefaultContentLayoutProps } from "./theme/components/content-layout.js";
|
|
8
8
|
import { DefaultContentShell, DefaultContentShellProps } from "./theme/components/content-shell.js";
|
|
9
9
|
import { DefaultDocsShell, DefaultDocsShellProps } from "./theme/components/docs-shell.js";
|
|
10
10
|
import { DefaultHomeShell, DefaultHomeShellProps } from "./theme/components/home-shell.js";
|
|
11
11
|
import { CreateHomeDataOptions, createHomeData } from "./theme/create-home-data.js";
|
|
12
12
|
import { resolveThemeSlots } from "./theme/slots.js";
|
|
13
|
-
export { type CreateHomeDataOptions, DefaultContentLayout, type DefaultContentLayoutProps, DefaultContentShell, type DefaultContentShellProps, DefaultDocsFooter, type DefaultDocsFooterProps, DefaultDocsHeader, type DefaultDocsHeaderProps, DefaultDocsLink, type DefaultDocsLinkProps, DefaultDocsShell, type DefaultDocsShellProps, DefaultDocsToc, type DefaultDocsTocProps, DefaultHomeShell, type DefaultHomeShellProps, type DocsHomeConfig, type DocsSlotsConfig, type DocsThemeContentHeaderMetaProps, type DocsThemeFooterSlotProps, type DocsThemeHeaderActionsProps, type DocsThemeHomeAction, type DocsThemeHomeData, type DocsThemeHomeHighlight, type DocsThemeLinkComponent, type DocsThemeLinkProps, type DocsThemeLocaleLink, type DocsThemeNavItem, type DocsThemeSlots, type DocsTocHeading, MobileDocsToc, type MobileDocsTocProps, createHomeData, resolveThemeSlots };
|
|
13
|
+
export { type CreateHomeDataOptions, DefaultContentLayout, type DefaultContentLayoutProps, DefaultContentShell, type DefaultContentShellProps, DefaultDocsFooter, type DefaultDocsFooterProps, DefaultDocsHeader, type DefaultDocsHeaderProps, DefaultDocsLink, type DefaultDocsLinkProps, DefaultDocsShell, type DefaultDocsShellProps, DefaultDocsToc, type DefaultDocsTocProps, DefaultHomeShell, type DefaultHomeShellProps, type DocsHomeConfig, type DocsSlotsConfig, type DocsThemeContentHeaderMetaProps, type DocsThemeFooterSlotProps, type DocsThemeHeaderActionsProps, type DocsThemeHomeAction, type DocsThemeHomeData, type DocsThemeHomeHighlight, type DocsThemeHomePreviewProps, type DocsThemeLinkComponent, type DocsThemeLinkProps, type DocsThemeLocaleLink, type DocsThemeNavItem, type DocsThemeSlots, type DocsTocHeading, MobileDocsToc, type MobileDocsTocProps, createHomeData, resolveThemeSlots };
|
package/dist/theme.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* name: @blackwork/docs
|
|
3
|
-
* version: v0.
|
|
3
|
+
* version: v0.6.0
|
|
4
4
|
* description: Next-first documentation framework for Blackwork projects.
|
|
5
5
|
* author: chengpeiquan <chengpeiquan@chengpeiquan.com>
|
|
6
6
|
* homepage: https://chengpeiquan.com
|
|
7
7
|
* license: MIT
|
|
8
8
|
*/
|
|
9
|
-
import{
|
|
9
|
+
import{DefaultDocsFooter as e}from"./theme/components/footer.mjs";import{DefaultDocsLink as t}from"./theme/components/link.mjs";import{DefaultDocsHeader as n}from"./theme/components/header.mjs";import{DefaultDocsToc as r,MobileDocsToc as i}from"./theme/components/docs-toc.mjs";import{DefaultContentLayout as a}from"./theme/components/content-layout.mjs";import{resolveThemeSlots as o}from"./theme/slots.mjs";import{DefaultContentShell as s}from"./theme/components/content-shell.mjs";import{DefaultDocsShell as c}from"./theme/components/docs-shell.mjs";import{createHomeData as l}from"./theme/create-home-data.mjs";import{DefaultHomeShell as u}from"./theme/components/home-shell.mjs";export{a as DefaultContentLayout,s as DefaultContentShell,e as DefaultDocsFooter,n as DefaultDocsHeader,t as DefaultDocsLink,c as DefaultDocsShell,r as DefaultDocsToc,u as DefaultHomeShell,i as MobileDocsToc,l as createHomeData,o as resolveThemeSlots};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blackwork/docs",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Next-first documentation framework for Blackwork projects.",
|
|
5
5
|
"author": "chengpeiquan <chengpeiquan@chengpeiquan.com>",
|
|
6
6
|
"homepage": "https://chengpeiquan.com",
|
|
@@ -52,10 +52,11 @@
|
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"chokidar": "^4.0.3",
|
|
54
54
|
"jiti": "^1.21.7",
|
|
55
|
-
"
|
|
55
|
+
"lucide-react": "^1.31.0",
|
|
56
|
+
"@blackwork/machine": "0.2.2"
|
|
56
57
|
},
|
|
57
58
|
"peerDependencies": {
|
|
58
|
-
"blackwork": ">=0.
|
|
59
|
+
"blackwork": ">=0.13.0",
|
|
59
60
|
"next": ">=16.0.0",
|
|
60
61
|
"react": ">=19.0.0",
|
|
61
62
|
"react-dom": ">=19.0.0"
|
|
@@ -63,13 +64,18 @@
|
|
|
63
64
|
"devDependencies": {
|
|
64
65
|
"@bassist/build-config": "^0.2.0",
|
|
65
66
|
"@bassist/tsconfig": "^0.1.1",
|
|
66
|
-
"@types/node": "^25.5
|
|
67
|
-
"
|
|
67
|
+
"@types/node": "^25.9.5",
|
|
68
|
+
"@types/react": "^19.2.18",
|
|
69
|
+
"@types/react-dom": "^19.2.4",
|
|
70
|
+
"eslint": "^10.8.1",
|
|
68
71
|
"jsdom": "^26.1.0",
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
72
|
+
"next": "^16.3.1",
|
|
73
|
+
"react": "^19.2.8",
|
|
74
|
+
"react-dom": "^19.2.8",
|
|
75
|
+
"tsdown": "^0.21.10",
|
|
76
|
+
"typescript": "^6.0.3",
|
|
77
|
+
"vitest": "^4.1.10",
|
|
78
|
+
"blackwork": "0.13.0"
|
|
73
79
|
},
|
|
74
80
|
"scripts": {
|
|
75
81
|
"build": "tsdown && node ./scripts/copy-css.mjs",
|