@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.
Files changed (40) hide show
  1. package/dist/{chunk-TTLAZ2T2.js → chunk-3QC7HYIF.js} +0 -1
  2. package/dist/{chunk-G2A5MZJA.js → chunk-4G4ACGLN.js} +0 -1
  3. package/dist/{chunk-H5CO4N2X.js → chunk-D4PNWSRD.js} +8 -5
  4. package/dist/{chunk-7HKDCMSZ.js → chunk-MSIQIC6B.js} +4 -3
  5. package/dist/chunk-NVJING6T.js +91 -0
  6. package/dist/{chunk-XUTBTIEE.js → chunk-RZAPSH5Z.js} +20 -19
  7. package/dist/cli/index.js +5 -6
  8. package/dist/components/features/FeatureList.css +0 -1
  9. package/dist/components/features/FeatureList.js +2 -3
  10. package/dist/components/features/initFeatureList.js +2 -3
  11. package/dist/{devServer-534L4U45.js → devServer-UKWIENKN.js} +4 -5
  12. package/dist/index.css +0 -1
  13. package/dist/index.d.ts +5 -4
  14. package/dist/index.js +181 -134
  15. package/dist/languages-KXPKJFQL.svg +1 -0
  16. package/dist/renderer/_default.page.client.css +22 -4
  17. package/dist/renderer/_default.page.client.js +6 -6
  18. package/dist/renderer/_default.page.server.css +2 -4
  19. package/dist/renderer/_default.page.server.d.ts +1 -1
  20. package/dist/renderer/_default.page.server.js +249 -223
  21. package/dist/repora-UNKQZ6QP.svg +10 -0
  22. package/package.json +3 -3
  23. package/dist/chunk-7HKDCMSZ.js.map +0 -1
  24. package/dist/chunk-C3OIVLKV.js +0 -75
  25. package/dist/chunk-C3OIVLKV.js.map +0 -1
  26. package/dist/chunk-G2A5MZJA.js.map +0 -1
  27. package/dist/chunk-H5CO4N2X.js.map +0 -1
  28. package/dist/chunk-TTLAZ2T2.js.map +0 -1
  29. package/dist/chunk-XUTBTIEE.js.map +0 -1
  30. package/dist/cli/index.js.map +0 -1
  31. package/dist/components/features/FeatureList.css.map +0 -1
  32. package/dist/components/features/FeatureList.js.map +0 -1
  33. package/dist/components/features/initFeatureList.js.map +0 -1
  34. package/dist/devServer-534L4U45.js.map +0 -1
  35. package/dist/index.css.map +0 -1
  36. package/dist/index.js.map +0 -1
  37. package/dist/renderer/_default.page.client.css.map +0 -1
  38. package/dist/renderer/_default.page.client.js.map +0 -1
  39. package/dist/renderer/_default.page.server.css.map +0 -1
  40. 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-H5CO4N2X.js";
7
+ } from "../chunk-D4PNWSRD.js";
8
8
  import {
9
9
  Emoji,
10
10
  jsxToTextContent,
11
11
  objectAssign
12
- } from "../chunk-7HKDCMSZ.js";
12
+ } from "../chunk-MSIQIC6B.js";
13
13
  import {
14
14
  assert,
15
15
  assertUsage
16
- } from "../chunk-G2A5MZJA.js";
16
+ } from "../chunk-4G4ACGLN.js";
17
17
  import {
18
18
  __template
19
- } from "../chunk-TTLAZ2T2.js";
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
- "div",
52
- {
53
- id: "navigation-header",
54
- style: {
55
- display: "flex",
56
- flexDirection: "column",
57
- alignItems: "center",
58
- marginBottom: -5
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
- /* @__PURE__ */ React.createElement(
62
- "a",
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
- return /* @__PURE__ */ React.createElement(
85
- "div",
86
- {
87
- style: {
88
- display: "flex",
89
- alignItems: "center",
90
- paddingTop: 0,
91
- justifyContent: "left"
92
- }
93
- },
94
- /* @__PURE__ */ React.createElement(SocialLink, { className: "decolorize-4", icon: github_default, href: projectInfo.githubRepository }),
95
- /* @__PURE__ */ React.createElement(SocialLink, { className: "decolorize-6", icon: discord_default, href: projectInfo.discordInvite }),
96
- /* @__PURE__ */ React.createElement(SocialLink, { className: "decolorize-7", icon: twitter_default, href: projectInfo.twitterProfile }),
97
- /* @__PURE__ */ React.createElement("div", { id: "docsearch-desktop" }),
98
- /* @__PURE__ */ React.createElement(ChangelogButton, null)
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
- "a",
106
- {
107
- href: `${projectInfo.githubRepository}/blob/main/CHANGELOG.md`,
108
- className: "button colorize-on-hover",
109
- style: {
110
- display: "flex",
111
- alignItems: "center",
112
- padding: "1px 7px",
113
- marginLeft: 2,
114
- fontSize: "0.97em",
115
- color: "inherit"
116
- }
117
- },
118
- /* @__PURE__ */ React.createElement("span", { className: "decolorize-7" }, "v", projectInfo.projectVersion),
119
- /* @__PURE__ */ React.createElement("img", { className: "decolorize-6", src: changelog_default, height: 16, style: { marginLeft: 5 } })
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 SocialLink({ className, icon, href }) {
123
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
124
- "a",
125
- {
126
- className: "colorize-on-hover " + className,
127
- href,
128
- style: { padding: 3, display: "inline-block", lineHeight: 0 }
129
- },
130
- /* @__PURE__ */ React.createElement("img", { src: icon, height: "20", style: {} })
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", { id: "navigation-fullscreen-button" }, /* @__PURE__ */ React2.createElement(
143
- "div",
144
- {
145
- style: {
146
- position: "fixed",
147
- cursor: "pointer",
148
- height: "100vh",
149
- width: 20,
150
- overflow: "hidden"
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
- "a",
166
- {
167
- id: "navigation-fullscreen-close",
168
- style: { position: "fixed", top: 11, right: 15, zIndex: 10 },
169
- "aria-label": "Press <Esc>",
170
- "data-balloon-pos": "left"
171
- },
172
- /* @__PURE__ */ React2.createElement("img", { src: close_default, height: 50, width: 50, style: { display: "block" } })
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", { id: "navigation-container" }, /* @__PURE__ */ React3.createElement(NavigationHeader, null), isDetachedPage && /* @__PURE__ */ React3.createElement(DetachedPageNote, null), /* @__PURE__ */ React3.createElement(NavigationContent, { pageContext }), /* @__PURE__ */ React3.createElement(NavigationFullscreenClose, null)));
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", { id: "navigation-mask" });
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", { id: "navigation-content" }, /* @__PURE__ */ React3.createElement("div", { className: "nav-column", style: { position: "relative" } }, headingsGrouped.map((headingsH1, i) => /* @__PURE__ */ React3.createElement("div", { className: "nav-h1-group", key: i }, /* @__PURE__ */ React3.createElement(Heading, { heading: headingsH1 }), headingsH1.headings.map((heading, j) => /* @__PURE__ */ React3.createElement(Heading, { heading, key: j }))))));
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
- return /* @__PURE__ */ React3.createElement(
198
- "a",
199
- {
200
- className: [
201
- "nav-item",
202
- "nav-item-h" + heading.level,
203
- heading.computed.isActive && " is-active",
204
- heading.computed.isActiveFirst && " is-active-first",
205
- heading.computed.isActiveLast && " is-active-last",
206
- heading.computed.isChildOfListHeading && "nav-item-parent-is-list-heading",
207
- heading.computed.isFirstOfItsKind && "nav-item-first-of-its-kind",
208
- heading.computed.isLastOfItsKind && "nav-item-last-of-its-kind"
209
- ].filter(Boolean).join(" "),
210
- href: heading.url || void 0
211
- },
212
- heading.titleInNav
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
- "div",
269
- {
270
- id: "detached-note",
271
- style: {
272
- backgroundColor: "var(--background-color)",
273
- textAlign: "left",
274
- marginLeft: 10,
275
- marginRight: 10,
276
- marginTop: 30,
277
- marginBottom: -8,
278
- borderRadius: 5,
279
- padding: 10
280
- }
281
- },
282
- /* @__PURE__ */ React3.createElement(Emoji, { name: "info" }),
283
- " ",
284
- /* @__PURE__ */ React3.createElement("b", null, /* @__PURE__ */ React3.createElement("em", null, "Detached")),
285
- /* @__PURE__ */ React3.createElement(
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
- "div",
304
- {
305
- id: "mobile-header",
306
- style: {
307
- height: "var(--mobile-header-height)",
308
- width: "100vw",
309
- position: "relative"
310
- }
311
- },
312
- /* @__PURE__ */ React4.createElement(
313
- "div",
314
- {
315
- style: {
316
- position: "fixed",
317
- display: "flex",
318
- alignItems: "center",
319
- background: "white",
320
- zIndex: 99,
321
- top: 0,
322
- left: 0,
323
- height: "var(--mobile-header-height)",
324
- width: "100%",
325
- borderBottom: "1px solid #ddd"
326
- }
327
- },
328
- /* @__PURE__ */ React4.createElement(MenuToggle, null),
329
- /* @__PURE__ */ React4.createElement(
330
- "a",
331
- {
332
- href: "/",
333
- style: {
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", { style: { padding: 20, lineHeight: 0 }, id: "menu-toggle" }, /* @__PURE__ */ React4.createElement(
349
- "svg",
350
- {
351
- style: { width: 20 },
352
- className: "icon",
353
- xmlns: "http://www.w3.org/2000/svg",
354
- "aria-hidden": "true",
355
- role: "img",
356
- viewBox: "0 0 448 512"
357
- },
358
- /* @__PURE__ */ React4.createElement(
359
- "path",
360
- {
361
- fill: "currentColor",
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, { name: "writing-hang" }), " Edit this page");
372
- return /* @__PURE__ */ React5.createElement("div", { style: { marginTop: 50 } }, /* @__PURE__ */ React5.createElement(RepoLink, { path: "/docs/pages" + pageContext.urlPathname + ".page.server.mdx", text, editMode: true }));
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, { pageContext }, /* @__PURE__ */ React6.createElement("div", { id: "page-layout", className: isLandingPage ? "landing-page" : "doc-page" }, /* @__PURE__ */ React6.createElement("div", { id: "navigation-wrapper" }, /* @__PURE__ */ React6.createElement(Navigation, { pageContext })), /* @__PURE__ */ React6.createElement(NavigationFullscreenButton, null), /* @__PURE__ */ React6.createElement("div", { id: "page-wrapper" }, /* @__PURE__ */ React6.createElement("div", { id: "page-container" }, /* @__PURE__ */ React6.createElement(MobileHeader, null), /* @__PURE__ */ React6.createElement("div", { id: "page-content" }, pageTitle && /* @__PURE__ */ React6.createElement("h1", null, pageTitle), children, !isLandingPage && /* @__PURE__ */ React6.createElement(EditPageNote, { pageContext }))), /* @__PURE__ */ React6.createElement(NavigationMask, null)))));
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.id;
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, { pageContext: pageContextResolved }, /* @__PURE__ */ React7.createElement(Page, null));
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.1",
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.0.2",
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.8.4"
71
+ "typescript": "^4.9.4"
72
72
  },
73
73
  "bin": {
74
74
  "docpress": "./bin.js"