docus 2.1.0 → 3.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -4
- package/app/router.options.ts +18 -0
- package/assets/css/fonts.css +84 -0
- package/assets/css/main.css +11 -0
- package/assets/css/tailwind.css +282 -0
- package/components/app/Container.vue +25 -0
- package/components/app/Footer.vue +40 -0
- package/components/app/Navbar.vue +26 -0
- package/components/app/NavbarLogo.vue +33 -0
- package/components/app/Page.vue +7 -0
- package/components/app/PoweredByDocus.vue +11 -0
- package/components/content/Alert.vue +124 -0
- package/components/content/BlockHero.vue +54 -0
- package/components/content/ButtonLink.vue +45 -0
- package/components/content/Card.vue +46 -0
- package/components/content/CardGrid.vue +23 -0
- package/components/content/CodeBlock.vue +47 -0
- package/components/content/CodeGroup.vue +135 -0
- package/components/content/CopyButton.vue +49 -0
- package/{dist/runtime/app/components/prose/ProseOl.vue → components/content/List.vue} +2 -2
- package/components/content/NeedContribution.vue +23 -0
- package/components/content/ReadMore.vue +25 -0
- package/components/content/Sandbox.vue +102 -0
- package/components/content/TabsHeader.vue +44 -0
- package/components/content/Terminal.vue +64 -0
- package/components/content/VideoPlayer.vue +115 -0
- package/components/docs/DocsAside.vue +21 -0
- package/components/docs/DocsAsideTree.vue +102 -0
- package/components/docs/DocsHero.vue +39 -0
- package/components/docs/DocsPage.vue +22 -0
- package/components/docs/DocsPageContent.vue +31 -0
- package/components/docs/DocsToc.vue +74 -0
- package/components/globals/Icon.vue +24 -0
- package/{dist/runtime/app/components/prose/ProseHr.vue → components/globals/Logo.vue} +1 -1
- package/components/globals/NuxtImg.vue +45 -0
- package/components/globals/SocialIcons.vue +45 -0
- package/components/globals/ThemeSelect.vue +35 -0
- package/components/icons/IconAlgolia.vue +8 -0
- package/components/icons/IconArrowLeft.vue +10 -0
- package/components/icons/IconArrowRight.vue +10 -0
- package/components/icons/IconBadgeCheck.vue +14 -0
- package/components/icons/IconCheck.vue +10 -0
- package/components/icons/IconCheckCircle.vue +10 -0
- package/components/icons/IconChevronRight.vue +12 -0
- package/components/icons/IconClipboardCheck.vue +14 -0
- package/components/icons/IconClipboardCopy.vue +14 -0
- package/components/icons/IconCodeSandbox.vue +8 -0
- package/components/icons/IconCopy.vue +17 -0
- package/components/icons/IconDots.vue +10 -0
- package/components/icons/IconEdit.vue +18 -0
- package/components/icons/IconExclamationCircle.vue +12 -0
- package/components/icons/IconExclamationTriangle.vue +10 -0
- package/components/icons/IconExternalLink.vue +12 -0
- package/components/icons/IconGit.vue +7 -0
- package/components/icons/IconGitHub.vue +10 -0
- package/components/icons/IconHeart.vue +9 -0
- package/components/icons/IconInformationCircle.vue +10 -0
- package/components/icons/IconLighthouse.vue +83 -0
- package/components/icons/IconLine.vue +10 -0
- package/components/icons/IconMarkdown.vue +13 -0
- package/components/icons/IconMenu.vue +12 -0
- package/components/icons/IconMenuAlt.vue +10 -0
- package/components/icons/IconMinus.vue +10 -0
- package/components/icons/IconMoon.vue +10 -0
- package/components/icons/IconNuxt.vue +14 -0
- package/components/icons/IconNuxtContent.vue +20 -0
- package/components/icons/IconNuxtLabs.vue +21 -0
- package/components/icons/IconPlus.vue +10 -0
- package/components/icons/IconPuzzle.vue +8 -0
- package/components/icons/IconSSG.vue +7 -0
- package/components/icons/IconSearch.vue +12 -0
- package/components/icons/IconSun.vue +10 -0
- package/components/icons/IconTocBack.vue +21 -0
- package/components/icons/IconTocCurrent.vue +21 -0
- package/components/icons/IconTocNext.vue +8 -0
- package/components/icons/IconTranslate.vue +14 -0
- package/components/icons/IconTwitter.vue +8 -0
- package/components/icons/IconVite.vue +30 -0
- package/components/icons/IconVue.vue +6 -0
- package/components/icons/IconVueTelescope.vue +11 -0
- package/components/icons/IconWindi.vue +17 -0
- package/components/icons/IconX.vue +12 -0
- package/components/icons/IconXCircle.vue +10 -0
- package/components/icons/IconZap.vue +8 -0
- package/components/prose/ProseA.vue +66 -0
- package/components/prose/ProseBlockquote.vue +21 -0
- package/components/prose/ProseCode.vue +68 -0
- package/components/prose/ProseCodeInline.vue +38 -0
- package/components/prose/ProseEm.vue +11 -0
- package/components/prose/ProseH1.vue +22 -0
- package/components/prose/ProseH2.vue +22 -0
- package/components/prose/ProseH3.vue +24 -0
- package/components/prose/ProseH4.vue +24 -0
- package/components/prose/ProseHr.vue +13 -0
- package/components/prose/ProseImg.vue +30 -0
- package/components/prose/ProseLi.vue +31 -0
- package/components/prose/ProseOl.vue +16 -0
- package/components/prose/ProseP.vue +14 -0
- package/components/prose/ProseStrong.vue +14 -0
- package/components/prose/ProseTable.vue +13 -0
- package/{dist/runtime/app/components → components}/prose/ProseTbody.vue +0 -0
- package/components/prose/ProseTd.vue +11 -0
- package/components/prose/ProseTh.vue +11 -0
- package/components/prose/ProseThead.vue +11 -0
- package/components/prose/ProseTr.vue +11 -0
- package/components/prose/ProseUl.vue +15 -0
- package/composables/useContent.ts +156 -0
- package/composables/useMenu.ts +22 -0
- package/composables/useScrollToHeading.ts +35 -0
- package/composables/useScrollspy.ts +46 -0
- package/composables/useTheme.ts +12 -0
- package/layouts/default.vue +29 -0
- package/layouts/page.vue +11 -0
- package/nuxt.config.ts +151 -0
- package/package.json +46 -83
- package/pages/[...slug].vue +26 -0
- package/public/android-chrome-192x192.png +0 -0
- package/public/android-chrome-512x512.png +0 -0
- package/public/apple-touch-icon.png +0 -0
- package/public/favicon-16x16.png +0 -0
- package/public/favicon-32x32.png +0 -0
- package/public/favicon.ico +0 -0
- package/public/site.webmanifest +1 -0
- package/LICENSE +0 -21
- package/dist/index.cjs +0 -549
- package/dist/index.d.ts +0 -25
- package/dist/index.mjs +0 -523
- package/dist/runtime/app/components/DocusContent.vue +0 -215
- package/dist/runtime/app/components/DocusContent.vue.d.ts +0 -25
- package/dist/runtime/app/components/Error.vue +0 -19
- package/dist/runtime/app/components/Error.vue.d.ts +0 -9
- package/dist/runtime/app/components/Markdown.vue +0 -56
- package/dist/runtime/app/components/Markdown.vue.d.ts +0 -25
- package/dist/runtime/app/components/Page.vue +0 -29
- package/dist/runtime/app/components/Page.vue.d.ts +0 -2
- package/dist/runtime/app/components/Props.vue +0 -130
- package/dist/runtime/app/components/Props.vue.d.ts +0 -80
- package/dist/runtime/app/components/prose/ProseA.vue +0 -41
- package/dist/runtime/app/components/prose/ProseA.vue.d.ts +0 -23
- package/dist/runtime/app/components/prose/ProseBlockquote.vue +0 -5
- package/dist/runtime/app/components/prose/ProseCode.vue +0 -5
- package/dist/runtime/app/components/prose/ProseCodeInline.vue +0 -5
- package/dist/runtime/app/components/prose/ProseEm.vue +0 -5
- package/dist/runtime/app/components/prose/ProseH1.vue +0 -3
- package/dist/runtime/app/components/prose/ProseH2.vue +0 -3
- package/dist/runtime/app/components/prose/ProseH3.vue +0 -3
- package/dist/runtime/app/components/prose/ProseH4.vue +0 -3
- package/dist/runtime/app/components/prose/ProseH5.vue +0 -3
- package/dist/runtime/app/components/prose/ProseH6.vue +0 -3
- package/dist/runtime/app/components/prose/ProseImg.vue +0 -32
- package/dist/runtime/app/components/prose/ProseImg.vue.d.ts +0 -21
- package/dist/runtime/app/components/prose/ProseLi.vue +0 -3
- package/dist/runtime/app/components/prose/ProseParagraph.vue +0 -3
- package/dist/runtime/app/components/prose/ProseStrong.vue +0 -5
- package/dist/runtime/app/components/prose/ProseTable.vue +0 -5
- package/dist/runtime/app/components/prose/ProseTd.vue +0 -5
- package/dist/runtime/app/components/prose/ProseTh.vue +0 -5
- package/dist/runtime/app/components/prose/ProseThead.vue +0 -5
- package/dist/runtime/app/components/prose/ProseTr.vue +0 -5
- package/dist/runtime/app/components/prose/ProseUl.vue +0 -5
- package/dist/runtime/app/composables/helpers.d.ts +0 -4
- package/dist/runtime/app/composables/helpers.js +0 -66
- package/dist/runtime/app/composables/helpers.mjs +0 -40
- package/dist/runtime/app/composables/index.d.ts +0 -90
- package/dist/runtime/app/composables/index.js +0 -108
- package/dist/runtime/app/composables/index.mjs +0 -63
- package/dist/runtime/app/composables/navigation.d.ts +0 -37
- package/dist/runtime/app/composables/navigation.js +0 -227
- package/dist/runtime/app/composables/navigation.mjs +0 -148
- package/dist/runtime/app/composables/store.d.ts +0 -7
- package/dist/runtime/app/composables/store.js +0 -52
- package/dist/runtime/app/composables/store.mjs +0 -35
- package/dist/runtime/app/composables/style.d.ts +0 -11
- package/dist/runtime/app/composables/style.js +0 -117
- package/dist/runtime/app/composables/style.mjs +0 -71
- package/dist/runtime/app/composables/theme-colors.d.ts +0 -30
- package/dist/runtime/app/composables/theme-colors.js +0 -80
- package/dist/runtime/app/composables/theme-colors.mjs +0 -48
- package/dist/runtime/app/composables/websocket.d.ts +0 -3
- package/dist/runtime/app/composables/websocket.js +0 -79
- package/dist/runtime/app/composables/websocket.mjs +0 -63
- package/dist/runtime/app/layouts/default.vue +0 -5
- package/dist/runtime/app/layouts/error.vue +0 -33
- package/dist/runtime/app/layouts/error.vue.d.ts +0 -21
- package/dist/runtime/app/pages/_.vue +0 -222
- package/dist/runtime/app/pages/_.vue.d.ts +0 -2
- package/dist/runtime/context.d.ts +0 -1
- package/dist/runtime/context.js +0 -17
- package/dist/runtime/context.mjs +0 -5
- package/dist/runtime/database/Query.d.ts +0 -18
- package/dist/runtime/database/Query.js +0 -68
- package/dist/runtime/database/Query.mjs +0 -49
- package/dist/runtime/database/index.d.ts +0 -4
- package/dist/runtime/database/index.js +0 -45
- package/dist/runtime/database/index.mjs +0 -25
- package/dist/runtime/database/providers/local/Query.d.ts +0 -14
- package/dist/runtime/database/providers/local/Query.js +0 -85
- package/dist/runtime/database/providers/local/Query.mjs +0 -60
- package/dist/runtime/database/providers/local/index.d.ts +0 -3
- package/dist/runtime/database/providers/local/index.js +0 -63
- package/dist/runtime/database/providers/local/index.mjs +0 -39
- package/dist/runtime/database/providers/local/operations.d.ts +0 -2
- package/dist/runtime/database/providers/local/operations.js +0 -83
- package/dist/runtime/database/providers/local/operations.mjs +0 -53
- package/dist/runtime/database/providers/local/utils.d.ts +0 -8
- package/dist/runtime/database/providers/local/utils.js +0 -28
- package/dist/runtime/database/providers/local/utils.mjs +0 -17
- package/dist/runtime/index.d.ts +0 -3
- package/dist/runtime/index.js +0 -44
- package/dist/runtime/index.mjs +0 -3
- package/dist/runtime/navigation.d.ts +0 -4
- package/dist/runtime/navigation.js +0 -176
- package/dist/runtime/navigation.mjs +0 -137
- package/dist/runtime/server/api/get.d.ts +0 -10
- package/dist/runtime/server/api/get.js +0 -24
- package/dist/runtime/server/api/get.mjs +0 -13
- package/dist/runtime/server/api/list.d.ts +0 -9
- package/dist/runtime/server/api/list.js +0 -34
- package/dist/runtime/server/api/list.mjs +0 -18
- package/dist/runtime/server/api/navigation.d.ts +0 -7
- package/dist/runtime/server/api/navigation.js +0 -20
- package/dist/runtime/server/api/navigation.mjs +0 -10
- package/dist/runtime/server/api/preview.d.ts +0 -3
- package/dist/runtime/server/api/preview.js +0 -54
- package/dist/runtime/server/api/preview.mjs +0 -31
- package/dist/runtime/server/api/reload.d.ts +0 -6
- package/dist/runtime/server/api/reload.js +0 -27
- package/dist/runtime/server/api/reload.mjs +0 -11
- package/dist/runtime/server/api/search.d.ts +0 -6
- package/dist/runtime/server/api/search.js +0 -27
- package/dist/runtime/server/api/search.mjs +0 -13
- package/dist/runtime/server/content.d.ts +0 -46
- package/dist/runtime/server/content.js +0 -175
- package/dist/runtime/server/content.mjs +0 -114
- package/dist/runtime/server/socket.d.ts +0 -9
- package/dist/runtime/server/socket.js +0 -33
- package/dist/runtime/server/socket.mjs +0 -20
- package/dist/runtime/server/utils/cache.d.ts +0 -19
- package/dist/runtime/server/utils/cache.js +0 -110
- package/dist/runtime/server/utils/cache.mjs +0 -75
- package/dist/runtime/server/utils/index.d.ts +0 -4
- package/dist/runtime/server/utils/index.js +0 -18
- package/dist/runtime/server/utils/index.mjs +0 -8
- package/dist/runtime/transformers/index.d.ts +0 -1
- package/dist/runtime/transformers/index.js +0 -26
- package/dist/runtime/transformers/index.mjs +0 -11
- package/dist/runtime/transformers/json.d.ts +0 -3
- package/dist/runtime/transformers/json.js +0 -15
- package/dist/runtime/transformers/json.mjs +0 -5
- package/dist/runtime/transformers/markdown/index.d.ts +0 -8
- package/dist/runtime/transformers/markdown/index.js +0 -25
- package/dist/runtime/transformers/markdown/index.mjs +0 -16
- package/dist/runtime/transformers/utils/index.d.ts +0 -1
- package/dist/runtime/transformers/utils/index.js +0 -18
- package/dist/runtime/transformers/utils/index.mjs +0 -1
- package/dist/runtime/transformers/utils/path.d.ts +0 -26
- package/dist/runtime/transformers/utils/path.js +0 -88
- package/dist/runtime/transformers/utils/path.mjs +0 -56
- package/dist/runtime/utils/index.d.ts +0 -1
- package/dist/runtime/utils/index.js +0 -18
- package/dist/runtime/utils/index.mjs +0 -1
- package/dist/runtime/utils/log.d.ts +0 -1
- package/dist/runtime/utils/log.js +0 -14
- package/dist/runtime/utils/log.mjs +0 -2
- package/dist/runtime/utils/object.d.ts +0 -9
- package/dist/runtime/utils/object.js +0 -22
- package/dist/runtime/utils/object.mjs +0 -4
- package/dist/templates/content.mjs +0 -50
- package/dist/templates/docus.mjs +0 -13
- package/dist/templates/hot.mjs +0 -16
- package/dist/templates/i18n.mjs +0 -23
- package/dist/templates/options.mjs +0 -46
- package/shims.d.ts +0 -24
- package/types.d.ts +0 -397
package/types.d.ts
DELETED
|
@@ -1,397 +0,0 @@
|
|
|
1
|
-
import type { MDCOptions, MDCRoot, Toc } from '@docus/mdc'
|
|
2
|
-
|
|
3
|
-
import type { MetaInfo } from 'vue-meta'
|
|
4
|
-
|
|
5
|
-
export * from '@docus/mdc'
|
|
6
|
-
|
|
7
|
-
declare module '#docus'
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Shim modules for NuxtOptions
|
|
11
|
-
*/
|
|
12
|
-
declare module '@nuxt/schema' {
|
|
13
|
-
interface NuxtOptions {
|
|
14
|
-
bridge: any
|
|
15
|
-
colorMode: any
|
|
16
|
-
image: any
|
|
17
|
-
nitro: any
|
|
18
|
-
i18n: any
|
|
19
|
-
content: any
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export interface DocusOptions {
|
|
24
|
-
apiBase: string
|
|
25
|
-
watch: boolean
|
|
26
|
-
dirs: Array<string | string[]>
|
|
27
|
-
ignoreList?: string[]
|
|
28
|
-
locales: {
|
|
29
|
-
codes: string[]
|
|
30
|
-
defaultLocale: string
|
|
31
|
-
}
|
|
32
|
-
database: {
|
|
33
|
-
provider: string
|
|
34
|
-
options: Record<string, any>
|
|
35
|
-
}
|
|
36
|
-
search: {
|
|
37
|
-
inheritanceFields: string[]
|
|
38
|
-
}
|
|
39
|
-
transformers: {
|
|
40
|
-
markdown: Partial<MDCOptions>
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export interface QueryBuilder<T> {
|
|
45
|
-
/**
|
|
46
|
-
* Select a subset of fields
|
|
47
|
-
* @param {Array} keys - Array of fields to be picked.
|
|
48
|
-
* @returns {QueryBuilder} Returns current instance to be chained
|
|
49
|
-
*/
|
|
50
|
-
only(keys: string | string[]): QueryBuilder<T>
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Remove a subset of fields
|
|
54
|
-
* @param {Array} keys - Array of fields to be picked.
|
|
55
|
-
* @returns {QueryBuilder} Returns current instance to be chained
|
|
56
|
-
*/
|
|
57
|
-
without(keys: string | string[]): QueryBuilder<T>
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Sort results
|
|
61
|
-
* @param {string} field - Field key to sort on.
|
|
62
|
-
* @param {string} direction - Direction of sort (asc / desc).
|
|
63
|
-
* @returns {QueryBuilder} Returns current instance to be chained
|
|
64
|
-
*/
|
|
65
|
-
sortBy(field: string, direction: 'asc' | 'desc'): QueryBuilder<T>
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Filter results
|
|
69
|
-
* @param {object} query - Where query.
|
|
70
|
-
* @returns {QueryBuilder} Returns current instance to be chained
|
|
71
|
-
*/
|
|
72
|
-
where(query: any): QueryBuilder<T>
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Surround results
|
|
76
|
-
* @param {string} slugOrPath - Slug or path of the file to surround.
|
|
77
|
-
* @param {Object} options - Options to surround (before / after).
|
|
78
|
-
* @returns {QueryBuilder} Returns current instance to be chained
|
|
79
|
-
*/
|
|
80
|
-
surround(slugOrPath: string, count: { before: number; after: number }): QueryBuilder<T>
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Limit number of results
|
|
84
|
-
* @param {number} n - Limit number.
|
|
85
|
-
* @returns {QueryBuilder} Returns current instance to be chained
|
|
86
|
-
*/
|
|
87
|
-
limit(count: number): QueryBuilder<T>
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Skip number of results
|
|
91
|
-
* @param {number} n - Skip number.
|
|
92
|
-
* @returns {QueryBuilder} Returns current instance to be chained
|
|
93
|
-
*/
|
|
94
|
-
skip(count: number): QueryBuilder<T>
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Collect data and apply process filters
|
|
98
|
-
* @returns {(Object|Array)} Returns processed data
|
|
99
|
-
*/
|
|
100
|
-
fetch(params?: any): Promise<T | T[]>
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
export interface QueryBuilderParams {
|
|
104
|
-
skip: number
|
|
105
|
-
limit: number
|
|
106
|
-
only: string[]
|
|
107
|
-
without: string[]
|
|
108
|
-
sortBy: Array<string[]>
|
|
109
|
-
where: object
|
|
110
|
-
|
|
111
|
-
[key: string]: any
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
export interface SearchOptions {
|
|
115
|
-
sortBy?: string[]
|
|
116
|
-
skip?: number
|
|
117
|
-
limit?: number
|
|
118
|
-
only?: string[] | string
|
|
119
|
-
without?: string[] | string
|
|
120
|
-
where?: any
|
|
121
|
-
surround?: string[]
|
|
122
|
-
deep?: boolean
|
|
123
|
-
text?: boolean
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
export interface DatabaseProvider {
|
|
127
|
-
getItem<T>(key: string): T
|
|
128
|
-
setItem<T>(key: string, value: T): void
|
|
129
|
-
removeItem(key: string): void
|
|
130
|
-
clear(): void
|
|
131
|
-
//
|
|
132
|
-
search<T>(query: string, params: any): Promise<T[]>
|
|
133
|
-
query<T>(query: string, params: any): QueryBuilder<T>
|
|
134
|
-
//
|
|
135
|
-
serialize(): Promise<any>
|
|
136
|
-
load(serialized: any): void | Promise<void>
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
export interface DocusContent<T> {
|
|
140
|
-
search: (to?: string | SearchOptions, options?: SearchOptions) => QueryBuilder<T>
|
|
141
|
-
fetch: <T>(path: string, opts?: any) => Promise<T>
|
|
142
|
-
get: <T>(id: string) => Promise<T>
|
|
143
|
-
preview: (previewKey?: string) => this
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
export interface NavItemNavigationConfig {
|
|
147
|
-
/**
|
|
148
|
-
* Navigation title
|
|
149
|
-
*/
|
|
150
|
-
title: string
|
|
151
|
-
/**
|
|
152
|
-
* If set to `false`, the nested pages will not display in Docus navigation menus
|
|
153
|
-
*/
|
|
154
|
-
nested: boolean
|
|
155
|
-
/**
|
|
156
|
-
* If set to `true`, other pages will not show in the left menu when user visiting the page or its nested pages.
|
|
157
|
-
*/
|
|
158
|
-
exclusive: boolean
|
|
159
|
-
/**
|
|
160
|
-
* If set to `true` in an `index.md`, the category will be collapsed by default in aside navigation.
|
|
161
|
-
*/
|
|
162
|
-
collapse: boolean
|
|
163
|
-
/**
|
|
164
|
-
* If set in an `index.md`, the page will redirect to the specified path when loaded, can be useful for empty categories pages.
|
|
165
|
-
*/
|
|
166
|
-
redirect: string
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
export interface DocusDocument {
|
|
170
|
-
// FrontMatter
|
|
171
|
-
title: string
|
|
172
|
-
description: string
|
|
173
|
-
badge: string
|
|
174
|
-
version: number
|
|
175
|
-
fullscreen: boolean
|
|
176
|
-
head: MetaInfo
|
|
177
|
-
position: string
|
|
178
|
-
draft: boolean
|
|
179
|
-
// Navigation
|
|
180
|
-
navigation: NavItemNavigationConfig | false
|
|
181
|
-
// url of nearest exclusive parent
|
|
182
|
-
// parent uses to filter pages to find currect previous and next page
|
|
183
|
-
parent: string
|
|
184
|
-
// Template
|
|
185
|
-
template: {
|
|
186
|
-
self: string
|
|
187
|
-
nested: string
|
|
188
|
-
[key: string]: any
|
|
189
|
-
}
|
|
190
|
-
// Layout
|
|
191
|
-
layout: {
|
|
192
|
-
header: boolean
|
|
193
|
-
footer: boolean
|
|
194
|
-
aside: boolean
|
|
195
|
-
asideClass: string
|
|
196
|
-
fluid: boolean
|
|
197
|
-
[key: string]: any
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
// Generated
|
|
201
|
-
/**
|
|
202
|
-
* If set to `false` the document will not render as a standalone page an can only accessible with `InjectContent` of `$docus` search API
|
|
203
|
-
*/
|
|
204
|
-
page: boolean
|
|
205
|
-
/**
|
|
206
|
-
* It will set to `false` if the file does not containts any markdown content
|
|
207
|
-
*/
|
|
208
|
-
empty: boolean
|
|
209
|
-
/**
|
|
210
|
-
* The unique key of document (file path)
|
|
211
|
-
*/
|
|
212
|
-
key: string
|
|
213
|
-
/**
|
|
214
|
-
* Path of document in the storage.
|
|
215
|
-
*/
|
|
216
|
-
path: string
|
|
217
|
-
/**
|
|
218
|
-
* Generated url of document. This url will be used to create anchor links of document.
|
|
219
|
-
*/
|
|
220
|
-
to: string
|
|
221
|
-
/**
|
|
222
|
-
* File extension
|
|
223
|
-
*/
|
|
224
|
-
extension: string
|
|
225
|
-
slug: string
|
|
226
|
-
toc: false | Toc
|
|
227
|
-
language: string
|
|
228
|
-
body: MDCRoot
|
|
229
|
-
dir: string
|
|
230
|
-
createdAt: Date
|
|
231
|
-
updatedAt: Date
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
export interface NavItem extends NavItemNavigationConfig {
|
|
235
|
-
/**
|
|
236
|
-
* Page slug
|
|
237
|
-
*/
|
|
238
|
-
slug: string
|
|
239
|
-
/**
|
|
240
|
-
* full path of page
|
|
241
|
-
*/
|
|
242
|
-
to: string
|
|
243
|
-
/**
|
|
244
|
-
* Shows if the page is draft or not
|
|
245
|
-
*/
|
|
246
|
-
draft?: boolean
|
|
247
|
-
/**
|
|
248
|
-
* Provide template name that should use to render the page
|
|
249
|
-
*/
|
|
250
|
-
template?: string
|
|
251
|
-
/**
|
|
252
|
-
* Shows if this nav belogs to a real page or not
|
|
253
|
-
*/
|
|
254
|
-
page: boolean
|
|
255
|
-
/**
|
|
256
|
-
* Small Icon that shows before page title
|
|
257
|
-
*/
|
|
258
|
-
icon?: string
|
|
259
|
-
/**
|
|
260
|
-
* If set to `false`, the page will not show in navigation menus
|
|
261
|
-
*/
|
|
262
|
-
hidden: boolean
|
|
263
|
-
/**
|
|
264
|
-
* Child pages
|
|
265
|
-
*/
|
|
266
|
-
children: NavItem[]
|
|
267
|
-
|
|
268
|
-
[key: string]: any
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
/**
|
|
272
|
-
*
|
|
273
|
-
* APP
|
|
274
|
-
*
|
|
275
|
-
*/
|
|
276
|
-
|
|
277
|
-
export interface DocusConfig {
|
|
278
|
-
/**
|
|
279
|
-
* The website title.
|
|
280
|
-
*/
|
|
281
|
-
title?: string
|
|
282
|
-
/**
|
|
283
|
-
* Your content dir.
|
|
284
|
-
* @default content
|
|
285
|
-
*/
|
|
286
|
-
contentDir?: string
|
|
287
|
-
/**
|
|
288
|
-
* Your website description to be used in <head>.
|
|
289
|
-
*/
|
|
290
|
-
description?: string
|
|
291
|
-
/**
|
|
292
|
-
* Your website URL.
|
|
293
|
-
*/
|
|
294
|
-
url?: string
|
|
295
|
-
/**
|
|
296
|
-
* The default template to use.
|
|
297
|
-
* @default page
|
|
298
|
-
*/
|
|
299
|
-
template?: string
|
|
300
|
-
/**
|
|
301
|
-
* Your theme path or module name.
|
|
302
|
-
*/
|
|
303
|
-
theme?: string
|
|
304
|
-
/**
|
|
305
|
-
* Any key useful to your app.
|
|
306
|
-
*/
|
|
307
|
-
[key: string]: any
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
/**
|
|
311
|
-
*
|
|
312
|
-
* THEME
|
|
313
|
-
*
|
|
314
|
-
*/
|
|
315
|
-
|
|
316
|
-
export interface ThemeConfig {
|
|
317
|
-
/**
|
|
318
|
-
* The theme name to be displayed for users.
|
|
319
|
-
*/
|
|
320
|
-
name?: string
|
|
321
|
-
/**
|
|
322
|
-
* The theme config is by definition permissive.
|
|
323
|
-
*/
|
|
324
|
-
[key: string]: any
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
/**
|
|
328
|
-
*
|
|
329
|
-
* NAVIGATION
|
|
330
|
-
*
|
|
331
|
-
*/
|
|
332
|
-
|
|
333
|
-
export type DocusNavigationState = { [language: string]: NavItem[] }
|
|
334
|
-
|
|
335
|
-
export type DocusCurrentNav = {
|
|
336
|
-
/**
|
|
337
|
-
* The current page title.
|
|
338
|
-
*/
|
|
339
|
-
title?: string
|
|
340
|
-
/**
|
|
341
|
-
* The current path.
|
|
342
|
-
*/
|
|
343
|
-
to?: string
|
|
344
|
-
/**
|
|
345
|
-
* The current nav.
|
|
346
|
-
*/
|
|
347
|
-
navigation?: NavItemNavigationConfig | false
|
|
348
|
-
/**
|
|
349
|
-
* The parent nav.
|
|
350
|
-
*/
|
|
351
|
-
parent?: NavItem
|
|
352
|
-
/**
|
|
353
|
-
* The current navigation links.
|
|
354
|
-
*/
|
|
355
|
-
links: NavItem[]
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
export interface DocusNavigationGetParameters {
|
|
359
|
-
/**
|
|
360
|
-
* Depth to which the navigation should be queried.
|
|
361
|
-
*/
|
|
362
|
-
depth?: number
|
|
363
|
-
/**
|
|
364
|
-
* Locale in which the navigation should be queried.
|
|
365
|
-
*/
|
|
366
|
-
locale?: string
|
|
367
|
-
/**
|
|
368
|
-
* A path from which the navigation should be queried.
|
|
369
|
-
*/
|
|
370
|
-
from?: string
|
|
371
|
-
/**
|
|
372
|
-
* Whether or not the regular filters (exclusive, draft...) should be applied to the query.
|
|
373
|
-
* @default false
|
|
374
|
-
*/
|
|
375
|
-
all?: boolean
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
/**
|
|
379
|
-
*
|
|
380
|
-
* MISCELLANOUS
|
|
381
|
-
*
|
|
382
|
-
*/
|
|
383
|
-
|
|
384
|
-
export interface Colors {
|
|
385
|
-
[key: string]: string | Colors
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
export interface DocusRuntimeInstance {
|
|
389
|
-
content: ReturnType<typeof useDocusContent>
|
|
390
|
-
config: ReturnType<typeof useDocusConfig>
|
|
391
|
-
theme: ReturnType<typeof useDocusTheme>
|
|
392
|
-
layout: ReturnType<typeof useDocusLayout>
|
|
393
|
-
page: ReturnType<typeof useDocusPage>
|
|
394
|
-
navigation: ReturnType<typeof useDocusNavigation>
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
export * from './dist'
|