@deot/docs-client 1.0.9 → 1.1.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 +25 -5
- package/dist/index.cjs +5062 -4028
- package/dist/index.d.ts +30 -0
- package/dist/index.js +20978 -19773
- package/dist/index.style.css +1 -1
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -5,8 +5,12 @@ import { DocsThemeOptions } from '@deot/docs-theme';
|
|
|
5
5
|
import { DocsThemePreference } from '@deot/docs-theme';
|
|
6
6
|
import { HTTPController } from '@deot/http-core';
|
|
7
7
|
import { Language } from '@deot/docs-locale';
|
|
8
|
+
import { MarkdownIndicatorConfig } from '@deot/docs-markdown';
|
|
9
|
+
import type { MarkdownPlaygroundConfig } from '@deot/docs-markdown';
|
|
10
|
+
import { MarkdownTheme } from '@deot/docs-markdown';
|
|
8
11
|
import { Ref } from 'vue';
|
|
9
12
|
import type { RendererDocument } from '@deot/docs-renderer';
|
|
13
|
+
import { RendererFit } from '@deot/docs-renderer';
|
|
10
14
|
import type { RendererModuleSource } from '@deot/docs-renderer';
|
|
11
15
|
import type { RouteLocationNormalized } from 'vue-router';
|
|
12
16
|
import type { RouteLocationNormalizedGeneric } from 'vue-router';
|
|
@@ -26,6 +30,12 @@ export declare const createResourceIdentity: (config: DocsConfig, lang: string,
|
|
|
26
30
|
|
|
27
31
|
export declare const DOCS_RESOURCE_TYPES: readonly ["markdown", "sidebar", "page", "sfc", "module", "style"];
|
|
28
32
|
|
|
33
|
+
export declare interface DocsComponentsOptions {
|
|
34
|
+
markdown?: DocsMarkdownComponentOptions;
|
|
35
|
+
playground?: DocsPlaygroundComponentOptions;
|
|
36
|
+
renderer?: DocsRendererComponentOptions;
|
|
37
|
+
}
|
|
38
|
+
|
|
29
39
|
export declare interface DocsConfig {
|
|
30
40
|
locales: Record<string, DocsLocaleEntry>;
|
|
31
41
|
routes: Record<string, DocsRouteConfig>;
|
|
@@ -36,6 +46,7 @@ export declare interface DocsConfig {
|
|
|
36
46
|
styles?: Record<string, string>;
|
|
37
47
|
prefetch?: boolean | DocsPrefetchOptions;
|
|
38
48
|
theme?: boolean | DocsThemeOptions;
|
|
49
|
+
components?: DocsComponentsOptions;
|
|
39
50
|
layout?: DocsLayoutOptions;
|
|
40
51
|
renderers?: RendererModuleSource[];
|
|
41
52
|
resolve?: {
|
|
@@ -82,17 +93,28 @@ export { DocsLocaleEntry }
|
|
|
82
93
|
|
|
83
94
|
export declare type DocsLocalized<T> = T | Record<string, T>;
|
|
84
95
|
|
|
96
|
+
export declare interface DocsMarkdownComponentOptions {
|
|
97
|
+
theme?: MarkdownTheme;
|
|
98
|
+
indicator?: MarkdownIndicatorConfig;
|
|
99
|
+
}
|
|
100
|
+
|
|
85
101
|
export declare interface DocsMarkdownContext {
|
|
86
102
|
lang: string;
|
|
87
103
|
value: string;
|
|
88
104
|
route: RouteLocationNormalizedGeneric;
|
|
89
105
|
}
|
|
90
106
|
|
|
107
|
+
export declare type DocsPlaygroundComponentOptions = Omit<MarkdownPlaygroundConfig, 'entry' | 'title' | 'id'>;
|
|
108
|
+
|
|
91
109
|
export declare interface DocsPrefetchOptions {
|
|
92
110
|
batchSize?: number;
|
|
93
111
|
idleTimeout?: number;
|
|
94
112
|
}
|
|
95
113
|
|
|
114
|
+
export declare interface DocsRendererComponentOptions {
|
|
115
|
+
fit?: RendererFit;
|
|
116
|
+
}
|
|
117
|
+
|
|
96
118
|
export declare interface DocsResourceContext {
|
|
97
119
|
source: string;
|
|
98
120
|
type: DocsResourceType;
|
|
@@ -163,6 +185,10 @@ declare type LegacyResourceField = Exclude<keyof ResourceRecord, 'identity' | 'u
|
|
|
163
185
|
|
|
164
186
|
export declare const listRendererEditorDemos: (lang: string) => RendererEditorDemoItem[];
|
|
165
187
|
|
|
188
|
+
export { MarkdownIndicatorConfig }
|
|
189
|
+
|
|
190
|
+
export { MarkdownTheme }
|
|
191
|
+
|
|
166
192
|
export declare const Network: HTTPController;
|
|
167
193
|
|
|
168
194
|
export declare const normalizeWorkspaceBase: (value?: string) => string;
|
|
@@ -270,6 +296,8 @@ declare interface RendererEditorDemoItem {
|
|
|
270
296
|
|
|
271
297
|
export declare const rendererEditorDemoPath: (lang: string, demo?: RendererEditorDemo) => string;
|
|
272
298
|
|
|
299
|
+
export { RendererFit }
|
|
300
|
+
|
|
273
301
|
export declare const resolveResource: (config: DocsConfig, context: Omit<DocsResourceContext, "runtime" | "base">) => Promise<string>;
|
|
274
302
|
|
|
275
303
|
declare interface ResourceCache {
|
|
@@ -428,6 +456,8 @@ declare interface SettingsAccess {
|
|
|
428
456
|
export declare interface SidebarItem {
|
|
429
457
|
label: string;
|
|
430
458
|
value?: string;
|
|
459
|
+
icon?: string | [normal: string, selected: string];
|
|
460
|
+
tag?: string;
|
|
431
461
|
children?: SidebarItem[];
|
|
432
462
|
}
|
|
433
463
|
|