@brillout/docpress 0.5.40 → 0.6.1

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 (146) hide show
  1. package/+config.ts +17 -0
  2. package/MobileHeader.tsx +68 -0
  3. package/PageLayout.css +42 -0
  4. package/PageLayout.tsx +39 -0
  5. package/algolia/DocSearch.css +34 -0
  6. package/algolia/DocSearch.ts +62 -0
  7. package/autoScrollNav.ts +36 -0
  8. package/components/CodeBlockTransformer.css +9 -0
  9. package/components/CodeBlockTransformer.tsx +18 -0
  10. package/components/Comment.tsx +7 -0
  11. package/components/Consulting.tsx +47 -0
  12. package/components/Contributors.tsx +113 -0
  13. package/components/EditPageNote.tsx +18 -0
  14. package/components/FeatureList/FeatureList.client.ts +66 -0
  15. package/{dist/components/features → components/FeatureList}/FeatureList.css +10 -2
  16. package/components/FeatureList/FeatureList.tsx +114 -0
  17. package/components/HorizontalLine.tsx +20 -0
  18. package/components/ImportMeta.tsx +11 -0
  19. package/components/Link.tsx +144 -0
  20. package/components/Note.css +54 -0
  21. package/components/Note.tsx +78 -0
  22. package/components/P.css +8 -0
  23. package/components/P.tsx +8 -0
  24. package/components/ReadingRecommendation.tsx +56 -0
  25. package/components/RepoLink.tsx +24 -0
  26. package/components/Sponsors/label.draft.svg +108 -0
  27. package/components/Sponsors.tsx +218 -0
  28. package/components/Supporters.tsx +136 -0
  29. package/components/index.ts +14 -0
  30. package/config/getConfig.ts +18 -0
  31. package/config/resolveConfig/resolveHeading.ts +0 -0
  32. package/config/resolvePageContext.ts +186 -0
  33. package/css/button.css +7 -0
  34. package/css/code/block.css +36 -0
  35. package/css/code/inline.css +27 -0
  36. package/css/code.css +20 -0
  37. package/css/colorize-on-hover.css +29 -0
  38. package/css/font.css +25 -0
  39. package/css/heading.css +45 -0
  40. package/css/index.css +12 -0
  41. package/css/link.css +17 -0
  42. package/css/reset.css +12 -0
  43. package/css/table.css +14 -0
  44. package/css/tooltip.css +11 -0
  45. package/data/maintainersList.tsx +92 -0
  46. package/data/sponsorsList.ts +147 -0
  47. package/dist/+config.d.ts +19 -0
  48. package/dist/+config.js +15 -0
  49. package/dist/markdownHeadingsVitePlugin.d.ts +13 -0
  50. package/dist/markdownHeadingsVitePlugin.js +170 -0
  51. package/dist/utils/assert.d.ts +6 -0
  52. package/dist/utils/assert.js +48 -0
  53. package/dist/utils/determineSectionUrlHash.d.ts +4 -0
  54. package/dist/utils/determineSectionUrlHash.js +38 -0
  55. package/dist/vite.config.d.ts +3 -0
  56. package/dist/vite.config.js +32 -0
  57. package/index.ts +4 -0
  58. package/installSectionUrlHashs.ts +60 -0
  59. package/markdownHeadingsVitePlugin.ts +150 -0
  60. package/navigation/Navigation-highlight.css +41 -0
  61. package/navigation/Navigation-items.css +119 -0
  62. package/navigation/Navigation-layout.css +127 -0
  63. package/navigation/Navigation.client.ts +43 -0
  64. package/navigation/Navigation.css +3 -0
  65. package/navigation/Navigation.tsx +211 -0
  66. package/navigation/NavigationHeader.tsx +111 -0
  67. package/navigation/navigation-fullscreen/NavigationFullscreenButton.css +32 -0
  68. package/navigation/navigation-fullscreen/NavigationFullscreenButton.tsx +44 -0
  69. package/navigation/navigation-fullscreen/initNavigationFullscreen.ts +116 -0
  70. package/package.json +38 -53
  71. package/parseEmojis.ts +35 -0
  72. package/parseTitle.ts +139 -0
  73. package/renderer/client.ts +4 -0
  74. package/renderer/onRenderHtml.tsx +69 -0
  75. package/renderer/usePageContext.tsx +25 -0
  76. package/tsconfig.config.json +7 -0
  77. package/tsconfig.json +15 -0
  78. package/types/Config.ts +46 -0
  79. package/types/Heading.ts +49 -0
  80. package/utils/Emoji/Emoji.ts +224 -0
  81. package/utils/Emoji/assets.ts +9 -0
  82. package/utils/Emoji/index.ts +1 -0
  83. package/utils/Emoji/mountain.svg +1 -0
  84. package/utils/assert.ts +51 -0
  85. package/utils/client.ts +2 -0
  86. package/utils/determineSectionUrlHash.ts +44 -0
  87. package/utils/filesystemPathHandling.ts +42 -0
  88. package/utils/filter.ts +12 -0
  89. package/utils/isBrowser.ts +5 -0
  90. package/utils/jsxToTextContent.ts +11 -0
  91. package/utils/objectAssign.ts +9 -0
  92. package/utils/server.ts +7 -0
  93. package/vite.config.ts +36 -0
  94. package/bin.js +0 -3
  95. package/dist/chunk-2ZTPUQGS.js +0 -58
  96. package/dist/chunk-3QC7HYIF.js +0 -7
  97. package/dist/chunk-MGOI4AFO.js +0 -165
  98. package/dist/chunk-NVJING6T.js +0 -91
  99. package/dist/chunk-QWL3MA4E.js +0 -171
  100. package/dist/chunk-UN23G34B.js +0 -157
  101. package/dist/cli/index.d.ts +0 -1
  102. package/dist/cli/index.js +0 -34
  103. package/dist/components/features/FeatureList.d.ts +0 -13
  104. package/dist/components/features/FeatureList.js +0 -7
  105. package/dist/components/features/initFeatureList.d.ts +0 -3
  106. package/dist/components/features/initFeatureList.js +0 -59
  107. package/dist/devServer-JKH6U5PF.js +0 -36
  108. package/dist/index.css +0 -120
  109. package/dist/index.d.ts +0 -221
  110. package/dist/index.js +0 -947
  111. package/dist/renderer/_default.page.client.css +0 -318
  112. package/dist/renderer/_default.page.client.d.ts +0 -1
  113. package/dist/renderer/_default.page.client.js +0 -218
  114. package/dist/renderer/_default.page.server.css +0 -310
  115. package/dist/renderer/_default.page.server.d.ts +0 -22
  116. package/dist/renderer/_default.page.server.js +0 -665
  117. package/readme.md +0 -5
  118. /package/{dist/chevron-R2IYJD62.svg → components/FeatureList/chevron.svg} +0 -0
  119. /package/{dist/label-MP75CTIA.svg → components/Sponsors/label.svg} +0 -0
  120. /package/{dist/medalBronze-CO4CTUR4.svg → components/Sponsors/medalBronze.svg} +0 -0
  121. /package/{dist/medalGold-UP6A73FL.svg → components/Sponsors/medalGold.svg} +0 -0
  122. /package/{dist/medalSilver-FAPGGOBN.svg → components/Sponsors/medalSilver.svg} +0 -0
  123. /package/{dist/Inter-Var-IOAEQULN.ttf → css/Inter-Var.ttf} +0 -0
  124. /package/{dist/alignable-B4QZV4X7.svg → data/sponsorsList/companyLogos/alignable.svg} +0 -0
  125. /package/{dist/bluefin-JQABZFGV.svg → data/sponsorsList/companyLogos/bluefin.svg} +0 -0
  126. /package/{dist/burdaforward-EUGURYZY.png → data/sponsorsList/companyLogos/burdaforward.png} +0 -0
  127. /package/{dist/contra-WLZBOPBV.svg → data/sponsorsList/companyLogos/contra.svg} +0 -0
  128. /package/{dist/ecosia-OYRLTR5T.svg → data/sponsorsList/companyLogos/ecosia.svg} +0 -0
  129. /package/{dist/inlang-GFRWND6X.png → data/sponsorsList/companyLogos/inlang.png} +0 -0
  130. /package/{dist/optimizers-SFEZF3NW.svg → data/sponsorsList/companyLogos/optimizers.svg} +0 -0
  131. /package/{dist/sourcegraph-YR2HADLS.svg → data/sponsorsList/companyLogos/sourcegraph.svg} +0 -0
  132. /package/{dist/changelog-IPI5F42D.svg → icons/changelog.svg} +0 -0
  133. /package/{dist/discord-JD33TUSF.svg → icons/discord.svg} +0 -0
  134. /package/{dist/github-P5ZSKN2N.svg → icons/github.svg} +0 -0
  135. /package/{dist/heart-OINVKOXO.svg → icons/heart.svg} +0 -0
  136. /package/{dist/languages-KXPKJFQL.svg → icons/languages.svg} +0 -0
  137. /package/{dist/people-72KKQHU4.svg → icons/people.svg} +0 -0
  138. /package/{dist/twitter-I7DXDN3J.svg → icons/twitter.svg} +0 -0
  139. /package/{dist/chevron-K3WPYLOP.svg → navigation/navigation-fullscreen/chevron.svg} +0 -0
  140. /package/{dist/close-IQXTDOHV.svg → navigation/navigation-fullscreen/close.svg} +0 -0
  141. /package/{dist/compass-2RWQU3E4.svg → utils/Emoji/compass.svg} +0 -0
  142. /package/{dist/engine-6Q6VSCVA.png → utils/Emoji/engine.png} +0 -0
  143. /package/{dist/mechanical-arm-TR7IQQMG.svg → utils/Emoji/mechanical-arm.svg} +0 -0
  144. /package/{dist/road-fork-3WZLW3HB.svg → utils/Emoji/road-fork.svg} +0 -0
  145. /package/{dist/shield-CU45RG5C.svg → utils/Emoji/shield.svg} +0 -0
  146. /package/{dist/typescript-ALIPKLRM.svg → utils/Emoji/typescript.svg} +0 -0
package/dist/index.d.ts DELETED
@@ -1,221 +0,0 @@
1
- import React$1 from 'react';
2
- export { FeatureList } from './components/features/FeatureList.js';
3
-
4
- declare function assert(condition: unknown, debugInfo?: unknown): asserts condition;
5
- declare function assertUsage(condition: unknown, msg: string): asserts condition;
6
- declare function assertWarning(condition: unknown, msg: string): asserts condition;
7
-
8
- declare function isBrowser(): boolean;
9
-
10
- declare function filter<T extends object>(obj: T, predicate: <K extends keyof T>(value: T[K], key: K) => boolean): T;
11
-
12
- declare function determineSectionUrlHash(title: string): string | null;
13
- declare function determineSectionTitle(urlWithHash: string): string;
14
-
15
- declare function jsxToTextContent(node: JSX.Element | string): string;
16
-
17
- declare function objectAssign<Obj extends Object, ObjAddendum>(obj: Obj, objAddendum: ObjAddendum): asserts obj is Obj & ObjAddendum;
18
-
19
- declare function crawlAllFiles(dir: string): Promise<string[]>;
20
-
21
- type EmojiName = 'warning' | 'typescript' | 'shield' | 'mechanical-arm' | 'mountain' | 'rocket' | 'wrench' | 'compass' | 'seedling' | 'books' | 'plug' | 'earth' | 'gear' | 'red-heart' | 'high-voltage' | 'gem-stone' | 'dizzy' | 'sparkles' | 'writing-hang' | 'road-fork' | 'engine' | 'red-circle' | 'sparkling-heart' | 'gift' | 'package' | 'info' | 'lab' | 'trophy' | 'ribbon';
22
- declare function Emoji({ name, style }: {
23
- name: EmojiName;
24
- style?: React$1.CSSProperties;
25
- }): JSX.Element;
26
-
27
- type HeadingDetachedDefinition = {
28
- url: string;
29
- title: string | JSX.Element;
30
- sectionTitles?: string[];
31
- };
32
- type HeadingDefinition = HeadingBase & (({
33
- level: 1;
34
- titleEmoji: EmojiName;
35
- } & HeadingAbstract) | ({
36
- level: 4;
37
- } & HeadingAbstract) | {
38
- level: 2;
39
- sectionTitles?: string[];
40
- url: null | string;
41
- } | {
42
- level: 3;
43
- url: null | string;
44
- });
45
- type HeadingBase = {
46
- title: string;
47
- level: number;
48
- url?: null | string;
49
- titleDocument?: string;
50
- titleInNav?: string;
51
- };
52
- type HeadingAbstract = {
53
- url?: undefined;
54
- titleDocument?: undefined;
55
- titleInNav?: undefined;
56
- };
57
-
58
- type Config = {
59
- projectInfo: {
60
- githubRepository: string;
61
- githubIssues: string;
62
- githubDiscussions?: string;
63
- projectName: string;
64
- projectVersion: string;
65
- discordInvite: string;
66
- twitterProfile: string;
67
- };
68
- faviconUrl: string;
69
- algolia: null | ({
70
- PENDING_APPROVAL?: true;
71
- } & ({
72
- appId?: undefined;
73
- apiKey?: undefined;
74
- indexName?: undefined;
75
- } | {
76
- appId: string;
77
- apiKey: string;
78
- indexName: string;
79
- }));
80
- headings: HeadingDefinition[];
81
- headingsDetached: HeadingDetachedDefinition[];
82
- navHeaderMobile: React.ReactNode;
83
- navHeaderMobileWrapperStyle?: React.CSSProperties;
84
- navHeader: React.ReactNode;
85
- navHeaderWrapperStyle?: React.CSSProperties;
86
- tagline: string;
87
- websiteUrl: string;
88
- bannerUrl?: string;
89
- twitterHandle: string;
90
- globalNote?: React.ReactNode;
91
- i18n?: true;
92
- pressKit?: true;
93
- sponsorGithubAccount?: string;
94
- };
95
-
96
- declare function Link({ href, text, noBreadcrumb, doNotInferSectionTitle, children }: {
97
- href: string;
98
- text?: string | JSX.Element;
99
- noBreadcrumb?: true;
100
- doNotInferSectionTitle?: true;
101
- children?: React$1.ReactNode;
102
- }): JSX.Element;
103
-
104
- declare function isRepoLink(href: string): boolean;
105
- declare function RepoLink({ path, text, editMode }: {
106
- path: string;
107
- text?: string | JSX.Element;
108
- editMode?: true;
109
- }): JSX.Element;
110
-
111
- declare function P(props: React$1.HTMLProps<HTMLDivElement>): JSX.Element;
112
-
113
- declare function ReadingRecommendation({ tour, links }: {
114
- tour?: true;
115
- links?: string[];
116
- }): JSX.Element;
117
-
118
- declare function Warning({ children }: {
119
- children: React$1.ReactNode;
120
- }): JSX.Element;
121
- declare function Construction({ children }: {
122
- children: React$1.ReactNode;
123
- }): JSX.Element;
124
- declare function Danger({ children }: {
125
- children: React$1.ReactNode;
126
- }): JSX.Element;
127
- declare function NoteWithoutIcon({ children }: {
128
- children: React$1.ReactNode;
129
- }): JSX.Element;
130
- type CustomIcon = JSX.Element | string;
131
- declare function NoteWithCustomIcon({ icon, children }: {
132
- children: React$1.ReactNode;
133
- icon: CustomIcon;
134
- }): JSX.Element;
135
-
136
- declare function ImportMeta({ prop }: {
137
- prop: string;
138
- }): JSX.Element;
139
-
140
- declare function HorizontalLine({ primary }: {
141
- primary?: true;
142
- }): JSX.Element;
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
-
175
- type Plan = 'indie' | 'bronze' | 'silver' | 'gold' | 'platinum';
176
- type SponsorCompany = {
177
- companyName: string;
178
- companyLogo: string;
179
- website: string;
180
- plan: Plan;
181
- divSize?: Partial<DivSize>;
182
- github: string;
183
- };
184
- type SponsorIndividual = {
185
- username: string;
186
- };
187
- type Sponsor = SponsorCompany | SponsorIndividual;
188
- type DivSize = {
189
- width: number;
190
- height: number;
191
- padding: number;
192
- };
193
- declare function Sponsors(): JSX.Element;
194
-
195
- type Maintainer$1 = {
196
- username: string;
197
- firstName: string;
198
- roles: React$1.ReactNode[];
199
- consultingUrl?: string;
200
- };
201
- declare const maintainers: Maintainer$1[];
202
-
203
- declare function Contributors(): JSX.Element;
204
- declare function Maintainer({ maintainer }: {
205
- maintainer: (typeof maintainers)[0];
206
- }): JSX.Element;
207
-
208
- declare function Consulting(): JSX.Element;
209
- declare function Consultants(): JSX.Element;
210
-
211
- type LineBreak = 'white-space' | 'break-word';
212
- declare function CodeBlockTransformer({ children, lineBreak }: {
213
- children: React$1.ReactNode;
214
- lineBreak: LineBreak;
215
- }): JSX.Element;
216
-
217
- declare function Comment({ children }: {
218
- children: React$1.ReactNode;
219
- }): JSX.Element;
220
-
221
- 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 };