@patternfly/documentation-framework 6.0.0-alpha.3 → 6.0.0-alpha.30
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 +713 -0
- package/app.js +1 -4
- package/components/autoLinkHeader/autoLinkHeader.css +2 -2
- package/components/autoLinkHeader/autoLinkHeader.js +2 -2
- package/components/cssVariables/cssVariables.css +4 -4
- package/components/cssVariables/cssVariables.js +6 -6
- package/components/example/example.css +29 -29
- package/components/example/example.js +122 -56
- package/components/example/exampleToolbar.js +3 -2
- package/components/footer/footer.css +16 -16
- package/components/footer/footer.js +13 -13
- package/components/gdprBanner/gdprBanner.css +2 -2
- package/components/gdprBanner/gdprBanner.js +4 -4
- package/components/inlineAlert/inlineAlert.js +1 -1
- package/components/propsTable/propsTable.js +3 -3
- package/components/sectionGallery/sectionDataListLayout.js +3 -3
- package/components/sectionGallery/sectionGallery.css +12 -12
- package/components/sectionGallery/sectionGalleryToolbar.js +1 -1
- package/components/sideNav/sideNav.js +3 -4
- package/components/tableOfContents/tableOfContents.css +23 -24
- package/layouts/sideNavLayout/sideNavLayout.css +14 -14
- package/layouts/sideNavLayout/sideNavLayout.js +79 -26
- package/package.json +13 -20
- package/pages/404/404.css +2 -2
- package/pages/404/index.js +3 -1
- package/routes.js +3 -1
- package/scripts/md/parseMD.js +20 -18
- package/scripts/webpack/webpack.base.config.js +7 -18
- package/scripts/writeScreenshots.js +2 -2
- package/templates/mdx.css +169 -157
- package/templates/mdx.js +16 -10
- package/versions.json +85 -9
- package/components/sideNav/sideNav.css +0 -21
- package/pages/global-css-variables.md +0 -109
- package/pages/img/component-variable-mapping.png +0 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/documentation-framework",
|
|
3
3
|
"description": "A framework to build documentation for PatternFly.",
|
|
4
|
-
"version": "6.0.0-alpha.
|
|
4
|
+
"version": "6.0.0-alpha.30",
|
|
5
5
|
"author": "Red Hat",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"private": false,
|
|
@@ -9,18 +9,14 @@
|
|
|
9
9
|
"pf-docs-framework": "scripts/cli/cli.js"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@babel/core": "7.
|
|
13
|
-
"@babel/
|
|
14
|
-
"@babel/
|
|
15
|
-
"@babel/plugin-proposal-private-methods": "7.17.12",
|
|
16
|
-
"@babel/plugin-proposal-private-property-in-object": "7.17.12",
|
|
17
|
-
"@babel/plugin-transform-react-jsx": "7.17.12",
|
|
18
|
-
"@babel/preset-env": "7.18.2",
|
|
12
|
+
"@babel/core": "^7.24.3",
|
|
13
|
+
"@babel/preset-env": "^7.24.3",
|
|
14
|
+
"@babel/preset-react": "^7.24.1",
|
|
19
15
|
"@mdx-js/util": "1.6.16",
|
|
20
|
-
"@patternfly/ast-helpers": "^1.
|
|
16
|
+
"@patternfly/ast-helpers": "^1.4.0-alpha.19",
|
|
21
17
|
"@reach/router": "npm:@gatsbyjs/reach-router@1.3.9",
|
|
22
18
|
"autoprefixer": "9.8.6",
|
|
23
|
-
"babel-loader": "9.1.
|
|
19
|
+
"babel-loader": "^9.1.3",
|
|
24
20
|
"camelcase-css": "2.0.1",
|
|
25
21
|
"chokidar": "3.5.3",
|
|
26
22
|
"clean-webpack-plugin": "4.0.0",
|
|
@@ -43,18 +39,15 @@
|
|
|
43
39
|
"mdast-util-to-hast": "9.1.1",
|
|
44
40
|
"mdurl": "1.0.1",
|
|
45
41
|
"mini-css-extract-plugin": "2.7.5",
|
|
46
|
-
"monaco-editor": "0.34.1",
|
|
47
|
-
"monaco-editor-webpack-plugin": "7.0.1",
|
|
48
42
|
"null-loader": "4.0.1",
|
|
49
43
|
"parse-entities": "2.0.0",
|
|
50
44
|
"path-browserify": "1.0.1",
|
|
51
45
|
"postcss": "8.4.32",
|
|
52
46
|
"postcss-loader": "7.1.0",
|
|
53
47
|
"process": "^0.11.10",
|
|
54
|
-
"puppeteer": "19.
|
|
48
|
+
"puppeteer": "19.11.1",
|
|
55
49
|
"puppeteer-cluster": "0.23.0",
|
|
56
50
|
"react-docgen": "5.3.1",
|
|
57
|
-
"react-monaco-editor": "^0.51.0",
|
|
58
51
|
"react-ssr-prepass": "1.5.0",
|
|
59
52
|
"remark-footnotes": "1.0.0",
|
|
60
53
|
"remark-frontmatter": "2.0.0",
|
|
@@ -67,7 +60,7 @@
|
|
|
67
60
|
"style-to-object": "0.3.0",
|
|
68
61
|
"to-vfile": "6.1.0",
|
|
69
62
|
"typedoc": "0.23.0",
|
|
70
|
-
"typescript": "4.
|
|
63
|
+
"typescript": "4.7.4",
|
|
71
64
|
"unified": "9.1.0",
|
|
72
65
|
"unist-util-remove": "2.0.0",
|
|
73
66
|
"unist-util-visit": "2.0.3",
|
|
@@ -80,12 +73,12 @@
|
|
|
80
73
|
"webpack-merge": "5.8.0"
|
|
81
74
|
},
|
|
82
75
|
"peerDependencies": {
|
|
83
|
-
"@patternfly/patternfly": "6.0.0-alpha.
|
|
84
|
-
"@patternfly/react-code-editor": "6.0.0-alpha.
|
|
85
|
-
"@patternfly/react-core": "6.0.0-alpha.
|
|
86
|
-
"@patternfly/react-table": "6.0.0-alpha.
|
|
76
|
+
"@patternfly/patternfly": "6.0.0-alpha.117",
|
|
77
|
+
"@patternfly/react-code-editor": "6.0.0-alpha.56",
|
|
78
|
+
"@patternfly/react-core": "6.0.0-alpha.56",
|
|
79
|
+
"@patternfly/react-table": "6.0.0-alpha.56",
|
|
87
80
|
"react": "^17.0.0 || ^18.0.0",
|
|
88
81
|
"react-dom": "^17.0.0 || ^18.0.0"
|
|
89
82
|
},
|
|
90
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "b1498f629f2d1eea703970dcf20bb6d8245042e9"
|
|
91
84
|
}
|
package/pages/404/404.css
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
.ws-404-card-header {
|
|
8
|
-
padding: var(--pf-
|
|
8
|
+
padding: var(--pf-t--global--spacer--lg);
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
div.ws-404-button-wrapper {
|
|
12
12
|
width: 100%;
|
|
13
13
|
display: flex;
|
|
14
14
|
justify-content: center;
|
|
15
|
-
padding: var(--pf-
|
|
15
|
+
padding: var(--pf-t--global--spacer--xl);
|
|
16
16
|
}
|
package/pages/404/index.js
CHANGED
|
@@ -73,7 +73,9 @@ const Page404 = () => {
|
|
|
73
73
|
<Title headingLevel="h1" size="2xl">
|
|
74
74
|
404: That page no longer exists
|
|
75
75
|
</Title>
|
|
76
|
-
<p
|
|
76
|
+
<p
|
|
77
|
+
// style={{ marginTop: 'var(--pf-v6-global--spacer--sm)' }}
|
|
78
|
+
>
|
|
77
79
|
Another page might have the information you need, so try searching PatternFly.
|
|
78
80
|
</p>
|
|
79
81
|
<EmptyStateBody>
|
package/routes.js
CHANGED
package/scripts/md/parseMD.js
CHANGED
|
@@ -105,6 +105,7 @@ function toReactComponent(mdFilePath, source, buildMode) {
|
|
|
105
105
|
section: frontmatter.section || '',
|
|
106
106
|
subsection: frontmatter.subsection || '',
|
|
107
107
|
deprecated: frontmatter.deprecated || false,
|
|
108
|
+
template: frontmatter.template || false,
|
|
108
109
|
beta: frontmatter.beta || false,
|
|
109
110
|
demo: frontmatter.demo || false,
|
|
110
111
|
newImplementationLink: frontmatter.newImplementationLink || false,
|
|
@@ -213,24 +214,24 @@ function toReactComponent(mdFilePath, source, buildMode) {
|
|
|
213
214
|
pageData.examples.push(node.title);
|
|
214
215
|
}
|
|
215
216
|
// Typecheck TS examples
|
|
216
|
-
if (node.properties.lang === 'ts') {
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
}
|
|
217
|
+
// if (node.properties.lang === 'ts') {
|
|
218
|
+
// const typerrors = typecheck(
|
|
219
|
+
// path.join(pageData.id, node.title + '.tsx'), // Needs to be unique per-example
|
|
220
|
+
// node.properties.code
|
|
221
|
+
// );
|
|
222
|
+
// typerrors.forEach(({ line, character, message }) => {
|
|
223
|
+
// line = node.position.start.line + line + 1;
|
|
224
|
+
// const column = character;
|
|
225
|
+
// if (buildMode === 'start') {
|
|
226
|
+
// // Don't fail to start over types
|
|
227
|
+
// file.message(`\u001b[31m THIS WILL FAIL THE BUILD\u001b[0m\n ${message}`, { line, column });
|
|
228
|
+
// } else {
|
|
229
|
+
// console.log('\u001b[31m');
|
|
230
|
+
// file.fail(`\n ${message}\n`, { line, column });
|
|
231
|
+
// console.log('\u001b[0m');
|
|
232
|
+
// }
|
|
233
|
+
// });
|
|
234
|
+
// }
|
|
234
235
|
});
|
|
235
236
|
})
|
|
236
237
|
// Add custom PatternFly doc design things
|
|
@@ -295,6 +296,7 @@ function sourceMDFile(file, source, buildMode) {
|
|
|
295
296
|
...(pageData.hideNavItem && { hideNavItem: pageData.hideNavItem }),
|
|
296
297
|
...(pageData.beta && { beta: pageData.beta }),
|
|
297
298
|
...(pageData.deprecated && { deprecated: pageData.deprecated }),
|
|
299
|
+
...(pageData.template && { template: pageData.template }),
|
|
298
300
|
...(pageData.demo && { demo: pageData.demo }),
|
|
299
301
|
...(pageData.sortValue && { sortValue: pageData.sortValue }),
|
|
300
302
|
...(pageData.subsectionSortValue && { subsectionSortValue: pageData.subsectionSortValue })
|
|
@@ -2,7 +2,6 @@ const path = require('path');
|
|
|
2
2
|
const webpack = require('webpack');
|
|
3
3
|
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
|
4
4
|
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
|
5
|
-
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
|
|
6
5
|
|
|
7
6
|
module.exports = (_env, argv) => {
|
|
8
7
|
const {
|
|
@@ -47,6 +46,7 @@ module.exports = (_env, argv) => {
|
|
|
47
46
|
/react-[\w-]+\\src\\.*\\examples/, // fix for Windows
|
|
48
47
|
/react-[\w-]+\/patternfly-docs\/.*\/examples/, //fixes for extensions
|
|
49
48
|
/react-[\w-]+\\patternfly-docs\\.*\\examples/,
|
|
49
|
+
path.resolve(__dirname, '../../../../node_modules/@patternfly/design-tokens/patternfly-docs/content')
|
|
50
50
|
].concat(includePaths.map(path => new RegExp(path))),
|
|
51
51
|
exclude: [
|
|
52
52
|
path.resolve(__dirname, '../../node_modules'), // Temporarily compile theme using webpack for development
|
|
@@ -56,20 +56,12 @@ module.exports = (_env, argv) => {
|
|
|
56
56
|
options: {
|
|
57
57
|
cacheDirectory: '.cache/babel',
|
|
58
58
|
cacheCompression: false,
|
|
59
|
-
presets: [
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
targets: "> 0.25%, not dead"
|
|
66
|
-
}]],
|
|
67
|
-
plugins: [
|
|
68
|
-
'@babel/plugin-transform-react-jsx',
|
|
69
|
-
'@babel/plugin-proposal-class-properties',
|
|
70
|
-
'@babel/plugin-proposal-optional-chaining',
|
|
71
|
-
["@babel/plugin-proposal-private-methods", { "loose": false }],
|
|
72
|
-
["@babel/plugin-proposal-private-property-in-object", { "loose": false }]
|
|
59
|
+
presets: [
|
|
60
|
+
'@babel/preset-react',
|
|
61
|
+
['@babel/preset-env', {
|
|
62
|
+
loose: true,
|
|
63
|
+
targets: '> 1%, not dead'
|
|
64
|
+
}],
|
|
73
65
|
],
|
|
74
66
|
}
|
|
75
67
|
},
|
|
@@ -155,9 +147,6 @@ module.exports = (_env, argv) => {
|
|
|
155
147
|
patterns: [
|
|
156
148
|
{ from: path.join(__dirname, '../../assets'), to: 'assets' }
|
|
157
149
|
]
|
|
158
|
-
}),
|
|
159
|
-
new MonacoWebpackPlugin({
|
|
160
|
-
globalAPI: true,
|
|
161
150
|
})
|
|
162
151
|
],
|
|
163
152
|
stats: 'minimal'
|
|
@@ -11,7 +11,7 @@ sharp.cache(false);
|
|
|
11
11
|
async function writeScreenshot({ page, data: { url, urlPrefix } }) {
|
|
12
12
|
await page.goto(url);
|
|
13
13
|
await page.addStyleTag({content: '*,*::before,*::after{animation-delay:-1ms !important;animation-duration:1ms !important;animation-iteration-count:1 !important;transition-duration:0s !important;transition-delay:0s !important;}'}); // disable animations/transitions so they don't interfere with screenshot tool
|
|
14
|
-
await page.waitForSelector('.pf-
|
|
14
|
+
await page.waitForSelector('.pf-v6-u-h-100');
|
|
15
15
|
const outfile = path.join(
|
|
16
16
|
screenshotBase,
|
|
17
17
|
url.replace(`${urlPrefix}/`, '') + '.png'
|
|
@@ -32,7 +32,7 @@ async function writeScreenshots({ urlPrefix, allRoutes, filterTerm }) {
|
|
|
32
32
|
concurrency: Cluster.CONCURRENCY_CONTEXT,
|
|
33
33
|
maxConcurrency: os.cpus().length,
|
|
34
34
|
puppeteerOptions: {
|
|
35
|
-
headless:
|
|
35
|
+
headless: 'new', // set to false for testing...
|
|
36
36
|
args: ["--no-sandbox", "--disable-setuid-sandbox"],
|
|
37
37
|
defaultViewport: {width: 1920, height: 1080}
|
|
38
38
|
}
|