@primer/doctocat-nextjs 0.0.0-20251124212930 → 0.0.0-20251124215110

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/CHANGELOG.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # @primer/doctocat-nextjs
2
2
 
3
- ## 0.0.0-20251124212930
3
+ ## 0.0.0-20251124215110
4
4
 
5
5
  ### Patch Changes
6
6
 
7
7
  - Fake entry to force publishing
8
8
 
9
- ## 0.0.0-20251124212928
9
+ ## 0.0.0-20251124215108
10
10
 
11
11
  ### Patch Changes
12
12
 
@@ -10,7 +10,6 @@ import '@primer/primitives/dist/css/functional/themes/dark.css'
10
10
  import {
11
11
  Animate,
12
12
  AnimationProvider,
13
- Box,
14
13
  ButtonGroup,
15
14
  ThemeProvider as BrandThemeProvider,
16
15
  Button,
@@ -38,6 +37,7 @@ import {RelatedContentLinks} from '../related-content-links/RelatedContentLinks'
38
37
  import {getRelatedPages} from '../related-content-links/getRelatedPages'
39
38
  import {hasChildren} from '../../../helpers/hasChildren'
40
39
  import {Footer} from '../footer/Footer'
40
+ import styles from './Theme.module.css'
41
41
 
42
42
  const repoSrcPath = process.env.NEXT_PUBLIC_REPO_SRC_PATH || ''
43
43
  const repoURL = process.env.NEXT_PUBLIC_REPO || ''
@@ -119,7 +119,7 @@ export function Theme({pageMap, children}: ThemeProps) {
119
119
  </Head>
120
120
 
121
121
  <ContentWrapper disableAnimations={disablePageAnimation}>
122
- <div style={{position: 'sticky', top: 0, zIndex: 99}}>
122
+ <div className={styles.StickyHeader}>
123
123
  <SkipToMainContent href="#main">Skip to main content</SkipToMainContent>
124
124
  <Header flatDocsDirectories={flatDocsDirectories} siteTitle={siteTitle} pageMap={pageMap} />
125
125
  </div>
@@ -144,13 +144,9 @@ export function Theme({pageMap, children}: ThemeProps) {
144
144
  {!isHomePage && (
145
145
  <>
146
146
  {activePath.length > 0 && (
147
- <Breadcrumbs>
147
+ <Breadcrumbs className={styles.BreadcrumbRoot}>
148
148
  {(activeHeaderLink || siteTitle) && (
149
- <Breadcrumbs.Item
150
- as={NextLink}
151
- href="/"
152
- style={{color: 'var(--brand-InlineLink-color-rest)'}}
153
- >
149
+ <Breadcrumbs.Item as={NextLink} href="/">
154
150
  {activeHeaderLink ? activeHeaderLink.title : siteTitle}
155
151
  </Breadcrumbs.Item>
156
152
  )}
@@ -158,6 +154,8 @@ export function Theme({pageMap, children}: ThemeProps) {
158
154
  .filter((item, index, array) => {
159
155
  const nextItem = array[index + 1]
160
156
 
157
+ // Skip when current item is a folder followed by its index page
158
+ // or when it is an index page with a tabbed navigation
161
159
  return !(
162
160
  (index < array.length - 1 &&
163
161
  nextItem.name === 'index' &&
@@ -182,10 +180,7 @@ export function Theme({pageMap, children}: ThemeProps) {
182
180
  key={item.name}
183
181
  href={item.route}
184
182
  selected={isLastItem}
185
- style={{
186
- textTransform: 'capitalize',
187
- color: 'var(--brand-InlineLink-color-rest)',
188
- }}
183
+ className={styles.BreadcrumbItem}
189
184
  >
190
185
  {itemTitle.replace(/-/g, ' ')}
191
186
  </Breadcrumbs.Item>
@@ -207,12 +202,12 @@ export function Theme({pageMap, children}: ThemeProps) {
207
202
  </Text>
208
203
  )}
209
204
  {activeMetadata.image && (
210
- <div style={{paddingBlockStart: 'var(--base-size-16)', width: '100%'}}>
205
+ <div className={styles.HeroImageWrapper}>
211
206
  <Hero.Image src={activeMetadata.image} alt={activeMetadata['image-alt']} />
212
207
  </div>
213
208
  )}
214
209
  {activeMetadata['action-1-text'] && (
215
- <div style={{paddingBlockStart: 'var(--base-size-16)'}}>
210
+ <div className={styles.ActionsWrapper}>
216
211
  <ButtonGroup>
217
212
  <Button as="a" href={activeMetadata['action-1-link']}>
218
213
  {activeMetadata['action-1-text']}
@@ -238,7 +233,7 @@ export function Theme({pageMap, children}: ThemeProps) {
238
233
  <>{children}</>
239
234
 
240
235
  {relatedLinks.length > 0 && (
241
- <div style={{paddingTop: 'var(--base-size-20)'}}>
236
+ <div className={styles.RelatedLinks}>
242
237
  <RelatedContentLinks links={relatedLinks} />
243
238
  </div>
244
239
  )}
@@ -142,7 +142,7 @@ export function Sidebar({pageMap}: SidebarProps) {
142
142
  as={NextLink}
143
143
  key={landingPageItem.route}
144
144
  href={landingPageItem.route}
145
- style={{textTransform: 'capitalize'}}
145
+ style={{textTransform: 'capitalize'}}
146
146
  aria-current={isCurrentOrChild ? 'page' : undefined}
147
147
  className={styles.NavListItem}
148
148
  >
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/doctocat-nextjs",
3
- "version": "0.0.0-20251124212930",
3
+ "version": "0.0.0-20251124215110",
4
4
  "description": "A Next.js theme for building Primer documentation sites",
5
5
  "main": "index.js",
6
6
  "type": "module",