@brillout/docpress 0.5.11 → 0.5.12
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/{chunk-W5PDEMRM.js → chunk-PHRTR4OU.js} +1 -1
- package/dist/cli/index.js +3 -3
- package/dist/{devServer-5TMJUDWP.js → devServer-QUFP2E4K.js} +2 -2
- package/dist/index.d.ts +4 -4
- package/dist/renderer/_default.page.server.d.ts +3 -3
- package/dist/renderer/_default.page.server.js +3 -3
- package/package.json +2 -2
- package/readme.md +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
vite_config_default
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-PHRTR4OU.js";
|
|
4
4
|
import "../chunk-OFUQWIQL.js";
|
|
5
5
|
import "../chunk-2ZTPUQGS.js";
|
|
6
6
|
import "../chunk-3QC7HYIF.js";
|
|
7
7
|
|
|
8
8
|
// src/cli/index.ts
|
|
9
9
|
import { build, preview } from "vite";
|
|
10
|
-
import { prerender } from "
|
|
10
|
+
import { prerender } from "vike/prerender";
|
|
11
11
|
var args = process.argv.filter(Boolean).slice(2);
|
|
12
12
|
var isDev = args.includes("dev");
|
|
13
13
|
var isPreview = args.includes("preview");
|
|
@@ -16,7 +16,7 @@ Error.stackTraceLimit = Infinity;
|
|
|
16
16
|
cli();
|
|
17
17
|
async function cli() {
|
|
18
18
|
if (isDev) {
|
|
19
|
-
await import("../devServer-
|
|
19
|
+
await import("../devServer-QUFP2E4K.js");
|
|
20
20
|
} else if (isBuild) {
|
|
21
21
|
await build(vite_config_default);
|
|
22
22
|
await build({ ...vite_config_default, build: { ssr: true } });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
vite_config_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PHRTR4OU.js";
|
|
4
4
|
import "./chunk-OFUQWIQL.js";
|
|
5
5
|
import "./chunk-2ZTPUQGS.js";
|
|
6
6
|
import "./chunk-3QC7HYIF.js";
|
|
@@ -8,7 +8,7 @@ import "./chunk-3QC7HYIF.js";
|
|
|
8
8
|
// src/cli/devServer.ts
|
|
9
9
|
import express from "express";
|
|
10
10
|
import * as vite from "vite";
|
|
11
|
-
import { renderPage } from "
|
|
11
|
+
import { renderPage } from "vike/server";
|
|
12
12
|
var viteVersion = vite.version || "2.?.?";
|
|
13
13
|
startServer();
|
|
14
14
|
async function startServer() {
|
package/dist/index.d.ts
CHANGED
|
@@ -67,17 +67,17 @@ type Config = {
|
|
|
67
67
|
twitterProfile: string;
|
|
68
68
|
};
|
|
69
69
|
faviconUrl: string;
|
|
70
|
-
algolia: null | {
|
|
71
|
-
PENDING_APPROVAL
|
|
70
|
+
algolia: null | ({
|
|
71
|
+
PENDING_APPROVAL?: true;
|
|
72
|
+
} & ({
|
|
72
73
|
appId?: undefined;
|
|
73
74
|
apiKey?: undefined;
|
|
74
75
|
indexName?: undefined;
|
|
75
76
|
} | {
|
|
76
|
-
PENDING_APPROVAL?: undefined;
|
|
77
77
|
appId: string;
|
|
78
78
|
apiKey: string;
|
|
79
79
|
indexName: string;
|
|
80
|
-
};
|
|
80
|
+
}));
|
|
81
81
|
headings: HeadingDefinition[];
|
|
82
82
|
headingsDetached: HeadingDetachedDefinition[];
|
|
83
83
|
navHeaderMobile: React.ReactNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { PageContextBuiltIn } from '
|
|
1
|
+
import * as vike_dist_esm_node_runtime_html_renderHtml from 'vike/dist/esm/node/runtime/html/renderHtml';
|
|
2
|
+
import { PageContextBuiltIn } from 'vike/types';
|
|
3
3
|
|
|
4
4
|
type MarkdownHeading = {
|
|
5
5
|
title: string;
|
|
@@ -17,6 +17,6 @@ type PageContextOriginal = PageContextBuiltIn & {
|
|
|
17
17
|
exports: Exports;
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
-
declare function render(pageContextOriginal: PageContextOriginal): Promise<
|
|
20
|
+
declare function render(pageContextOriginal: PageContextOriginal): Promise<vike_dist_esm_node_runtime_html_renderHtml.TemplateWrapped>;
|
|
21
21
|
|
|
22
22
|
export { render };
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
// src/renderer/_default.page.server.tsx
|
|
23
23
|
import ReactDOMServer from "react-dom/server";
|
|
24
24
|
import React7 from "react";
|
|
25
|
-
import { escapeInject as escapeInject2, dangerouslySkipEscape as dangerouslySkipEscape2 } from "
|
|
25
|
+
import { escapeInject as escapeInject2, dangerouslySkipEscape as dangerouslySkipEscape2 } from "vike/server";
|
|
26
26
|
|
|
27
27
|
// src/PageLayout.tsx
|
|
28
28
|
import React6 from "react";
|
|
@@ -562,7 +562,7 @@ function getPageHeadings(pageContext, currentHeading) {
|
|
|
562
562
|
}
|
|
563
563
|
|
|
564
564
|
// src/algolia/DocSearch.ts
|
|
565
|
-
import { dangerouslySkipEscape, escapeInject } from "
|
|
565
|
+
import { dangerouslySkipEscape, escapeInject } from "vike/server";
|
|
566
566
|
function getDocSearchCSS(pageContext) {
|
|
567
567
|
const docSearchCSS = !pageContext.meta.algolia ? "" : escapeInject`
|
|
568
568
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css@alpha" />
|
|
@@ -578,7 +578,7 @@ function getDocSearchJS(pageContext) {
|
|
|
578
578
|
const appId = '`, "';\n const apiKey = '", "';\n const indexName = '", "';\n const transformItems = ", ";\n docsearch({\n container: '#docsearch-desktop',\n appId, apiKey, indexName, transformItems\n });\n docsearch({\n container: '#docsearch-mobile',\n appId, apiKey, indexName, transformItems\n });\n <\/script>\n "])), algolia.appId || "FAKE", algolia.apiKey || "FAKE", algolia.indexName || "FAKE", dangerouslySkipEscape(getTransformItems()));
|
|
579
579
|
if (algolia == null ? void 0 : algolia.PENDING_APPROVAL) {
|
|
580
580
|
docSearchJS = escapeInject(_b || (_b = __template(["\n ", `
|
|
581
|
-
<script>[document.getElementById('docsearch-desktop'), document.getElementById('docsearch-mobile')].forEach(el => el.addEventListener('click', () => window.alert("Algolia approval is pending: the search results
|
|
581
|
+
<script>[document.getElementById('docsearch-desktop'), document.getElementById('docsearch-mobile')].forEach(el => el.addEventListener('click', () => window.alert("Algolia approval is pending: the search results may be empty until the approval process is completed.")))<\/script>
|
|
582
582
|
`])), docSearchJS);
|
|
583
583
|
}
|
|
584
584
|
return docSearchJS;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brillout/docpress",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.12",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"// Check types while developing": "",
|
|
6
6
|
"types": "tsc --noEmit --watch",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"shiki": "^0.10.1",
|
|
27
27
|
"twemoji": "^13.1.0",
|
|
28
28
|
"vite": "^4.3.9",
|
|
29
|
-
"
|
|
29
|
+
"vike": "^0.4.131"
|
|
30
30
|
},
|
|
31
31
|
"type": "module",
|
|
32
32
|
"exports": {
|
package/readme.md
CHANGED