varvara-typedoc-theme 0.3.4 → 0.3.5

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Varvara TypeDoc Theme
1
+ # Varvara 🤦‍♀️ TypeDoc Theme
2
2
 
3
3
  _View a_ [_live example here_](https://marcmarine.github.io/western-signs).
4
4
 
@@ -8,6 +8,18 @@ Varvara TypeDoc Theme is a custom theme for TypeDoc, designed to provide a seaml
8
8
  [![GitHub License](https://img.shields.io/github/license/marcmarine/varvara-js)](https://github.com/marcmarine/varvara-js/blob/main/LICENSE)
9
9
  [![TypeDoc](https://img.shields.io/badge/view-CHANGELOG.md-blue.svg)](https://github.com/marcmarine/varvara-js/blob/main/packages/typedoc-theme/CHANGELOG.md)
10
10
 
11
+ <details close>
12
+ <summary>🖼️ <strong>Screenshots</strong></summary>
13
+
14
+ ![Dark example](https://github.com/marcmarine/varvara-js/raw/main/packages/typedoc-theme/basic-example/example-dark.png)
15
+
16
+ ![Light example](https://github.com/marcmarine/varvara-js/raw/main/packages/typedoc-theme/basic-example/example-light.png)
17
+
18
+ > [!TIP]
19
+ > The theme is [fully customizable](#customization) 🚀.
20
+
21
+ </details>
22
+
11
23
  ## Installation
12
24
 
13
25
  Ensure TypeDoc is [installed](https://typedoc.org/index.html#quick-start) in your project.
@@ -1,5 +1,7 @@
1
1
  :root {
2
2
  --va-link-color: var(--va-color-primary);
3
+ --va-collapse-tree-indentation: var(--va-space-4);
4
+ --va-space-ratio: 0.78;
3
5
  }
4
6
 
5
7
  [data-theme='light'] {
@@ -14,10 +16,6 @@
14
16
  box-sizing: border-box;
15
17
  }
16
18
 
17
- .va-collapse {
18
- overflow: hidden;
19
- }
20
-
21
19
  .va-button {
22
20
  display: flex;
23
21
  align-items: center;
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import { createRequire } from "node:module";
2
2
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
3
3
 
4
4
  // src/themes/VarvaraTheme.tsx
5
- import { DefaultTheme as DefaultTheme2, JSX as JSX6, RendererEvent } from "typedoc";
5
+ import { DefaultTheme as DefaultTheme2, JSX as JSX5, RendererEvent } from "typedoc";
6
6
  import * as path from "path";
7
7
  import * as fs from "fs";
8
8
  import { fileURLToPath } from "url";
@@ -56,37 +56,54 @@ function footer(context) {
56
56
  }, context.hook("footer.begin", context), generatorDisplay, customFooterDisplay, context.hook("footer.end", context)));
57
57
  }
58
58
 
59
- // src/partials/sidebar.tsx
60
- import { i18n as i18n2, JSX as JSX2 } from "typedoc";
61
- function sidebar(context) {
62
- const navigation = context.getNavigation();
63
- return (props) => {
64
- return /* @__PURE__ */ JSX2.createElement("nav", {
65
- class: "va-button-group"
66
- }, /* @__PURE__ */ JSX2.createElement("details", {
67
- class: "va-collapse tsd-accordion"
68
- }, /* @__PURE__ */ JSX2.createElement("summary", null, /* @__PURE__ */ JSX2.createElement("a", {
69
- href: context.urlTo(props.project)
70
- }, i18n2.kind_plural_module())), navigation.map((item) => /* @__PURE__ */ JSX2.createElement("a", {
71
- href: `${context.relativeURL("./")}/${item.path}`,
72
- class: ["va-button", item.path?.includes(props.url) && "va-button--active"].join(" ")
73
- }, /* @__PURE__ */ JSX2.createElement("svg", {
74
- width: "20",
75
- height: "20",
76
- viewBox: "0 0 24 24",
77
- fill: "none",
78
- class: "tsd-kind-icon"
79
- }, /* @__PURE__ */ JSX2.createElement("use", {
80
- href: `#icon-${item.kind}`
81
- })), item.text))));
82
- };
59
+ // src/partials/navigation.tsx
60
+ import { JSX as JSX2, ReflectionFlag, i18n as i18n2, translateTagName, ReflectionFlags } from "typedoc";
61
+
62
+ // src/utils.ts
63
+ import {
64
+ DeclarationReflection,
65
+ ProjectReflection,
66
+ ReflectionKind
67
+ } from "typedoc";
68
+ function getDisplayName(refl) {
69
+ let version = "";
70
+ if ((refl instanceof DeclarationReflection || refl instanceof ProjectReflection) && refl.packageVersion) {
71
+ version = ` - v${refl.packageVersion}`;
72
+ }
73
+ return `${refl.name}${version}`;
74
+ }
75
+ var rootsCache = new WeakMap;
76
+ function getHierarchyRoots(project) {
77
+ const cached = rootsCache.get(project);
78
+ if (cached)
79
+ return cached;
80
+ const allClasses = project.getReflectionsByKind(ReflectionKind.ClassOrInterface);
81
+ const roots = allClasses.filter((refl) => {
82
+ if (!refl.implementedBy && !refl.extendedBy) {
83
+ return false;
84
+ }
85
+ if (!refl.implementedTypes && !refl.extendedTypes) {
86
+ return true;
87
+ }
88
+ const types = [
89
+ ...refl.implementedTypes || [],
90
+ ...refl.extendedTypes || []
91
+ ];
92
+ return types.every((type) => !type.visit({
93
+ reference(ref) {
94
+ return ref.reflection !== undefined;
95
+ }
96
+ }));
97
+ });
98
+ const result = roots.sort((a, b) => a.name.localeCompare(b.name));
99
+ rootsCache.set(project, result);
100
+ return result;
83
101
  }
84
102
 
85
103
  // src/partials/navigation.tsx
86
- import { JSX as JSX3, ReflectionFlag, i18n as i18n3, translateTagName, ReflectionFlags } from "typedoc";
87
104
  function pageSidebar(context) {
88
105
  return (props) => {
89
- return /* @__PURE__ */ JSX3.createElement("div", {
106
+ return /* @__PURE__ */ JSX2.createElement("div", {
90
107
  class: "va-button-group"
91
108
  }, context.settings(), context.pageNavigation(props));
92
109
  };
@@ -109,21 +126,21 @@ function settings(context) {
109
126
  visibilityOptions.push(buildFilterItem(context, key, ReflectionFlags.flagString(flagOptionNameToReflectionFlag[key]), defaultFilters[key]));
110
127
  }
111
128
  }
112
- return /* @__PURE__ */ JSX3.createElement("details", {
129
+ return /* @__PURE__ */ JSX2.createElement("details", {
113
130
  class: "va-collapse settings tsd-accordion",
114
131
  open: false
115
- }, /* @__PURE__ */ JSX3.createElement("summary", null, i18n3.theme_settings()), visibilityOptions.length && /* @__PURE__ */ JSX3.createElement("details", {
132
+ }, /* @__PURE__ */ JSX2.createElement("summary", null, i18n2.theme_settings()), visibilityOptions.length && /* @__PURE__ */ JSX2.createElement("details", {
116
133
  class: "va-collapse"
117
- }, /* @__PURE__ */ JSX3.createElement("summary", null, i18n3.theme_member_visibility()), ...visibilityOptions), /* @__PURE__ */ JSX3.createElement("label", null, /* @__PURE__ */ JSX3.createElement("span", null, i18n3.theme_theme()), /* @__PURE__ */ JSX3.createElement("select", {
134
+ }, /* @__PURE__ */ JSX2.createElement("summary", null, i18n2.theme_member_visibility()), ...visibilityOptions), /* @__PURE__ */ JSX2.createElement("label", null, /* @__PURE__ */ JSX2.createElement("span", null, i18n2.theme_theme()), /* @__PURE__ */ JSX2.createElement("select", {
118
135
  id: "tsd-theme",
119
136
  class: "va-select"
120
- }, /* @__PURE__ */ JSX3.createElement("option", {
137
+ }, /* @__PURE__ */ JSX2.createElement("option", {
121
138
  value: "os"
122
- }, i18n3.theme_os()), /* @__PURE__ */ JSX3.createElement("option", {
139
+ }, i18n2.theme_os()), /* @__PURE__ */ JSX2.createElement("option", {
123
140
  value: "light"
124
- }, i18n3.theme_light()), /* @__PURE__ */ JSX3.createElement("option", {
141
+ }, i18n2.theme_light()), /* @__PURE__ */ JSX2.createElement("option", {
125
142
  value: "dark"
126
- }, i18n3.theme_dark()))));
143
+ }, i18n2.theme_dark()))));
127
144
  };
128
145
  }
129
146
  function buildSectionNavigation(context, headings) {
@@ -135,7 +152,7 @@ function buildSectionNavigation(context, headings) {
135
152
  levels[levels.length - 1] = level;
136
153
  return;
137
154
  }
138
- const built = /* @__PURE__ */ JSX3.createElement(JSX3.Fragment, null, level.map((l) => /* @__PURE__ */ JSX3.createElement(JSX3.Fragment, null, l)));
155
+ const built = /* @__PURE__ */ JSX2.createElement(JSX2.Fragment, null, level.map((l) => /* @__PURE__ */ JSX2.createElement(JSX2.Fragment, null, l)));
139
156
  levels[levels.length - 1].push(built);
140
157
  }
141
158
  for (const heading of headings) {
@@ -146,11 +163,10 @@ function buildSectionNavigation(context, headings) {
146
163
  while (inferredLevel > levels.length) {
147
164
  levels.push([]);
148
165
  }
149
- levels[levels.length - 1].push(/* @__PURE__ */ JSX3.createElement("a", {
166
+ levels[levels.length - 1].push(/* @__PURE__ */ JSX2.createElement("a", {
150
167
  href: heading.link,
151
- class: [heading.classes, "va-button"].join(" "),
152
- style: `padding-left: ${PADDING_PER_LEVEL * (inferredLevel - 1)}px`
153
- }, heading.kind && context.icons[heading.kind](), /* @__PURE__ */ JSX3.createElement("span", null, heading.text)));
168
+ class: [heading.classes, "va-button"].join(" ")
169
+ }, heading.kind && context.icons[heading.kind](), heading.text));
154
170
  }
155
171
  while (levels.length > 1) {
156
172
  finalizeLevel(true);
@@ -160,9 +176,9 @@ function buildSectionNavigation(context, headings) {
160
176
  return levels[0];
161
177
  }
162
178
  function buildFilterItem(_context, name, displayName, defaultValue) {
163
- return /* @__PURE__ */ JSX3.createElement("label", {
179
+ return /* @__PURE__ */ JSX2.createElement("label", {
164
180
  class: "tsd-filter-item"
165
- }, /* @__PURE__ */ JSX3.createElement("span", null, displayName), /* @__PURE__ */ JSX3.createElement("input", {
181
+ }, /* @__PURE__ */ JSX2.createElement("span", null, displayName), /* @__PURE__ */ JSX2.createElement("input", {
166
182
  class: "tsd-filter-input va-checkbox",
167
183
  type: "checkbox",
168
184
  id: `tsd-filter-${name}`,
@@ -173,47 +189,80 @@ function buildFilterItem(_context, name, displayName, defaultValue) {
173
189
  function pageNavigation(context) {
174
190
  return (props) => {
175
191
  if (!props.pageSections.some((sect) => sect.headings.length)) {
176
- return /* @__PURE__ */ JSX3.createElement(JSX3.Fragment, null);
192
+ return /* @__PURE__ */ JSX2.createElement(JSX2.Fragment, null);
177
193
  }
178
194
  const sections = [];
179
195
  for (const section of props.pageSections) {
180
196
  if (section.title) {
181
- sections.push(/* @__PURE__ */ JSX3.createElement("details", {
197
+ sections.push(/* @__PURE__ */ JSX2.createElement("details", {
182
198
  open: true,
183
199
  class: "va-collapse tsd-accordion"
184
- }, /* @__PURE__ */ JSX3.createElement("summary", {
200
+ }, /* @__PURE__ */ JSX2.createElement("summary", {
185
201
  "data-key": `section-${section.title}`
186
202
  }, section.title), buildSectionNavigation(context, section.headings)));
187
203
  } else {
188
204
  sections.push(buildSectionNavigation(context, section.headings));
189
205
  }
190
206
  }
191
- return /* @__PURE__ */ JSX3.createElement("details", {
207
+ return /* @__PURE__ */ JSX2.createElement("details", {
192
208
  open: false,
193
209
  class: "va-collapse page-navigation tsd-accordion"
194
- }, /* @__PURE__ */ JSX3.createElement("summary", null, i18n3.theme_on_this_page()), sections);
210
+ }, /* @__PURE__ */ JSX2.createElement("summary", null, i18n2.theme_on_this_page()), sections);
195
211
  };
196
212
  }
213
+ var navigation = (context) => (props) => {
214
+ const navigationData = context.getNavigation();
215
+ return /* @__PURE__ */ JSX2.createElement("nav", {
216
+ class: "va-button-group"
217
+ }, /* @__PURE__ */ JSX2.createElement("details", {
218
+ class: "va-collapse tsd-accordion"
219
+ }, /* @__PURE__ */ JSX2.createElement("summary", null, /* @__PURE__ */ JSX2.createElement("a", {
220
+ href: context.urlTo(props.project)
221
+ }, getDisplayName(props.project))), /* @__PURE__ */ JSX2.createElement(Navigation, {
222
+ data: navigationData,
223
+ context
224
+ })));
225
+ };
226
+ var Navigation = ({ data, context }) => /* @__PURE__ */ JSX2.createElement(JSX2.Fragment, null, data.map((item) => item.children && item.children.length > 0 ? /* @__PURE__ */ JSX2.createElement("details", {
227
+ class: "va-collapse tsd-accordion"
228
+ }, /* @__PURE__ */ JSX2.createElement("summary", {
229
+ class: "tsd-accordion-summary"
230
+ }, item.text), /* @__PURE__ */ JSX2.createElement(Navigation, {
231
+ data: item.children,
232
+ context
233
+ })) : /* @__PURE__ */ JSX2.createElement(Item, {
234
+ item,
235
+ context
236
+ })));
237
+ var Item = ({ item, context }) => {
238
+ const icon = item.kind && context.icons[item.kind]();
239
+ return item.path ? /* @__PURE__ */ JSX2.createElement("a", {
240
+ href: context.relativeURL(item.path),
241
+ class: "va-button"
242
+ }, icon, item.text) : /* @__PURE__ */ JSX2.createElement("span", {
243
+ class: "va-button"
244
+ }, icon, item.text);
245
+ };
197
246
 
198
247
  // src/partials/toolbar.tsx
199
- import { i18n as i18n4, DeclarationReflection, JSX as JSX4, ProjectReflection } from "typedoc";
248
+ import { i18n as i18n3, DeclarationReflection as DeclarationReflection2, JSX as JSX3, ProjectReflection as ProjectReflection2 } from "typedoc";
200
249
  function toolbar(context) {
201
- return (props) => /* @__PURE__ */ JSX4.createElement("header", {
250
+ return (props) => /* @__PURE__ */ JSX3.createElement("header", {
202
251
  class: "page-toolbar"
203
- }, /* @__PURE__ */ JSX4.createElement("div", {
252
+ }, /* @__PURE__ */ JSX3.createElement("div", {
204
253
  class: "va-button-group"
205
- }, /* @__PURE__ */ JSX4.createElement("div", {
254
+ }, /* @__PURE__ */ JSX3.createElement("div", {
206
255
  class: "va-button-group va-button-group--horizontal"
207
- }, /* @__PURE__ */ JSX4.createElement("a", {
256
+ }, /* @__PURE__ */ JSX3.createElement("a", {
208
257
  href: context.options.getValue("titleLink") || context.relativeURL("index.html"),
209
258
  class: "title va-button"
210
- }, /* @__PURE__ */ JSX4.createElement("b", null, props.project.name), (props.project instanceof DeclarationReflection || props.project instanceof ProjectReflection) && props.project.packageVersion && /* @__PURE__ */ JSX4.createElement("span", {
259
+ }, /* @__PURE__ */ JSX3.createElement("b", null, props.project.name), (props.project instanceof DeclarationReflection2 || props.project instanceof ProjectReflection2) && props.project.packageVersion && /* @__PURE__ */ JSX3.createElement("span", {
211
260
  class: "version-badge"
212
- }, "v", props.project.packageVersion)), /* @__PURE__ */ JSX4.createElement("button", {
261
+ }, "v", props.project.packageVersion)), /* @__PURE__ */ JSX3.createElement("button", {
213
262
  id: "tsd-search-trigger",
214
263
  class: "va-button",
215
- "aria-label": i18n4.theme_search()
216
- }, /* @__PURE__ */ JSX4.createElement("svg", {
264
+ "aria-label": i18n3.theme_search()
265
+ }, /* @__PURE__ */ JSX3.createElement("svg", {
217
266
  xmlns: "http://www.w3.org/2000/svg",
218
267
  fill: "none",
219
268
  viewBox: "0 0 24 24",
@@ -221,15 +270,15 @@ function toolbar(context) {
221
270
  width: "16",
222
271
  height: "16",
223
272
  stroke: "currentColor"
224
- }, /* @__PURE__ */ JSX4.createElement("path", {
273
+ }, /* @__PURE__ */ JSX3.createElement("path", {
225
274
  d: "m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"
226
- }))), /* @__PURE__ */ JSX4.createElement("a", {
275
+ }))), /* @__PURE__ */ JSX3.createElement("a", {
227
276
  href: "#",
228
277
  class: "va-button",
229
278
  id: "tsd-toolbar-menu-trigger",
230
279
  "data-toggle": "menu",
231
- "aria-label": i18n4.theme_menu()
232
- }, /* @__PURE__ */ JSX4.createElement("svg", {
280
+ "aria-label": i18n3.theme_menu()
281
+ }, /* @__PURE__ */ JSX3.createElement("svg", {
233
282
  xmlns: "http://www.w3.org/2000/svg",
234
283
  fill: "none",
235
284
  viewBox: "0 0 24 24",
@@ -237,28 +286,28 @@ function toolbar(context) {
237
286
  width: "16",
238
287
  height: "16",
239
288
  stroke: "currentColor"
240
- }, /* @__PURE__ */ JSX4.createElement("path", {
289
+ }, /* @__PURE__ */ JSX3.createElement("path", {
241
290
  d: "M3.75 9h16.5m-16.5 6.75h16.5"
242
- })))), /* @__PURE__ */ JSX4.createElement("div", {
291
+ })))), /* @__PURE__ */ JSX3.createElement("div", {
243
292
  class: "navigation-links va-button-group"
244
- }, Object.entries(context.options.getValue("navigationLinks")).map(([label, url]) => /* @__PURE__ */ JSX4.createElement("a", {
293
+ }, Object.entries(context.options.getValue("navigationLinks")).map(([label, url]) => /* @__PURE__ */ JSX3.createElement("a", {
245
294
  href: url,
246
295
  class: "va-button"
247
- }, /* @__PURE__ */ JSX4.createElement("span", null, label), /* @__PURE__ */ JSX4.createElement("svg", {
296
+ }, /* @__PURE__ */ JSX3.createElement("span", null, label), /* @__PURE__ */ JSX3.createElement("svg", {
248
297
  viewBox: "0 0 16 16",
249
298
  xmlns: "http://www.w3.org/2000/svg",
250
299
  width: "16",
251
300
  height: "16",
252
301
  fill: "none"
253
- }, /* @__PURE__ */ JSX4.createElement("path", {
302
+ }, /* @__PURE__ */ JSX3.createElement("path", {
254
303
  "fill-rule": "evenodd",
255
304
  "clip-rule": "evenodd",
256
305
  d: "M1.52346 0.380859H15.6187V14.4761H13.333V4.28282L2.33158 15.2842L0.715332 13.668L11.7167 2.66657H1.52346V0.380859Z",
257
306
  fill: "currentColor"
258
- })))))), /* @__PURE__ */ JSX4.createElement("dialog", {
307
+ })))))), /* @__PURE__ */ JSX3.createElement("dialog", {
259
308
  id: "tsd-search",
260
- "aria-label": i18n4.theme_search()
261
- }, /* @__PURE__ */ JSX4.createElement("input", {
309
+ "aria-label": i18n3.theme_search()
310
+ }, /* @__PURE__ */ JSX3.createElement("input", {
262
311
  role: "combobox",
263
312
  class: "va-input",
264
313
  id: "tsd-search-input",
@@ -268,124 +317,81 @@ function toolbar(context) {
268
317
  spellcheck: false,
269
318
  autocapitalize: "off",
270
319
  autocomplete: "off",
271
- placeholder: i18n4.theme_search_placeholder(),
320
+ placeholder: i18n3.theme_search_placeholder(),
272
321
  maxLength: 100
273
- }), /* @__PURE__ */ JSX4.createElement("ul", {
322
+ }), /* @__PURE__ */ JSX3.createElement("ul", {
274
323
  role: "listbox",
275
324
  id: "tsd-search-results"
276
- }), /* @__PURE__ */ JSX4.createElement("div", {
325
+ }), /* @__PURE__ */ JSX3.createElement("div", {
277
326
  id: "tsd-search-status",
278
327
  "aria-live": "polite",
279
328
  "aria-atomic": "true"
280
- }, /* @__PURE__ */ JSX4.createElement("div", null, i18n4.theme_preparing_search_index()))));
329
+ }, /* @__PURE__ */ JSX3.createElement("div", null, i18n3.theme_preparing_search_index()))));
281
330
  }
282
331
 
283
332
  // src/partials/layout.tsx
284
333
  import { extname } from "path";
285
- import { JSX as JSX5 } from "typedoc";
286
-
287
- // src/utils.ts
288
- import {
289
- DeclarationReflection as DeclarationReflection2,
290
- ProjectReflection as ProjectReflection2,
291
- ReflectionKind
292
- } from "typedoc";
293
- function getDisplayName(refl) {
294
- let version = "";
295
- if ((refl instanceof DeclarationReflection2 || refl instanceof ProjectReflection2) && refl.packageVersion) {
296
- version = ` - v${refl.packageVersion}`;
297
- }
298
- return `${refl.name}${version}`;
299
- }
300
- var rootsCache = new WeakMap;
301
- function getHierarchyRoots(project) {
302
- const cached = rootsCache.get(project);
303
- if (cached)
304
- return cached;
305
- const allClasses = project.getReflectionsByKind(ReflectionKind.ClassOrInterface);
306
- const roots = allClasses.filter((refl) => {
307
- if (!refl.implementedBy && !refl.extendedBy) {
308
- return false;
309
- }
310
- if (!refl.implementedTypes && !refl.extendedTypes) {
311
- return true;
312
- }
313
- const types = [
314
- ...refl.implementedTypes || [],
315
- ...refl.extendedTypes || []
316
- ];
317
- return types.every((type) => !type.visit({
318
- reference(ref) {
319
- return ref.reflection !== undefined;
320
- }
321
- }));
322
- });
323
- const result = roots.sort((a, b) => a.name.localeCompare(b.name));
324
- rootsCache.set(project, result);
325
- return result;
326
- }
327
-
328
- // src/partials/layout.tsx
334
+ import { JSX as JSX4 } from "typedoc";
329
335
  function layout(context) {
330
- return (template, props) => /* @__PURE__ */ JSX5.createElement("html", {
336
+ return (template, props) => /* @__PURE__ */ JSX4.createElement("html", {
331
337
  class: "default",
332
338
  lang: context.options.getValue("lang"),
333
339
  "data-base": context.relativeURL("./")
334
- }, /* @__PURE__ */ JSX5.createElement("head", null, /* @__PURE__ */ JSX5.createElement("meta", {
340
+ }, /* @__PURE__ */ JSX4.createElement("head", null, /* @__PURE__ */ JSX4.createElement("meta", {
335
341
  charset: "utf-8"
336
- }), context.hook("head.begin", context), /* @__PURE__ */ JSX5.createElement("meta", {
342
+ }), context.hook("head.begin", context), /* @__PURE__ */ JSX4.createElement("meta", {
337
343
  "http-equiv": "x-ua-compatible",
338
344
  content: "IE=edge"
339
- }), /* @__PURE__ */ JSX5.createElement("title", null, props.model.isProject() ? getDisplayName(props.model) : `${getDisplayName(props.model)} | ${getDisplayName(props.project)}`), favicon(context), props.url === "index.html" && buildSiteMetadata(context), /* @__PURE__ */ JSX5.createElement("meta", {
345
+ }), /* @__PURE__ */ JSX4.createElement("title", null, props.model.isProject() ? getDisplayName(props.model) : `${getDisplayName(props.model)} | ${getDisplayName(props.project)}`), favicon(context), props.url === "index.html" && buildSiteMetadata(context), /* @__PURE__ */ JSX4.createElement("meta", {
340
346
  name: "description",
341
347
  content: "Documentation for " + props.project.name
342
- }), /* @__PURE__ */ JSX5.createElement("meta", {
348
+ }), /* @__PURE__ */ JSX4.createElement("meta", {
343
349
  name: "viewport",
344
350
  content: "width=device-width, initial-scale=1"
345
- }), /* @__PURE__ */ JSX5.createElement("link", {
351
+ }), /* @__PURE__ */ JSX4.createElement("link", {
346
352
  rel: "stylesheet",
347
353
  href: context.relativeURL("assets/style.css", true)
348
- }), /* @__PURE__ */ JSX5.createElement("link", {
354
+ }), /* @__PURE__ */ JSX4.createElement("link", {
349
355
  rel: "stylesheet",
350
356
  href: context.relativeURL("assets/highlight.css", true)
351
- }), /* @__PURE__ */ JSX5.createElement("script", {
357
+ }), /* @__PURE__ */ JSX4.createElement("script", {
352
358
  defer: true,
353
359
  src: context.relativeURL("assets/main.js", true)
354
- }), /* @__PURE__ */ JSX5.createElement("script", {
360
+ }), /* @__PURE__ */ JSX4.createElement("script", {
355
361
  async: true,
356
362
  src: context.relativeURL("assets/icons.js", true),
357
363
  id: "tsd-icons-script"
358
- }), /* @__PURE__ */ JSX5.createElement("script", {
364
+ }), /* @__PURE__ */ JSX4.createElement("script", {
359
365
  async: true,
360
366
  src: context.relativeURL("assets/search.js", true),
361
367
  id: "tsd-search-script"
362
- }), /* @__PURE__ */ JSX5.createElement("script", {
368
+ }), /* @__PURE__ */ JSX4.createElement("script", {
363
369
  async: true,
364
370
  src: context.relativeURL("assets/navigation.js", true),
365
371
  id: "tsd-nav-script"
366
- }), !!getHierarchyRoots(props.project).length && /* @__PURE__ */ JSX5.createElement("script", {
372
+ }), !!getHierarchyRoots(props.project).length && /* @__PURE__ */ JSX4.createElement("script", {
367
373
  async: true,
368
374
  src: context.relativeURL("assets/hierarchy.js", true),
369
375
  id: "tsd-hierarchy-script"
370
- }), context.hook("head.end", context), context.options.getValue("customCss") && /* @__PURE__ */ JSX5.createElement("link", {
376
+ }), context.hook("head.end", context), context.options.getValue("customCss") && /* @__PURE__ */ JSX4.createElement("link", {
371
377
  rel: "stylesheet",
372
378
  href: context.relativeURL("assets/custom.css", true)
373
- }), context.options.getValue("customJs") && /* @__PURE__ */ JSX5.createElement("script", {
379
+ }), context.options.getValue("customJs") && /* @__PURE__ */ JSX4.createElement("script", {
374
380
  defer: true,
375
381
  src: context.relativeURL("assets/custom.js", true)
376
- })), /* @__PURE__ */ JSX5.createElement("body", null, context.hook("body.begin", context), /* @__PURE__ */ JSX5.createElement("script", null, /* @__PURE__ */ JSX5.createElement(JSX5.Raw, {
382
+ })), /* @__PURE__ */ JSX4.createElement("body", null, context.hook("body.begin", context), /* @__PURE__ */ JSX4.createElement("script", null, /* @__PURE__ */ JSX4.createElement(JSX4.Raw, {
377
383
  html: 'document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";'
378
- })), /* @__PURE__ */ JSX5.createElement("div", {
384
+ })), /* @__PURE__ */ JSX4.createElement("div", {
379
385
  class: "container container-main"
380
- }, context.toolbar(props), /* @__PURE__ */ JSX5.createElement("div", {
386
+ }, context.toolbar(props), /* @__PURE__ */ JSX4.createElement("div", {
381
387
  class: "col-content"
382
- }, context.hook("content.begin", context), context.header(props), template(props), context.hook("content.end", context)), /* @__PURE__ */ JSX5.createElement("div", {
388
+ }, context.hook("content.begin", context), context.header(props), template(props), context.hook("content.end", context)), /* @__PURE__ */ JSX4.createElement("div", {
383
389
  class: "col-sidebar"
384
- }, /* @__PURE__ */ JSX5.createElement("div", {
390
+ }, /* @__PURE__ */ JSX4.createElement("div", {
385
391
  class: "page-menu"
386
- }, context.hook("pageSidebar.begin", context), context.pageSidebar(props), context.hook("pageSidebar.end", context)), /* @__PURE__ */ JSX5.createElement("div", {
392
+ }, context.hook("pageSidebar.begin", context), context.pageSidebar(props), context.hook("pageSidebar.end", context)), /* @__PURE__ */ JSX4.createElement("div", {
387
393
  class: "site-menu"
388
- }, context.hook("sidebar.begin", context), context.sidebar(props), context.hook("sidebar.end", context)))), context.footer(), /* @__PURE__ */ JSX5.createElement("div", {
394
+ }, context.hook("sidebar.begin", context), context.sidebar(props), context.hook("sidebar.end", context)))), context.footer(), /* @__PURE__ */ JSX4.createElement("div", {
389
395
  class: "overlay"
390
396
  }), context.hook("body.end", context)));
391
397
  }
@@ -395,18 +401,18 @@ function favicon(context) {
395
401
  return null;
396
402
  switch (extname(fav)) {
397
403
  case ".ico":
398
- return /* @__PURE__ */ JSX5.createElement("link", {
404
+ return /* @__PURE__ */ JSX4.createElement("link", {
399
405
  rel: "icon",
400
406
  href: context.relativeURL("assets/favicon.ico", true)
401
407
  });
402
408
  case ".png":
403
- return /* @__PURE__ */ JSX5.createElement("link", {
409
+ return /* @__PURE__ */ JSX4.createElement("link", {
404
410
  rel: "icon",
405
411
  href: context.relativeURL("assets/favicon.png", true),
406
412
  type: "image/png"
407
413
  });
408
414
  case ".svg":
409
- return /* @__PURE__ */ JSX5.createElement("link", {
415
+ return /* @__PURE__ */ JSX4.createElement("link", {
410
416
  rel: "icon",
411
417
  href: context.relativeURL("assets/favicon.svg", true),
412
418
  type: "image/svg+xml"
@@ -421,9 +427,9 @@ function buildSiteMetadata(context) {
421
427
  if (url.pathname !== "/") {
422
428
  return null;
423
429
  }
424
- return /* @__PURE__ */ JSX5.createElement("script", {
430
+ return /* @__PURE__ */ JSX4.createElement("script", {
425
431
  type: "application/ld+json"
426
- }, /* @__PURE__ */ JSX5.createElement(JSX5.Raw, {
432
+ }, /* @__PURE__ */ JSX4.createElement(JSX4.Raw, {
427
433
  html: JSON.stringify({
428
434
  "@context": "https://schema.org",
429
435
  "@type": "WebSite",
@@ -443,11 +449,11 @@ class VarvaraThemeContext extends DefaultThemeRenderContext3 {
443
449
  this.pageSidebar = pageSidebar(this);
444
450
  this.toolbar = toolbar(this);
445
451
  this.defaultLayout = layout(this);
446
- this.sidebar = sidebar(this);
447
452
  this.settings = settings(this);
448
453
  this.pageNavigation = pageNavigation(this);
449
454
  }
450
455
  footer = () => footer(this);
456
+ navigation = (context) => navigation(this)(context);
451
457
  }
452
458
 
453
459
  // src/themes/VarvaraTheme.tsx
@@ -461,10 +467,10 @@ class VarvaraTheme extends DefaultTheme2 {
461
467
  fs.copyFileSync(varvaraCssPath, destPath);
462
468
  fs.cpSync(path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../assets/"), path.resolve(this.application.options.getValue("out"), "assets/"), { recursive: true });
463
469
  });
464
- renderer.hooks.on("head.end", (event) => /* @__PURE__ */ JSX6.createElement(JSX6.Fragment, null, /* @__PURE__ */ JSX6.createElement("link", {
470
+ renderer.hooks.on("head.end", (event) => /* @__PURE__ */ JSX5.createElement(JSX5.Fragment, null, /* @__PURE__ */ JSX5.createElement("link", {
465
471
  rel: "stylesheet",
466
472
  href: event.relativeURL("assets/varvara.css")
467
- }), /* @__PURE__ */ JSX6.createElement("link", {
473
+ }), /* @__PURE__ */ JSX5.createElement("link", {
468
474
  rel: "stylesheet",
469
475
  href: event.relativeURL("assets/overrides.css")
470
476
  })));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "varvara-typedoc-theme",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "author": "Marc Mariné <shenobi@gmail.com>",
5
5
  "repository": {
6
6
  "type": "git",