@brillout/docpress 0.5.33 → 0.5.35
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-GMA6WHHB.js → chunk-MGOI4AFO.js} +28 -40
- package/dist/index.d.ts +53 -3
- package/dist/index.js +355 -108
- package/dist/people-72KKQHU4.svg +9 -0
- package/dist/renderer/_default.page.server.css +0 -3
- package/dist/renderer/_default.page.server.d.ts +2 -2
- package/dist/renderer/_default.page.server.js +20 -24
- package/package.json +11 -3
|
@@ -47,32 +47,31 @@ function RepoLink({ path, text, editMode }) {
|
|
|
47
47
|
// src/parseTitle.ts
|
|
48
48
|
import React3 from "react";
|
|
49
49
|
function getHeadingsWithProcessedTitle(config) {
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
assert(heading.isListTitle === true);
|
|
56
|
-
let titleParsed = parseTitle(titleInNav);
|
|
57
|
-
titleInNavProcessed = React3.createElement(React3.Fragment, {}, getListPrefix(), titleParsed);
|
|
58
|
-
} else {
|
|
50
|
+
const headingsWithoutBreadcrumb = config.headings.map(
|
|
51
|
+
(heading) => {
|
|
52
|
+
const titleProcessed = parseTitle(heading.title);
|
|
53
|
+
const titleInNav = heading.titleInNav || heading.title;
|
|
54
|
+
let titleInNavProcessed;
|
|
59
55
|
titleInNavProcessed = parseTitle(titleInNav);
|
|
56
|
+
if ("titleEmoji" in heading) {
|
|
57
|
+
assert(heading.titleEmoji);
|
|
58
|
+
titleInNavProcessed = withEmoji(heading.titleEmoji, titleInNavProcessed);
|
|
59
|
+
}
|
|
60
|
+
const headingProcessed = {
|
|
61
|
+
...heading,
|
|
62
|
+
title: titleProcessed,
|
|
63
|
+
titleInNav: titleInNavProcessed
|
|
64
|
+
};
|
|
65
|
+
return headingProcessed;
|
|
60
66
|
}
|
|
61
|
-
|
|
62
|
-
assert(heading.titleEmoji);
|
|
63
|
-
titleInNavProcessed = withEmoji(heading.titleEmoji, titleInNavProcessed);
|
|
64
|
-
}
|
|
65
|
-
const headingProcessed = {
|
|
66
|
-
...heading,
|
|
67
|
-
title: titleProcessed,
|
|
68
|
-
titleInNav: titleInNavProcessed
|
|
69
|
-
};
|
|
70
|
-
return headingProcessed;
|
|
71
|
-
});
|
|
67
|
+
);
|
|
72
68
|
const headingsProcessed = [];
|
|
73
|
-
|
|
74
|
-
const
|
|
75
|
-
headingsProcessed.push({
|
|
69
|
+
headingsWithoutBreadcrumb.forEach((heading) => {
|
|
70
|
+
const headingsBreadcrumb = getHeadingsBreadcrumb(heading, headingsProcessed);
|
|
71
|
+
headingsProcessed.push({
|
|
72
|
+
...heading,
|
|
73
|
+
headingsBreadcrumb
|
|
74
|
+
});
|
|
76
75
|
});
|
|
77
76
|
const headingsDetachedProcessed = config.headingsDetached.map((headingsDetached) => {
|
|
78
77
|
const { url, title } = headingsDetached;
|
|
@@ -86,29 +85,23 @@ function getHeadingsWithProcessedTitle(config) {
|
|
|
86
85
|
level: 2,
|
|
87
86
|
title: titleProcessed,
|
|
88
87
|
titleInNav: titleProcessed,
|
|
89
|
-
|
|
88
|
+
headingsBreadcrumb: null
|
|
90
89
|
};
|
|
91
90
|
});
|
|
92
91
|
assertHeadingsUrl([...headingsProcessed, ...headingsDetachedProcessed]);
|
|
93
92
|
return { headingsProcessed, headingsDetachedProcessed };
|
|
94
93
|
}
|
|
95
|
-
function
|
|
96
|
-
const
|
|
94
|
+
function getHeadingsBreadcrumb(heading, headings) {
|
|
95
|
+
const headingsBreadcrumb = [];
|
|
97
96
|
let levelCurrent = heading.level;
|
|
98
|
-
let listTitleParentFound = false;
|
|
99
97
|
headings.slice().reverse().forEach((parentCandidate) => {
|
|
100
|
-
let isListTitleParent = false;
|
|
101
|
-
if (!listTitleParentFound && levelCurrent === heading.level && parentCandidate.level === heading.level && !parentCandidate.isListTitle && heading.isListTitle) {
|
|
102
|
-
isListTitleParent = true;
|
|
103
|
-
listTitleParentFound = true;
|
|
104
|
-
}
|
|
105
98
|
const isParent = parentCandidate.level < levelCurrent;
|
|
106
|
-
if (isParent
|
|
99
|
+
if (isParent) {
|
|
107
100
|
levelCurrent = parentCandidate.level;
|
|
108
|
-
|
|
101
|
+
headingsBreadcrumb.push(parentCandidate);
|
|
109
102
|
}
|
|
110
103
|
});
|
|
111
|
-
return
|
|
104
|
+
return headingsBreadcrumb;
|
|
112
105
|
}
|
|
113
106
|
function assertHeadingsUrl(headings) {
|
|
114
107
|
headings.forEach((heading) => {
|
|
@@ -118,11 +111,6 @@ function assertHeadingsUrl(headings) {
|
|
|
118
111
|
}
|
|
119
112
|
});
|
|
120
113
|
}
|
|
121
|
-
function getListPrefix() {
|
|
122
|
-
const nonBreakingSpace = String.fromCodePoint(160);
|
|
123
|
-
const bulletPoint = String.fromCodePoint(8226);
|
|
124
|
-
return nonBreakingSpace + bulletPoint + nonBreakingSpace;
|
|
125
|
-
}
|
|
126
114
|
function parseTitle(title) {
|
|
127
115
|
const parts = [];
|
|
128
116
|
let current;
|
package/dist/index.d.ts
CHANGED
|
@@ -36,7 +36,6 @@ type HeadingDefinition = HeadingBase & (({
|
|
|
36
36
|
level: 4;
|
|
37
37
|
} & HeadingAbstract) | {
|
|
38
38
|
level: 2;
|
|
39
|
-
isListTitle?: true;
|
|
40
39
|
sectionTitles?: string[];
|
|
41
40
|
url: null | string;
|
|
42
41
|
} | {
|
|
@@ -60,8 +59,8 @@ type Config = {
|
|
|
60
59
|
projectInfo: {
|
|
61
60
|
githubRepository: string;
|
|
62
61
|
githubIssues: string;
|
|
62
|
+
githubDiscussions?: string;
|
|
63
63
|
projectName: string;
|
|
64
|
-
projectNameJsx?: JSX.Element;
|
|
65
64
|
projectVersion: string;
|
|
66
65
|
discordInvite: string;
|
|
67
66
|
twitterProfile: string;
|
|
@@ -142,6 +141,37 @@ declare function HorizontalLine({ primary }: {
|
|
|
142
141
|
primary?: true;
|
|
143
142
|
}): JSX.Element;
|
|
144
143
|
|
|
144
|
+
type Children = (string | JSX.Element) | (string | JSX.Element)[];
|
|
145
|
+
declare function SupporterSection({ children }: {
|
|
146
|
+
children?: Children;
|
|
147
|
+
}): JSX.Element;
|
|
148
|
+
declare function SectionDescription({ children }: {
|
|
149
|
+
children?: Children;
|
|
150
|
+
}): JSX.Element;
|
|
151
|
+
declare function Individuals({ children }: {
|
|
152
|
+
children?: Children;
|
|
153
|
+
}): JSX.Element;
|
|
154
|
+
declare function Supporter({ username, avatarUrl }: {
|
|
155
|
+
username: string;
|
|
156
|
+
avatarUrl?: string;
|
|
157
|
+
}): JSX.Element;
|
|
158
|
+
declare function SupporterImg({ imgSrc, // has precedence over avatarUrl
|
|
159
|
+
avatarUrl, // has precedence over username
|
|
160
|
+
username, imgAlt, width, height, padding }: {
|
|
161
|
+
imgSrc?: string;
|
|
162
|
+
avatarUrl?: string;
|
|
163
|
+
username?: string;
|
|
164
|
+
imgAlt?: string;
|
|
165
|
+
width: number;
|
|
166
|
+
height: number;
|
|
167
|
+
padding?: number;
|
|
168
|
+
}): JSX.Element;
|
|
169
|
+
declare function CallToAction({ iconUrl, text, href }: {
|
|
170
|
+
iconUrl: string;
|
|
171
|
+
text: string;
|
|
172
|
+
href: string;
|
|
173
|
+
}): JSX.Element;
|
|
174
|
+
|
|
145
175
|
type Plan = 'indie' | 'bronze' | 'silver' | 'gold' | 'platinum';
|
|
146
176
|
type SponsorCompany = {
|
|
147
177
|
companyName: string;
|
|
@@ -162,6 +192,26 @@ type DivSize = {
|
|
|
162
192
|
};
|
|
163
193
|
declare function Sponsors(): JSX.Element;
|
|
164
194
|
|
|
195
|
+
declare const maintainers: ({
|
|
196
|
+
username: string;
|
|
197
|
+
firstName: string;
|
|
198
|
+
roles: JSX.Element[];
|
|
199
|
+
consultingUrl?: undefined;
|
|
200
|
+
} | {
|
|
201
|
+
username: string;
|
|
202
|
+
firstName: string;
|
|
203
|
+
roles: JSX.Element[];
|
|
204
|
+
consultingUrl: string;
|
|
205
|
+
})[];
|
|
206
|
+
|
|
207
|
+
declare function Contributors(): JSX.Element;
|
|
208
|
+
declare function Maintainer({ maintainer }: {
|
|
209
|
+
maintainer: (typeof maintainers)[0];
|
|
210
|
+
}): JSX.Element;
|
|
211
|
+
|
|
212
|
+
declare function Consulting(): JSX.Element;
|
|
213
|
+
declare function Consultants(): JSX.Element;
|
|
214
|
+
|
|
165
215
|
type LineBreak = 'white-space' | 'break-word';
|
|
166
216
|
declare function CodeBlockTransformer({ children, lineBreak }: {
|
|
167
217
|
children: React$1.ReactNode;
|
|
@@ -172,4 +222,4 @@ declare function Comment({ children }: {
|
|
|
172
222
|
children: React$1.ReactNode;
|
|
173
223
|
}): JSX.Element;
|
|
174
224
|
|
|
175
|
-
export { CodeBlockTransformer, Comment, Config, Construction, Danger, Emoji, EmojiName, HeadingDefinition, HeadingDetachedDefinition, HorizontalLine, ImportMeta, Link, NoteWithCustomIcon, NoteWithoutIcon, P, ReadingRecommendation, RepoLink, Sponsor, Sponsors, Warning, assert, assertUsage, assertWarning, crawlAllFiles, determineSectionTitle, determineSectionUrlHash, filter, isBrowser, isRepoLink, jsxToTextContent, objectAssign };
|
|
225
|
+
export { CallToAction, CodeBlockTransformer, Comment, Config, Construction, Consultants, Consulting, Contributors, Danger, Emoji, EmojiName, HeadingDefinition, HeadingDetachedDefinition, HorizontalLine, ImportMeta, Individuals, Link, Maintainer, NoteWithCustomIcon, NoteWithoutIcon, P, ReadingRecommendation, RepoLink, SectionDescription, Sponsor, Sponsors, Supporter, SupporterImg, SupporterSection, Warning, assert, assertUsage, assertWarning, crawlAllFiles, determineSectionTitle, determineSectionUrlHash, filter, isBrowser, isRepoLink, jsxToTextContent, objectAssign };
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
isRepoLink,
|
|
4
4
|
parseTitle,
|
|
5
5
|
usePageContext
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MGOI4AFO.js";
|
|
7
7
|
import {
|
|
8
8
|
FeatureList
|
|
9
9
|
} from "./chunk-NVJING6T.js";
|
|
@@ -47,10 +47,10 @@ function Link({
|
|
|
47
47
|
const pageContext = usePageContext();
|
|
48
48
|
return /* @__PURE__ */ React.createElement("a", {
|
|
49
49
|
href
|
|
50
|
-
}, children || text ||
|
|
50
|
+
}, children || text || getLinkText({ href, noBreadcrumb, pageContext, doNotInferSectionTitle }));
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function getLinkText({
|
|
54
54
|
href,
|
|
55
55
|
noBreadcrumb,
|
|
56
56
|
pageContext,
|
|
@@ -80,13 +80,13 @@ function getTitle({
|
|
|
80
80
|
assert(isLinkOnSamePage === (heading.url === pageContext.urlPathname));
|
|
81
81
|
assert(isLinkOnSamePage === (heading.url === pageContext.activeHeading.url));
|
|
82
82
|
assert(isLinkOnSamePage === (heading === pageContext.activeHeading));
|
|
83
|
-
const
|
|
84
|
-
if (heading.
|
|
85
|
-
|
|
86
|
-
...(heading.
|
|
83
|
+
const breadcrumbParts = [];
|
|
84
|
+
if (heading.headingsBreadcrumb) {
|
|
85
|
+
breadcrumbParts.push(
|
|
86
|
+
...(heading.headingsBreadcrumb ?? []).slice().reverse().map(({ title }) => title)
|
|
87
87
|
);
|
|
88
88
|
}
|
|
89
|
-
|
|
89
|
+
breadcrumbParts.push(heading.title);
|
|
90
90
|
if (urlHash) {
|
|
91
91
|
let sectionTitle = void 0;
|
|
92
92
|
assert(!urlHash.startsWith("#"));
|
|
@@ -107,14 +107,14 @@ function getTitle({
|
|
|
107
107
|
);
|
|
108
108
|
sectionTitle = determineSectionTitle(href);
|
|
109
109
|
}
|
|
110
|
-
|
|
110
|
+
breadcrumbParts.push(sectionTitle);
|
|
111
111
|
}
|
|
112
112
|
{
|
|
113
113
|
if (noBreadcrumb || isLinkOnSamePage) {
|
|
114
|
-
return
|
|
114
|
+
return breadcrumbParts[breadcrumbParts.length - 1];
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null,
|
|
117
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, breadcrumbParts.map((title, i) => {
|
|
118
118
|
const seperator = i === 0 ? /* @__PURE__ */ React.createElement(React.Fragment, null) : " > ";
|
|
119
119
|
return /* @__PURE__ */ React.createElement(React.Fragment, {
|
|
120
120
|
key: i
|
|
@@ -274,8 +274,108 @@ function HorizontalLine({ primary }) {
|
|
|
274
274
|
}));
|
|
275
275
|
}
|
|
276
276
|
|
|
277
|
-
// src/components/
|
|
277
|
+
// src/components/Supporters.tsx
|
|
278
278
|
import React7 from "react";
|
|
279
|
+
function SupporterSection({ children }) {
|
|
280
|
+
return /* @__PURE__ */ React7.createElement("div", {
|
|
281
|
+
style: {
|
|
282
|
+
textAlign: "center",
|
|
283
|
+
marginTop: 19
|
|
284
|
+
}
|
|
285
|
+
}, children);
|
|
286
|
+
}
|
|
287
|
+
function SectionDescription({ children }) {
|
|
288
|
+
return /* @__PURE__ */ React7.createElement("div", {
|
|
289
|
+
style: {
|
|
290
|
+
maxWidth: 400,
|
|
291
|
+
display: "inline-block",
|
|
292
|
+
marginTop: 12,
|
|
293
|
+
marginBottom: 12
|
|
294
|
+
}
|
|
295
|
+
}, children);
|
|
296
|
+
}
|
|
297
|
+
function Individuals({ children }) {
|
|
298
|
+
return /* @__PURE__ */ React7.createElement("div", {
|
|
299
|
+
style: {
|
|
300
|
+
display: "flex",
|
|
301
|
+
flexWrap: "wrap",
|
|
302
|
+
justifyContent: "center",
|
|
303
|
+
alignItems: "end",
|
|
304
|
+
margin: "17px auto",
|
|
305
|
+
maxWidth: 700
|
|
306
|
+
}
|
|
307
|
+
}, children);
|
|
308
|
+
}
|
|
309
|
+
function Supporter({ username, avatarUrl }) {
|
|
310
|
+
const website = `https://github.com/${username}`;
|
|
311
|
+
const width = 30;
|
|
312
|
+
const height = 30;
|
|
313
|
+
const marginWidth = 5;
|
|
314
|
+
const marginHeight = 5;
|
|
315
|
+
return /* @__PURE__ */ React7.createElement("a", {
|
|
316
|
+
href: website,
|
|
317
|
+
style: {
|
|
318
|
+
margin: `${marginHeight}px ${marginWidth}px`
|
|
319
|
+
}
|
|
320
|
+
}, /* @__PURE__ */ React7.createElement("div", {
|
|
321
|
+
style: {
|
|
322
|
+
borderRadius: 7,
|
|
323
|
+
overflow: "hidden",
|
|
324
|
+
width,
|
|
325
|
+
height,
|
|
326
|
+
display: "flex",
|
|
327
|
+
alignItems: "center",
|
|
328
|
+
flexDirection: "column",
|
|
329
|
+
justifyContent: "center"
|
|
330
|
+
}
|
|
331
|
+
}, /* @__PURE__ */ React7.createElement(SupporterImg, {
|
|
332
|
+
...{ username, avatarUrl, width, height }
|
|
333
|
+
})));
|
|
334
|
+
}
|
|
335
|
+
function SupporterImg({
|
|
336
|
+
imgSrc,
|
|
337
|
+
avatarUrl,
|
|
338
|
+
username,
|
|
339
|
+
imgAlt,
|
|
340
|
+
width,
|
|
341
|
+
height,
|
|
342
|
+
padding = 0
|
|
343
|
+
}) {
|
|
344
|
+
const size = Math.max(width, height);
|
|
345
|
+
if (avatarUrl) {
|
|
346
|
+
imgSrc = imgSrc || `${avatarUrl}&size=${size}`;
|
|
347
|
+
}
|
|
348
|
+
if (username) {
|
|
349
|
+
imgSrc = imgSrc || `https://github.com/${username}.png?size=${size}`;
|
|
350
|
+
imgAlt = imgAlt || username;
|
|
351
|
+
}
|
|
352
|
+
return /* @__PURE__ */ React7.createElement("img", {
|
|
353
|
+
style: { width: `calc(100% - ${padding}px)`, height: height - padding, zIndex: 2, objectFit: "contain" },
|
|
354
|
+
src: imgSrc,
|
|
355
|
+
alt: imgAlt
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
function CallToAction({ iconUrl, text, href }) {
|
|
359
|
+
return /* @__PURE__ */ React7.createElement("a", {
|
|
360
|
+
className: "button",
|
|
361
|
+
style: {
|
|
362
|
+
color: "inherit",
|
|
363
|
+
display: "inline-flex",
|
|
364
|
+
alignItems: "center",
|
|
365
|
+
padding: "5px 10px",
|
|
366
|
+
marginBottom: 10
|
|
367
|
+
},
|
|
368
|
+
href
|
|
369
|
+
}, /* @__PURE__ */ React7.createElement("img", {
|
|
370
|
+
src: iconUrl,
|
|
371
|
+
height: 22
|
|
372
|
+
}), " ", /* @__PURE__ */ React7.createElement("span", {
|
|
373
|
+
style: { marginLeft: 7, fontSize: "1.07em" }
|
|
374
|
+
}, text));
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
// src/components/Sponsors.tsx
|
|
378
|
+
import React8 from "react";
|
|
279
379
|
|
|
280
380
|
// src/icons/heart.svg
|
|
281
381
|
var heart_default = "/assets/heart-OINVKOXO.svg";
|
|
@@ -292,29 +392,32 @@ var medalBronze_default = "/assets/medalBronze-CO4CTUR4.svg";
|
|
|
292
392
|
// src/components/Sponsors/label.svg
|
|
293
393
|
var label_default = "/assets/label-MP75CTIA.svg";
|
|
294
394
|
|
|
295
|
-
// src/
|
|
395
|
+
// src/data/sponsorsList/companyLogos/contra.svg
|
|
296
396
|
var contra_default = "/assets/contra-WLZBOPBV.svg";
|
|
297
397
|
|
|
298
|
-
// src/
|
|
398
|
+
// src/data/sponsorsList/companyLogos/optimizers.svg
|
|
299
399
|
var optimizers_default = "/assets/optimizers-SFEZF3NW.svg";
|
|
300
400
|
|
|
301
|
-
// src/
|
|
401
|
+
// src/data/sponsorsList/companyLogos/sourcegraph.svg
|
|
302
402
|
var sourcegraph_default = "/assets/sourcegraph-YR2HADLS.svg";
|
|
303
403
|
|
|
304
|
-
// src/
|
|
404
|
+
// src/data/sponsorsList/companyLogos/burdaforward.png
|
|
305
405
|
var burdaforward_default = "/assets/burdaforward-EUGURYZY.png";
|
|
306
406
|
|
|
307
|
-
// src/
|
|
407
|
+
// src/data/sponsorsList/companyLogos/inlang.png
|
|
308
408
|
var inlang_default = "/assets/inlang-GFRWND6X.png";
|
|
309
409
|
|
|
310
|
-
// src/
|
|
410
|
+
// src/data/sponsorsList/companyLogos/bluefin.svg
|
|
311
411
|
var bluefin_default = "/assets/bluefin-JQABZFGV.svg";
|
|
312
412
|
|
|
313
|
-
// src/
|
|
413
|
+
// src/data/sponsorsList/companyLogos/alignable.svg
|
|
314
414
|
var alignable_default = "/assets/alignable-B4QZV4X7.svg";
|
|
315
415
|
|
|
316
|
-
// src/
|
|
416
|
+
// src/data/sponsorsList.ts
|
|
317
417
|
var individuals = [
|
|
418
|
+
{ username: "shishkin17" },
|
|
419
|
+
{ username: "royalswe" },
|
|
420
|
+
{ username: "lebretont" },
|
|
318
421
|
{ username: "xar" },
|
|
319
422
|
{ username: "NicoZweifel" },
|
|
320
423
|
{ username: "mariuslian" },
|
|
@@ -345,7 +448,6 @@ var individuals = [
|
|
|
345
448
|
{ username: "cookieplace" },
|
|
346
449
|
{ username: "JiangWeixian" },
|
|
347
450
|
{ username: "harrytran998" },
|
|
348
|
-
{ username: "royalswe" },
|
|
349
451
|
{ username: "alexturpin" },
|
|
350
452
|
{ username: "gu-stav" },
|
|
351
453
|
{ username: "YannBirba" },
|
|
@@ -387,6 +489,13 @@ var companies = [
|
|
|
387
489
|
website: "https://contra.com",
|
|
388
490
|
github: "contra"
|
|
389
491
|
},
|
|
492
|
+
{
|
|
493
|
+
companyName: "Inlang",
|
|
494
|
+
companyLogo: inlang_default,
|
|
495
|
+
plan: "silver",
|
|
496
|
+
website: "https://inlang.com/",
|
|
497
|
+
github: "opral"
|
|
498
|
+
},
|
|
390
499
|
{
|
|
391
500
|
companyName: "Alignable",
|
|
392
501
|
companyLogo: alignable_default,
|
|
@@ -418,13 +527,6 @@ var companies = [
|
|
|
418
527
|
website: "https://www.burda-forward.de",
|
|
419
528
|
github: "BurdaForward"
|
|
420
529
|
},
|
|
421
|
-
{
|
|
422
|
-
companyName: "Inlang",
|
|
423
|
-
companyLogo: inlang_default,
|
|
424
|
-
plan: "indie",
|
|
425
|
-
website: "https://inlang.com/",
|
|
426
|
-
github: "inlang"
|
|
427
|
-
},
|
|
428
530
|
{
|
|
429
531
|
companyName: "Bluefin",
|
|
430
532
|
companyLogo: bluefin_default,
|
|
@@ -442,86 +544,47 @@ function Sponsors() {
|
|
|
442
544
|
const sponsorGithubAccount = pageContext.config.sponsorGithubAccount || "brillout";
|
|
443
545
|
const sponsorsCompanies = sponsorsList.filter(isCompany);
|
|
444
546
|
const sponsorsIndividuals = sponsorsList.filter(isIndividual);
|
|
445
|
-
return /* @__PURE__ */
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
style: {
|
|
451
|
-
color: "inherit",
|
|
452
|
-
display: "inline-flex",
|
|
453
|
-
alignItems: "center",
|
|
454
|
-
padding: "5px 10px",
|
|
455
|
-
marginBottom: 10
|
|
456
|
-
}
|
|
457
|
-
}, /* @__PURE__ */ React7.createElement("img", {
|
|
458
|
-
src: heart_default,
|
|
459
|
-
height: 22
|
|
460
|
-
}), " ", /* @__PURE__ */ React7.createElement("span", {
|
|
461
|
-
style: { marginLeft: 7, fontSize: "1.07em" }
|
|
462
|
-
}, "Sponsor")), /* @__PURE__ */ React7.createElement("div", null), /* @__PURE__ */ React7.createElement("div", {
|
|
463
|
-
style: { maxWidth: 400, display: "inline-block", marginTop: 12, marginBottom: 12 }
|
|
464
|
-
}, projectInfo.projectNameJsx || projectInfo.projectName, " is free and open source, made possible by wonderful sponsors."), /* @__PURE__ */ React7.createElement("div", {
|
|
547
|
+
return /* @__PURE__ */ React8.createElement(SupporterSection, null, /* @__PURE__ */ React8.createElement(CallToAction, {
|
|
548
|
+
iconUrl: heart_default,
|
|
549
|
+
text: "Sponsor",
|
|
550
|
+
href: `https://github.com/sponsors/${sponsorGithubAccount}`
|
|
551
|
+
}), /* @__PURE__ */ React8.createElement("div", null), /* @__PURE__ */ React8.createElement(SectionDescription, null, projectInfo.projectName, " is free and open source, made possible by wonderful sponsors."), /* @__PURE__ */ React8.createElement("div", {
|
|
465
552
|
style: { display: "flex", flexWrap: "wrap", justifyContent: "space-evenly", alignItems: "end" }
|
|
466
|
-
}, sponsorsCompanies.map((sponsor, i) => /* @__PURE__ */
|
|
553
|
+
}, sponsorsCompanies.map((sponsor, i) => /* @__PURE__ */ React8.createElement(SponsorDiv, {
|
|
467
554
|
sponsor,
|
|
468
555
|
key: i
|
|
469
|
-
}))), /* @__PURE__ */
|
|
470
|
-
style: {
|
|
471
|
-
display: "flex",
|
|
472
|
-
flexWrap: "wrap",
|
|
473
|
-
justifyContent: "center",
|
|
474
|
-
alignItems: "end",
|
|
475
|
-
margin: "17px auto",
|
|
476
|
-
maxWidth: 700
|
|
477
|
-
}
|
|
478
|
-
}, sponsorsIndividuals.map((sponsor, i) => /* @__PURE__ */ React7.createElement(SponsorDiv, {
|
|
556
|
+
}))), /* @__PURE__ */ React8.createElement(Individuals, null, sponsorsIndividuals.map((sponsor, i) => /* @__PURE__ */ React8.createElement(SponsorDiv, {
|
|
479
557
|
sponsor,
|
|
480
558
|
key: i
|
|
481
559
|
}))));
|
|
482
560
|
}
|
|
483
561
|
function SponsorDiv({ sponsor }) {
|
|
484
|
-
let imgSrc;
|
|
485
|
-
let imgAlt;
|
|
486
|
-
let width;
|
|
487
|
-
let height;
|
|
488
|
-
let website;
|
|
489
|
-
let padding;
|
|
490
|
-
let marginHeight;
|
|
491
|
-
let marginWidth;
|
|
492
|
-
let backgroundColor = "#f0f0f0";
|
|
493
|
-
let label = null;
|
|
494
562
|
if (isIndividual(sponsor)) {
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
width = 30;
|
|
498
|
-
height = 30;
|
|
499
|
-
padding = 0;
|
|
500
|
-
marginHeight = 5;
|
|
501
|
-
marginWidth = 5;
|
|
502
|
-
backgroundColor = "none";
|
|
503
|
-
} else {
|
|
504
|
-
imgSrc = sponsor.companyLogo;
|
|
505
|
-
website = sponsor.website;
|
|
506
|
-
const size = getSize(sponsor);
|
|
507
|
-
width = size.width;
|
|
508
|
-
height = size.height;
|
|
509
|
-
padding = size.padding;
|
|
510
|
-
imgAlt = sponsor.companyName;
|
|
511
|
-
marginHeight = 20;
|
|
512
|
-
marginWidth = 10;
|
|
513
|
-
label = /* @__PURE__ */ React7.createElement(Label, {
|
|
514
|
-
sponsor
|
|
563
|
+
return /* @__PURE__ */ React8.createElement(Supporter, {
|
|
564
|
+
username: sponsor.username
|
|
515
565
|
});
|
|
516
566
|
}
|
|
517
|
-
return /* @__PURE__ */
|
|
518
|
-
|
|
567
|
+
return /* @__PURE__ */ React8.createElement(CompanyDiv, {
|
|
568
|
+
sponsor
|
|
569
|
+
});
|
|
570
|
+
}
|
|
571
|
+
function CompanyDiv({ sponsor }) {
|
|
572
|
+
assert(isCompany(sponsor));
|
|
573
|
+
const imgSrc = sponsor.companyLogo;
|
|
574
|
+
const imgAlt = sponsor.companyName;
|
|
575
|
+
const { width, height, padding } = getSize(sponsor);
|
|
576
|
+
const marginHeight = 20;
|
|
577
|
+
const marginWidth = 10;
|
|
578
|
+
return /* @__PURE__ */ React8.createElement("a", {
|
|
579
|
+
href: sponsor.website,
|
|
519
580
|
style: {
|
|
520
581
|
margin: `${marginHeight}px ${marginWidth}px`
|
|
521
582
|
}
|
|
522
|
-
},
|
|
583
|
+
}, /* @__PURE__ */ React8.createElement(Label, {
|
|
584
|
+
sponsor
|
|
585
|
+
}), /* @__PURE__ */ React8.createElement("div", {
|
|
523
586
|
style: {
|
|
524
|
-
backgroundColor,
|
|
587
|
+
backgroundColor: "#f0f0f0",
|
|
525
588
|
borderRadius: 7,
|
|
526
589
|
overflow: "hidden",
|
|
527
590
|
width,
|
|
@@ -532,10 +595,8 @@ function SponsorDiv({ sponsor }) {
|
|
|
532
595
|
flexDirection: "column",
|
|
533
596
|
justifyContent: "center"
|
|
534
597
|
}
|
|
535
|
-
}, /* @__PURE__ */
|
|
536
|
-
|
|
537
|
-
src: imgSrc,
|
|
538
|
-
alt: imgAlt
|
|
598
|
+
}, /* @__PURE__ */ React8.createElement(SupporterImg, {
|
|
599
|
+
...{ imgSrc, imgAlt, width, height, padding }
|
|
539
600
|
})));
|
|
540
601
|
}
|
|
541
602
|
function Label({ sponsor }) {
|
|
@@ -543,7 +604,7 @@ function Label({ sponsor }) {
|
|
|
543
604
|
const labelBg = getLabelBg(sponsor);
|
|
544
605
|
const labelIcon = getLabelIcon(sponsor);
|
|
545
606
|
const labelText = getLabelText(sponsor);
|
|
546
|
-
return /* @__PURE__ */
|
|
607
|
+
return /* @__PURE__ */ React8.createElement("div", {
|
|
547
608
|
style: {
|
|
548
609
|
top: 0,
|
|
549
610
|
display: "flex",
|
|
@@ -556,20 +617,20 @@ function Label({ sponsor }) {
|
|
|
556
617
|
}
|
|
557
618
|
function getLabelBg(sponsor) {
|
|
558
619
|
const height = sponsor.plan === "platinum" ? 32 : 24;
|
|
559
|
-
return /* @__PURE__ */
|
|
620
|
+
return /* @__PURE__ */ React8.createElement("img", {
|
|
560
621
|
src: label_default,
|
|
561
622
|
style: { height, position: "absolute", bottom: 0, zIndex: -1 }
|
|
562
623
|
});
|
|
563
624
|
}
|
|
564
625
|
function getLabelText(sponsor) {
|
|
565
626
|
if (sponsor.plan === "platinum") {
|
|
566
|
-
return /* @__PURE__ */
|
|
627
|
+
return /* @__PURE__ */ React8.createElement(React8.Fragment, null);
|
|
567
628
|
}
|
|
568
629
|
let letterSpacing = void 0;
|
|
569
630
|
if (["bronze", "silver", "gold", "indie"].includes(sponsor.plan)) {
|
|
570
631
|
letterSpacing = 1;
|
|
571
632
|
}
|
|
572
|
-
return /* @__PURE__ */
|
|
633
|
+
return /* @__PURE__ */ React8.createElement(React8.Fragment, null, " ", /* @__PURE__ */ React8.createElement("span", {
|
|
573
634
|
style: {
|
|
574
635
|
zIndex: 1,
|
|
575
636
|
fontSize: "0.82em",
|
|
@@ -584,12 +645,12 @@ function getLabelText(sponsor) {
|
|
|
584
645
|
function getLabelIcon(sponsor) {
|
|
585
646
|
let medalSrc;
|
|
586
647
|
if (sponsor.plan === "platinum") {
|
|
587
|
-
return /* @__PURE__ */
|
|
648
|
+
return /* @__PURE__ */ React8.createElement(Emoji, {
|
|
588
649
|
name: "trophy",
|
|
589
650
|
style: { fontSize: "1.3em" }
|
|
590
651
|
});
|
|
591
652
|
} else if (sponsor.plan === "indie") {
|
|
592
|
-
return /* @__PURE__ */
|
|
653
|
+
return /* @__PURE__ */ React8.createElement(Emoji, {
|
|
593
654
|
name: "ribbon",
|
|
594
655
|
style: { fontSize: "0.9em" }
|
|
595
656
|
});
|
|
@@ -602,7 +663,7 @@ function getLabelIcon(sponsor) {
|
|
|
602
663
|
} else {
|
|
603
664
|
assert(false);
|
|
604
665
|
}
|
|
605
|
-
return /* @__PURE__ */
|
|
666
|
+
return /* @__PURE__ */ React8.createElement("img", {
|
|
606
667
|
src: medalSrc,
|
|
607
668
|
style: { height: 15, zIndex: 1, marginRight: 5 }
|
|
608
669
|
});
|
|
@@ -641,40 +702,226 @@ function isIndividual(sponsor) {
|
|
|
641
702
|
return "username" in sponsor;
|
|
642
703
|
}
|
|
643
704
|
|
|
705
|
+
// src/components/Contributors.tsx
|
|
706
|
+
import React10 from "react";
|
|
707
|
+
|
|
708
|
+
// src/data/maintainersList.tsx
|
|
709
|
+
import React9 from "react";
|
|
710
|
+
var maintainers = [
|
|
711
|
+
{
|
|
712
|
+
username: "brillout",
|
|
713
|
+
firstName: "Rom",
|
|
714
|
+
roles: [
|
|
715
|
+
/* @__PURE__ */ React9.createElement(React9.Fragment, null, "Vike Core (Lead Maintainer, Creator)"),
|
|
716
|
+
/* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement("code", null, "vike-react"), " (Lead Maintainer, Creator)"),
|
|
717
|
+
/* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement("code", null, "vike-vue"), " (Contributor)")
|
|
718
|
+
]
|
|
719
|
+
},
|
|
720
|
+
{
|
|
721
|
+
username: "magne4000",
|
|
722
|
+
firstName: "Jo\xEBl",
|
|
723
|
+
roles: [
|
|
724
|
+
/* @__PURE__ */ React9.createElement(React9.Fragment, null, "Bati (Lead Maintainer, Creator)"),
|
|
725
|
+
/* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement("code", null, "vike-solid"), " (Lead Maintainer, Creator)"),
|
|
726
|
+
/* @__PURE__ */ React9.createElement(React9.Fragment, null, "Vike Core (Contributor)")
|
|
727
|
+
]
|
|
728
|
+
},
|
|
729
|
+
{
|
|
730
|
+
username: "AurelienLourot",
|
|
731
|
+
firstName: "Aur\xE9lien",
|
|
732
|
+
roles: [
|
|
733
|
+
/* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement("code", null, "vike-vue"), " (Lead Maintainer, Creator)"),
|
|
734
|
+
/* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement("code", null, "vike-react"), " (Contributor)"),
|
|
735
|
+
/* @__PURE__ */ React9.createElement(React9.Fragment, null, "Vike Core (Contributor)")
|
|
736
|
+
],
|
|
737
|
+
consultingUrl: "https://lourot.dev/"
|
|
738
|
+
},
|
|
739
|
+
{
|
|
740
|
+
username: "nitedani",
|
|
741
|
+
firstName: "D\xE1niel",
|
|
742
|
+
roles: [
|
|
743
|
+
/* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement("code", null, "vike-react-query"), " (Lead Maintainer, Creator)"),
|
|
744
|
+
/* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement("code", null, "vike-angular"), " (Lead Maintainer, Creator)"),
|
|
745
|
+
/* @__PURE__ */ React9.createElement(React9.Fragment, null, "Vike Core (Contributor)")
|
|
746
|
+
]
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
username: "phonzammi",
|
|
750
|
+
firstName: "Muhammad",
|
|
751
|
+
roles: [
|
|
752
|
+
/* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement("code", null, "vike-vue"), " (Contributor)"),
|
|
753
|
+
/* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement("code", null, "vike-solid"), " (Contributor)"),
|
|
754
|
+
/* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement("code", null, "vike-react"), " (Contributor)")
|
|
755
|
+
]
|
|
756
|
+
},
|
|
757
|
+
{
|
|
758
|
+
username: "4350pChris",
|
|
759
|
+
firstName: "Chris",
|
|
760
|
+
roles: [
|
|
761
|
+
/* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement("code", null, "vike-pinia"), " (Lead Maintainer, Creator)"),
|
|
762
|
+
/* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement("code", null, "vike-vue"), " (Contributor)"),
|
|
763
|
+
/* @__PURE__ */ React9.createElement(React9.Fragment, null, "Vike Core (Contributor)")
|
|
764
|
+
]
|
|
765
|
+
}
|
|
766
|
+
];
|
|
767
|
+
|
|
768
|
+
// src/components/Contributors.tsx
|
|
769
|
+
import { contributors } from "vike-contributors";
|
|
770
|
+
function Contributors() {
|
|
771
|
+
const pageContext = usePageContext();
|
|
772
|
+
const { projectInfo } = pageContext.config;
|
|
773
|
+
return /* @__PURE__ */ React10.createElement(SupporterSection, null, /* @__PURE__ */ React10.createElement(SectionDescription, null, projectInfo.projectName, " is built and maintained by passionate contributors."), /* @__PURE__ */ React10.createElement("div", {
|
|
774
|
+
style: { display: "flex", flexWrap: "wrap", justifyContent: "space-evenly", alignItems: "end" }
|
|
775
|
+
}, maintainers.map((maintainer, i) => /* @__PURE__ */ React10.createElement(Maintainer, {
|
|
776
|
+
maintainer,
|
|
777
|
+
key: i
|
|
778
|
+
}))), /* @__PURE__ */ React10.createElement(Individuals, null, contributors.filter((contributor) => {
|
|
779
|
+
return !contributor.login.includes("[bot]") && !maintainers.map((m) => m.username).includes(contributor.login);
|
|
780
|
+
}).map((contributor, i) => /* @__PURE__ */ React10.createElement(Supporter, {
|
|
781
|
+
username: contributor.login,
|
|
782
|
+
avatarUrl: contributor.avatarUrl,
|
|
783
|
+
key: i
|
|
784
|
+
}))));
|
|
785
|
+
}
|
|
786
|
+
function Maintainer({ maintainer }) {
|
|
787
|
+
const marginHeight = 20;
|
|
788
|
+
const marginWidth = 10;
|
|
789
|
+
const imgSize = 50;
|
|
790
|
+
const githubUrl = `https://github.com/${maintainer.username}`;
|
|
791
|
+
return /* @__PURE__ */ React10.createElement("div", {
|
|
792
|
+
style: {
|
|
793
|
+
borderRadius: 7,
|
|
794
|
+
borderWidth: 1,
|
|
795
|
+
borderStyle: "solid",
|
|
796
|
+
borderColor: "#e0e0e0",
|
|
797
|
+
overflow: "hidden",
|
|
798
|
+
width: 430,
|
|
799
|
+
maxWidth: `calc(100vw - 2 * var(--main-view-padding) - 2 * ${marginWidth}px)`,
|
|
800
|
+
margin: `${marginHeight}px ${marginWidth}px`,
|
|
801
|
+
display: "flex",
|
|
802
|
+
flexWrap: "wrap",
|
|
803
|
+
padding: 20,
|
|
804
|
+
gap: 20,
|
|
805
|
+
textAlign: "left"
|
|
806
|
+
}
|
|
807
|
+
}, /* @__PURE__ */ React10.createElement("a", {
|
|
808
|
+
href: githubUrl
|
|
809
|
+
}, /* @__PURE__ */ React10.createElement("div", {
|
|
810
|
+
style: { width: imgSize, height: imgSize, borderRadius: imgSize / 2, overflow: "hidden" }
|
|
811
|
+
}, /* @__PURE__ */ React10.createElement(SupporterImg, {
|
|
812
|
+
username: maintainer.username,
|
|
813
|
+
avatarUrl: getAvatarUrl(maintainer),
|
|
814
|
+
imgAlt: maintainer.firstName,
|
|
815
|
+
width: imgSize,
|
|
816
|
+
height: imgSize
|
|
817
|
+
}))), /* @__PURE__ */ React10.createElement("div", null, /* @__PURE__ */ React10.createElement("b", null, maintainer.firstName), " \xB7", " ", /* @__PURE__ */ React10.createElement("a", {
|
|
818
|
+
href: githubUrl
|
|
819
|
+
}, /* @__PURE__ */ React10.createElement("i", {
|
|
820
|
+
style: { fontSize: ".9em", color: "#505050" }
|
|
821
|
+
}, maintainer.username)), maintainer.consultingUrl ? /* @__PURE__ */ React10.createElement(React10.Fragment, null, " ", "\xB7", " ", /* @__PURE__ */ React10.createElement("a", {
|
|
822
|
+
href: maintainer.consultingUrl
|
|
823
|
+
}, /* @__PURE__ */ React10.createElement("b", {
|
|
824
|
+
style: {
|
|
825
|
+
fontSize: ".7em",
|
|
826
|
+
color: "white",
|
|
827
|
+
backgroundColor: "#305090",
|
|
828
|
+
padding: "1px 5px 2px 5px",
|
|
829
|
+
verticalAlign: "text-top",
|
|
830
|
+
borderRadius: 3
|
|
831
|
+
}
|
|
832
|
+
}, "consulting"))) : null, /* @__PURE__ */ React10.createElement("ul", {
|
|
833
|
+
style: { fontSize: ".8em", paddingLeft: 15, marginTop: 5, marginBottom: 0 }
|
|
834
|
+
}, maintainer.roles.map((role, i) => /* @__PURE__ */ React10.createElement("li", {
|
|
835
|
+
key: i
|
|
836
|
+
}, role)))));
|
|
837
|
+
}
|
|
838
|
+
function getAvatarUrl(maintainer) {
|
|
839
|
+
for (const contributor of contributors) {
|
|
840
|
+
if (maintainer.username === contributor.login) {
|
|
841
|
+
return contributor.avatarUrl;
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
throw new Error(`Maintainer ${maintainer.username} not found in contributors' list.`);
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
// src/components/Consulting.tsx
|
|
848
|
+
import React11 from "react";
|
|
849
|
+
|
|
850
|
+
// src/icons/people.svg
|
|
851
|
+
var people_default = "/assets/people-72KKQHU4.svg";
|
|
852
|
+
|
|
853
|
+
// src/components/Consulting.tsx
|
|
854
|
+
var consultingPageHref = "/consulting";
|
|
855
|
+
function Consulting() {
|
|
856
|
+
const pageContext = usePageContext();
|
|
857
|
+
const { projectInfo } = pageContext.config;
|
|
858
|
+
const { projectName } = projectInfo;
|
|
859
|
+
return /* @__PURE__ */ React11.createElement(SupporterSection, null, /* @__PURE__ */ React11.createElement(CallToAction, {
|
|
860
|
+
iconUrl: people_default,
|
|
861
|
+
text: "Consulting",
|
|
862
|
+
href: consultingPageHref
|
|
863
|
+
}), /* @__PURE__ */ React11.createElement("div", null), /* @__PURE__ */ React11.createElement(SectionDescription, null, "For questions and issues related to ", projectName, ", open a", " ", /* @__PURE__ */ React11.createElement("a", {
|
|
864
|
+
href: projectInfo.githubDiscussions || projectInfo.githubIssues
|
|
865
|
+
}, "GitHub Discussion"), ". For advanced help or help not directly related to ", projectName, ", the ", projectName, " team offers", " ", /* @__PURE__ */ React11.createElement(Link, {
|
|
866
|
+
href: consultingPageHref,
|
|
867
|
+
noBreadcrumb: true
|
|
868
|
+
}, "consulting"), "."));
|
|
869
|
+
}
|
|
870
|
+
function Consultants() {
|
|
871
|
+
return /* @__PURE__ */ React11.createElement(SupporterSection, null, /* @__PURE__ */ React11.createElement("div", {
|
|
872
|
+
style: { display: "flex", flexWrap: "wrap", alignItems: "end" }
|
|
873
|
+
}, maintainers.filter((maintainer) => {
|
|
874
|
+
return !!maintainer.consultingUrl;
|
|
875
|
+
}).map((maintainer, i) => /* @__PURE__ */ React11.createElement(Maintainer, {
|
|
876
|
+
maintainer,
|
|
877
|
+
key: i
|
|
878
|
+
}))));
|
|
879
|
+
}
|
|
880
|
+
|
|
644
881
|
// src/components/CodeBlockTransformer.tsx
|
|
645
|
-
import
|
|
882
|
+
import React12 from "react";
|
|
646
883
|
function CodeBlockTransformer({ children, lineBreak }) {
|
|
647
884
|
assert(
|
|
648
885
|
lineBreak === "white-space" || lineBreak === "break-word",
|
|
649
886
|
"`lineBreak` is currently the only use case for <CodeBlockTransformer>"
|
|
650
887
|
);
|
|
651
888
|
const className = `with-line-break_${lineBreak}`;
|
|
652
|
-
return /* @__PURE__ */
|
|
889
|
+
return /* @__PURE__ */ React12.createElement("div", {
|
|
653
890
|
className
|
|
654
891
|
}, children);
|
|
655
892
|
}
|
|
656
893
|
|
|
657
894
|
// src/components/Comment.tsx
|
|
658
|
-
import
|
|
895
|
+
import React13 from "react";
|
|
659
896
|
function Comment({ children }) {
|
|
660
|
-
return /* @__PURE__ */
|
|
897
|
+
return /* @__PURE__ */ React13.createElement(React13.Fragment, null);
|
|
661
898
|
}
|
|
662
899
|
export {
|
|
900
|
+
CallToAction,
|
|
663
901
|
CodeBlockTransformer,
|
|
664
902
|
Comment,
|
|
665
903
|
Construction,
|
|
904
|
+
Consultants,
|
|
905
|
+
Consulting,
|
|
906
|
+
Contributors,
|
|
666
907
|
Danger,
|
|
667
908
|
Emoji,
|
|
668
909
|
FeatureList,
|
|
669
910
|
HorizontalLine,
|
|
670
911
|
ImportMeta,
|
|
912
|
+
Individuals,
|
|
671
913
|
Link,
|
|
914
|
+
Maintainer,
|
|
672
915
|
NoteWithCustomIcon,
|
|
673
916
|
NoteWithoutIcon,
|
|
674
917
|
P,
|
|
675
918
|
ReadingRecommendation,
|
|
676
919
|
RepoLink,
|
|
920
|
+
SectionDescription,
|
|
677
921
|
Sponsors,
|
|
922
|
+
Supporter,
|
|
923
|
+
SupporterImg,
|
|
924
|
+
SupporterSection,
|
|
678
925
|
Warning,
|
|
679
926
|
assert,
|
|
680
927
|
assertUsage,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
|
2
|
+
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<path d="M16.719 19.7519L16.0785 14.6279C15.8908 13.1266 14.6146 12 13.1017 12H12H10.8983C9.38538 12 8.10917 13.1266 7.92151 14.6279L7.28101 19.7519C7.1318 20.9456 8.06257 22 9.26556 22H12H14.7344C15.9374 22 16.8682 20.9456 16.719 19.7519Z" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
<circle cx="12" cy="5" r="3" stroke="#000000" stroke-width="2"/>
|
|
5
|
+
<circle cx="4" cy="9" r="2" stroke="#000000" stroke-width="2"/>
|
|
6
|
+
<circle cx="20" cy="9" r="2" stroke="#000000" stroke-width="2"/>
|
|
7
|
+
<path d="M4 14H3.69425C2.71658 14 1.8822 14.7068 1.72147 15.6712L1.38813 17.6712C1.18496 18.8903 2.12504 20 3.36092 20H7" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
8
|
+
<path d="M20 14H20.3057C21.2834 14 22.1178 14.7068 22.2785 15.6712L22.6119 17.6712C22.815 18.8903 21.8751 20 20.6392 20C19.4775 20 18.0952 20 17 20" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
9
|
+
</svg>
|
|
@@ -233,9 +233,6 @@ html.navigation-fullscreen .nav-item {
|
|
|
233
233
|
border-bottom-left-radius: 5px;
|
|
234
234
|
border-bottom-right-radius: var(--expend-border-radius);
|
|
235
235
|
}
|
|
236
|
-
.nav-item-h3.nav-item-parent-is-list-heading {
|
|
237
|
-
--padding-left-additional: 21px;
|
|
238
|
-
}
|
|
239
236
|
|
|
240
237
|
/* src/navigation/Navigation-highlight.css */
|
|
241
238
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as vike_dist_esm_node_runtime_html_renderHtml from 'vike/dist/esm/node/runtime/html/renderHtml';
|
|
2
|
-
import {
|
|
2
|
+
import { PageContextBuiltInServer } from 'vike/types';
|
|
3
3
|
|
|
4
4
|
type MarkdownHeading = {
|
|
5
5
|
title: string;
|
|
@@ -12,7 +12,7 @@ type ReactComponent = () => JSX.Element;
|
|
|
12
12
|
type Exports = {
|
|
13
13
|
headings?: MarkdownHeading[];
|
|
14
14
|
};
|
|
15
|
-
type PageContextOriginal =
|
|
15
|
+
type PageContextOriginal = PageContextBuiltInServer & {
|
|
16
16
|
Page: ReactComponent;
|
|
17
17
|
exports: Exports;
|
|
18
18
|
};
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
getHeadingsWithProcessedTitle,
|
|
5
5
|
parseTitle,
|
|
6
6
|
usePageContext
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-MGOI4AFO.js";
|
|
8
8
|
import {
|
|
9
9
|
Emoji,
|
|
10
10
|
jsxToTextContent,
|
|
@@ -245,7 +245,6 @@ function Heading({
|
|
|
245
245
|
heading.computed.isActive && " is-active",
|
|
246
246
|
heading.computed.isActiveFirst && " is-active-first",
|
|
247
247
|
heading.computed.isActiveLast && " is-active-last",
|
|
248
|
-
heading.computed.isChildOfListHeading && "nav-item-parent-is-list-heading",
|
|
249
248
|
heading.computed.isFirstOfItsKind && "nav-item-first-of-its-kind",
|
|
250
249
|
heading.computed.isLastOfItsKind && "nav-item-last-of-its-kind"
|
|
251
250
|
].filter(Boolean).join(" "),
|
|
@@ -266,7 +265,6 @@ function groupHeadings(headings) {
|
|
|
266
265
|
}
|
|
267
266
|
function getHeadingsWithComputedProps(headings, currentUrl) {
|
|
268
267
|
return headings.map((heading, i) => {
|
|
269
|
-
var _a2;
|
|
270
268
|
assert([1, 2, 3, 4].includes(heading.level), heading);
|
|
271
269
|
const headingPrevious = headings[i - 1];
|
|
272
270
|
const headingNext = headings[i + 1];
|
|
@@ -289,7 +287,6 @@ function getHeadingsWithComputedProps(headings, currentUrl) {
|
|
|
289
287
|
}
|
|
290
288
|
const isFirstOfItsKind = heading.level !== (headingPrevious == null ? void 0 : headingPrevious.level);
|
|
291
289
|
const isLastOfItsKind = heading.level !== (headingNext == null ? void 0 : headingNext.level);
|
|
292
|
-
const isChildOfListHeading = !!heading.parentHeadings && !!((_a2 = heading.parentHeadings[0]) == null ? void 0 : _a2.isListTitle);
|
|
293
290
|
return {
|
|
294
291
|
...heading,
|
|
295
292
|
computed: {
|
|
@@ -297,8 +294,7 @@ function getHeadingsWithComputedProps(headings, currentUrl) {
|
|
|
297
294
|
isActiveFirst,
|
|
298
295
|
isActiveLast,
|
|
299
296
|
isFirstOfItsKind,
|
|
300
|
-
isLastOfItsKind
|
|
301
|
-
isChildOfListHeading
|
|
297
|
+
isLastOfItsKind
|
|
302
298
|
}
|
|
303
299
|
};
|
|
304
300
|
});
|
|
@@ -444,11 +440,11 @@ function resolvePageContext(pageContext) {
|
|
|
444
440
|
);
|
|
445
441
|
let headingsOfDetachedPage = null;
|
|
446
442
|
let headingsAll = [...headingsProcessed, ...headingsDetachedProcessed];
|
|
447
|
-
headingsAll =
|
|
443
|
+
headingsAll = getHeadingsAll(headingsAll, pageContext, activeHeading);
|
|
448
444
|
if (activeNavigationHeading) {
|
|
449
|
-
headingsProcessed =
|
|
445
|
+
headingsProcessed = getHeadingsAll(headingsProcessed, pageContext, activeNavigationHeading);
|
|
450
446
|
} else {
|
|
451
|
-
headingsOfDetachedPage = [activeHeading, ...
|
|
447
|
+
headingsOfDetachedPage = [activeHeading, ...getHeadingsOfTheCurrentPage(pageContext, activeHeading)];
|
|
452
448
|
}
|
|
453
449
|
const { title, isLandingPage, pageTitle } = getMetaData(
|
|
454
450
|
headingsDetachedProcessed,
|
|
@@ -526,40 +522,40 @@ function findHeading(headingsProcessed, headingsDetachedProcessed, pageContext)
|
|
|
526
522
|
}
|
|
527
523
|
return { activeHeading, activeNavigationHeading };
|
|
528
524
|
}
|
|
529
|
-
function
|
|
530
|
-
const
|
|
531
|
-
const
|
|
532
|
-
const activeHeadingIdx =
|
|
525
|
+
function getHeadingsAll(headingsProcessed, pageContext, activeHeading) {
|
|
526
|
+
const headingsAll = headingsProcessed.slice();
|
|
527
|
+
const headingsOfTheCurrentPage = getHeadingsOfTheCurrentPage(pageContext, activeHeading);
|
|
528
|
+
const activeHeadingIdx = headingsAll.indexOf(activeHeading);
|
|
533
529
|
assert(activeHeadingIdx >= 0);
|
|
534
|
-
|
|
535
|
-
|
|
530
|
+
headingsOfTheCurrentPage.forEach((pageHeading, i) => {
|
|
531
|
+
headingsAll.splice(activeHeadingIdx + 1 + i, 0, pageHeading);
|
|
536
532
|
});
|
|
537
|
-
return
|
|
533
|
+
return headingsAll;
|
|
538
534
|
}
|
|
539
|
-
function
|
|
540
|
-
const
|
|
541
|
-
const
|
|
542
|
-
|
|
535
|
+
function getHeadingsOfTheCurrentPage(pageContext, currentHeading) {
|
|
536
|
+
const headingsOfCurrentPage = [];
|
|
537
|
+
const headingsExport = pageContext.exports.headings ?? [];
|
|
538
|
+
headingsExport.forEach((markdownHeading) => {
|
|
543
539
|
const title = parseTitle(markdownHeading.title);
|
|
544
540
|
const url = markdownHeading.headingId && "#" + markdownHeading.headingId;
|
|
545
541
|
if (markdownHeading.headingLevel === 2) {
|
|
546
542
|
const heading = {
|
|
547
543
|
url,
|
|
548
544
|
title,
|
|
549
|
-
|
|
545
|
+
headingsBreadcrumb: [currentHeading, ...currentHeading.headingsBreadcrumb ?? []],
|
|
550
546
|
titleInNav: title,
|
|
551
547
|
level: 3
|
|
552
548
|
};
|
|
553
|
-
|
|
549
|
+
headingsOfCurrentPage.push(heading);
|
|
554
550
|
}
|
|
555
551
|
});
|
|
556
552
|
if (currentHeading == null ? void 0 : currentHeading.sectionTitles) {
|
|
557
553
|
currentHeading.sectionTitles.forEach((sectionTitle) => {
|
|
558
|
-
const pageHeadingTitles =
|
|
554
|
+
const pageHeadingTitles = headingsExport.map((h) => h.title);
|
|
559
555
|
assert(pageHeadingTitles.includes(sectionTitle), { pageHeadingTitles, sectionTitle });
|
|
560
556
|
});
|
|
561
557
|
}
|
|
562
|
-
return
|
|
558
|
+
return headingsOfCurrentPage;
|
|
563
559
|
}
|
|
564
560
|
|
|
565
561
|
// src/algolia/DocSearch.ts
|
package/package.json
CHANGED
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brillout/docpress",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.35",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"// Check types while developing": "",
|
|
6
6
|
"types": "tsc --noEmit --watch",
|
|
7
7
|
"// Develop Docpress using demo/": "",
|
|
8
|
+
"dev": "pnpm run dev:build && pnpm run dev:start",
|
|
8
9
|
"dev:build": "tsup",
|
|
9
10
|
"dev:start": "node dist/index.js dev",
|
|
10
|
-
"dev": "pnpm run dev:build && pnpm run dev:start",
|
|
11
11
|
"// Build Docpress": "",
|
|
12
12
|
"build": "rimraf dist/ && framework-builder",
|
|
13
|
+
"// Preview build": "",
|
|
14
|
+
"preview": "pnpm run preview:build && pnpm run preview:start",
|
|
15
|
+
"preview:build": "pnpm run build && node dist/cli/index.js build",
|
|
16
|
+
"preview:start": "node dist/cli/index.js preview",
|
|
17
|
+
"// Test": "",
|
|
18
|
+
"test": "test-e2e",
|
|
13
19
|
"// Release": "",
|
|
14
20
|
"release": "release-me patch",
|
|
15
21
|
"release:breaking-change": "release-me minor"
|
|
@@ -25,7 +31,8 @@
|
|
|
25
31
|
"remark-gfm": "^3.0.1",
|
|
26
32
|
"shiki": "^0.10.1",
|
|
27
33
|
"twemoji": "^13.1.0",
|
|
28
|
-
"vike": "^0.4.
|
|
34
|
+
"vike": "^0.4.158",
|
|
35
|
+
"vike-contributors": "^0.0.6",
|
|
29
36
|
"vite": "^4.3.9"
|
|
30
37
|
},
|
|
31
38
|
"type": "module",
|
|
@@ -64,6 +71,7 @@
|
|
|
64
71
|
"@brillout/docpress": "link:.",
|
|
65
72
|
"@brillout/framework-builder": "^0.1.1",
|
|
66
73
|
"@brillout/release-me": "^0.1.13",
|
|
74
|
+
"@brillout/test-e2e": "^0.5.25",
|
|
67
75
|
"@types/express": "^4.17.13",
|
|
68
76
|
"@types/node": "^15.12.1",
|
|
69
77
|
"@types/react": "^17.0.44",
|