@brillout/docpress 0.6.19 → 0.6.21

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/+config.ts CHANGED
@@ -9,9 +9,5 @@ export default {
9
9
  Page: {
10
10
  env: { client: false, server: true },
11
11
  },
12
- // Vike already defines the setting 'name', but we redundantly define it here for older Vike versions (otherwise older Vike versions will complain that 'name` is an unknown config).
13
- name: {
14
- env: { config: true },
15
- },
16
12
  },
17
13
  } satisfies Config
package/PageLayout.css CHANGED
@@ -1,42 +1,42 @@
1
- .doc-page #page-container {
1
+ .doc-page .page-container {
2
2
  padding-bottom: 100px;
3
3
  }
4
4
 
5
- #page-layout {
5
+ .page-layout {
6
6
  display: flex;
7
7
  justify-content: center;
8
8
  width: 100%;
9
9
  }
10
- #page-layout > #navigation-wrapper,
11
- #page-layout > #page-wrapper {
10
+ .page-layout > #navigation-wrapper,
11
+ .page-layout > .page-wrapper {
12
12
  flex-grow: 1;
13
13
  }
14
14
  /* Avoid overflow, see https://stackoverflow.com/questions/36230944/prevent-flex-items-from-overflowing-a-container/66689926#66689926 */
15
- #page-layout > #page-wrapper {
15
+ .page-layout > .page-wrapper {
16
16
  min-width: 0;
17
17
  }
18
18
 
19
- .doc-page #page-wrapper {
19
+ .doc-page .page-wrapper {
20
20
  --main-view-max-width: 800px;
21
21
  }
22
- .landing-page #page-wrapper {
22
+ .landing-page .page-wrapper {
23
23
  --main-view-max-width: 1010px;
24
24
  }
25
- #page-wrapper {
25
+ .page-wrapper {
26
26
  max-width: calc(var(--main-view-max-width) + 80px);
27
27
  }
28
- #page-content {
28
+ .page-content {
29
29
  box-sizing: content-box;
30
30
  max-width: var(--main-view-max-width);
31
31
  padding: 20px var(--main-view-padding);
32
32
  margin: auto;
33
33
  }
34
34
 
35
- #page-content {
35
+ .page-content {
36
36
  --main-view-padding: 20px;
37
37
  }
38
38
  @media screen and (max-width: 1139px) {
39
- #page-content {
39
+ .page-content {
40
40
  --main-view-padding: 10px;
41
41
  }
42
42
  }
package/PageLayout.tsx CHANGED
@@ -10,22 +10,22 @@ import { NavigationFullscreenButton } from './navigation/navigation-fullscreen/N
10
10
  export { PageLayout }
11
11
 
12
12
  function PageLayout({ pageContext, children }: { pageContext: PageContextResolved; children: React.ReactNode }) {
13
- const { isLandingPage, pageTitle } = pageContext
13
+ const { isLandingPage, pageTitle, navigationData } = pageContext
14
14
  const { globalNote } = pageContext.config
15
15
  return (
16
16
  <React.StrictMode>
17
17
  <PageContextProvider pageContext={pageContext}>
18
- <div id="page-layout" className={isLandingPage ? 'landing-page' : 'doc-page'}>
18
+ <div className={`page-layout ${isLandingPage ? 'landing-page' : 'doc-page'}`}>
19
19
  <div id="navigation-wrapper">
20
20
  <Navigation {...pageContext.navigationData} />
21
21
  </div>
22
22
  <NavigationFullscreenButton />
23
- <div id="page-wrapper">
24
- <div id="page-container">
23
+ <div className="page-wrapper">
24
+ <div className="page-container">
25
25
  <MobileHeader />
26
- <div id="page-content">
26
+ <div className="page-content">
27
27
  {globalNote}
28
- {pageTitle && <h1>{pageTitle}</h1>}
28
+ {pageTitle && <h1 id={`${navigationData.currentUrl.replace('/', '')}`}>{pageTitle}</h1>}
29
29
  {children}
30
30
  {!isLandingPage && <EditPageNote pageContext={pageContext} />}
31
31
  </div>
@@ -21,7 +21,7 @@ import './Note.css'
21
21
 
22
22
  type Props = {
23
23
  children: React.ReactNode
24
- style: React.CSSProperties
24
+ style?: React.CSSProperties
25
25
  }
26
26
  function Warning(props: Props) {
27
27
  return <NoteGeneric type="warning" {...props} />
package/dist/+config.d.ts CHANGED
@@ -9,11 +9,6 @@ declare const _default: {
9
9
  server: true;
10
10
  };
11
11
  };
12
- name: {
13
- env: {
14
- config: true;
15
- };
16
- };
17
12
  };
18
13
  };
19
14
  export default _default;
package/dist/+config.js CHANGED
@@ -7,9 +7,5 @@ export default {
7
7
  Page: {
8
8
  env: { client: false, server: true },
9
9
  },
10
- // Vike already defines the setting 'name', but we redundantly define it here for older Vike versions (otherwise older Vike versions will complain that 'name` is an unknown config).
11
- name: {
12
- env: { config: true },
13
- },
14
10
  },
15
11
  };
@@ -6,7 +6,7 @@ jumpToSection()
6
6
  */
7
7
 
8
8
  function installSectionUrlHashs() {
9
- const pageContainer = document.querySelector('.doc-page #page-container')
9
+ const pageContainer = document.querySelector('.doc-page .page-container')
10
10
  if (!pageContainer) {
11
11
  assert(window.location.pathname === '/')
12
12
  return
@@ -56,7 +56,7 @@
56
56
  background: white;
57
57
  z-index: 3;
58
58
  }
59
- #page-wrapper {
59
+ .page-wrapper {
60
60
  margin-left: calc(-1 * var(--navigation-fullscreen-button-width));
61
61
  }
62
62
  @media screen and (max-width: 1139px) {
@@ -70,7 +70,7 @@
70
70
  #navigation-fullscreen-button {
71
71
  display: none;
72
72
  }
73
- #page-wrapper {
73
+ .page-wrapper {
74
74
  margin-left: 0 !important;
75
75
  }
76
76
  #navigation-container {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brillout/docpress",
3
- "version": "0.6.19",
3
+ "version": "0.6.21",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "// Build vite.config.ts and +config.ts": "",
@@ -34,7 +34,7 @@
34
34
  "react": ">=18.0.0",
35
35
  "react-dom": ">=18.0.0",
36
36
  "typescript": "*",
37
- "vike": ">=0.4.167",
37
+ "vike": ">=0.4.195",
38
38
  "vite": ">=5.2.0"
39
39
  },
40
40
  "exports": {
@@ -71,12 +71,10 @@
71
71
  "devDependencies": {
72
72
  "@brillout/release-me": "^0.3.8",
73
73
  "@types/node": "^15.12.1",
74
- "@types/react": "^17.0.44",
75
- "@types/react-dom": "^17.0.6",
76
- "react": "^18.2.0",
77
- "react-dom": "^18.2.0",
74
+ "@types/react": "^18.2.45",
75
+ "@types/react-dom": "^18.2.18",
78
76
  "typescript": "^5.4.3",
79
- "vike": "^0.4.180",
77
+ "vike": "^0.4.195",
80
78
  "vite": "^5.2.2"
81
79
  },
82
80
  "repository": "https://github.com/brillout/docpress",