@primer/doctocat-nextjs 0.5.7-rc.c059213 → 0.5.8-rc.095ea49
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 +8 -0
- package/components/layout/code-block/code-transformer.ts +1 -1
- package/components/layout/root-layout/Theme.tsx +13 -12
- package/package.json +18 -6
- package/.eslintrc.cjs +0 -9
- package/.vscode/settings.json +0 -5
- package/prettier.config.cjs +0 -3
- package/tsconfig.json +0 -19
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @primer/doctocat-nextjs
|
|
2
2
|
|
|
3
|
+
## 0.5.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#59](https://github.com/primer/doctocat-nextjs/pull/59) [`c24a5b9`](https://github.com/primer/doctocat-nextjs/commit/c24a5b98aad639b42213ad230d923907115eb864) Thanks [@danielguillan](https://github.com/danielguillan)! - Switched sidebar navigation and content document order for improved accessibility
|
|
8
|
+
|
|
9
|
+
- [#61](https://github.com/primer/doctocat-nextjs/pull/61) [`1446089`](https://github.com/primer/doctocat-nextjs/commit/14460897dbcd248f688c13b9085128707abbda25) Thanks [@rezrah](https://github.com/rezrah)! - React code previews now support dot-notation in component names. E.g. Hero.Image.
|
|
10
|
+
|
|
3
11
|
## 0.5.7
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -9,7 +9,7 @@ export const codeTransformer = (sourceCode: string, basePath: string): string =>
|
|
|
9
9
|
|
|
10
10
|
// Assumes all elements with a src attribute are trying to point at Next.js public folder
|
|
11
11
|
return sourceCode.replace(
|
|
12
|
-
/<(\w
|
|
12
|
+
/<([a-z]\w*|[A-Z]\w*(?:\.[A-Z]\w*)?)\s+([^>]*\s+)?src=["']([^"']+)["']([^>]*)/g,
|
|
13
13
|
(match, tagName, before = '', src, after) => {
|
|
14
14
|
if (!shouldTransform(src)) return match
|
|
15
15
|
|
|
@@ -130,6 +130,19 @@ export function Theme({pageMap, children}: ThemeProps) {
|
|
|
130
130
|
<Header flatDocsDirectories={flatDocsDirectories} siteTitle={siteTitle} pageMap={pageMap} />
|
|
131
131
|
</PRCBox>
|
|
132
132
|
<PageLayout rowGap="none" columnGap="none" padding="none" containerWidth="full">
|
|
133
|
+
<PageLayout.Pane
|
|
134
|
+
width="small"
|
|
135
|
+
sticky
|
|
136
|
+
offsetHeader={65}
|
|
137
|
+
padding="none"
|
|
138
|
+
position="start"
|
|
139
|
+
hidden={{narrow: true}}
|
|
140
|
+
divider="line"
|
|
141
|
+
>
|
|
142
|
+
<aside aria-label={`${activeHeaderLink ? activeHeaderLink.title : siteTitle} sidebar`}>
|
|
143
|
+
<Sidebar pageMap={pageMap} />
|
|
144
|
+
</aside>
|
|
145
|
+
</PageLayout.Pane>
|
|
133
146
|
<PageLayout.Content padding="normal">
|
|
134
147
|
<div id="main">
|
|
135
148
|
<PRCBox sx={!isHomePage && {maxWidth: 1200, width: '100%', margin: '0 auto'}}>
|
|
@@ -247,18 +260,6 @@ export function Theme({pageMap, children}: ThemeProps) {
|
|
|
247
260
|
</PRCBox>
|
|
248
261
|
</div>
|
|
249
262
|
</PageLayout.Content>
|
|
250
|
-
<PageLayout.Pane
|
|
251
|
-
aria-label="Side navigation"
|
|
252
|
-
width="small"
|
|
253
|
-
sticky
|
|
254
|
-
offsetHeader={65}
|
|
255
|
-
padding="none"
|
|
256
|
-
position="start"
|
|
257
|
-
hidden={{narrow: true}}
|
|
258
|
-
divider="line"
|
|
259
|
-
>
|
|
260
|
-
<Sidebar pageMap={pageMap} />
|
|
261
|
-
</PageLayout.Pane>
|
|
262
263
|
</PageLayout>
|
|
263
264
|
</ContentWrapper>
|
|
264
265
|
</BaseStyles>
|
package/package.json
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primer/doctocat-nextjs",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.8-rc.095ea49",
|
|
4
4
|
"description": "A Next.js theme for building Primer documentation sites",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"check": "tsc --noEmit",
|
|
9
9
|
"lint": "eslint '**/*.{js,ts,tsx,md,mdx}' --max-warnings=0 --config ./.eslintrc.cjs",
|
|
10
|
-
"test": "
|
|
10
|
+
"test": "vitest",
|
|
11
|
+
"test:ui": "vitest --ui",
|
|
12
|
+
"test:no-watch": "vitest run",
|
|
13
|
+
"test:coverage": "vitest run --coverage"
|
|
11
14
|
},
|
|
12
15
|
"author": "GitHub, Inc.",
|
|
13
16
|
"license": "MIT",
|
|
@@ -17,7 +20,7 @@
|
|
|
17
20
|
"react-dom": ">=18.0.0 <20.0.0"
|
|
18
21
|
},
|
|
19
22
|
"dependencies": {
|
|
20
|
-
"@next/mdx": "15.
|
|
23
|
+
"@next/mdx": "15.3.5",
|
|
21
24
|
"@primer/octicons-react": "19.15.1",
|
|
22
25
|
"@primer/react": "^37.11.0",
|
|
23
26
|
"@primer/react-brand": "0.54.0",
|
|
@@ -32,12 +35,21 @@
|
|
|
32
35
|
},
|
|
33
36
|
"devDependencies": {
|
|
34
37
|
"@github/prettier-config": "^0.0.6",
|
|
35
|
-
"@
|
|
38
|
+
"@testing-library/dom": "^10.4.0",
|
|
39
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
40
|
+
"@testing-library/react": "^16.1.0",
|
|
41
|
+
"@testing-library/user-event": "^14.5.2",
|
|
42
|
+
"@types/node": "^20.19.0",
|
|
36
43
|
"@types/react": "18.3.12",
|
|
37
44
|
"@types/react-dom": "18.3.1",
|
|
45
|
+
"@vitejs/plugin-react": "^4.3.3",
|
|
46
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
47
|
+
"@vitest/ui": "^3.2.4",
|
|
38
48
|
"clsx": "2.1.1",
|
|
39
|
-
"
|
|
40
|
-
"
|
|
49
|
+
"jsdom": "^26.0.1",
|
|
50
|
+
"next": "15.3.5",
|
|
51
|
+
"styled-components": "5.3.11",
|
|
52
|
+
"vitest": "^3.2.4"
|
|
41
53
|
},
|
|
42
54
|
"overrides": {
|
|
43
55
|
"@types/react": "18.3.12",
|
package/.eslintrc.cjs
DELETED
package/.vscode/settings.json
DELETED
package/prettier.config.cjs
DELETED
package/tsconfig.json
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "es2016",
|
|
4
|
-
"module": "ESNext",
|
|
5
|
-
"declaration": false,
|
|
6
|
-
"noEmit": true,
|
|
7
|
-
"esModuleInterop": true,
|
|
8
|
-
"strict": true,
|
|
9
|
-
"skipLibCheck": true,
|
|
10
|
-
"allowJs": true,
|
|
11
|
-
"jsx": "react-jsx",
|
|
12
|
-
"moduleResolution": "bundler",
|
|
13
|
-
"lib": ["ESNext", "DOM", "DOM.Iterable"],
|
|
14
|
-
"resolveJsonModule": true,
|
|
15
|
-
"strictNullChecks": true,
|
|
16
|
-
"strictFunctionTypes": true,
|
|
17
|
-
"noImplicitAny": true
|
|
18
|
-
}
|
|
19
|
-
}
|