@brillout/docpress 0.8.2 → 0.8.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.
- package/Layout.tsx +1 -4
- package/MenuModal.tsx +3 -10
- package/css/font.css +3 -15
- package/css/tooltip.css +21 -9
- package/docsearch/SearchLink.tsx +1 -4
- package/package.json +1 -2
- package/css/Inter-Var.ttf +0 -0
package/Layout.tsx
CHANGED
|
@@ -410,10 +410,7 @@ function MenuLink(props: PropsAnchor) {
|
|
|
410
410
|
ev.preventDefault()
|
|
411
411
|
toggleMenuModal()
|
|
412
412
|
}}
|
|
413
|
-
aria-label={
|
|
414
|
-
data-balloon-pos="left"
|
|
415
|
-
data-balloon-blunt
|
|
416
|
-
data-balloon-nofocus
|
|
413
|
+
aria-label={'Ctrl\xa0+\xa0M'}
|
|
417
414
|
>
|
|
418
415
|
<MenuIcon />
|
|
419
416
|
Menu
|
package/MenuModal.tsx
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
export { MenuModal }
|
|
2
2
|
export { toggleMenuModal }
|
|
3
3
|
export { closeMenuModal }
|
|
4
|
-
export { hotkeyMenuOpen }
|
|
5
|
-
export { hotkeyMenuClose }
|
|
6
4
|
|
|
7
5
|
import React from 'react'
|
|
8
6
|
import { usePageContext } from './renderer/usePageContext'
|
|
@@ -11,9 +9,6 @@ import { css } from './utils/css'
|
|
|
11
9
|
import { containerQueryMobile } from './Layout'
|
|
12
10
|
import { Links } from './Links'
|
|
13
11
|
|
|
14
|
-
const hotkeyMenuOpen = 'Ctrl + M'
|
|
15
|
-
const hotkeyMenuClose = 'Ctrl+M or Escape'
|
|
16
|
-
|
|
17
12
|
function MenuModal() {
|
|
18
13
|
return (
|
|
19
14
|
<>
|
|
@@ -88,11 +83,9 @@ function CloseButton() {
|
|
|
88
83
|
return (
|
|
89
84
|
<div
|
|
90
85
|
onClick={toggleMenuModal}
|
|
91
|
-
style={{ position: 'fixed', top: 0, right: 0, zIndex: 10, padding: 11 }}
|
|
92
|
-
aria-label={
|
|
93
|
-
data-
|
|
94
|
-
data-balloon-blunt
|
|
95
|
-
data-balloon-nofocus
|
|
86
|
+
style={{ position: 'fixed', top: 0, right: 0, zIndex: 10, padding: 11, cursor: 'pointer' }}
|
|
87
|
+
aria-label={'Escape\nCtrl\xa0+\xa0M'}
|
|
88
|
+
data-label-shift
|
|
96
89
|
>
|
|
97
90
|
<svg width="48.855" height="48.855" version="1.1" viewBox="0 0 22.901 22.901" xmlns="http://www.w3.org/2000/svg">
|
|
98
91
|
<circle
|
package/css/font.css
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');
|
|
2
|
+
|
|
1
3
|
body {
|
|
2
|
-
font-family: 'Inter';
|
|
4
|
+
font-family: 'Inter', sans-serif;
|
|
3
5
|
}
|
|
4
6
|
button {
|
|
5
7
|
font-family: inherit;
|
|
@@ -9,17 +11,3 @@ body {
|
|
|
9
11
|
color: var(--color-text);
|
|
10
12
|
line-height: 1.5;
|
|
11
13
|
}
|
|
12
|
-
|
|
13
|
-
@font-face {
|
|
14
|
-
font-family: 'Inter';
|
|
15
|
-
font-weight: 100 900;
|
|
16
|
-
font-stretch: 75% 125%;
|
|
17
|
-
font-style: oblique 0deg 12deg;
|
|
18
|
-
src: url('./Inter-Var.ttf') format('truetype-variations');
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
em,
|
|
22
|
-
i {
|
|
23
|
-
font-variation-settings: 'slnt' -10;
|
|
24
|
-
font-style: normal;
|
|
25
|
-
}
|
package/css/tooltip.css
CHANGED
|
@@ -1,11 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
:root {
|
|
4
|
-
--balloon-color: #444;
|
|
5
|
-
--balloon-move: 2px;
|
|
6
|
-
--balloon-font-size: 14px;
|
|
7
|
-
--balloon-border-radius: 5px;
|
|
1
|
+
[aria-label] {
|
|
2
|
+
position: relative;
|
|
8
3
|
}
|
|
9
|
-
[aria-label]
|
|
10
|
-
font-family:
|
|
4
|
+
[aria-label]:hover::before {
|
|
5
|
+
font-family: monospace;
|
|
6
|
+
font-size: 12px;
|
|
7
|
+
content: attr(aria-label);
|
|
8
|
+
position: absolute;
|
|
9
|
+
top: 100%;
|
|
10
|
+
left: 50%;
|
|
11
|
+
transform: translate(-50%, 0);
|
|
12
|
+
margin-top: 5px;
|
|
13
|
+
background: #fdfdfd;
|
|
14
|
+
padding: 3px 10px;
|
|
15
|
+
box-shadow: rgb(0 0 0 / 8%) 2px 4px 7px 0px;
|
|
16
|
+
border-radius: 5px;
|
|
17
|
+
color: #333;
|
|
18
|
+
letter-spacing: -0.02em;
|
|
19
|
+
border: 1px solid #e3e3e3;
|
|
20
|
+
}
|
|
21
|
+
[data-label-shift]::before {
|
|
22
|
+
margin-left: -10px;
|
|
11
23
|
}
|
package/docsearch/SearchLink.tsx
CHANGED
|
@@ -20,10 +20,7 @@ function SearchLink(props: PropsAnchor) {
|
|
|
20
20
|
ev.preventDefault()
|
|
21
21
|
openDocsearchModal()
|
|
22
22
|
}}
|
|
23
|
-
aria-label=
|
|
24
|
-
data-balloon-pos="left"
|
|
25
|
-
data-balloon-blunt
|
|
26
|
-
data-balloon-nofocus
|
|
23
|
+
aria-label={'Ctrl\xa0+\xa0K'}
|
|
27
24
|
>
|
|
28
25
|
<SearchIcon />
|
|
29
26
|
Search
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brillout/docpress",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@brillout/picocolors": "^1.0.10",
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
"@mdx-js/rollup": "3.0.1",
|
|
12
12
|
"@shikijs/transformers": "1.2.0",
|
|
13
13
|
"@vitejs/plugin-react-swc": "^3.3.2",
|
|
14
|
-
"balloon-css": "1.2.0",
|
|
15
14
|
"rehype-pretty-code": "0.13.0",
|
|
16
15
|
"remark-gfm": "4.0.0",
|
|
17
16
|
"shiki": "1.2.0",
|
package/css/Inter-Var.ttf
DELETED
|
Binary file
|