@hyperbook/types 0.8.1 → 0.10.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/dist/index.d.ts +23 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export type Navigation = {
|
|
|
18
18
|
current: HyperbookPage | null;
|
|
19
19
|
pages: HyperbookPage[];
|
|
20
20
|
sections: HyperbookSection[];
|
|
21
|
+
glossary: HyperbookPage[];
|
|
21
22
|
};
|
|
22
23
|
export type Term = {
|
|
23
24
|
name: string;
|
|
@@ -28,8 +29,11 @@ export type Language = "de" | "en" | "fr" | "es" | "it" | "pt" | "nl";
|
|
|
28
29
|
export type HyperbookPageFrontmatter = {
|
|
29
30
|
name: string;
|
|
30
31
|
lang?: Language;
|
|
32
|
+
qrcode?: boolean;
|
|
31
33
|
description?: string;
|
|
32
34
|
keywords?: string[];
|
|
35
|
+
scripts?: string[];
|
|
36
|
+
styles?: string[];
|
|
33
37
|
index?: number;
|
|
34
38
|
hide?: boolean;
|
|
35
39
|
toc?: boolean;
|
|
@@ -55,9 +59,10 @@ export type HyperbookSection = HyperbookSectionFrontmatter & {
|
|
|
55
59
|
export type HyperbookFrontmatter = HyperbookPageFrontmatter | HyperbookSectionFrontmatter;
|
|
56
60
|
export type HyperbookJson = {
|
|
57
61
|
name: string;
|
|
58
|
-
trailingSlash?: boolean;
|
|
59
62
|
description?: string;
|
|
60
63
|
logo?: string;
|
|
64
|
+
allowDangerousHtml?: boolean;
|
|
65
|
+
qrcode?: boolean;
|
|
61
66
|
author?: {
|
|
62
67
|
name?: string;
|
|
63
68
|
url?: string;
|
|
@@ -68,6 +73,8 @@ export type HyperbookJson = {
|
|
|
68
73
|
body?: string;
|
|
69
74
|
code?: string;
|
|
70
75
|
};
|
|
76
|
+
scripts?: string[];
|
|
77
|
+
styles?: string[];
|
|
71
78
|
colors?: {
|
|
72
79
|
/**
|
|
73
80
|
* @format color-hex
|
|
@@ -93,6 +100,13 @@ export type HyperbookJson = {
|
|
|
93
100
|
links?: Link[];
|
|
94
101
|
elements?: {
|
|
95
102
|
bookmarks?: false | ElementConfig;
|
|
103
|
+
code?: ElementConfig & {
|
|
104
|
+
theme?: {
|
|
105
|
+
dark: string;
|
|
106
|
+
light: string;
|
|
107
|
+
} | string;
|
|
108
|
+
showLineNumbers?: boolean;
|
|
109
|
+
};
|
|
96
110
|
excalidraw?: ElementConfig & {
|
|
97
111
|
autoZoom?: boolean;
|
|
98
112
|
center?: boolean;
|
|
@@ -132,4 +146,12 @@ export type Hyperproject = {
|
|
|
132
146
|
type: "library";
|
|
133
147
|
projects: Hyperproject[];
|
|
134
148
|
});
|
|
149
|
+
export interface HyperbookContext {
|
|
150
|
+
root: string;
|
|
151
|
+
config: HyperbookJson;
|
|
152
|
+
library?: HyperlibraryJson;
|
|
153
|
+
project?: Hyperproject;
|
|
154
|
+
makeUrl(path: string | string[], base: "public" | "book" | "archive" | "glossary" | "assets"): string;
|
|
155
|
+
navigation: Navigation;
|
|
156
|
+
}
|
|
135
157
|
export {};
|