@brillout/docpress 0.10.12 → 0.10.14

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 CHANGED
@@ -32,7 +32,7 @@ const navLeftWidthMin = 300
32
32
  const navLeftWidthMax = 370
33
33
  const containerQuerySmallNav = 550
34
34
  const containerQueryMobileNav = 1000
35
- const containerQueryMobileLayout = (mainViewMax + navLeftWidthMin) as 1143 // 1143 = 840 + 300
35
+ const containerQueryMobileLayout = (mainViewMax + navLeftWidthMin) as 1140 // 1140 = 840 + 300
36
36
  const containerQueryExtraSpace = (mainViewMax + navLeftWidthMax + blockMargin) as 1213 // 1213 = 840 + 370 + 3
37
37
 
38
38
  // Avoid whitespace at the bottom of pages with almost no content
@@ -110,7 +110,7 @@ function LayoutDocsPage({ children }: { children: React.ReactNode }) {
110
110
  width: ${navLeftWidthMax}px !important;
111
111
  }
112
112
  }`
113
- let navLeftHide = css`
113
+ let navLeftHidden = css`
114
114
  #nav-left, #nav-left-margin {
115
115
  display: none;
116
116
  }
@@ -127,18 +127,18 @@ function LayoutDocsPage({ children }: { children: React.ReactNode }) {
127
127
  }
128
128
  `
129
129
  if (!hideNavLeftAlways) {
130
- navLeftHide = css`
130
+ navLeftHidden = css`
131
131
  @container container-viewport (max-width: ${containerQueryMobileLayout - 1}px) {
132
- ${navLeftHide}
132
+ ${navLeftHidden}
133
133
  }
134
134
  @container container-viewport (min-width: ${containerQueryMobileLayout}px) {
135
- .nav-head-top {
135
+ .nav-head-full-width {
136
136
  display: none !important;
137
137
  }
138
138
  }
139
139
  `
140
140
  }
141
- style += navLeftHide
141
+ style += navLeftHidden
142
142
 
143
143
  return style
144
144
  }
@@ -315,13 +315,14 @@ function NavHead({ isNavLeft }: { isNavLeft?: true }) {
315
315
 
316
316
  return (
317
317
  <div
318
- className={cls(['nav-head-full-width', !isNavLeft && 'nav-head-top', 'link-hover-animation'])}
318
+ className={cls(['nav-head-top', !isNavLeft && 'nav-head-full-width', 'link-hover-animation'])}
319
319
  style={{
320
320
  display: 'flex',
321
321
  justifyContent: isNavLeft ? 'flex-end' : 'center',
322
322
  backgroundColor: 'var(--bg-color)',
323
323
  borderBottom: 'var(--block-margin) solid white',
324
324
  position: 'relative',
325
+ marginBottom: !isNavLeft ? -5 : 0,
325
326
  }}
326
327
  >
327
328
  {isNavLeft && <NavHeaderLeftFullWidthBackground />}
@@ -385,6 +386,9 @@ function NavHead({ isNavLeft }: { isNavLeft?: true }) {
385
386
  padding: 0;
386
387
  margin: 0;
387
388
  }
389
+ .nav-head-top {
390
+ margin-bottom: -15px !important;
391
+ }
388
392
  }
389
393
  @container container-nav-head (min-width: 501px) {
390
394
  .nav-head-content {
@@ -430,7 +434,7 @@ function NavHead({ isNavLeft }: { isNavLeft?: true }) {
430
434
  transition-property: opacity;
431
435
  pointer-events: none;
432
436
  }
433
- html:not(.unexpand-nav) :has(.nav-head-full-width:hover) .show-on-nav-hover,
437
+ html:not(.unexpand-nav) :has(.nav-head-top:hover) .show-on-nav-hover,
434
438
  html:not(.unexpand-nav) :has(.show-on-nav-hover:hover) .show-on-nav-hover,
435
439
  html:not(.unexpand-nav).menu-modal-show .show-on-nav-hover {
436
440
  opacity: 1;
package/MenuModal.tsx CHANGED
@@ -148,8 +148,6 @@ function CloseButton({ className }: { className: string }) {
148
148
  className={className}
149
149
  onClick={closeMenuModal}
150
150
  style={{ position: 'fixed', top: 0, right: 0, zIndex: 10, padding: 11, cursor: 'pointer' }}
151
- aria-label={'Escape\nCtrl\xa0+\xa0M'}
152
- data-label-shift
153
151
  >
154
152
  <svg width="48.855" height="48.855" version="1.1" viewBox="0 0 22.901 22.901" xmlns="http://www.w3.org/2000/svg">
155
153
  <circle
@@ -43,7 +43,7 @@ function NavItemComponent({
43
43
  const icon = navItem.titleIcon && (
44
44
  <img
45
45
  src={navItem.titleIcon}
46
- style={{ height: iconSize, width: iconSize, marginRight: 8, ...navItem.titleIconStyle }}
46
+ style={{ height: iconSize, width: iconSize, marginRight: 8, marginLeft: 4, ...navItem.titleIconStyle }}
47
47
  />
48
48
  )
49
49
 
@@ -12,7 +12,7 @@ function HorizontalLine({ primary }: { primary?: true }) {
12
12
  margin: 0,
13
13
  border: 0,
14
14
  // Same as `.doc-page h2::after`
15
- borderTop: '1px solid #eaeaea',
15
+ borderTop: '1px solid rgba(0, 0, 0, 0.1)',
16
16
  maxWidth: 500,
17
17
  width: '80%',
18
18
  }}
package/css/heading.css CHANGED
@@ -9,7 +9,7 @@ h3 {
9
9
  }
10
10
 
11
11
  .doc-page h1 {
12
- margin-top: 20px;
12
+ margin-top: 15px;
13
13
  margin-bottom: 20px;
14
14
  }
15
15
 
@@ -27,7 +27,7 @@ h3 {
27
27
  height: 1px;
28
28
  top: -45px;
29
29
  /* Same as <HorizontalLine> */
30
- background-color: #eaeaea;
30
+ background-color: rgba(0, 0, 0, 0.1);
31
31
  --width: min(80%, 500px);
32
32
  width: var(--width);
33
33
  left: calc((100% - var(--width)) / 2);
package/css/tooltip.css CHANGED
@@ -7,6 +7,12 @@
7
7
  position: relative;
8
8
  }
9
9
  [aria-label]:hover::before {
10
+ opacity: 1;
11
+ }
12
+ [aria-label]::before {
13
+ opacity: 0;
14
+ transition: opacity 0.3s ease-in-out;
15
+ pointer-events: none;
10
16
  font-family: monospace;
11
17
  font-size: 12px;
12
18
  content: attr(aria-label);
@@ -23,8 +29,9 @@
23
29
  letter-spacing: -0.02em;
24
30
  border: 1px solid #e3e3e3;
25
31
  z-index: 1;
26
- }
27
- [data-label-shift]::before {
28
- margin-left: -10px;
32
+ /* Atlernative: https://stackoverflow.com/questions/30086913/css-positioned-absolute-element-automatic-width-outside-of-parents-bounds/57379329#57379329
33
+ width: max-content;
34
+ */
35
+ white-space: nowrap;
29
36
  }
30
37
  }
@@ -24,7 +24,7 @@ function NavItemComponent(_a) {
24
24
  var titleJsx = parseMarkdownMini(navItem.title);
25
25
  var titleInNavJsx = parseMarkdownMini(navItem.titleInNav);
26
26
  var iconSize = 25;
27
- var icon = navItem.titleIcon && (React.createElement("img", { src: navItem.titleIcon, style: __assign({ height: iconSize, width: iconSize, marginRight: 8 }, navItem.titleIconStyle) }));
27
+ var icon = navItem.titleIcon && (React.createElement("img", { src: navItem.titleIcon, style: __assign({ height: iconSize, width: iconSize, marginRight: 8, marginLeft: 4 }, navItem.titleIconStyle) }));
28
28
  if (navItem.level === 1 || navItem.level === 4) {
29
29
  assert(navItem.url === undefined);
30
30
  }
@@ -9,7 +9,7 @@ function HorizontalLine(_a) {
9
9
  margin: 0,
10
10
  border: 0,
11
11
  // Same as `.doc-page h2::after`
12
- borderTop: '1px solid #eaeaea',
12
+ borderTop: '1px solid rgba(0, 0, 0, 0.1)',
13
13
  maxWidth: 500,
14
14
  width: '80%',
15
15
  } })));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brillout/docpress",
3
- "version": "0.10.12",
3
+ "version": "0.10.14",
4
4
  "type": "module",
5
5
  "dependencies": {
6
6
  "@brillout/picocolors": "^1.0.10",