@rspress/core 2.0.0-beta.21 → 2.0.0-beta.23
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/bin/rspress.js +15 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +144 -0
- package/dist/index.d.ts +17 -11
- package/dist/index.js +517 -431
- package/dist/index.js.LICENSE.txt +10 -0
- package/dist/loader.d.ts +4 -7
- package/dist/loader.js +3 -4
- package/dist/processor.d.ts +6 -8
- package/dist/processor.js +287 -244
- package/dist/renderPageWorker.js +193 -0
- package/dist/runtime/ssrClientEntry.js +2 -1
- package/dist/runtime/ssrServerEntry.js +2 -2
- package/dist/shiki-transformers.js +14 -14
- package/meta-json-schema.json +382 -0
- package/nav-json-schema.json +118 -0
- package/package.json +20 -10
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { workerData } from "node:worker_threads";
|
|
2
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
3
|
+
import { logger as logger_logger } from "@rspress/shared/logger";
|
|
4
|
+
import { createHead, transformHtmlTemplate } from "@unhead/react/server";
|
|
5
|
+
import picocolors_0 from "picocolors";
|
|
6
|
+
import "node:fs/promises";
|
|
7
|
+
import node_path from "node:path";
|
|
8
|
+
import { APPEARANCE_KEY, RSPRESS_TEMP_DIR } from "@rspress/shared";
|
|
9
|
+
async function pMap(iterable, mapper, { concurrency = 1 / 0, stopOnError = true, signal } = {}) {
|
|
10
|
+
return new Promise((resolve_, reject_)=>{
|
|
11
|
+
if (void 0 === iterable[Symbol.iterator] && void 0 === iterable[Symbol.asyncIterator]) throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof iterable})`);
|
|
12
|
+
if ('function' != typeof mapper) throw new TypeError('Mapper function is required');
|
|
13
|
+
if (!(Number.isSafeInteger(concurrency) && concurrency >= 1 || concurrency === 1 / 0)) throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`);
|
|
14
|
+
const result = [];
|
|
15
|
+
const errors = [];
|
|
16
|
+
const skippedIndexesMap = new Map();
|
|
17
|
+
let isRejected = false;
|
|
18
|
+
let isResolved = false;
|
|
19
|
+
let isIterableDone = false;
|
|
20
|
+
let resolvingCount = 0;
|
|
21
|
+
let currentIndex = 0;
|
|
22
|
+
const iterator = void 0 === iterable[Symbol.iterator] ? iterable[Symbol.asyncIterator]() : iterable[Symbol.iterator]();
|
|
23
|
+
const signalListener = ()=>{
|
|
24
|
+
reject(signal.reason);
|
|
25
|
+
};
|
|
26
|
+
const cleanup = ()=>{
|
|
27
|
+
signal?.removeEventListener('abort', signalListener);
|
|
28
|
+
};
|
|
29
|
+
const resolve = (value)=>{
|
|
30
|
+
resolve_(value);
|
|
31
|
+
cleanup();
|
|
32
|
+
};
|
|
33
|
+
const reject = (reason)=>{
|
|
34
|
+
isRejected = true;
|
|
35
|
+
isResolved = true;
|
|
36
|
+
reject_(reason);
|
|
37
|
+
cleanup();
|
|
38
|
+
};
|
|
39
|
+
if (signal) {
|
|
40
|
+
if (signal.aborted) reject(signal.reason);
|
|
41
|
+
signal.addEventListener('abort', signalListener, {
|
|
42
|
+
once: true
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
const next = async ()=>{
|
|
46
|
+
if (isResolved) return;
|
|
47
|
+
const nextItem = await iterator.next();
|
|
48
|
+
const index = currentIndex;
|
|
49
|
+
currentIndex++;
|
|
50
|
+
if (nextItem.done) {
|
|
51
|
+
isIterableDone = true;
|
|
52
|
+
if (0 === resolvingCount && !isResolved) {
|
|
53
|
+
if (!stopOnError && errors.length > 0) return void reject(new AggregateError(errors));
|
|
54
|
+
isResolved = true;
|
|
55
|
+
if (0 === skippedIndexesMap.size) return void resolve(result);
|
|
56
|
+
const pureResult = [];
|
|
57
|
+
for (const [index, value] of result.entries())if (skippedIndexesMap.get(index) !== pMapSkip) pureResult.push(value);
|
|
58
|
+
resolve(pureResult);
|
|
59
|
+
}
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
resolvingCount++;
|
|
63
|
+
(async ()=>{
|
|
64
|
+
try {
|
|
65
|
+
const element = await nextItem.value;
|
|
66
|
+
if (isResolved) return;
|
|
67
|
+
const value = await mapper(element, index);
|
|
68
|
+
if (value === pMapSkip) skippedIndexesMap.set(index, value);
|
|
69
|
+
result[index] = value;
|
|
70
|
+
resolvingCount--;
|
|
71
|
+
await next();
|
|
72
|
+
} catch (error) {
|
|
73
|
+
if (stopOnError) reject(error);
|
|
74
|
+
else {
|
|
75
|
+
errors.push(error);
|
|
76
|
+
resolvingCount--;
|
|
77
|
+
try {
|
|
78
|
+
await next();
|
|
79
|
+
} catch (error) {
|
|
80
|
+
reject(error);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
})();
|
|
85
|
+
};
|
|
86
|
+
(async ()=>{
|
|
87
|
+
for(let index = 0; index < concurrency; index++){
|
|
88
|
+
try {
|
|
89
|
+
await next();
|
|
90
|
+
} catch (error) {
|
|
91
|
+
reject(error);
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
if (isIterableDone || isRejected) break;
|
|
95
|
+
}
|
|
96
|
+
})();
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
const pMapSkip = Symbol('skip');
|
|
100
|
+
function hintSSGFailed() {
|
|
101
|
+
logger_logger.info(`[Rspress v2] \`ssg: true\` requires the source code to support SSR. If the code is not compatible to SSR, the build process will fail. You can try:
|
|
102
|
+
1. Fix code to make it SSR-compatible.
|
|
103
|
+
2. Set \`ssg: false\` if the code in node_modules may be difficult to fix, but the SSG feature will be lost.`);
|
|
104
|
+
}
|
|
105
|
+
var package_namespaceObject = JSON.parse('{"i8":"2.0.0-beta.23"}');
|
|
106
|
+
const RSPRESS_VERSION = package_namespaceObject.i8;
|
|
107
|
+
`{
|
|
108
|
+
const saved = localStorage.getItem('${APPEARANCE_KEY}')
|
|
109
|
+
const preferDark = window.matchMedia('(prefers-color-scheme: dark)').matches
|
|
110
|
+
const isDark = !saved || saved === 'auto' ? preferDark : saved === 'dark'
|
|
111
|
+
document.documentElement.classList.toggle('dark', isDark)
|
|
112
|
+
document.documentElement.classList.toggle('rp-dark', isDark)
|
|
113
|
+
document.documentElement.style.colorScheme = isDark ? 'dark' : 'light'
|
|
114
|
+
}`.replace(/\n/g, ';').replace(/\s{2,}/g, '');
|
|
115
|
+
const dirname = node_path.dirname(fileURLToPath(new URL(import.meta.url)));
|
|
116
|
+
const PACKAGE_ROOT = node_path.join(dirname, '..');
|
|
117
|
+
node_path.join(PACKAGE_ROOT, 'index.html');
|
|
118
|
+
node_path.join(PACKAGE_ROOT, 'dist', 'runtime', 'csrClientEntry.js');
|
|
119
|
+
node_path.join(PACKAGE_ROOT, 'dist', 'runtime', 'ssrClientEntry.js');
|
|
120
|
+
node_path.join(PACKAGE_ROOT, 'dist', 'runtime', 'ssrServerEntry.js');
|
|
121
|
+
const APP_HTML_MARKER = '<!--<?- DOC_CONTENT ?>-->';
|
|
122
|
+
const HEAD_MARKER = '<!--<?- HEAD ?>-->';
|
|
123
|
+
const META_GENERATOR = '<!--<?- GENERATOR ?>-->';
|
|
124
|
+
node_path.join(process.cwd(), 'node_modules', RSPRESS_TEMP_DIR);
|
|
125
|
+
async function renderConfigHead(head, route) {
|
|
126
|
+
if (!isRouteMeta(route)) return '';
|
|
127
|
+
if (!head || 0 === head.length) return '';
|
|
128
|
+
return head.map((head)=>{
|
|
129
|
+
if ('string' == typeof head) return head;
|
|
130
|
+
if ('function' == typeof head) {
|
|
131
|
+
const resultHead = head(route);
|
|
132
|
+
if (!resultHead) return '';
|
|
133
|
+
if ('string' == typeof resultHead) return resultHead;
|
|
134
|
+
return `<${resultHead[0]} ${renderAttrs(resultHead[1])}>`;
|
|
135
|
+
}
|
|
136
|
+
return `<${head[0]} ${renderAttrs(head[1])}>`;
|
|
137
|
+
}).join('');
|
|
138
|
+
}
|
|
139
|
+
async function renderHtmlTemplate(htmlTemplate, head, route, appHtml = '') {
|
|
140
|
+
const replacedHtmlTemplate = htmlTemplate.replace(APP_HTML_MARKER, ()=>appHtml).replace(META_GENERATOR, ()=>`<meta name="generator" content="Rspress v${RSPRESS_VERSION}">`).replace(HEAD_MARKER, [
|
|
141
|
+
await renderConfigHead(head, route)
|
|
142
|
+
].join(''));
|
|
143
|
+
return replacedHtmlTemplate;
|
|
144
|
+
}
|
|
145
|
+
function renderAttrs(attrs) {
|
|
146
|
+
return Object.entries(attrs).map(([key, value])=>{
|
|
147
|
+
if ('boolean' == typeof value) return key;
|
|
148
|
+
if ('string' == typeof value || 'number' == typeof value) return `${key}="${value}"`;
|
|
149
|
+
throw new Error(`Invalid value for attribute ${key}:${JSON.stringify(value)}`);
|
|
150
|
+
}).join('');
|
|
151
|
+
}
|
|
152
|
+
function isRouteMeta(route) {
|
|
153
|
+
return !!route && 'object' == typeof route && 'routePath' in route && 'absolutePath' in route;
|
|
154
|
+
}
|
|
155
|
+
async function renderPage(route, htmlTemplate, configHead, ssrBundlePath) {
|
|
156
|
+
let render;
|
|
157
|
+
try {
|
|
158
|
+
const { default: ssrExports } = await import(pathToFileURL(ssrBundlePath).toString());
|
|
159
|
+
render = await ssrExports.render;
|
|
160
|
+
} catch (e) {
|
|
161
|
+
if (e instanceof Error) {
|
|
162
|
+
logger_logger.error(`Failed to load SSG bundle: ${picocolors_0.yellow(ssrBundlePath)}: ${e.message}`);
|
|
163
|
+
logger_logger.debug(e);
|
|
164
|
+
hintSSGFailed();
|
|
165
|
+
}
|
|
166
|
+
throw e;
|
|
167
|
+
}
|
|
168
|
+
const head = createHead();
|
|
169
|
+
const { routePath } = route;
|
|
170
|
+
let appHtml = '';
|
|
171
|
+
if (render) try {
|
|
172
|
+
({ appHtml } = await render(routePath, head));
|
|
173
|
+
} catch (e) {
|
|
174
|
+
if (e instanceof Error) {
|
|
175
|
+
logger_logger.error(`Page "${picocolors_0.yellow(routePath)}" SSG rendering failed.\n ${picocolors_0.gray(e.toString())}`);
|
|
176
|
+
throw e;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
const replacedHtmlTemplate = await renderHtmlTemplate(htmlTemplate, configHead, route, appHtml);
|
|
180
|
+
const html = await transformHtmlTemplate(head, replacedHtmlTemplate);
|
|
181
|
+
return html;
|
|
182
|
+
}
|
|
183
|
+
const params = workerData?.[1]?.params;
|
|
184
|
+
if (!params) throw new Error('SSG Worker Thread workerData params missing');
|
|
185
|
+
const { htmlTemplate: renderPageWorker_htmlTemplate, head: renderPageWorker_head, ssrBundlePath: renderPageWorker_ssrBundlePath } = params;
|
|
186
|
+
const exportWorkerGlueFn = async ({ routes })=>pMap(routes, async (route)=>{
|
|
187
|
+
const html = await renderPage(route, renderPageWorker_htmlTemplate, renderPageWorker_head, renderPageWorker_ssrBundlePath);
|
|
188
|
+
return html;
|
|
189
|
+
}, {
|
|
190
|
+
concurrency: 10
|
|
191
|
+
});
|
|
192
|
+
const renderPageWorker = exportWorkerGlueFn;
|
|
193
|
+
export { renderPageWorker as default };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { removeBase } from "@rspress/runtime";
|
|
2
3
|
import { startTransition } from "react";
|
|
3
4
|
import { hydrateRoot } from "react-dom/client";
|
|
4
5
|
import { ClientApp } from "./ClientApp.js";
|
|
5
6
|
import { initPageData } from "./initPageData.js";
|
|
6
7
|
async function renderInBrowser() {
|
|
7
8
|
const container = document.getElementById('root');
|
|
8
|
-
const initialPageData = await initPageData(window.location.pathname);
|
|
9
|
+
const initialPageData = await initPageData(removeBase(window.location.pathname));
|
|
9
10
|
startTransition(()=>{
|
|
10
11
|
hydrateRoot(container, /*#__PURE__*/ jsx(ClientApp, {
|
|
11
12
|
initialPageData: initialPageData
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { PassThrough } from "node:stream";
|
|
3
|
+
import { text as consumers_text } from "node:stream/consumers";
|
|
2
4
|
import { DataContext, ThemeContext, pathnameToRouteService, withBase } from "@rspress/runtime";
|
|
3
5
|
import { StaticRouter } from "@rspress/runtime/server";
|
|
4
6
|
import { UnheadProvider } from "@unhead/react/server";
|
|
5
7
|
import { renderToPipeableStream } from "react-dom/server";
|
|
6
|
-
import { PassThrough } from "node:stream";
|
|
7
|
-
import { text as consumers_text } from "node:stream/consumers";
|
|
8
8
|
import { base } from "virtual-runtime-config";
|
|
9
9
|
import { App } from "./App.js";
|
|
10
10
|
import { initPageData } from "./initPageData.js";
|
|
@@ -1,23 +1,10 @@
|
|
|
1
1
|
/*! For license information please see shiki-transformers.js.LICENSE.txt */
|
|
2
|
-
const SHIKI_TRANSFORMER_LINE_NUMBER = 'shiki-transformer:line-number';
|
|
3
|
-
function transformerLineNumber(options = {}) {
|
|
4
|
-
const { classActiveLine = 'line-number', classActivePre = 'has-line-number' } = options;
|
|
5
|
-
return {
|
|
6
|
-
name: SHIKI_TRANSFORMER_LINE_NUMBER,
|
|
7
|
-
pre (pre) {
|
|
8
|
-
return this.addClassToHast(pre, classActivePre);
|
|
9
|
-
},
|
|
10
|
-
line (node) {
|
|
11
|
-
this.addClassToHast(node, classActiveLine);
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
2
|
const SHIKI_TRANSFORMER_ADD_TITLE = 'shiki-transformer:add-title';
|
|
16
3
|
function parseTitleFromMeta(meta) {
|
|
17
4
|
if (!meta) return '';
|
|
18
5
|
const kvList = meta.split(' ').filter(Boolean);
|
|
19
6
|
for (const item of kvList){
|
|
20
|
-
const [k, v] = item.split('=');
|
|
7
|
+
const [k, v = ''] = item.split('=').filter(Boolean);
|
|
21
8
|
if ('title' === k && v.length > 0) return v.replace(/["'`]/g, '');
|
|
22
9
|
}
|
|
23
10
|
return '';
|
|
@@ -35,6 +22,19 @@ function transformerAddTitle() {
|
|
|
35
22
|
}
|
|
36
23
|
};
|
|
37
24
|
}
|
|
25
|
+
const SHIKI_TRANSFORMER_LINE_NUMBER = 'shiki-transformer:line-number';
|
|
26
|
+
function transformerLineNumber(options = {}) {
|
|
27
|
+
const { classActiveLine = 'line-number', classActivePre = 'has-line-number' } = options;
|
|
28
|
+
return {
|
|
29
|
+
name: SHIKI_TRANSFORMER_LINE_NUMBER,
|
|
30
|
+
pre (pre) {
|
|
31
|
+
return this.addClassToHast(pre, classActivePre);
|
|
32
|
+
},
|
|
33
|
+
line (node) {
|
|
34
|
+
this.addClassToHast(node, classActiveLine);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
38
|
/**
|
|
39
39
|
* these codes are copied from @shiki/transformers, transformerMetaHighlight
|
|
40
40
|
* @source https://github.com/shikijs/shiki/blob/f5cf06f55a0b4643d7b02f15ee2c5033be6f1245/packages/transformers/src/transformers/meta-highlight.ts#L56
|
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$ref": "#/definitions/MetaJson",
|
|
4
|
+
"definitions": {
|
|
5
|
+
"MetaJson": {
|
|
6
|
+
"$ref": "#/definitions/SideMeta"
|
|
7
|
+
},
|
|
8
|
+
"SideMeta": {
|
|
9
|
+
"type": "array",
|
|
10
|
+
"items": {
|
|
11
|
+
"$ref": "#/definitions/SideMetaItem"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"SideMetaItem": {
|
|
15
|
+
"anyOf": [
|
|
16
|
+
{
|
|
17
|
+
"$ref": "#/definitions/FileSideMeta"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"$ref": "#/definitions/DirSideMeta"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"$ref": "#/definitions/DividerSideMeta"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"$ref": "#/definitions/SectionHeaderMeta"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"$ref": "#/definitions/CustomLinkMeta"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"type": "string"
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
"FileSideMeta": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"properties": {
|
|
39
|
+
"type": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"const": "file"
|
|
42
|
+
},
|
|
43
|
+
"name": {
|
|
44
|
+
"type": "string"
|
|
45
|
+
},
|
|
46
|
+
"label": {
|
|
47
|
+
"type": "string"
|
|
48
|
+
},
|
|
49
|
+
"tag": {
|
|
50
|
+
"type": "string"
|
|
51
|
+
},
|
|
52
|
+
"overviewHeaders": {
|
|
53
|
+
"type": "array",
|
|
54
|
+
"items": {
|
|
55
|
+
"type": "number"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"context": {
|
|
59
|
+
"type": "string"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"required": [
|
|
63
|
+
"type",
|
|
64
|
+
"name"
|
|
65
|
+
],
|
|
66
|
+
"additionalProperties": false
|
|
67
|
+
},
|
|
68
|
+
"DirSideMeta": {
|
|
69
|
+
"type": "object",
|
|
70
|
+
"properties": {
|
|
71
|
+
"type": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"const": "dir"
|
|
74
|
+
},
|
|
75
|
+
"name": {
|
|
76
|
+
"type": "string"
|
|
77
|
+
},
|
|
78
|
+
"label": {
|
|
79
|
+
"type": "string"
|
|
80
|
+
},
|
|
81
|
+
"tag": {
|
|
82
|
+
"type": "string"
|
|
83
|
+
},
|
|
84
|
+
"overviewHeaders": {
|
|
85
|
+
"type": "array",
|
|
86
|
+
"items": {
|
|
87
|
+
"type": "number"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"context": {
|
|
91
|
+
"type": "string"
|
|
92
|
+
},
|
|
93
|
+
"collapsible": {
|
|
94
|
+
"type": "boolean"
|
|
95
|
+
},
|
|
96
|
+
"collapsed": {
|
|
97
|
+
"type": "boolean"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"required": [
|
|
101
|
+
"type",
|
|
102
|
+
"name"
|
|
103
|
+
],
|
|
104
|
+
"additionalProperties": false
|
|
105
|
+
},
|
|
106
|
+
"DividerSideMeta": {
|
|
107
|
+
"type": "object",
|
|
108
|
+
"properties": {
|
|
109
|
+
"type": {
|
|
110
|
+
"type": "string",
|
|
111
|
+
"const": "divider"
|
|
112
|
+
},
|
|
113
|
+
"dashed": {
|
|
114
|
+
"type": "boolean"
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"required": [
|
|
118
|
+
"type"
|
|
119
|
+
],
|
|
120
|
+
"additionalProperties": false
|
|
121
|
+
},
|
|
122
|
+
"SectionHeaderMeta": {
|
|
123
|
+
"type": "object",
|
|
124
|
+
"properties": {
|
|
125
|
+
"type": {
|
|
126
|
+
"type": "string",
|
|
127
|
+
"const": "section-header"
|
|
128
|
+
},
|
|
129
|
+
"label": {
|
|
130
|
+
"type": "string"
|
|
131
|
+
},
|
|
132
|
+
"tag": {
|
|
133
|
+
"type": "string"
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"required": [
|
|
137
|
+
"type",
|
|
138
|
+
"label"
|
|
139
|
+
],
|
|
140
|
+
"additionalProperties": false
|
|
141
|
+
},
|
|
142
|
+
"CustomLinkMeta": {
|
|
143
|
+
"anyOf": [
|
|
144
|
+
{
|
|
145
|
+
"type": "object",
|
|
146
|
+
"properties": {
|
|
147
|
+
"type": {
|
|
148
|
+
"type": "string",
|
|
149
|
+
"const": "custom-link"
|
|
150
|
+
},
|
|
151
|
+
"label": {
|
|
152
|
+
"type": "string"
|
|
153
|
+
},
|
|
154
|
+
"tag": {
|
|
155
|
+
"type": "string"
|
|
156
|
+
},
|
|
157
|
+
"overviewHeaders": {
|
|
158
|
+
"type": "array",
|
|
159
|
+
"items": {
|
|
160
|
+
"type": "number"
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
"context": {
|
|
164
|
+
"type": "string"
|
|
165
|
+
},
|
|
166
|
+
"link": {
|
|
167
|
+
"type": "string"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"required": [
|
|
171
|
+
"type",
|
|
172
|
+
"label",
|
|
173
|
+
"link"
|
|
174
|
+
],
|
|
175
|
+
"additionalProperties": false
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"type": "object",
|
|
179
|
+
"properties": {
|
|
180
|
+
"type": {
|
|
181
|
+
"type": "string",
|
|
182
|
+
"const": "custom-link"
|
|
183
|
+
},
|
|
184
|
+
"label": {
|
|
185
|
+
"type": "string"
|
|
186
|
+
},
|
|
187
|
+
"tag": {
|
|
188
|
+
"type": "string"
|
|
189
|
+
},
|
|
190
|
+
"overviewHeaders": {
|
|
191
|
+
"type": "array",
|
|
192
|
+
"items": {
|
|
193
|
+
"type": "number"
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"context": {
|
|
197
|
+
"type": "string"
|
|
198
|
+
},
|
|
199
|
+
"link": {
|
|
200
|
+
"type": "string"
|
|
201
|
+
},
|
|
202
|
+
"collapsible": {
|
|
203
|
+
"type": "boolean"
|
|
204
|
+
},
|
|
205
|
+
"collapsed": {
|
|
206
|
+
"type": "boolean"
|
|
207
|
+
},
|
|
208
|
+
"items": {
|
|
209
|
+
"type": "array",
|
|
210
|
+
"items": {
|
|
211
|
+
"anyOf": [
|
|
212
|
+
{
|
|
213
|
+
"type": "object",
|
|
214
|
+
"properties": {
|
|
215
|
+
"type": {
|
|
216
|
+
"type": "string",
|
|
217
|
+
"const": "custom-link"
|
|
218
|
+
},
|
|
219
|
+
"label": {
|
|
220
|
+
"type": "string"
|
|
221
|
+
},
|
|
222
|
+
"tag": {
|
|
223
|
+
"type": "string"
|
|
224
|
+
},
|
|
225
|
+
"overviewHeaders": {
|
|
226
|
+
"type": "array",
|
|
227
|
+
"items": {
|
|
228
|
+
"type": "number"
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
"context": {
|
|
232
|
+
"type": "string"
|
|
233
|
+
},
|
|
234
|
+
"link": {
|
|
235
|
+
"type": "string"
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
"required": [
|
|
239
|
+
"label",
|
|
240
|
+
"link"
|
|
241
|
+
],
|
|
242
|
+
"additionalProperties": false
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"type": "object",
|
|
246
|
+
"properties": {
|
|
247
|
+
"type": {
|
|
248
|
+
"type": "string",
|
|
249
|
+
"const": "custom-link"
|
|
250
|
+
},
|
|
251
|
+
"label": {
|
|
252
|
+
"type": "string"
|
|
253
|
+
},
|
|
254
|
+
"tag": {
|
|
255
|
+
"type": "string"
|
|
256
|
+
},
|
|
257
|
+
"overviewHeaders": {
|
|
258
|
+
"type": "array",
|
|
259
|
+
"items": {
|
|
260
|
+
"type": "number"
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
"context": {
|
|
264
|
+
"type": "string"
|
|
265
|
+
},
|
|
266
|
+
"link": {
|
|
267
|
+
"type": "string"
|
|
268
|
+
},
|
|
269
|
+
"collapsible": {
|
|
270
|
+
"type": "boolean"
|
|
271
|
+
},
|
|
272
|
+
"collapsed": {
|
|
273
|
+
"type": "boolean"
|
|
274
|
+
},
|
|
275
|
+
"items": {
|
|
276
|
+
"type": "array",
|
|
277
|
+
"items": {
|
|
278
|
+
"$ref": "#/definitions/alias-926151818-564-1152-926151818-0-1986"
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
"required": [
|
|
283
|
+
"label",
|
|
284
|
+
"items"
|
|
285
|
+
],
|
|
286
|
+
"additionalProperties": false
|
|
287
|
+
}
|
|
288
|
+
]
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
"required": [
|
|
293
|
+
"type",
|
|
294
|
+
"label",
|
|
295
|
+
"items"
|
|
296
|
+
],
|
|
297
|
+
"additionalProperties": false
|
|
298
|
+
}
|
|
299
|
+
]
|
|
300
|
+
},
|
|
301
|
+
"alias-926151818-564-1152-926151818-0-1986": {
|
|
302
|
+
"anyOf": [
|
|
303
|
+
{
|
|
304
|
+
"type": "object",
|
|
305
|
+
"properties": {
|
|
306
|
+
"type": {
|
|
307
|
+
"type": "string",
|
|
308
|
+
"const": "custom-link"
|
|
309
|
+
},
|
|
310
|
+
"label": {
|
|
311
|
+
"type": "string"
|
|
312
|
+
},
|
|
313
|
+
"tag": {
|
|
314
|
+
"type": "string"
|
|
315
|
+
},
|
|
316
|
+
"overviewHeaders": {
|
|
317
|
+
"type": "array",
|
|
318
|
+
"items": {
|
|
319
|
+
"type": "number"
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
"context": {
|
|
323
|
+
"type": "string"
|
|
324
|
+
},
|
|
325
|
+
"link": {
|
|
326
|
+
"type": "string"
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
"required": [
|
|
330
|
+
"label",
|
|
331
|
+
"link"
|
|
332
|
+
],
|
|
333
|
+
"additionalProperties": false
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
"type": "object",
|
|
337
|
+
"properties": {
|
|
338
|
+
"type": {
|
|
339
|
+
"type": "string",
|
|
340
|
+
"const": "custom-link"
|
|
341
|
+
},
|
|
342
|
+
"label": {
|
|
343
|
+
"type": "string"
|
|
344
|
+
},
|
|
345
|
+
"tag": {
|
|
346
|
+
"type": "string"
|
|
347
|
+
},
|
|
348
|
+
"overviewHeaders": {
|
|
349
|
+
"type": "array",
|
|
350
|
+
"items": {
|
|
351
|
+
"type": "number"
|
|
352
|
+
}
|
|
353
|
+
},
|
|
354
|
+
"context": {
|
|
355
|
+
"type": "string"
|
|
356
|
+
},
|
|
357
|
+
"link": {
|
|
358
|
+
"type": "string"
|
|
359
|
+
},
|
|
360
|
+
"collapsible": {
|
|
361
|
+
"type": "boolean"
|
|
362
|
+
},
|
|
363
|
+
"collapsed": {
|
|
364
|
+
"type": "boolean"
|
|
365
|
+
},
|
|
366
|
+
"items": {
|
|
367
|
+
"type": "array",
|
|
368
|
+
"items": {
|
|
369
|
+
"$ref": "#/definitions/alias-926151818-564-1152-926151818-0-1986"
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
"required": [
|
|
374
|
+
"label",
|
|
375
|
+
"items"
|
|
376
|
+
],
|
|
377
|
+
"additionalProperties": false
|
|
378
|
+
}
|
|
379
|
+
]
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
}
|