@patternfly/patternfly-doc-core 1.16.1 → 1.18.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/.astro/content-modules.mjs +48 -48
- package/dist/apiIndex.json +448 -448
- package/dist/docs/_worker.js/chunks/case_DEd0yJND.mjs +125 -0
- package/dist/docs/_worker.js/chunks/l_flex_item_Order_DmYJ8crs.mjs +8 -0
- package/dist/docs/_worker.js/chunks/t_global_breakpoint_xl_s9TZwYeB.mjs +128 -0
- package/dist/docs/_worker.js/chunks/tokens_BSL29Ypc.mjs +105060 -0
- package/dist/docs/_worker.js/index.js +37 -27
- package/dist/docs/_worker.js/manifest_FGQ-GLjs.mjs +100 -0
- package/dist/docs/_worker.js/pages/api/_version_/_section_/_page_/props.astro.mjs +49 -0
- package/dist/docs/_worker.js/pages/api/_version_/_section_/names.astro.mjs +36 -0
- package/dist/docs/_worker.js/pages/api/_version_/tokens/_category_.astro.mjs +54 -0
- package/dist/docs/_worker.js/pages/api/_version_/tokens/all.astro.mjs +41 -0
- package/dist/docs/_worker.js/pages/api/_version_/tokens.astro.mjs +39 -0
- package/dist/docs/_worker.js/pages/api/openapi.json.astro.mjs +401 -0
- package/dist/docs/_worker.js/pages/api.astro.mjs +70 -0
- package/dist/docs/apiIndex.json +448 -448
- package/dist/docs/components/accordion/react/index.html +10 -10
- package/dist/docs/components/action-list/html/index.html +11 -11
- package/dist/docs/components/action-list/index.html +9 -9
- package/dist/docs/components/action-list/react/index.html +9 -9
- package/dist/docs/components/alert/html/index.html +31 -31
- package/dist/docs/components/alert/index.html +83 -83
- package/dist/docs/components/alert/react/index.html +80 -80
- package/dist/docs/components/avatar/react/index.html +5 -5
- package/dist/docs/components/back-to-top/html/index.html +9 -9
- package/dist/docs/components/back-to-top/index.html +8 -8
- package/dist/docs/components/back-to-top/react/index.html +5 -5
- package/dist/docs/components/backdrop/html/index.html +11 -11
- package/dist/docs/components/backdrop/index.html +6 -6
- package/dist/docs/components/badge/react/index.html +8 -8
- package/dist/docs/components/banner/react/index.html +11 -11
- package/dist/docs/components/brand/html/index.html +13 -13
- package/dist/docs/components/brand/index.html +9 -9
- package/dist/docs/components/breadcrumb/html/index.html +18 -18
- package/dist/docs/components/breadcrumb/index.html +9 -9
- package/dist/docs/components/button/html-demos/index.html +8 -8
- package/dist/docs/components/calendar-month/react/index.html +9 -9
- package/dist/docs/components/card/html/index.html +40 -40
- package/dist/docs/components/card/html-demos/index.html +25 -25
- package/dist/docs/components/card/index.html +55 -55
- package/dist/docs/components/card/react/index.html +52 -52
- package/dist/docs/components/checkbox/html/index.html +21 -21
- package/dist/docs/components/checkbox/index.html +16 -16
- package/dist/docs/components/checkbox/react/index.html +16 -16
- package/dist/docs/components/data-list/html/index.html +41 -41
- package/dist/docs/components/data-list/index.html +24 -24
- package/dist/docs/components/date-picker/html/index.html +14 -14
- package/dist/docs/components/date-picker/index.html +17 -17
- package/dist/docs/components/description-list/html/index.html +44 -44
- package/dist/docs/components/description-list/index.html +39 -39
- package/dist/docs/components/description-list/react/index.html +39 -39
- package/dist/docs/components/divider/html/index.html +21 -21
- package/dist/docs/components/divider/index.html +14 -14
- package/dist/docs/components/divider/react/index.html +11 -11
- package/dist/docs/components/drawer/html/index.html +30 -30
- package/dist/docs/components/drawer/html-demos/index.html +16 -16
- package/dist/docs/components/drawer/index.html +28 -28
- package/dist/docs/components/drawer/react/index.html +28 -28
- package/dist/docs/components/dropdown/index.html +17 -17
- package/dist/docs/components/dropdown/react/index.html +17 -17
- package/dist/docs/components/dual-list-selector/html/index.html +16 -16
- package/dist/docs/components/dual-list-selector/index.html +20 -20
- package/dist/docs/components/dual-list-selector/react-deprecated/index.html +28 -28
- package/dist/docs/components/form/html-demos/index.html +9 -9
- package/dist/docs/components/inline-edit/html/index.html +29 -29
- package/dist/docs/components/inline-edit/index.html +29 -29
- package/dist/docs/components/input-group/html/index.html +12 -12
- package/dist/docs/components/input-group/index.html +12 -12
- package/dist/docs/components/input-group/react/index.html +12 -12
- package/dist/docs/components/jump-links/html-demos/index.html +13 -13
- package/dist/docs/components/jump-links/react/index.html +12 -12
- package/dist/docs/components/label/html/index.html +41 -41
- package/dist/docs/components/label/index.html +25 -25
- package/dist/docs/components/list/html/index.html +16 -16
- package/dist/docs/components/list/index.html +12 -12
- package/dist/docs/components/login-page/html/index.html +17 -17
- package/dist/docs/components/login-page/index.html +13 -13
- package/dist/docs/components/login-page/react/index.html +13 -13
- package/dist/docs/components/masthead/html-demos/index.html +23 -23
- package/dist/docs/components/masthead/react/index.html +18 -18
- package/dist/docs/components/menu/react/index.html +68 -68
- package/dist/docs/components/menu-toggle/react/index.html +66 -66
- package/dist/docs/components/modal/html-demos/index.html +16 -16
- package/dist/docs/components/modal/react-deprecated/index.html +41 -41
- package/dist/docs/components/navigation/html/index.html +29 -29
- package/dist/docs/components/navigation/index.html +21 -21
- package/dist/docs/components/notification-drawer/html/index.html +9 -9
- package/dist/docs/components/notification-drawer/index.html +8 -8
- package/dist/docs/components/number-input/html/index.html +15 -15
- package/dist/docs/components/number-input/index.html +14 -14
- package/dist/docs/components/overflow-menu/html/index.html +21 -21
- package/dist/docs/components/overflow-menu/index.html +12 -12
- package/dist/docs/components/page/html/index.html +18 -18
- package/dist/docs/components/page/index.html +50 -50
- package/dist/docs/components/pagination/html/index.html +20 -20
- package/dist/docs/components/pagination/index.html +17 -17
- package/dist/docs/components/panel/html/index.html +17 -17
- package/dist/docs/components/panel/index.html +25 -25
- package/dist/docs/components/password-strength/html-demos/index.html +10 -10
- package/dist/docs/components/password-strength/index.html +10 -10
- package/dist/docs/components/popover/html/index.html +47 -47
- package/dist/docs/components/popover/index.html +23 -23
- package/dist/docs/components/progress/html/index.html +28 -28
- package/dist/docs/components/progress/index.html +20 -20
- package/dist/docs/components/progress-stepper/html/index.html +24 -24
- package/dist/docs/components/progress-stepper/index.html +13 -13
- package/dist/docs/components/radio/html/index.html +20 -20
- package/dist/docs/components/radio/index.html +15 -15
- package/dist/docs/components/select/index.html +62 -62
- package/dist/docs/components/select/react/index.html +62 -62
- package/dist/docs/components/sidebar/html/index.html +21 -21
- package/dist/docs/components/sidebar/index.html +17 -17
- package/dist/docs/components/sidebar/react/index.html +17 -17
- package/dist/docs/components/simple-list/html/index.html +11 -11
- package/dist/docs/components/simple-list/index.html +9 -9
- package/dist/docs/components/simple-list/react/index.html +9 -9
- package/dist/docs/components/skeleton/html/index.html +13 -13
- package/dist/docs/components/skeleton/html-demos/index.html +6 -6
- package/dist/docs/components/skeleton/index.html +10 -10
- package/dist/docs/components/skeleton/react/index.html +10 -10
- package/dist/docs/components/skip-to-content/html/index.html +13 -13
- package/dist/docs/components/skip-to-content/index.html +6 -6
- package/dist/docs/components/slider/html/index.html +14 -14
- package/dist/docs/components/slider/index.html +22 -22
- package/dist/docs/components/spinner/html/index.html +16 -16
- package/dist/docs/components/spinner/index.html +9 -9
- package/dist/docs/components/switch/html/index.html +14 -14
- package/dist/docs/components/switch/index.html +9 -9
- package/dist/docs/components/switch/react/index.html +9 -9
- package/dist/docs/components/table/html/index.html +132 -132
- package/dist/docs/components/table/html-demos/index.html +33 -33
- package/dist/docs/components/table/index.html +132 -132
- package/dist/docs/components/tabs/html/index.html +64 -64
- package/dist/docs/components/tabs/index.html +74 -74
- package/dist/docs/components/tabs/react/index.html +77 -77
- package/dist/docs/components/text-area/index.html +12 -12
- package/dist/docs/components/text-area/react/index.html +12 -12
- package/dist/docs/components/text-input/index.html +13 -13
- package/dist/docs/components/text-input/react/index.html +13 -13
- package/dist/docs/components/text-input-group/html/index.html +24 -24
- package/dist/docs/components/text-input-group/index.html +13 -13
- package/dist/docs/components/tile/html-deprecated/index.html +14 -14
- package/dist/docs/components/tile/index.html +26 -26
- package/dist/docs/components/tile/react-deprecated/index.html +26 -26
- package/dist/docs/components/timestamp/html/index.html +5 -5
- package/dist/docs/components/timestamp/index.html +18 -18
- package/dist/docs/components/title/html/index.html +13 -13
- package/dist/docs/components/title/index.html +7 -7
- package/dist/docs/components/toggle-group/html/index.html +12 -12
- package/dist/docs/components/toggle-group/index.html +21 -21
- package/dist/docs/components/toolbar/html/index.html +52 -52
- package/dist/docs/components/toolbar/index.html +39 -39
- package/dist/docs/components/tooltip/html/index.html +14 -14
- package/dist/docs/components/tooltip/index.html +9 -9
- package/dist/docs/components/tree-view/html/index.html +18 -18
- package/dist/docs/components/tree-view/index.html +20 -20
- package/dist/docs/components/truncate/html/index.html +10 -10
- package/dist/docs/components/truncate/index.html +10 -10
- package/dist/docs/components/wizard/html/index.html +29 -29
- package/dist/docs/components/wizard/html-demos/index.html +19 -19
- package/dist/docs/components/wizard/index.html +32 -32
- package/dist/docs/components/wizard/react-deprecated/index.html +22 -22
- package/dist/docs/layouts/bullseye/html/index.html +11 -11
- package/dist/docs/layouts/bullseye/index.html +11 -11
- package/dist/docs/layouts/flex/html/index.html +90 -90
- package/dist/docs/layouts/flex/index.html +90 -90
- package/dist/docs/layouts/gallery/html/index.html +17 -17
- package/dist/docs/layouts/gallery/index.html +17 -17
- package/dist/docs/layouts/grid/html/index.html +22 -22
- package/dist/docs/layouts/grid/index.html +22 -22
- package/dist/docs/layouts/level/html/index.html +10 -10
- package/dist/docs/layouts/level/index.html +10 -10
- package/dist/docs/layouts/split/html/index.html +13 -13
- package/dist/docs/layouts/split/index.html +13 -13
- package/dist/docs/layouts/stack/html/index.html +12 -12
- package/dist/docs/layouts/stack/index.html +12 -12
- package/dist/docs/patterns/primary-detail/html-demos/index.html +17 -17
- package/dist/docs/patterns/primary-detail/index.html +17 -17
- package/dist/docs/utility-classes/accessibility/html/index.html +11 -11
- package/dist/docs/utility-classes/accessibility/index.html +11 -11
- package/dist/docs/utility-classes/alignment/html/index.html +10 -10
- package/dist/docs/utility-classes/alignment/index.html +10 -10
- package/dist/docs/utility-classes/background-color/html/index.html +12 -12
- package/dist/docs/utility-classes/background-color/index.html +12 -12
- package/dist/docs/utility-classes/box-shadow/html/index.html +9 -9
- package/dist/docs/utility-classes/box-shadow/index.html +9 -9
- package/dist/docs/utility-classes/display/html/index.html +15 -15
- package/dist/docs/utility-classes/display/index.html +15 -15
- package/dist/docs/utility-classes/flex/html/index.html +20 -20
- package/dist/docs/utility-classes/flex/index.html +20 -20
- package/dist/docs/utility-classes/float/html/index.html +10 -10
- package/dist/docs/utility-classes/float/index.html +10 -10
- package/dist/docs/utility-classes/sizing/html/index.html +31 -31
- package/dist/docs/utility-classes/sizing/index.html +31 -31
- package/dist/docs/utility-classes/spacing/html/index.html +15 -15
- package/dist/docs/utility-classes/spacing/index.html +15 -15
- package/dist/docs/utility-classes/text/html/index.html +21 -21
- package/dist/docs/utility-classes/text/index.html +21 -21
- package/package.json +1 -1
- package/src/pages/api/[version]/[section]/[page]/props.ts +49 -0
- package/src/pages/api/[version]/[section]/names.ts +32 -0
- package/src/pages/api/[version]/tokens/[category].ts +56 -0
- package/src/pages/api/[version]/tokens/all.ts +41 -0
- package/src/pages/api/[version]/tokens.ts +32 -0
- package/src/pages/api/index.ts +70 -0
- package/src/pages/api/openapi.json.ts +413 -6
- package/src/utils/tokens.ts +123 -0
- package/dist/docs/_worker.js/manifest_D3UQg5C2.mjs +0 -100
- /package/dist/docs/_worker.js/chunks/{_astro_data-layer-content_A2tQyjTY.mjs → _astro_data-layer-content_CyRgJrZy.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{content-modules_BcmOmccw.mjs → content-modules_C8p165SU.mjs} +0 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
globalThis.process ??= {}; globalThis.process.env ??= {};
|
|
2
|
+
import { c as createJsonResponse } from '../../../../../chunks/apiHelpers_CD8DANYs.mjs';
|
|
3
|
+
import { g as getConfig } from '../../../../../chunks/getConfig_DO3RhTb7.mjs';
|
|
4
|
+
import { join } from 'node:path';
|
|
5
|
+
import { readFileSync } from 'node:fs';
|
|
6
|
+
import { s as sentenceCase } from '../../../../../chunks/case_DEd0yJND.mjs';
|
|
7
|
+
export { r as renderers } from '../../../../../chunks/_@astro-renderers_OzpRq-hZ.mjs';
|
|
8
|
+
|
|
9
|
+
const prerender = false;
|
|
10
|
+
const GET = async ({ params }) => {
|
|
11
|
+
const { page } = params;
|
|
12
|
+
if (!page) {
|
|
13
|
+
return createJsonResponse(
|
|
14
|
+
{ error: "Page parameter is required" },
|
|
15
|
+
400
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
try {
|
|
19
|
+
const config = await getConfig(`${process.cwd()}/pf-docs.config.mjs`);
|
|
20
|
+
const outputDir = config?.outputDir || join(process.cwd(), "dist");
|
|
21
|
+
const propsFilePath = join(outputDir, "props.json");
|
|
22
|
+
const propsDataFile = readFileSync(propsFilePath);
|
|
23
|
+
const props = JSON.parse(propsDataFile.toString());
|
|
24
|
+
const propsData = props[sentenceCase(page)];
|
|
25
|
+
if (propsData === void 0) {
|
|
26
|
+
return createJsonResponse(
|
|
27
|
+
{ error: `Props data for ${page} not found` },
|
|
28
|
+
404
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
return createJsonResponse(propsData);
|
|
32
|
+
} catch (error) {
|
|
33
|
+
const details = error instanceof Error ? error.message : String(error);
|
|
34
|
+
return createJsonResponse(
|
|
35
|
+
{ error: "Props data not found", details },
|
|
36
|
+
500
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const _page = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
42
|
+
__proto__: null,
|
|
43
|
+
GET,
|
|
44
|
+
prerender
|
|
45
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
46
|
+
|
|
47
|
+
const page = () => _page;
|
|
48
|
+
|
|
49
|
+
export { page };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
globalThis.process ??= {}; globalThis.process.env ??= {};
|
|
2
|
+
import { c as createJsonResponse } from '../../../../chunks/apiHelpers_CD8DANYs.mjs';
|
|
3
|
+
import { g as getConfig } from '../../../../chunks/getConfig_DO3RhTb7.mjs';
|
|
4
|
+
import { join } from 'node:path';
|
|
5
|
+
import { readFileSync } from 'node:fs';
|
|
6
|
+
export { r as renderers } from '../../../../chunks/_@astro-renderers_OzpRq-hZ.mjs';
|
|
7
|
+
|
|
8
|
+
const prerender = false;
|
|
9
|
+
const GET = async ({}) => {
|
|
10
|
+
try {
|
|
11
|
+
const config = await getConfig(`${process.cwd()}/pf-docs.config.mjs`);
|
|
12
|
+
const outputDir = config?.outputDir || join(process.cwd(), "dist");
|
|
13
|
+
const propsFilePath = join(outputDir, "props.json");
|
|
14
|
+
const propsDataFile = readFileSync(propsFilePath);
|
|
15
|
+
const props = JSON.parse(propsDataFile.toString());
|
|
16
|
+
const propsKey = new RegExp("Props", "i");
|
|
17
|
+
const names = Object.keys(props).filter((name) => !propsKey.test(name));
|
|
18
|
+
return createJsonResponse(names);
|
|
19
|
+
} catch (error) {
|
|
20
|
+
const details = error instanceof Error ? error.message : String(error);
|
|
21
|
+
return createJsonResponse(
|
|
22
|
+
{ error: "Component names data not found", details },
|
|
23
|
+
500
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const _page = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
29
|
+
__proto__: null,
|
|
30
|
+
GET,
|
|
31
|
+
prerender
|
|
32
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
33
|
+
|
|
34
|
+
const page = () => _page;
|
|
35
|
+
|
|
36
|
+
export { page };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
globalThis.process ??= {}; globalThis.process.env ??= {};
|
|
2
|
+
import { c as createJsonResponse } from '../../../../chunks/apiHelpers_CD8DANYs.mjs';
|
|
3
|
+
import { f as fetchApiIndex } from '../../../../chunks/fetch_CoXtH9RF.mjs';
|
|
4
|
+
import { a as getTokensForCategory, b as getTokenCategories, c as filterTokens } from '../../../../chunks/tokens_BSL29Ypc.mjs';
|
|
5
|
+
export { r as renderers } from '../../../../chunks/_@astro-renderers_OzpRq-hZ.mjs';
|
|
6
|
+
|
|
7
|
+
const prerender = false;
|
|
8
|
+
const GET = async ({ params, url }) => {
|
|
9
|
+
const { version, category } = params;
|
|
10
|
+
if (!version || !category) {
|
|
11
|
+
return createJsonResponse(
|
|
12
|
+
{ error: "Version and category parameters are required" },
|
|
13
|
+
400
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
try {
|
|
17
|
+
const index = await fetchApiIndex(url);
|
|
18
|
+
if (!index.versions.includes(version)) {
|
|
19
|
+
return createJsonResponse(
|
|
20
|
+
{ error: `Version '${version}' not found` },
|
|
21
|
+
404
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
const tokens = getTokensForCategory(category);
|
|
25
|
+
if (!tokens) {
|
|
26
|
+
const validCategories = getTokenCategories();
|
|
27
|
+
return createJsonResponse(
|
|
28
|
+
{
|
|
29
|
+
error: `Category '${category}' not found`,
|
|
30
|
+
validCategories
|
|
31
|
+
},
|
|
32
|
+
404
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
const filterParam = url.searchParams.get("filter");
|
|
36
|
+
const filteredTokens = filterParam ? filterTokens(tokens, filterParam) : tokens;
|
|
37
|
+
return createJsonResponse(filteredTokens);
|
|
38
|
+
} catch (error) {
|
|
39
|
+
return createJsonResponse(
|
|
40
|
+
{ error: "Failed to load tokens", details: error },
|
|
41
|
+
500
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const _page = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
47
|
+
__proto__: null,
|
|
48
|
+
GET,
|
|
49
|
+
prerender
|
|
50
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
51
|
+
|
|
52
|
+
const page = () => _page;
|
|
53
|
+
|
|
54
|
+
export { page };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
globalThis.process ??= {}; globalThis.process.env ??= {};
|
|
2
|
+
import { c as createJsonResponse } from '../../../../chunks/apiHelpers_CD8DANYs.mjs';
|
|
3
|
+
import { f as fetchApiIndex } from '../../../../chunks/fetch_CoXtH9RF.mjs';
|
|
4
|
+
import { g as getTokensByCategory, f as filterTokensByCategory } from '../../../../chunks/tokens_BSL29Ypc.mjs';
|
|
5
|
+
export { r as renderers } from '../../../../chunks/_@astro-renderers_OzpRq-hZ.mjs';
|
|
6
|
+
|
|
7
|
+
const prerender = false;
|
|
8
|
+
const GET = async ({ params, url }) => {
|
|
9
|
+
const { version } = params;
|
|
10
|
+
if (!version) {
|
|
11
|
+
return createJsonResponse({ error: "Version parameter is required" }, 400);
|
|
12
|
+
}
|
|
13
|
+
try {
|
|
14
|
+
const index = await fetchApiIndex(url);
|
|
15
|
+
if (!index.versions.includes(version)) {
|
|
16
|
+
return createJsonResponse(
|
|
17
|
+
{ error: `Version '${version}' not found` },
|
|
18
|
+
404
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
const tokensByCategory = getTokensByCategory();
|
|
22
|
+
const filterParam = url.searchParams.get("filter");
|
|
23
|
+
const filteredTokens = filterParam ? filterTokensByCategory(tokensByCategory, filterParam) : tokensByCategory;
|
|
24
|
+
return createJsonResponse(filteredTokens);
|
|
25
|
+
} catch (error) {
|
|
26
|
+
return createJsonResponse(
|
|
27
|
+
{ error: "Failed to load tokens", details: error },
|
|
28
|
+
500
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const _page = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
34
|
+
__proto__: null,
|
|
35
|
+
GET,
|
|
36
|
+
prerender
|
|
37
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
38
|
+
|
|
39
|
+
const page = () => _page;
|
|
40
|
+
|
|
41
|
+
export { page };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
globalThis.process ??= {}; globalThis.process.env ??= {};
|
|
2
|
+
import { c as createJsonResponse } from '../../../chunks/apiHelpers_CD8DANYs.mjs';
|
|
3
|
+
import { f as fetchApiIndex } from '../../../chunks/fetch_CoXtH9RF.mjs';
|
|
4
|
+
import { b as getTokenCategories } from '../../../chunks/tokens_BSL29Ypc.mjs';
|
|
5
|
+
export { r as renderers } from '../../../chunks/_@astro-renderers_OzpRq-hZ.mjs';
|
|
6
|
+
|
|
7
|
+
const prerender = false;
|
|
8
|
+
const GET = async ({ params, url }) => {
|
|
9
|
+
const { version } = params;
|
|
10
|
+
if (!version) {
|
|
11
|
+
return createJsonResponse({ error: "Version parameter is required" }, 400);
|
|
12
|
+
}
|
|
13
|
+
try {
|
|
14
|
+
const index = await fetchApiIndex(url);
|
|
15
|
+
if (!index.versions.includes(version)) {
|
|
16
|
+
return createJsonResponse(
|
|
17
|
+
{ error: `Version '${version}' not found` },
|
|
18
|
+
404
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
const categories = getTokenCategories();
|
|
22
|
+
return createJsonResponse(categories);
|
|
23
|
+
} catch (error) {
|
|
24
|
+
return createJsonResponse(
|
|
25
|
+
{ error: "Failed to load tokens", details: error },
|
|
26
|
+
500
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const _page = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
32
|
+
__proto__: null,
|
|
33
|
+
GET,
|
|
34
|
+
prerender
|
|
35
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
36
|
+
|
|
37
|
+
const page = () => _page;
|
|
38
|
+
|
|
39
|
+
export { page };
|
|
@@ -219,6 +219,70 @@ const GET = async ({ url }) => {
|
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
221
|
},
|
|
222
|
+
"/{version}/{section}/names": {
|
|
223
|
+
get: {
|
|
224
|
+
summary: "Get component names",
|
|
225
|
+
description: "Returns the component names that have props data",
|
|
226
|
+
operationId: "getNames",
|
|
227
|
+
parameters: [
|
|
228
|
+
{
|
|
229
|
+
name: "version",
|
|
230
|
+
in: "path",
|
|
231
|
+
required: true,
|
|
232
|
+
description: "Documentation version",
|
|
233
|
+
schema: {
|
|
234
|
+
type: "string",
|
|
235
|
+
enum: versions
|
|
236
|
+
},
|
|
237
|
+
example: "v6"
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
name: "section",
|
|
241
|
+
in: "path",
|
|
242
|
+
required: true,
|
|
243
|
+
description: "Documentation section",
|
|
244
|
+
schema: {
|
|
245
|
+
type: "string"
|
|
246
|
+
},
|
|
247
|
+
example: "components"
|
|
248
|
+
}
|
|
249
|
+
],
|
|
250
|
+
responses: {
|
|
251
|
+
"200": {
|
|
252
|
+
description: "Component names with props data",
|
|
253
|
+
content: {
|
|
254
|
+
"application/json": {
|
|
255
|
+
schema: {
|
|
256
|
+
type: "array",
|
|
257
|
+
items: {
|
|
258
|
+
type: "string"
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
example: [
|
|
262
|
+
"Alert",
|
|
263
|
+
"AlertGroup"
|
|
264
|
+
]
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
"404": {
|
|
269
|
+
description: "Props not found",
|
|
270
|
+
content: {
|
|
271
|
+
"application/json": {
|
|
272
|
+
schema: {
|
|
273
|
+
type: "object",
|
|
274
|
+
properties: {
|
|
275
|
+
error: {
|
|
276
|
+
type: "string"
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
},
|
|
222
286
|
"/{version}/{section}/{page}": {
|
|
223
287
|
get: {
|
|
224
288
|
summary: "List tabs for a page",
|
|
@@ -290,6 +354,100 @@ const GET = async ({ url }) => {
|
|
|
290
354
|
}
|
|
291
355
|
}
|
|
292
356
|
},
|
|
357
|
+
"/{version}/{section}/{page}/props": {
|
|
358
|
+
get: {
|
|
359
|
+
summary: "Get component props",
|
|
360
|
+
description: "Returns the props for the specified component",
|
|
361
|
+
operationId: "getProps",
|
|
362
|
+
parameters: [
|
|
363
|
+
{
|
|
364
|
+
name: "version",
|
|
365
|
+
in: "path",
|
|
366
|
+
required: true,
|
|
367
|
+
description: "Documentation version",
|
|
368
|
+
schema: {
|
|
369
|
+
type: "string",
|
|
370
|
+
enum: versions
|
|
371
|
+
},
|
|
372
|
+
example: "v6"
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
name: "section",
|
|
376
|
+
in: "path",
|
|
377
|
+
required: true,
|
|
378
|
+
description: "Documentation section",
|
|
379
|
+
schema: {
|
|
380
|
+
type: "string"
|
|
381
|
+
},
|
|
382
|
+
example: "components"
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
name: "page",
|
|
386
|
+
in: "path",
|
|
387
|
+
required: true,
|
|
388
|
+
description: "Page ID (kebab-cased)",
|
|
389
|
+
schema: {
|
|
390
|
+
type: "string"
|
|
391
|
+
},
|
|
392
|
+
example: "alert"
|
|
393
|
+
}
|
|
394
|
+
],
|
|
395
|
+
responses: {
|
|
396
|
+
"200": {
|
|
397
|
+
description: "Props for the specified component",
|
|
398
|
+
content: {
|
|
399
|
+
"application/json": {
|
|
400
|
+
schema: {
|
|
401
|
+
type: "array",
|
|
402
|
+
items: {
|
|
403
|
+
type: "object",
|
|
404
|
+
properties: {
|
|
405
|
+
name: { type: "string" },
|
|
406
|
+
type: { type: "string" },
|
|
407
|
+
description: { type: "string" },
|
|
408
|
+
defaultValue: { type: "string" }
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
example: [
|
|
413
|
+
{
|
|
414
|
+
name: "actionClose",
|
|
415
|
+
type: "React.ReactNode",
|
|
416
|
+
description: "Close button; use the alert action close button component."
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
name: "actionLinks",
|
|
420
|
+
type: "React.ReactNode",
|
|
421
|
+
description: "Action links; use a single alert action link component or multiple wrapped in an array\nor React fragment."
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
name: "children",
|
|
425
|
+
type: "React.ReactNode",
|
|
426
|
+
description: "Content rendered inside the alert.",
|
|
427
|
+
defaultValue: "''"
|
|
428
|
+
}
|
|
429
|
+
]
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
},
|
|
433
|
+
"404": {
|
|
434
|
+
description: "Props not found",
|
|
435
|
+
content: {
|
|
436
|
+
"application/json": {
|
|
437
|
+
schema: {
|
|
438
|
+
type: "object",
|
|
439
|
+
properties: {
|
|
440
|
+
error: {
|
|
441
|
+
type: "string"
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
},
|
|
293
451
|
"/{version}/{section}/{page}/{tab}": {
|
|
294
452
|
get: {
|
|
295
453
|
summary: "Validate and redirect to text endpoint",
|
|
@@ -621,6 +779,249 @@ export const AlertBasic = () => <Alert title="Basic alert" />;`
|
|
|
621
779
|
}
|
|
622
780
|
}
|
|
623
781
|
}
|
|
782
|
+
},
|
|
783
|
+
"/{version}/tokens": {
|
|
784
|
+
get: {
|
|
785
|
+
summary: "List token categories",
|
|
786
|
+
description: "Returns an alphabetically sorted array of available design token categories from @patternfly/react-tokens. Categories are determined by token name prefixes (e.g., c_, t_, chart_). Optimized for MCP/LLM consumption.",
|
|
787
|
+
operationId: "getTokenCategories",
|
|
788
|
+
parameters: [
|
|
789
|
+
{
|
|
790
|
+
name: "version",
|
|
791
|
+
in: "path",
|
|
792
|
+
required: true,
|
|
793
|
+
description: "Documentation version",
|
|
794
|
+
schema: {
|
|
795
|
+
type: "string",
|
|
796
|
+
enum: versions
|
|
797
|
+
},
|
|
798
|
+
example: "v6"
|
|
799
|
+
}
|
|
800
|
+
],
|
|
801
|
+
responses: {
|
|
802
|
+
"200": {
|
|
803
|
+
description: "List of token categories",
|
|
804
|
+
content: {
|
|
805
|
+
"application/json": {
|
|
806
|
+
schema: {
|
|
807
|
+
type: "array",
|
|
808
|
+
items: {
|
|
809
|
+
type: "string"
|
|
810
|
+
}
|
|
811
|
+
},
|
|
812
|
+
example: ["c", "chart", "global", "hidden", "l", "t"]
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
},
|
|
816
|
+
"404": {
|
|
817
|
+
description: "Version not found",
|
|
818
|
+
content: {
|
|
819
|
+
"application/json": {
|
|
820
|
+
schema: {
|
|
821
|
+
type: "object",
|
|
822
|
+
properties: {
|
|
823
|
+
error: {
|
|
824
|
+
type: "string"
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
},
|
|
834
|
+
"/{version}/tokens/{category}": {
|
|
835
|
+
get: {
|
|
836
|
+
summary: "Get tokens for a category",
|
|
837
|
+
description: "Returns design tokens for a specific category with optional filtering. Each token includes name (CSS variable name), value (resolved value), and var (CSS var() reference). Use the filter query parameter for case-insensitive substring matching to minimize response size.",
|
|
838
|
+
operationId: "getTokensByCategory",
|
|
839
|
+
parameters: [
|
|
840
|
+
{
|
|
841
|
+
name: "version",
|
|
842
|
+
in: "path",
|
|
843
|
+
required: true,
|
|
844
|
+
description: "Documentation version",
|
|
845
|
+
schema: {
|
|
846
|
+
type: "string",
|
|
847
|
+
enum: versions
|
|
848
|
+
},
|
|
849
|
+
example: "v6"
|
|
850
|
+
},
|
|
851
|
+
{
|
|
852
|
+
name: "category",
|
|
853
|
+
in: "path",
|
|
854
|
+
required: true,
|
|
855
|
+
description: "Token category (e.g., c, t, chart)",
|
|
856
|
+
schema: {
|
|
857
|
+
type: "string"
|
|
858
|
+
},
|
|
859
|
+
example: "c"
|
|
860
|
+
},
|
|
861
|
+
{
|
|
862
|
+
name: "filter",
|
|
863
|
+
in: "query",
|
|
864
|
+
required: false,
|
|
865
|
+
description: "Case-insensitive substring filter to match against token names",
|
|
866
|
+
schema: {
|
|
867
|
+
type: "string"
|
|
868
|
+
},
|
|
869
|
+
example: "alert"
|
|
870
|
+
}
|
|
871
|
+
],
|
|
872
|
+
responses: {
|
|
873
|
+
"200": {
|
|
874
|
+
description: "Array of tokens matching the criteria",
|
|
875
|
+
content: {
|
|
876
|
+
"application/json": {
|
|
877
|
+
schema: {
|
|
878
|
+
type: "array",
|
|
879
|
+
items: {
|
|
880
|
+
type: "object",
|
|
881
|
+
properties: {
|
|
882
|
+
name: {
|
|
883
|
+
type: "string",
|
|
884
|
+
description: "CSS variable name"
|
|
885
|
+
},
|
|
886
|
+
value: {
|
|
887
|
+
type: "string",
|
|
888
|
+
description: "Resolved CSS value"
|
|
889
|
+
},
|
|
890
|
+
var: {
|
|
891
|
+
type: "string",
|
|
892
|
+
description: "CSS var() reference"
|
|
893
|
+
}
|
|
894
|
+
},
|
|
895
|
+
required: ["name", "value", "var"]
|
|
896
|
+
}
|
|
897
|
+
},
|
|
898
|
+
example: [
|
|
899
|
+
{
|
|
900
|
+
name: "--pf-v6-c-alert--Color",
|
|
901
|
+
value: "#000",
|
|
902
|
+
var: "var(--pf-v6-c-alert--Color)"
|
|
903
|
+
}
|
|
904
|
+
]
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
},
|
|
908
|
+
"404": {
|
|
909
|
+
description: "Category not found",
|
|
910
|
+
content: {
|
|
911
|
+
"application/json": {
|
|
912
|
+
schema: {
|
|
913
|
+
type: "object",
|
|
914
|
+
properties: {
|
|
915
|
+
error: {
|
|
916
|
+
type: "string"
|
|
917
|
+
},
|
|
918
|
+
validCategories: {
|
|
919
|
+
type: "array",
|
|
920
|
+
items: {
|
|
921
|
+
type: "string"
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
},
|
|
932
|
+
"/{version}/tokens/all": {
|
|
933
|
+
get: {
|
|
934
|
+
summary: "Get all tokens grouped by category",
|
|
935
|
+
description: "Returns all design tokens organized by category with optional filtering. Use the filter query parameter to minimize response size for MCP/LLM consumption. Empty categories are excluded from filtered results.",
|
|
936
|
+
operationId: "getAllTokens",
|
|
937
|
+
parameters: [
|
|
938
|
+
{
|
|
939
|
+
name: "version",
|
|
940
|
+
in: "path",
|
|
941
|
+
required: true,
|
|
942
|
+
description: "Documentation version",
|
|
943
|
+
schema: {
|
|
944
|
+
type: "string",
|
|
945
|
+
enum: versions
|
|
946
|
+
},
|
|
947
|
+
example: "v6"
|
|
948
|
+
},
|
|
949
|
+
{
|
|
950
|
+
name: "filter",
|
|
951
|
+
in: "query",
|
|
952
|
+
required: false,
|
|
953
|
+
description: "Case-insensitive substring filter to match against token names across all categories",
|
|
954
|
+
schema: {
|
|
955
|
+
type: "string"
|
|
956
|
+
},
|
|
957
|
+
example: "color"
|
|
958
|
+
}
|
|
959
|
+
],
|
|
960
|
+
responses: {
|
|
961
|
+
"200": {
|
|
962
|
+
description: "Object with category keys and token arrays as values",
|
|
963
|
+
content: {
|
|
964
|
+
"application/json": {
|
|
965
|
+
schema: {
|
|
966
|
+
type: "object",
|
|
967
|
+
additionalProperties: {
|
|
968
|
+
type: "array",
|
|
969
|
+
items: {
|
|
970
|
+
type: "object",
|
|
971
|
+
properties: {
|
|
972
|
+
name: {
|
|
973
|
+
type: "string",
|
|
974
|
+
description: "CSS variable name"
|
|
975
|
+
},
|
|
976
|
+
value: {
|
|
977
|
+
type: "string",
|
|
978
|
+
description: "Resolved CSS value"
|
|
979
|
+
},
|
|
980
|
+
var: {
|
|
981
|
+
type: "string",
|
|
982
|
+
description: "CSS var() reference"
|
|
983
|
+
}
|
|
984
|
+
},
|
|
985
|
+
required: ["name", "value", "var"]
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
},
|
|
989
|
+
example: {
|
|
990
|
+
c: [
|
|
991
|
+
{
|
|
992
|
+
name: "--pf-v6-c-alert--Color",
|
|
993
|
+
value: "#000",
|
|
994
|
+
var: "var(--pf-v6-c-alert--Color)"
|
|
995
|
+
}
|
|
996
|
+
],
|
|
997
|
+
t: [
|
|
998
|
+
{
|
|
999
|
+
name: "--pf-v6-t-global--Color",
|
|
1000
|
+
value: "#333",
|
|
1001
|
+
var: "var(--pf-v6-t-global--Color)"
|
|
1002
|
+
}
|
|
1003
|
+
]
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
},
|
|
1008
|
+
"404": {
|
|
1009
|
+
description: "Version not found",
|
|
1010
|
+
content: {
|
|
1011
|
+
"application/json": {
|
|
1012
|
+
schema: {
|
|
1013
|
+
type: "object",
|
|
1014
|
+
properties: {
|
|
1015
|
+
error: {
|
|
1016
|
+
type: "string"
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
624
1025
|
}
|
|
625
1026
|
},
|
|
626
1027
|
tags: [
|