@brillout/docpress 0.15.5 → 0.15.7
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/ExternalLinks.tsx +5 -1
- package/Layout.tsx +4 -2
- package/components/RepoLink.tsx +0 -8
- package/dist/components/RepoLink.js +0 -7
- package/dist/types/Config.d.ts +1 -0
- package/docsearch/SearchLink.tsx +1 -1
- package/icons/linkedin.svg +6 -0
- package/package.json +2 -2
- package/types/Config.ts +1 -0
package/ExternalLinks.tsx
CHANGED
|
@@ -5,6 +5,7 @@ import iconGithub from './icons/github.svg'
|
|
|
5
5
|
import iconTwitter from './icons/twitter.svg'
|
|
6
6
|
import iconDiscord from './icons/discord.svg'
|
|
7
7
|
import iconBluesky from './icons/bluesky.svg'
|
|
8
|
+
import iconLinkedin from './icons/linkedin.svg'
|
|
8
9
|
import iconChangelog from './icons/changelog.svg'
|
|
9
10
|
import iconLanguages from './icons/languages.svg'
|
|
10
11
|
import { usePageContext } from './renderer/usePageContext'
|
|
@@ -12,7 +13,7 @@ import '@docsearch/css'
|
|
|
12
13
|
|
|
13
14
|
function ExternalLinks(props: { style?: React.CSSProperties }) {
|
|
14
15
|
const pageContext = usePageContext()
|
|
15
|
-
const { github, discord, bluesky, i18n, twitter } = pageContext.globalContext.config.docpress
|
|
16
|
+
const { github, discord, bluesky, linkedin, i18n, twitter } = pageContext.globalContext.config.docpress
|
|
16
17
|
const iconI18n = !i18n ? null : (
|
|
17
18
|
<LinkIcon
|
|
18
19
|
className="decolorize-4"
|
|
@@ -34,6 +35,9 @@ function ExternalLinks(props: { style?: React.CSSProperties }) {
|
|
|
34
35
|
{discord && <LinkIcon className="decolorize-6" icon={iconDiscord} href={discord} />}
|
|
35
36
|
{twitter && <LinkIcon className="decolorize-4" icon={iconTwitter} href={`https://x.com/${twitter.slice(1)}`} />}
|
|
36
37
|
{bluesky && <LinkIcon className="decolorize-6" icon={iconBluesky} href={`https://bsky.app/profile/${bluesky}`} />}
|
|
38
|
+
{linkedin && (
|
|
39
|
+
<LinkIcon className="decolorize-6" icon={iconLinkedin} href={`https://www.linkedin.com/company/${linkedin}`} />
|
|
40
|
+
)}
|
|
37
41
|
<LinkIcon className="decolorize-4" icon={iconGithub} href={github} />
|
|
38
42
|
<ChangelogButton />
|
|
39
43
|
</div>
|
package/Layout.tsx
CHANGED
|
@@ -61,8 +61,8 @@ function Layout({ children }: { children: React.ReactNode }) {
|
|
|
61
61
|
['--bg-color']: '#f5f5f5',
|
|
62
62
|
['--block-margin']: `${blockMargin}px`,
|
|
63
63
|
['--icon-text-padding']: '8px',
|
|
64
|
-
// ['--nav-head-height']: `${isLandingPage ? 70 :
|
|
65
|
-
['--nav-head-height']: `
|
|
64
|
+
// ['--nav-head-height']: `${isLandingPage ? 70 : 63}px`,
|
|
65
|
+
['--nav-head-height']: `63px`,
|
|
66
66
|
}}
|
|
67
67
|
>
|
|
68
68
|
<MenuModal isTopNav={isLandingPage} />
|
|
@@ -605,6 +605,8 @@ function MenuToggle({ menuId, ...props }: PropsDiv & { menuId: number }) {
|
|
|
605
605
|
marginLeft: 10,
|
|
606
606
|
flexShrink: 0,
|
|
607
607
|
color: '#888',
|
|
608
|
+
position: 'relative',
|
|
609
|
+
top: -1,
|
|
608
610
|
}}
|
|
609
611
|
/>
|
|
610
612
|
</div>
|
package/components/RepoLink.tsx
CHANGED
|
@@ -2,15 +2,8 @@ export { RepoLink }
|
|
|
2
2
|
export { getRepoHref }
|
|
3
3
|
|
|
4
4
|
import React from 'react'
|
|
5
|
-
import { assert } from '../utils/server'
|
|
6
5
|
import { usePageContext } from '../renderer/usePageContext'
|
|
7
6
|
|
|
8
|
-
function isRepoLink(href: string) {
|
|
9
|
-
return ['/examples/', '/docs/', '/boilerplates/', '.github/', '/test/', '/packages/'].some((start) =>
|
|
10
|
-
href.startsWith(start),
|
|
11
|
-
)
|
|
12
|
-
}
|
|
13
|
-
|
|
14
7
|
function RepoLink({ path, text }: { path: string; text?: string | React.ReactNode }) {
|
|
15
8
|
text = text || path
|
|
16
9
|
const href = getRepoHref(path)
|
|
@@ -19,7 +12,6 @@ function RepoLink({ path, text }: { path: string; text?: string | React.ReactNod
|
|
|
19
12
|
|
|
20
13
|
function getRepoHref(path: string, editMode = false) {
|
|
21
14
|
const pageContext = usePageContext()
|
|
22
|
-
assert(isRepoLink(path), { path })
|
|
23
15
|
if (!path.startsWith('/')) {
|
|
24
16
|
path = '/' + path
|
|
25
17
|
}
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
export { RepoLink };
|
|
2
2
|
export { getRepoHref };
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import { assert } from '../utils/server';
|
|
5
4
|
import { usePageContext } from '../renderer/usePageContext';
|
|
6
|
-
function isRepoLink(href) {
|
|
7
|
-
return ['/examples/', '/docs/', '/boilerplates/', '.github/', '/test/', '/packages/'].some(function (start) {
|
|
8
|
-
return href.startsWith(start);
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
5
|
function RepoLink(_a) {
|
|
12
6
|
var path = _a.path, text = _a.text;
|
|
13
7
|
text = text || path;
|
|
@@ -17,7 +11,6 @@ function RepoLink(_a) {
|
|
|
17
11
|
function getRepoHref(path, editMode) {
|
|
18
12
|
if (editMode === void 0) { editMode = false; }
|
|
19
13
|
var pageContext = usePageContext();
|
|
20
|
-
assert(isRepoLink(path), { path: path });
|
|
21
14
|
if (!path.startsWith('/')) {
|
|
22
15
|
path = '/' + path;
|
|
23
16
|
}
|
package/dist/types/Config.d.ts
CHANGED
package/docsearch/SearchLink.tsx
CHANGED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg width="80.17" height="80.17" version="1.1" viewBox="0 0 80.17 80.17" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<defs>
|
|
3
|
+
<style>.cls-1{fill:#0a66c2;}</style>
|
|
4
|
+
</defs>
|
|
5
|
+
<path class="cls-1" d="m68.32 68.315h-11.88v-18.6c0-4.44-0.08-10.15-6.18-10.15s-7.14 4.83-7.14 9.83v18.92h-11.88v-38.25h11.41v5.23h0.16c1.59-3.01 5.47-6.18 11.25-6.18 12.04 0 14.27 7.92 14.27 18.22v20.98zm-50.48-43.49c-3.81 0-6.89-3.09-6.89-6.9s3.08-6.89 6.89-6.89 6.89 3.09 6.89 6.89-3.09 6.9-6.89 6.9m5.94 43.49h-11.89v-38.26h11.89zm50.46-68.31h-68.32c-3.27 0-5.92 2.59-5.92 5.78v68.6c0 3.19 2.65 5.78 5.92 5.78h68.32c3.27 0 5.93-2.59 5.93-5.78v-68.6c0-3.19-2.66-5.78-5.93-5.78"/>
|
|
6
|
+
</svg>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brillout/docpress",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@brillout/picocolors": "^1.0.10",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@brillout/release-me": "^0.4.
|
|
60
|
+
"@brillout/release-me": "^0.4.7",
|
|
61
61
|
"@types/node": "^22.5.5",
|
|
62
62
|
"@types/react": "^18.3.8",
|
|
63
63
|
"@types/react-dom": "^18.3.0"
|