@brillout/docpress 0.6.9 → 0.6.10

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 (2) hide show
  1. package/package.json +1 -1
  2. package/types/Heading.ts +28 -30
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brillout/docpress",
3
- "version": "0.6.9",
3
+ "version": "0.6.10",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "// Build vite.config.ts and +config.ts": "",
package/types/Heading.ts CHANGED
@@ -5,49 +5,47 @@ export { HeadingDefinition }
5
5
 
6
6
  import type { EmojiName } from '../utils/server'
7
7
 
8
- type NavItemLevel =
9
- | NaItemDefinitionLevel
10
- | {
11
- level: 3
12
- url: null | string
13
- }
14
- type NaItemDefinitionLevel =
15
- | ({ level: 1; titleEmoji: EmojiName } & IsNavCategory)
16
- | ({ level: 4 } & IsNavCategory)
17
- | {
18
- level: 2
19
- sectionTitles?: string[]
20
- url: null | string
21
- }
22
- type IsNavCategory = {
23
- url?: undefined
24
- titleDocument?: undefined
25
- titleInNav?: undefined
26
- }
27
-
28
- type HeadingResolved = HeadingCommon & {
8
+ type HeadingResolved = {
9
+ url?: null | string
29
10
  level: number
30
11
  title: JSX.Element
31
12
  titleInNav: JSX.Element
32
13
  linkBreadcrumb: JSX.Element[]
33
- }
14
+ sectionTitles?: string[]
15
+ } & Tmp
16
+
34
17
  type HeadingDetachedResolved = Omit<HeadingResolved, 'level' | 'linkBreadcrumb'> & {
35
18
  level: 2
36
19
  linkBreadcrumb: null
37
20
  }
21
+
38
22
  type HeadingDetachedDefinition = {
39
23
  url: string
40
24
  title: string | JSX.Element
25
+ sectionTitles?: string[]
41
26
  }
42
- type HeadingDefinition = HeadingCommon &
43
- NaItemDefinitionLevel & {
44
- title: string
45
- // TODO: rename to titleNav
46
- titleInNav?: string
47
- }
48
- type HeadingCommon = {
27
+
28
+ type HeadingDefinition = {
49
29
  url?: null | string
50
- sectionTitles?: string[]
30
+ title: string
31
+ titleInNav?: string
32
+ } & HeadingDefinitionLevel &
33
+ Tmp
34
+ type IsCategory = {
35
+ url?: undefined
36
+ titleDocument?: undefined
37
+ titleInNav?: undefined
38
+ }
39
+ type HeadingDefinitionLevel =
40
+ | ({ level: 1; titleEmoji: EmojiName } & IsCategory)
41
+ | ({ level: 4 } & IsCategory)
42
+ | {
43
+ level: 2
44
+ sectionTitles?: string[]
45
+ url: null | string
46
+ }
47
+
48
+ type Tmp = {
51
49
  // TODO: remove? Both Vike and Telefunc set it to the same value than docpress.config.js#projectInfo.projectName
52
50
  titleDocument?: string
53
51
  }