@brillout/docpress 0.2.1 → 0.2.3
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-TTLAZ2T2.js → chunk-3QC7HYIF.js} +0 -1
- package/dist/{chunk-G2A5MZJA.js → chunk-4G4ACGLN.js} +0 -1
- package/dist/{chunk-H5CO4N2X.js → chunk-D4PNWSRD.js} +8 -5
- package/dist/{chunk-7HKDCMSZ.js → chunk-MSIQIC6B.js} +4 -3
- package/dist/chunk-NVJING6T.js +91 -0
- package/dist/{chunk-XUTBTIEE.js → chunk-RZAPSH5Z.js} +20 -19
- package/dist/cli/index.js +5 -6
- package/dist/components/features/FeatureList.css +0 -1
- package/dist/components/features/FeatureList.js +2 -3
- package/dist/components/features/initFeatureList.js +2 -3
- package/dist/{devServer-534L4U45.js → devServer-UKWIENKN.js} +4 -5
- package/dist/index.css +0 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.js +181 -134
- package/dist/languages-KXPKJFQL.svg +1 -0
- package/dist/renderer/_default.page.client.css +22 -4
- package/dist/renderer/_default.page.client.js +6 -6
- package/dist/renderer/_default.page.server.css +2 -4
- package/dist/renderer/_default.page.server.d.ts +1 -1
- package/dist/renderer/_default.page.server.js +249 -223
- package/dist/repora-UNKQZ6QP.svg +10 -0
- package/package.json +3 -3
- package/dist/chunk-7HKDCMSZ.js.map +0 -1
- package/dist/chunk-C3OIVLKV.js +0 -75
- package/dist/chunk-C3OIVLKV.js.map +0 -1
- package/dist/chunk-G2A5MZJA.js.map +0 -1
- package/dist/chunk-H5CO4N2X.js.map +0 -1
- package/dist/chunk-TTLAZ2T2.js.map +0 -1
- package/dist/chunk-XUTBTIEE.js.map +0 -1
- package/dist/cli/index.js.map +0 -1
- package/dist/components/features/FeatureList.css.map +0 -1
- package/dist/components/features/FeatureList.js.map +0 -1
- package/dist/components/features/initFeatureList.js.map +0 -1
- package/dist/devServer-534L4U45.js.map +0 -1
- package/dist/index.css.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/renderer/_default.page.client.css.map +0 -1
- package/dist/renderer/_default.page.client.js.map +0 -1
- package/dist/renderer/_default.page.server.css.map +0 -1
- package/dist/renderer/_default.page.server.js.map +0 -1
|
@@ -4,19 +4,19 @@ import {
|
|
|
4
4
|
getHeadings,
|
|
5
5
|
parseTitle,
|
|
6
6
|
usePageContext
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-D4PNWSRD.js";
|
|
8
8
|
import {
|
|
9
9
|
Emoji,
|
|
10
10
|
jsxToTextContent,
|
|
11
11
|
objectAssign
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-MSIQIC6B.js";
|
|
13
13
|
import {
|
|
14
14
|
assert,
|
|
15
15
|
assertUsage
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-4G4ACGLN.js";
|
|
17
17
|
import {
|
|
18
18
|
__template
|
|
19
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-3QC7HYIF.js";
|
|
20
20
|
|
|
21
21
|
// src/renderer/_default.page.server.tsx
|
|
22
22
|
import ReactDOMServer from "react-dom/server";
|
|
@@ -44,91 +44,101 @@ var discord_default = "/assets/discord-JD33TUSF.svg";
|
|
|
44
44
|
// src/icons/changelog.svg
|
|
45
45
|
var changelog_default = "/assets/changelog-IPI5F42D.svg";
|
|
46
46
|
|
|
47
|
+
// src/icons/languages.svg
|
|
48
|
+
var languages_default = "/assets/languages-KXPKJFQL.svg";
|
|
49
|
+
|
|
47
50
|
// src/navigation/NavigationHeader.tsx
|
|
48
51
|
function NavigationHeader() {
|
|
49
52
|
const pageContext = usePageContext();
|
|
50
|
-
return /* @__PURE__ */ React.createElement(
|
|
51
|
-
"
|
|
52
|
-
{
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
53
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
54
|
+
id: "navigation-header",
|
|
55
|
+
style: {
|
|
56
|
+
display: "flex",
|
|
57
|
+
flexDirection: "column",
|
|
58
|
+
alignItems: "center",
|
|
59
|
+
marginBottom: -5
|
|
60
|
+
}
|
|
61
|
+
}, /* @__PURE__ */ React.createElement("a", {
|
|
62
|
+
id: "navigation-header-logo",
|
|
63
|
+
style: {
|
|
64
|
+
display: "flex",
|
|
65
|
+
alignItems: "center",
|
|
66
|
+
color: "inherit",
|
|
67
|
+
justifyContent: "left",
|
|
68
|
+
textDecoration: "none",
|
|
69
|
+
paddingTop: 12,
|
|
70
|
+
paddingBottom: 7
|
|
60
71
|
},
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
{
|
|
64
|
-
id: "navigation-header-logo",
|
|
65
|
-
style: {
|
|
66
|
-
display: "flex",
|
|
67
|
-
alignItems: "center",
|
|
68
|
-
color: "inherit",
|
|
69
|
-
justifyContent: "left",
|
|
70
|
-
textDecoration: "none",
|
|
71
|
-
paddingTop: 12,
|
|
72
|
-
paddingBottom: 7
|
|
73
|
-
},
|
|
74
|
-
href: "/"
|
|
75
|
-
},
|
|
76
|
-
pageContext.config.navHeader
|
|
77
|
-
),
|
|
78
|
-
/* @__PURE__ */ React.createElement(Links, null)
|
|
79
|
-
);
|
|
72
|
+
href: "/"
|
|
73
|
+
}, pageContext.config.navHeader), /* @__PURE__ */ React.createElement(Links, null));
|
|
80
74
|
}
|
|
81
75
|
function Links() {
|
|
82
76
|
const pageContext = usePageContext();
|
|
83
|
-
const { projectInfo } = pageContext.config;
|
|
84
|
-
|
|
85
|
-
"
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
77
|
+
const { projectInfo, i18n } = pageContext.config;
|
|
78
|
+
const iconI18n = !i18n ? null : /* @__PURE__ */ React.createElement(LinkIcon, {
|
|
79
|
+
className: "decolorize-4",
|
|
80
|
+
icon: languages_default,
|
|
81
|
+
href: "/languages",
|
|
82
|
+
style: { height: 21, position: "relative", top: 0, left: 0 }
|
|
83
|
+
});
|
|
84
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
85
|
+
style: {
|
|
86
|
+
display: "flex",
|
|
87
|
+
alignItems: "center",
|
|
88
|
+
paddingTop: 0,
|
|
89
|
+
justifyContent: "left"
|
|
90
|
+
}
|
|
91
|
+
}, /* @__PURE__ */ React.createElement(LinkIcon, {
|
|
92
|
+
className: "decolorize-4",
|
|
93
|
+
icon: github_default,
|
|
94
|
+
href: projectInfo.githubRepository
|
|
95
|
+
}), /* @__PURE__ */ React.createElement(LinkIcon, {
|
|
96
|
+
className: "decolorize-6",
|
|
97
|
+
icon: discord_default,
|
|
98
|
+
href: projectInfo.discordInvite
|
|
99
|
+
}), /* @__PURE__ */ React.createElement(LinkIcon, {
|
|
100
|
+
className: "decolorize-7",
|
|
101
|
+
icon: twitter_default,
|
|
102
|
+
href: projectInfo.twitterProfile
|
|
103
|
+
}), /* @__PURE__ */ React.createElement("div", {
|
|
104
|
+
className: "decolorize-6 colorize-on-hover",
|
|
105
|
+
id: "docsearch-desktop"
|
|
106
|
+
}), iconI18n, /* @__PURE__ */ React.createElement(ChangelogButton, null));
|
|
100
107
|
}
|
|
101
108
|
function ChangelogButton() {
|
|
102
109
|
const pageContext = usePageContext();
|
|
103
110
|
const { projectInfo } = pageContext.config;
|
|
104
|
-
return /* @__PURE__ */ React.createElement(
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
111
|
+
return /* @__PURE__ */ React.createElement("a", {
|
|
112
|
+
href: `${projectInfo.githubRepository}/blob/main/CHANGELOG.md`,
|
|
113
|
+
className: "button colorize-on-hover",
|
|
114
|
+
style: {
|
|
115
|
+
display: "flex",
|
|
116
|
+
alignItems: "center",
|
|
117
|
+
padding: "1px 7px",
|
|
118
|
+
marginLeft: 2,
|
|
119
|
+
fontSize: "0.97em",
|
|
120
|
+
color: "inherit"
|
|
121
|
+
}
|
|
122
|
+
}, /* @__PURE__ */ React.createElement("span", {
|
|
123
|
+
id: "version-number",
|
|
124
|
+
className: "decolorize-7"
|
|
125
|
+
}, "v", projectInfo.projectVersion), /* @__PURE__ */ React.createElement("img", {
|
|
126
|
+
className: "decolorize-6",
|
|
127
|
+
src: changelog_default,
|
|
128
|
+
height: 16,
|
|
129
|
+
style: { marginLeft: 5 }
|
|
130
|
+
}));
|
|
121
131
|
}
|
|
122
|
-
function
|
|
123
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
124
|
-
"
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
));
|
|
132
|
+
function LinkIcon({ className, icon, href, style }) {
|
|
133
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("a", {
|
|
134
|
+
className: "colorize-on-hover " + className,
|
|
135
|
+
href,
|
|
136
|
+
style: { padding: 3, display: "inline-block", lineHeight: 0 }
|
|
137
|
+
}, /* @__PURE__ */ React.createElement("img", {
|
|
138
|
+
src: icon,
|
|
139
|
+
height: "20",
|
|
140
|
+
style
|
|
141
|
+
})));
|
|
132
142
|
}
|
|
133
143
|
|
|
134
144
|
// src/navigation/navigation-fullscreen/NavigationFullscreenButton.tsx
|
|
@@ -139,38 +149,34 @@ var close_default = "/assets/close-IQXTDOHV.svg";
|
|
|
139
149
|
|
|
140
150
|
// src/navigation/navigation-fullscreen/NavigationFullscreenButton.tsx
|
|
141
151
|
function NavigationFullscreenButton() {
|
|
142
|
-
return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement("a", {
|
|
143
|
-
"
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
}
|
|
152
|
-
},
|
|
153
|
-
/* @__PURE__ */ React2.createElement("div", null)
|
|
154
|
-
), /* @__PURE__ */ React2.createElement(
|
|
155
|
-
"div",
|
|
156
|
-
{
|
|
157
|
-
style: { position: "fixed", height: "100vh", width: 20 },
|
|
158
|
-
"aria-label": "Press <Esc>",
|
|
159
|
-
"data-balloon-pos": "right"
|
|
152
|
+
return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement("a", {
|
|
153
|
+
id: "navigation-fullscreen-button"
|
|
154
|
+
}, /* @__PURE__ */ React2.createElement("div", {
|
|
155
|
+
style: {
|
|
156
|
+
position: "fixed",
|
|
157
|
+
cursor: "pointer",
|
|
158
|
+
height: "100vh",
|
|
159
|
+
width: 20,
|
|
160
|
+
overflow: "hidden"
|
|
160
161
|
}
|
|
161
|
-
))
|
|
162
|
+
}, /* @__PURE__ */ React2.createElement("div", null)), /* @__PURE__ */ React2.createElement("div", {
|
|
163
|
+
style: { position: "fixed", height: "100vh", width: 20 },
|
|
164
|
+
"aria-label": "Press <Esc>",
|
|
165
|
+
"data-balloon-pos": "right"
|
|
166
|
+
})));
|
|
162
167
|
}
|
|
163
168
|
function NavigationFullscreenClose() {
|
|
164
|
-
return /* @__PURE__ */ React2.createElement(
|
|
165
|
-
"
|
|
166
|
-
{
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
169
|
+
return /* @__PURE__ */ React2.createElement("a", {
|
|
170
|
+
id: "navigation-fullscreen-close",
|
|
171
|
+
style: { position: "fixed", top: 11, right: 15, zIndex: 10 },
|
|
172
|
+
"aria-label": "Press <Esc>",
|
|
173
|
+
"data-balloon-pos": "left"
|
|
174
|
+
}, /* @__PURE__ */ React2.createElement("img", {
|
|
175
|
+
src: close_default,
|
|
176
|
+
height: 50,
|
|
177
|
+
width: 50,
|
|
178
|
+
style: { display: "block" }
|
|
179
|
+
}));
|
|
174
180
|
}
|
|
175
181
|
|
|
176
182
|
// src/navigation/Navigation.tsx
|
|
@@ -178,39 +184,59 @@ function Navigation({
|
|
|
178
184
|
pageContext
|
|
179
185
|
}) {
|
|
180
186
|
const { isDetachedPage } = pageContext;
|
|
181
|
-
return /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement("div", {
|
|
187
|
+
return /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement("div", {
|
|
188
|
+
id: "navigation-container"
|
|
189
|
+
}, /* @__PURE__ */ React3.createElement(NavigationHeader, null), isDetachedPage && /* @__PURE__ */ React3.createElement(DetachedPageNote, null), /* @__PURE__ */ React3.createElement(NavigationContent, {
|
|
190
|
+
pageContext
|
|
191
|
+
}), /* @__PURE__ */ React3.createElement(NavigationFullscreenClose, null)));
|
|
182
192
|
}
|
|
183
193
|
function NavigationMask() {
|
|
184
|
-
return /* @__PURE__ */ React3.createElement("div", {
|
|
194
|
+
return /* @__PURE__ */ React3.createElement("div", {
|
|
195
|
+
id: "navigation-mask"
|
|
196
|
+
});
|
|
185
197
|
}
|
|
186
198
|
function NavigationContent({
|
|
187
199
|
pageContext
|
|
188
200
|
}) {
|
|
189
201
|
const headings = getHeadingsWithComputedProps(pageContext);
|
|
190
202
|
const headingsGrouped = groupHeadings(headings);
|
|
191
|
-
return /* @__PURE__ */ React3.createElement("div", {
|
|
203
|
+
return /* @__PURE__ */ React3.createElement("div", {
|
|
204
|
+
id: "navigation-content"
|
|
205
|
+
}, /* @__PURE__ */ React3.createElement("div", {
|
|
206
|
+
className: "nav-column",
|
|
207
|
+
style: { position: "relative" }
|
|
208
|
+
}, headingsGrouped.map((headingsH1, i) => /* @__PURE__ */ React3.createElement("div", {
|
|
209
|
+
className: "nav-h1-group",
|
|
210
|
+
key: i
|
|
211
|
+
}, /* @__PURE__ */ React3.createElement(Heading, {
|
|
212
|
+
heading: headingsH1
|
|
213
|
+
}), headingsH1.headings.map((heading, j) => /* @__PURE__ */ React3.createElement(Heading, {
|
|
214
|
+
heading,
|
|
215
|
+
key: j
|
|
216
|
+
}))))));
|
|
192
217
|
}
|
|
193
218
|
function Heading({
|
|
194
219
|
heading
|
|
195
220
|
}) {
|
|
196
221
|
assert([1, 2, 3, 4].includes(heading.level), heading);
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
222
|
+
if (heading.level === 1 || heading.level === 4) {
|
|
223
|
+
assert(heading.url === void 0);
|
|
224
|
+
} else {
|
|
225
|
+
assert(heading.url);
|
|
226
|
+
}
|
|
227
|
+
return /* @__PURE__ */ React3.createElement("a", {
|
|
228
|
+
className: [
|
|
229
|
+
"nav-item",
|
|
230
|
+
"nav-item-h" + heading.level,
|
|
231
|
+
heading.computed.isActive && " is-active",
|
|
232
|
+
heading.computed.isActiveFirst && " is-active-first",
|
|
233
|
+
heading.computed.isActiveLast && " is-active-last",
|
|
234
|
+
heading.computed.isChildOfListHeading && "nav-item-parent-is-list-heading",
|
|
235
|
+
heading.computed.isFirstOfItsKind && "nav-item-first-of-its-kind",
|
|
236
|
+
heading.computed.isLastOfItsKind && "nav-item-last-of-its-kind"
|
|
237
|
+
].filter(Boolean).join(" "),
|
|
238
|
+
href: heading.url ?? void 0
|
|
239
|
+
}, heading.titleInNav);
|
|
214
240
|
}
|
|
215
241
|
function groupHeadings(headings) {
|
|
216
242
|
const headingsGrouped = [];
|
|
@@ -264,118 +290,117 @@ function getHeadingsWithComputedProps(pageContext) {
|
|
|
264
290
|
});
|
|
265
291
|
}
|
|
266
292
|
function DetachedPageNote() {
|
|
267
|
-
return /* @__PURE__ */ React3.createElement(
|
|
268
|
-
"
|
|
269
|
-
{
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
"span",
|
|
287
|
-
{
|
|
288
|
-
style: {
|
|
289
|
-
opacity: 0.8
|
|
290
|
-
}
|
|
291
|
-
},
|
|
292
|
-
" ",
|
|
293
|
-
"\u2014 this page isn't listed in the navigation menu below."
|
|
294
|
-
)
|
|
295
|
-
);
|
|
293
|
+
return /* @__PURE__ */ React3.createElement("div", {
|
|
294
|
+
id: "detached-note",
|
|
295
|
+
style: {
|
|
296
|
+
backgroundColor: "var(--background-color)",
|
|
297
|
+
textAlign: "left",
|
|
298
|
+
marginLeft: 10,
|
|
299
|
+
marginRight: 10,
|
|
300
|
+
marginTop: 30,
|
|
301
|
+
marginBottom: -8,
|
|
302
|
+
borderRadius: 5,
|
|
303
|
+
padding: 10
|
|
304
|
+
}
|
|
305
|
+
}, /* @__PURE__ */ React3.createElement(Emoji, {
|
|
306
|
+
name: "info"
|
|
307
|
+
}), " ", /* @__PURE__ */ React3.createElement("b", null, /* @__PURE__ */ React3.createElement("em", null, "Detached")), /* @__PURE__ */ React3.createElement("span", {
|
|
308
|
+
style: {
|
|
309
|
+
opacity: 0.8
|
|
310
|
+
}
|
|
311
|
+
}, " ", "\u2014 this page isn't listed in the navigation menu below."));
|
|
296
312
|
}
|
|
297
313
|
|
|
298
314
|
// src/MobileHeader.tsx
|
|
299
315
|
import React4 from "react";
|
|
300
316
|
function MobileHeader() {
|
|
301
317
|
const pageContext = usePageContext();
|
|
302
|
-
return /* @__PURE__ */ React4.createElement(
|
|
303
|
-
"
|
|
304
|
-
{
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
"
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
color: "inherit",
|
|
335
|
-
display: "flex",
|
|
336
|
-
alignItems: "center",
|
|
337
|
-
justifyContent: "left",
|
|
338
|
-
textDecoration: "none"
|
|
339
|
-
}
|
|
340
|
-
},
|
|
341
|
-
pageContext.config.navHeaderMobile
|
|
342
|
-
),
|
|
343
|
-
/* @__PURE__ */ React4.createElement("div", { id: "docsearch-mobile" })
|
|
344
|
-
)
|
|
345
|
-
);
|
|
318
|
+
return /* @__PURE__ */ React4.createElement("div", {
|
|
319
|
+
id: "mobile-header",
|
|
320
|
+
style: {
|
|
321
|
+
height: "var(--mobile-header-height)",
|
|
322
|
+
width: "100vw",
|
|
323
|
+
position: "relative"
|
|
324
|
+
}
|
|
325
|
+
}, /* @__PURE__ */ React4.createElement("div", {
|
|
326
|
+
style: {
|
|
327
|
+
position: "fixed",
|
|
328
|
+
display: "flex",
|
|
329
|
+
alignItems: "center",
|
|
330
|
+
background: "white",
|
|
331
|
+
zIndex: 99,
|
|
332
|
+
top: 0,
|
|
333
|
+
left: 0,
|
|
334
|
+
height: "var(--mobile-header-height)",
|
|
335
|
+
width: "100%",
|
|
336
|
+
borderBottom: "1px solid #ddd"
|
|
337
|
+
}
|
|
338
|
+
}, /* @__PURE__ */ React4.createElement(MenuToggle, null), /* @__PURE__ */ React4.createElement("a", {
|
|
339
|
+
href: "/",
|
|
340
|
+
style: {
|
|
341
|
+
color: "inherit",
|
|
342
|
+
display: "flex",
|
|
343
|
+
alignItems: "center",
|
|
344
|
+
justifyContent: "left",
|
|
345
|
+
textDecoration: "none"
|
|
346
|
+
}
|
|
347
|
+
}, pageContext.config.navHeaderMobile), /* @__PURE__ */ React4.createElement("div", {
|
|
348
|
+
id: "docsearch-mobile"
|
|
349
|
+
})));
|
|
346
350
|
}
|
|
347
351
|
function MenuToggle() {
|
|
348
|
-
return /* @__PURE__ */ React4.createElement("div", {
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
d: "M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"
|
|
363
|
-
}
|
|
364
|
-
)
|
|
365
|
-
));
|
|
352
|
+
return /* @__PURE__ */ React4.createElement("div", {
|
|
353
|
+
style: { padding: 20, lineHeight: 0 },
|
|
354
|
+
id: "menu-toggle"
|
|
355
|
+
}, /* @__PURE__ */ React4.createElement("svg", {
|
|
356
|
+
style: { width: 20 },
|
|
357
|
+
className: "icon",
|
|
358
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
359
|
+
"aria-hidden": "true",
|
|
360
|
+
role: "img",
|
|
361
|
+
viewBox: "0 0 448 512"
|
|
362
|
+
}, /* @__PURE__ */ React4.createElement("path", {
|
|
363
|
+
fill: "currentColor",
|
|
364
|
+
d: "M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"
|
|
365
|
+
})));
|
|
366
366
|
}
|
|
367
367
|
|
|
368
368
|
// src/components/EditPageNote.tsx
|
|
369
369
|
import React5 from "react";
|
|
370
370
|
function EditPageNote({ pageContext }) {
|
|
371
|
-
const text = /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(Emoji, {
|
|
372
|
-
|
|
371
|
+
const text = /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(Emoji, {
|
|
372
|
+
name: "writing-hang"
|
|
373
|
+
}), " Edit this page");
|
|
374
|
+
return /* @__PURE__ */ React5.createElement("div", {
|
|
375
|
+
style: { marginTop: 50 }
|
|
376
|
+
}, /* @__PURE__ */ React5.createElement(RepoLink, {
|
|
377
|
+
path: "/docs/pages" + pageContext.urlPathname + ".page.server.mdx",
|
|
378
|
+
text,
|
|
379
|
+
editMode: true
|
|
380
|
+
}));
|
|
373
381
|
}
|
|
374
382
|
|
|
375
383
|
// src/PageLayout.tsx
|
|
376
384
|
function PageLayout({ pageContext, children }) {
|
|
377
385
|
const { isLandingPage, pageTitle } = pageContext;
|
|
378
|
-
return /* @__PURE__ */ React6.createElement(React6.StrictMode, null, /* @__PURE__ */ React6.createElement(PageContextProvider, {
|
|
386
|
+
return /* @__PURE__ */ React6.createElement(React6.StrictMode, null, /* @__PURE__ */ React6.createElement(PageContextProvider, {
|
|
387
|
+
pageContext
|
|
388
|
+
}, /* @__PURE__ */ React6.createElement("div", {
|
|
389
|
+
id: "page-layout",
|
|
390
|
+
className: isLandingPage ? "landing-page" : "doc-page"
|
|
391
|
+
}, /* @__PURE__ */ React6.createElement("div", {
|
|
392
|
+
id: "navigation-wrapper"
|
|
393
|
+
}, /* @__PURE__ */ React6.createElement(Navigation, {
|
|
394
|
+
pageContext
|
|
395
|
+
})), /* @__PURE__ */ React6.createElement(NavigationFullscreenButton, null), /* @__PURE__ */ React6.createElement("div", {
|
|
396
|
+
id: "page-wrapper"
|
|
397
|
+
}, /* @__PURE__ */ React6.createElement("div", {
|
|
398
|
+
id: "page-container"
|
|
399
|
+
}, /* @__PURE__ */ React6.createElement(MobileHeader, null), /* @__PURE__ */ React6.createElement("div", {
|
|
400
|
+
id: "page-content"
|
|
401
|
+
}, pageTitle && /* @__PURE__ */ React6.createElement("h1", null, pageTitle), children, !isLandingPage && /* @__PURE__ */ React6.createElement(EditPageNote, {
|
|
402
|
+
pageContext
|
|
403
|
+
}))), /* @__PURE__ */ React6.createElement(NavigationMask, null)))));
|
|
379
404
|
}
|
|
380
405
|
|
|
381
406
|
// src/config/getConfig.ts
|
|
@@ -476,7 +501,7 @@ function getHeadingsWithSubHeadings(headings, pageContext, activeHeading) {
|
|
|
476
501
|
const pageHeadings = pageContext.exports.headings || [];
|
|
477
502
|
pageHeadings.forEach((pageHeading, i) => {
|
|
478
503
|
const title = parseTitle(pageHeading.title);
|
|
479
|
-
const url = "#" + pageHeading.
|
|
504
|
+
const url = pageHeading.headingId && "#" + pageHeading.headingId;
|
|
480
505
|
assert(
|
|
481
506
|
pageHeading.headingLevel !== 3,
|
|
482
507
|
"Wrong page heading level `" + pageHeading.headingLevel + "` (it should be `<h2>`) for sub-heading `" + pageHeading.title + "` of page `" + pageContext.urlOriginal + "`."
|
|
@@ -547,7 +572,9 @@ function parseEmojis(html) {
|
|
|
547
572
|
async function render(pageContextOriginal) {
|
|
548
573
|
const { Page } = pageContextOriginal;
|
|
549
574
|
const pageContextResolved = resolvePageContext(pageContextOriginal);
|
|
550
|
-
const page = /* @__PURE__ */ React7.createElement(PageLayout, {
|
|
575
|
+
const page = /* @__PURE__ */ React7.createElement(PageLayout, {
|
|
576
|
+
pageContext: pageContextResolved
|
|
577
|
+
}, /* @__PURE__ */ React7.createElement(Page, null));
|
|
551
578
|
const descriptionTag = pageContextResolved.isLandingPage ? dangerouslySkipEscape(`<meta name="description" content="${pageContextResolved.meta.tagline}" />`) : "";
|
|
552
579
|
const docSearchJS = getDocSearchJS(pageContextResolved);
|
|
553
580
|
const docSearchCSS = getDocSearchCSS(pageContextResolved);
|
|
@@ -588,4 +615,3 @@ function getOpenGraphTags(url, meta) {
|
|
|
588
615
|
export {
|
|
589
616
|
render
|
|
590
617
|
};
|
|
591
|
-
//# sourceMappingURL=_default.page.server.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 178.84 55.522">
|
|
2
|
+
<defs>
|
|
3
|
+
<style>
|
|
4
|
+
.a {
|
|
5
|
+
fill: #00204f;
|
|
6
|
+
}
|
|
7
|
+
</style>
|
|
8
|
+
</defs>
|
|
9
|
+
<path class="a" d="M27.761,0A27.761,27.761,0,1,0,55.522,27.761,27.793,27.793,0,0,0,27.761,0Zm0,52.262a24.5,24.5,0,1,1,24.5-24.5A24.529,24.529,0,0,1,27.761,52.262Zm-5.543-8.536H35.3L22.218,28.358Zm5.9-30.856h-5.9V27.242h5.9a7.186,7.186,0,1,0,0-14.372Zm75.168,22.755a1.825,1.825,0,0,0-1.239.656A6.35,6.35,0,0,1,97.2,38.467a6.762,6.762,0,0,1-6.668-6.959,6.762,6.762,0,0,1,6.668-6.96,5.551,5.551,0,0,1,3.5,1.166l-3.844,4.245a1.23,1.23,0,0,0-.328.911,1.37,1.37,0,0,0,2.405.838l4.646-5.3a1.468,1.468,0,0,0-.074-2.223,9.326,9.326,0,0,0-6.3-2.332,9.656,9.656,0,0,0,0,19.312,9.22,9.22,0,0,0,7.105-3.17,1.7,1.7,0,0,0,.438-.984A1.38,1.38,0,0,0,103.286,35.625ZM117.543,22.01a9.019,9.019,0,0,0-6.622,2.833,10.116,10.116,0,0,0-1.843,2.566,9.363,9.363,0,0,0-.99,4.172v14.4a1.406,1.406,0,0,0,1.416,1.452,1.428,1.428,0,0,0,1.417-1.452V37.947a8.885,8.885,0,0,0,6.622,2.833,9.156,9.156,0,0,0,9.173-9.385A9.156,9.156,0,0,0,117.543,22.01Zm-.177,16.149a6.5,6.5,0,0,1-6.445-6.481v-.566a6.466,6.466,0,1,1,12.926.283A6.55,6.55,0,0,1,117.366,38.159ZM139.83,22.01a9.385,9.385,0,0,0,0,18.77,9.208,9.208,0,0,0,9.314-9.385A9.209,9.209,0,0,0,139.83,22.01Zm0,16.149a6.593,6.593,0,0,1-6.481-6.764,6.47,6.47,0,1,1,12.926,0A6.565,6.565,0,0,1,139.83,38.159Zm38.292-10.041a10.174,10.174,0,0,0-2.116-3.275A9.17,9.17,0,0,0,160.211,31.4a9.156,9.156,0,0,0,9.173,9.385,8.942,8.942,0,0,0,6.622-2.833v1.31a1.429,1.429,0,0,0,1.417,1.452,1.407,1.407,0,0,0,1.417-1.452V31.581A10.176,10.176,0,0,0,178.122,28.118Zm-2.116,3.56A6.466,6.466,0,1,1,163.08,31.4a6.466,6.466,0,1,1,12.926-.283ZM158.27,22.15a4.873,4.873,0,0,0-3.208.735,4.992,4.992,0,0,0-2.182,3.663l-.006.067V39.3a1.415,1.415,0,1,0,2.829,0V26.761a2.183,2.183,0,0,1,.9-1.5,2.076,2.076,0,0,1,1.336-.3,1.414,1.414,0,1,0,.331-2.809ZM77.577,28.959l.732-.037A6.319,6.319,0,0,0,83.8,22.369c0-4.063-3.038-7.322-7.688-7.322h-5.93a1.547,1.547,0,0,0-1.538,1.538V39.393a1.556,1.556,0,1,0,3.112,0V17.939H76a4.414,4.414,0,1,1,0,8.823H74.794A1.4,1.4,0,0,0,73.4,28.19a1.927,1.927,0,0,0,.476,1.208l9.226,10.983a1.489,1.489,0,0,0,1.208.586,1.547,1.547,0,0,0,1.538-1.537,1.424,1.424,0,0,0-.366-1.025Z"/>
|
|
10
|
+
</svg>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brillout/docpress",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"exports": {
|
|
5
5
|
"./renderer/_default.page.server.js": "./dist/renderer/_default.page.server.js",
|
|
6
6
|
"./renderer/_default.page.client.js": "./dist/renderer/_default.page.client.js",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"react-dom": "18"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@brillout/framework-builder": "^0.
|
|
60
|
+
"@brillout/framework-builder": "^0.1.1",
|
|
61
61
|
"@brillout/docpress": "link:.",
|
|
62
62
|
"@types/express": "^4.17.13",
|
|
63
63
|
"@types/node": "^15.12.1",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"react-dom": "^18.1.0",
|
|
69
69
|
"rollup": "^2.74.1",
|
|
70
70
|
"tsx": "^3.12.1",
|
|
71
|
-
"typescript": "^4.
|
|
71
|
+
"typescript": "^4.9.4"
|
|
72
72
|
},
|
|
73
73
|
"bin": {
|
|
74
74
|
"docpress": "./bin.js"
|