@patternfly/documentation-framework 6.36.8 → 6.37.0
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
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# 6.37.0 (2026-04-06)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* bump preleases and update screenshots ([#4986](https://github.com/patternfly/patternfly-org/issues/4986)) ([96b5a86](https://github.com/patternfly/patternfly-org/commit/96b5a86cf62be502b202e5c736a161439d2c5710))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## 6.36.8 (2026-03-25)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @patternfly/documentation-framework
|
|
@@ -265,9 +265,11 @@ export const SideNavLayout = ({ children, groupedRoutes, navOpen: navOpenProp })
|
|
|
265
265
|
|
|
266
266
|
const SideBar = (
|
|
267
267
|
<PageSidebar>
|
|
268
|
-
<
|
|
269
|
-
<
|
|
270
|
-
|
|
268
|
+
<div className="pf-v6-c-page__sidebar-main"> {/** TODO: fix with updated React components after https://redhat.atlassian.net/browse/PF-3728 merges */}
|
|
269
|
+
<PageSidebarBody>
|
|
270
|
+
<SideNav navItems={sideNavItems} groupedRoutes={groupedRoutes} />
|
|
271
|
+
</PageSidebarBody>
|
|
272
|
+
</div>
|
|
271
273
|
</PageSidebar>
|
|
272
274
|
);
|
|
273
275
|
|
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.
|
|
4
|
+
"version": "6.37.0",
|
|
5
5
|
"author": "Red Hat",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"bin": {
|
|
@@ -68,11 +68,11 @@
|
|
|
68
68
|
"webpack-merge": "5.10.0"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
|
-
"@patternfly/patternfly": "^6.5.0-prerelease.
|
|
72
|
-
"@patternfly/react-code-editor": "^6.5.0-prerelease.
|
|
73
|
-
"@patternfly/react-core": "^6.5.0-prerelease.
|
|
74
|
-
"@patternfly/react-icons": "^6.5.0-prerelease.
|
|
75
|
-
"@patternfly/react-table": "^6.5.0-prerelease.
|
|
71
|
+
"@patternfly/patternfly": "^6.5.0-prerelease.64",
|
|
72
|
+
"@patternfly/react-code-editor": "^6.5.0-prerelease.52",
|
|
73
|
+
"@patternfly/react-core": "^6.5.0-prerelease.49",
|
|
74
|
+
"@patternfly/react-icons": "^6.5.0-prerelease.20",
|
|
75
|
+
"@patternfly/react-table": "^6.5.0-prerelease.50",
|
|
76
76
|
"react": "^17.0.0 || ^18.0.0",
|
|
77
77
|
"react-dom": "^17.0.0 || ^18.0.0"
|
|
78
78
|
},
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"http-cache-semantics": ">=4.1.1",
|
|
93
93
|
"nanoid": "3.3.8"
|
|
94
94
|
},
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "49ab888825daee558ceee7e683ef61ec137a05a7"
|
|
96
96
|
}
|
|
@@ -8,6 +8,7 @@ const { parse } = require('@patternfly/ast-helpers');
|
|
|
8
8
|
const { capitalize } = require('../../helpers/capitalize');
|
|
9
9
|
const { slugger } = require('../../helpers/slugger');
|
|
10
10
|
const { liveCodeTypes } = require('../../helpers/liveCodeTypes');
|
|
11
|
+
const { stripReactTypeOnlyImports } = require('./stripReactTypeOnlyImports');
|
|
11
12
|
|
|
12
13
|
// Adapted from https://github.com/mdx-js/mdx/blob/next/packages/mdx/mdx-hast-to-jsx.js
|
|
13
14
|
function toJSX(node, parentNode = {}, options = {}) {
|
|
@@ -69,7 +70,9 @@ function serializeRoot(node, options) {
|
|
|
69
70
|
|
|
70
71
|
const importStatements = groups.import
|
|
71
72
|
.map(node => node.value)
|
|
72
|
-
.map(imp => imp.replace(/(['"])\./g, (_, match) => `${match}${getRelPath()}${path.posix.sep}\.`))
|
|
73
|
+
.map(imp => imp.replace(/(['"])\./g, (_, match) => `${match}${getRelPath()}${path.posix.sep}\.`))
|
|
74
|
+
.map(imp => stripReactTypeOnlyImports(imp))
|
|
75
|
+
.filter(Boolean);
|
|
73
76
|
|
|
74
77
|
// Build array of absolute import paths for relative imports
|
|
75
78
|
const relativeImportsRegex = /(import [^'"]*)['"](?:[\.\/]+(?:node_modules\/)?)(@?(?:(?!\.svg|\.jpe?g|\.png).)+)['"][;?]/gm;
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
const { parse } = require('@patternfly/ast-helpers');
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* TypeScript-only names that @types/react declares but the `react` package does not
|
|
5
|
+
* export at runtime. Value-importing them breaks strict ESM linking (e.g. Rspack).
|
|
6
|
+
* @see https://github.com/facebook/react/issues/11503
|
|
7
|
+
*/
|
|
8
|
+
const REACT_TYPE_ONLY_EXPORTS = new Set([
|
|
9
|
+
'AnimationEvent',
|
|
10
|
+
'AriaAttributes',
|
|
11
|
+
'BaseSyntheticEvent',
|
|
12
|
+
'ChangeEvent',
|
|
13
|
+
'ClipboardEvent',
|
|
14
|
+
'ComponentClass',
|
|
15
|
+
'ComponentProps',
|
|
16
|
+
'ComponentPropsWithRef',
|
|
17
|
+
'ComponentPropsWithoutRef',
|
|
18
|
+
'ComponentType',
|
|
19
|
+
'CompositionEvent',
|
|
20
|
+
'CSSProperties',
|
|
21
|
+
'DetailedHTMLProps',
|
|
22
|
+
'Dispatch',
|
|
23
|
+
'DOMAttributes',
|
|
24
|
+
'DragEvent',
|
|
25
|
+
'ElementType',
|
|
26
|
+
'ExoticComponent',
|
|
27
|
+
'FC',
|
|
28
|
+
'FocusEvent',
|
|
29
|
+
'FormEvent',
|
|
30
|
+
'ForwardRefExoticComponent',
|
|
31
|
+
'FunctionComponent',
|
|
32
|
+
'HTMLAttributes',
|
|
33
|
+
'InvalidEvent',
|
|
34
|
+
'JSXElementConstructor',
|
|
35
|
+
'KeyboardEvent',
|
|
36
|
+
'Key',
|
|
37
|
+
'LazyExoticComponent',
|
|
38
|
+
'LegacyRef',
|
|
39
|
+
'MemoExoticComponent',
|
|
40
|
+
'MouseEvent',
|
|
41
|
+
'MutableRefObject',
|
|
42
|
+
'PointerEvent',
|
|
43
|
+
'PropsWithChildren',
|
|
44
|
+
'PropsWithoutRef',
|
|
45
|
+
'PropsWithRef',
|
|
46
|
+
'ReactChangeEvent',
|
|
47
|
+
'ReactChild',
|
|
48
|
+
'ReactElement',
|
|
49
|
+
'ReactFragment',
|
|
50
|
+
'ReactFormEvent',
|
|
51
|
+
'ReactKeyboardEvent',
|
|
52
|
+
'ReactMouseEvent',
|
|
53
|
+
'ReactNode',
|
|
54
|
+
'ReactPointerEvent',
|
|
55
|
+
'ReactPortal',
|
|
56
|
+
'ReactText',
|
|
57
|
+
'Ref',
|
|
58
|
+
'RefAttributes',
|
|
59
|
+
'RefCallback',
|
|
60
|
+
'RefObject',
|
|
61
|
+
'SetStateAction',
|
|
62
|
+
'StyleHTMLAttributes',
|
|
63
|
+
'SVGAttributes',
|
|
64
|
+
'SVGProps',
|
|
65
|
+
'SyntheticEvent',
|
|
66
|
+
'TouchEvent',
|
|
67
|
+
'TransitionEvent',
|
|
68
|
+
'UIEvent',
|
|
69
|
+
'VoidFunctionComponent',
|
|
70
|
+
'VFC',
|
|
71
|
+
'WheelEvent',
|
|
72
|
+
]);
|
|
73
|
+
|
|
74
|
+
function specifierImportedName(spec) {
|
|
75
|
+
if (spec.type !== 'ImportSpecifier') {
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
78
|
+
const id = spec.imported;
|
|
79
|
+
return id.type === 'Identifier' ? id.name : null;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function importDeclarationToSource(decl, specifiers) {
|
|
83
|
+
const srcLiteral = decl.source.raw || JSON.stringify(decl.source.value);
|
|
84
|
+
if (specifiers.length === 0) {
|
|
85
|
+
return '';
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const def = specifiers.find((s) => s.type === 'ImportDefaultSpecifier');
|
|
89
|
+
const ns = specifiers.find((s) => s.type === 'ImportNamespaceSpecifier');
|
|
90
|
+
const named = specifiers.filter((s) => s.type === 'ImportSpecifier');
|
|
91
|
+
|
|
92
|
+
if (ns) {
|
|
93
|
+
return `import * as ${ns.local.name} from ${srcLiteral}`;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
const formatNamed = () =>
|
|
97
|
+
named
|
|
98
|
+
.map((sp) => {
|
|
99
|
+
const imp = sp.imported.name;
|
|
100
|
+
const loc = sp.local.name;
|
|
101
|
+
return imp === loc ? loc : `${imp} as ${loc}`;
|
|
102
|
+
})
|
|
103
|
+
.join(', ');
|
|
104
|
+
|
|
105
|
+
if (def && named.length) {
|
|
106
|
+
return `import ${def.local.name}, { ${formatNamed()} } from ${srcLiteral}`;
|
|
107
|
+
}
|
|
108
|
+
if (def) {
|
|
109
|
+
return `import ${def.local.name} from ${srcLiteral}`;
|
|
110
|
+
}
|
|
111
|
+
return `import { ${formatNamed()} } from ${srcLiteral}`;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function filterReactSpecifiers(decl) {
|
|
115
|
+
if (decl.importKind === 'type') {
|
|
116
|
+
return [];
|
|
117
|
+
}
|
|
118
|
+
return decl.specifiers.filter((spec) => {
|
|
119
|
+
if (spec.type === 'ImportDefaultSpecifier' || spec.type === 'ImportNamespaceSpecifier') {
|
|
120
|
+
return true;
|
|
121
|
+
}
|
|
122
|
+
if (spec.type === 'ImportSpecifier' && spec.importKind === 'type') {
|
|
123
|
+
return false;
|
|
124
|
+
}
|
|
125
|
+
const name = specifierImportedName(spec);
|
|
126
|
+
if (!name) {
|
|
127
|
+
return true;
|
|
128
|
+
}
|
|
129
|
+
return !REACT_TYPE_ONLY_EXPORTS.has(name);
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Removes TypeScript-only specifiers from `import … from 'react'` in MDX import blocks.
|
|
135
|
+
* MDX often provides many import lines in a single node; this handles multi-statement programs.
|
|
136
|
+
*/
|
|
137
|
+
function stripReactTypeOnlyImports(importSource) {
|
|
138
|
+
const trimmed = importSource.trim();
|
|
139
|
+
if (!trimmed || !trimmed.includes('react')) {
|
|
140
|
+
return importSource;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
const toParse = trimmed.endsWith(';') ? trimmed : `${trimmed};`;
|
|
144
|
+
let ast;
|
|
145
|
+
try {
|
|
146
|
+
ast = parse(toParse);
|
|
147
|
+
} catch {
|
|
148
|
+
return importSource;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
if (!ast.body.length) {
|
|
152
|
+
return importSource;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
const pureImports = ast.body.every((stmt) => stmt.type === 'ImportDeclaration');
|
|
156
|
+
if (!pureImports) {
|
|
157
|
+
return stripSingleImportDeclaration(toParse, trimmed, importSource);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
const parts = [];
|
|
161
|
+
for (const stmt of ast.body) {
|
|
162
|
+
if (stmt.type !== 'ImportDeclaration') {
|
|
163
|
+
continue;
|
|
164
|
+
}
|
|
165
|
+
const mod = stmt.source && stmt.source.value;
|
|
166
|
+
if (mod !== 'react') {
|
|
167
|
+
parts.push(toParse.slice(stmt.start, stmt.end));
|
|
168
|
+
continue;
|
|
169
|
+
}
|
|
170
|
+
const filtered = filterReactSpecifiers(stmt);
|
|
171
|
+
if (filtered.length === 0) {
|
|
172
|
+
continue;
|
|
173
|
+
}
|
|
174
|
+
if (filtered.length === stmt.specifiers.length) {
|
|
175
|
+
parts.push(toParse.slice(stmt.start, stmt.end));
|
|
176
|
+
continue;
|
|
177
|
+
}
|
|
178
|
+
const out = importDeclarationToSource(stmt, filtered);
|
|
179
|
+
if (out) {
|
|
180
|
+
parts.push(out.endsWith(';') ? out : `${out};`);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
if (parts.length === 0) {
|
|
185
|
+
return '';
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
return parts.join('\n');
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/** Previous behavior: one import statement per node. */
|
|
192
|
+
function stripSingleImportDeclaration(toParse, trimmed, importSource) {
|
|
193
|
+
if (toParse.length === 0) {
|
|
194
|
+
return importSource;
|
|
195
|
+
}
|
|
196
|
+
let ast;
|
|
197
|
+
try {
|
|
198
|
+
ast = parse(toParse);
|
|
199
|
+
} catch {
|
|
200
|
+
return importSource;
|
|
201
|
+
}
|
|
202
|
+
if (ast.body.length !== 1 || ast.body[0].type !== 'ImportDeclaration') {
|
|
203
|
+
return importSource;
|
|
204
|
+
}
|
|
205
|
+
const decl = ast.body[0];
|
|
206
|
+
if (decl.source.value !== 'react') {
|
|
207
|
+
return importSource;
|
|
208
|
+
}
|
|
209
|
+
if (decl.importKind === 'type') {
|
|
210
|
+
return '';
|
|
211
|
+
}
|
|
212
|
+
const filtered = filterReactSpecifiers(decl);
|
|
213
|
+
if (filtered.length === decl.specifiers.length) {
|
|
214
|
+
return importSource;
|
|
215
|
+
}
|
|
216
|
+
const out = importDeclarationToSource(decl, filtered);
|
|
217
|
+
if (!out) {
|
|
218
|
+
return '';
|
|
219
|
+
}
|
|
220
|
+
const hadSemicolon = /;\s*$/.test(trimmed);
|
|
221
|
+
return hadSemicolon ? `${out};` : out;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
module.exports = {
|
|
225
|
+
stripReactTypeOnlyImports,
|
|
226
|
+
REACT_TYPE_ONLY_EXPORTS,
|
|
227
|
+
};
|
package/versions.json
CHANGED
|
@@ -1,9 +1,36 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Releases": [
|
|
3
|
+
{
|
|
4
|
+
"name": "6.5.0-prerelease.49",
|
|
5
|
+
"date": "2026-04-06",
|
|
6
|
+
"latest": true,
|
|
7
|
+
"versions": {
|
|
8
|
+
"@patternfly/chatbot": "6.6.0-prerelease.6",
|
|
9
|
+
"@patternfly/patternfly": "6.5.0-prerelease.64",
|
|
10
|
+
"@patternfly/quickstarts": "6.5.0-prerelease.4",
|
|
11
|
+
"@patternfly/react-catalog-view-extension": "6.3.0-prerelease.3",
|
|
12
|
+
"@patternfly/react-charts": "8.5.0-prerelease.18",
|
|
13
|
+
"@patternfly/react-code-editor": "6.5.0-prerelease.52",
|
|
14
|
+
"@patternfly/react-component-groups": "6.4.0-prerelease.17",
|
|
15
|
+
"@patternfly/react-console": "6.1.0-prerelease.3",
|
|
16
|
+
"@patternfly/react-core": "6.5.0-prerelease.49",
|
|
17
|
+
"@patternfly/react-data-view": "6.5.0-prerelease.1",
|
|
18
|
+
"@patternfly/react-drag-drop": "6.5.0-prerelease.50",
|
|
19
|
+
"@patternfly/react-icons": "6.5.0-prerelease.20",
|
|
20
|
+
"@patternfly/react-log-viewer": "6.4.0-prerelease.2",
|
|
21
|
+
"@patternfly/react-styles": "6.5.0-prerelease.15",
|
|
22
|
+
"@patternfly/react-table": "6.5.0-prerelease.50",
|
|
23
|
+
"@patternfly/react-templates": "6.5.0-prerelease.49",
|
|
24
|
+
"@patternfly/react-tokens": "6.5.0-prerelease.14",
|
|
25
|
+
"@patternfly/react-topology": "6.5.0-prerelease.4",
|
|
26
|
+
"@patternfly/react-user-feedback": "6.2.0-prerelease.3",
|
|
27
|
+
"@patternfly/react-virtualized-extension": "6.2.0"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
3
30
|
{
|
|
4
31
|
"name": "6.5.0-prerelease.33",
|
|
5
32
|
"date": "2025-12-10",
|
|
6
|
-
"
|
|
33
|
+
"hidden": true,
|
|
7
34
|
"versions": {
|
|
8
35
|
"@patternfly/patternfly": "6.5.0-prerelease.33",
|
|
9
36
|
"@patternfly/react-catalog-view-extension": "6.3.0",
|