@deot/docs-markdown 1.0.10 → 1.1.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/README.md +50 -10
- package/dist/index.cjs +770 -316
- package/dist/index.d.ts +35 -2
- package/dist/index.js +767 -318
- package/dist/index.style.css +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ComponentOptionsMixin } from 'vue';
|
|
2
2
|
import { ComponentProvideOptions } from 'vue';
|
|
3
3
|
import { DefineComponent } from 'vue';
|
|
4
|
+
import type { InjectionKey } from 'vue';
|
|
4
5
|
import type { Language } from '@deot/docs-locale';
|
|
5
|
-
import type {
|
|
6
|
+
import type { PlaygroundExpandable } from '@deot/docs-playground';
|
|
6
7
|
import type { PlaygroundFiles } from '@deot/docs-playground';
|
|
7
8
|
import type { PlaygroundOptions } from '@deot/docs-playground';
|
|
8
9
|
import type { PlaygroundPreviewInset } from '@deot/docs-playground';
|
|
@@ -18,18 +19,36 @@ change: (value: string) => any;
|
|
|
18
19
|
onChange?: ((value: string) => any) | undefined;
|
|
19
20
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
20
21
|
}>, {
|
|
22
|
+
playground: MarkdownPlaygroundConfig;
|
|
21
23
|
indicator: MarkdownIndicatorConfig;
|
|
24
|
+
theme: MarkdownTheme;
|
|
22
25
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
23
26
|
|
|
24
27
|
declare type __VLS_Props = {
|
|
25
28
|
indicator?: MarkdownIndicatorConfig;
|
|
26
29
|
locale?: Language;
|
|
30
|
+
theme?: MarkdownTheme;
|
|
31
|
+
playground?: MarkdownPlaygroundConfig;
|
|
32
|
+
tabQuery?: MarkdownTabQueryAdapter;
|
|
27
33
|
modelValue?: string;
|
|
28
34
|
value?: string;
|
|
29
35
|
};
|
|
30
36
|
|
|
37
|
+
export declare const collectMarkdownHeadings: (root: ParentNode | null | undefined) => MarkdownHeading[];
|
|
38
|
+
|
|
39
|
+
export declare const createHistoryTabQueryAdapter: () => MarkdownTabQueryAdapter;
|
|
40
|
+
|
|
41
|
+
export declare const getMarkdownHeadingTitle: (element: HTMLElement) => string;
|
|
42
|
+
|
|
31
43
|
export declare const Markdown: typeof __VLS_export;
|
|
32
44
|
|
|
45
|
+
export declare interface MarkdownHeading {
|
|
46
|
+
element: HTMLElement;
|
|
47
|
+
id: string;
|
|
48
|
+
level: number;
|
|
49
|
+
text: string;
|
|
50
|
+
}
|
|
51
|
+
|
|
33
52
|
export declare type MarkdownIndicatorConfig = boolean | MarkdownIndicatorOptions;
|
|
34
53
|
|
|
35
54
|
export declare interface MarkdownIndicatorOptions {
|
|
@@ -42,13 +61,15 @@ export declare interface MarkdownIndicatorOptions {
|
|
|
42
61
|
|
|
43
62
|
export declare interface MarkdownPlaygroundConfig {
|
|
44
63
|
entry?: string;
|
|
64
|
+
title?: string;
|
|
65
|
+
id?: string;
|
|
45
66
|
views?: PlaygroundView[];
|
|
46
67
|
viewport?: PlaygroundViewport;
|
|
47
68
|
viewportOptions?: PlaygroundViewport[];
|
|
48
69
|
styleless?: boolean;
|
|
49
70
|
options?: PlaygroundOptions;
|
|
50
71
|
previewInset?: PlaygroundPreviewInset;
|
|
51
|
-
|
|
72
|
+
expandable?: PlaygroundExpandable;
|
|
52
73
|
previewOptions?: PlaygroundPreviewOptions;
|
|
53
74
|
}
|
|
54
75
|
|
|
@@ -76,6 +97,18 @@ export declare interface MarkdownSearchSection {
|
|
|
76
97
|
text: string;
|
|
77
98
|
}
|
|
78
99
|
|
|
100
|
+
export declare interface MarkdownTabQueryAdapter {
|
|
101
|
+
get: () => string;
|
|
102
|
+
set: (tab: string) => void;
|
|
103
|
+
subscribe?: (listener: () => void) => () => void;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export declare const markdownTabQueryKey: InjectionKey<MarkdownTabQueryAdapter>;
|
|
107
|
+
|
|
108
|
+
export declare type MarkdownTheme = 'default' | 'traditional';
|
|
109
|
+
|
|
79
110
|
export declare const parseMarkdownSearchSections: (content: string) => MarkdownSearchDocument;
|
|
80
111
|
|
|
112
|
+
export declare const toMarkdownTabId: (title: string) => string;
|
|
113
|
+
|
|
81
114
|
export { }
|