@patternfly/patternfly-doc-core 1.9.1 → 1.10.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/cli/convertToMDX.ts +77 -22
- package/dist/cli/convertToMDX.js +53 -16
- package/dist/client/_astro/{LiveExample.DZkxbJA_.js → LiveExample.DjPiO80i.js} +1 -1
- package/dist/client/components/accordion/index.html +10 -10
- package/dist/client/components/accordion/react/index.html +10 -10
- package/dist/client/components/all-components/index.html +6 -6
- package/dist/client/design-foundations/typography/index.html +6 -6
- package/dist/client/design-foundations/usage-and-behavior/index.html +6 -6
- package/dist/client/get-started/contribute/index.html +6 -6
- package/dist/server/entry.mjs +1 -1
- package/dist/server/{manifest_DxJLmW-j.mjs → manifest_DsbMfV1U.mjs} +1 -1
- package/package.json +1 -1
- package/src/components/LiveExample.astro +2 -2
- package/src/components/LiveExample.tsx +38 -9
|
@@ -91,10 +91,10 @@
|
|
|
91
91
|
<p>Our website documentation is contained in the <a href="https://github.com/patternfly/patternfly-org">patternfly-org repository</a>. If you find an issue that you’d like to work on, leave a comment and someone from our team will reach out to you with next steps.</p>
|
|
92
92
|
<h3 id="design-guidelines">Design guidelines</h3>
|
|
93
93
|
<p>Our design guidelines are found across our component, layout, chart, and pattern web pages. These guides clarify usage details to help designers follow best practices to create strong UI solutions.</p>
|
|
94
|
-
<p>If you’d like to contribute to our design guidelines, you can open an issue in <a href="https://github.com/patternfly/patternfly-org">patternfly-org</a> to propose a new page or updates to an existing page. From there, our team will work with you to author and publish your new content.</p> <div class="pf-v6-l-stack pf-m-gutter"> <div class="pf-v6-l-stack__item"> <!--[if astro]>server-island-start<![endif]--><link rel="preload" as="fetch" href="/_server-islands/PropsTables?e=default&p=
|
|
95
|
-
let script = document.querySelector('script[data-island-id="
|
|
94
|
+
<p>If you’d like to contribute to our design guidelines, you can open an issue in <a href="https://github.com/patternfly/patternfly-org">patternfly-org</a> to propose a new page or updates to an existing page. From there, our team will work with you to author and publish your new content.</p> <div class="pf-v6-l-stack pf-m-gutter"> <div class="pf-v6-l-stack__item"> <!--[if astro]>server-island-start<![endif]--><link rel="preload" as="fetch" href="/_server-islands/PropsTables?e=default&p=1C80427E44E1E078747BBECBmyyyhBqJ26hjxSRlVLoPPNyh8a4C5u3LWu7QPZqkokzB3TeN75U83IIgszWjDxjjMnDf4RXvdaD2bHAbBZP3yQ%3D%3D&s=%7B%7D" crossorigin="anonymous"><script async type="module" data-island-id="a93825d1-d168-4455-99c8-35ca5b095a59">
|
|
95
|
+
let script = document.querySelector('script[data-island-id="a93825d1-d168-4455-99c8-35ca5b095a59"]');
|
|
96
96
|
|
|
97
|
-
let response = await fetch('/_server-islands/PropsTables?e=default&p=
|
|
97
|
+
let response = await fetch('/_server-islands/PropsTables?e=default&p=1C80427E44E1E078747BBECBmyyyhBqJ26hjxSRlVLoPPNyh8a4C5u3LWu7QPZqkokzB3TeN75U83IIgszWjDxjjMnDf4RXvdaD2bHAbBZP3yQ%3D%3D&s=%7B%7D');
|
|
98
98
|
|
|
99
99
|
if (script) {
|
|
100
100
|
if(
|
|
@@ -116,10 +116,10 @@ if (script) {
|
|
|
116
116
|
}
|
|
117
117
|
script.remove();
|
|
118
118
|
}
|
|
119
|
-
</script> </div> <div class="pf-v6-l-stack__item"> <!--[if astro]>server-island-start<![endif]--><link rel="preload" as="fetch" href="/_server-islands/CSSTable?e=default&p=
|
|
120
|
-
let script = document.querySelector('script[data-island-id="
|
|
119
|
+
</script> </div> <div class="pf-v6-l-stack__item"> <!--[if astro]>server-island-start<![endif]--><link rel="preload" as="fetch" href="/_server-islands/CSSTable?e=default&p=9B9FC81388F31262E739F3263BjmVDGqoLOSZ0jumaKDWci6DTVleDRUETUkUBfeCJeF0tvsdIcXOo1QmMP%2Blvom26b3jSwmLoQF&s=%7B%7D" crossorigin="anonymous"><script async type="module" data-island-id="155f0b16-bfe3-4089-a5e2-c599b67bcd95">
|
|
120
|
+
let script = document.querySelector('script[data-island-id="155f0b16-bfe3-4089-a5e2-c599b67bcd95"]');
|
|
121
121
|
|
|
122
|
-
let response = await fetch('/_server-islands/CSSTable?e=default&p=
|
|
122
|
+
let response = await fetch('/_server-islands/CSSTable?e=default&p=9B9FC81388F31262E739F3263BjmVDGqoLOSZ0jumaKDWci6DTVleDRUETUkUBfeCJeF0tvsdIcXOo1QmMP%2Blvom26b3jSwmLoQF&s=%7B%7D');
|
|
123
123
|
|
|
124
124
|
if (script) {
|
|
125
125
|
if(
|
package/dist/server/entry.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { renderers } from './renderers.mjs';
|
|
2
2
|
import { c as createExports, s as serverEntrypointModule } from './chunks/_@astrojs-ssr-adapter_CbICuCdt.mjs';
|
|
3
|
-
import { manifest } from './
|
|
3
|
+
import { manifest } from './manifest_DsbMfV1U.mjs';
|
|
4
4
|
|
|
5
5
|
const serverIslandMap = new Map([
|
|
6
6
|
['PropsTables', () => import('./chunks/PropsTables_PVzRHJNB.mjs')],
|
|
@@ -96,7 +96,7 @@ function deserializeManifest(serializedManifest) {
|
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
const manifest = deserializeManifest({"hrefRoot":"file:///home/runner/work/patternfly-doc-core/patternfly-doc-core/","cacheDir":"file:///home/runner/work/patternfly-doc-core/patternfly-doc-core/node_modules/.astro/","outDir":"file:///home/runner/work/patternfly-doc-core/patternfly-doc-core/dist/","srcDir":"file:///home/runner/work/patternfly-doc-core/patternfly-doc-core/src/","publicDir":"file:///home/runner/work/patternfly-doc-core/patternfly-doc-core/public/","buildClientDir":"file:///home/runner/work/patternfly-doc-core/patternfly-doc-core/dist/client/","buildServerDir":"file:///home/runner/work/patternfly-doc-core/patternfly-doc-core/dist/server/","adapterName":"@astrojs/node","routes":[{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"type":"page","component":"_server-islands.astro","params":["name"],"segments":[[{"content":"_server-islands","dynamic":false,"spread":false}],[{"content":"name","dynamic":true,"spread":false}]],"pattern":"^\\/_server-islands\\/([^/]+?)\\/?$","prerender":false,"isIndex":false,"fallbackRoutes":[],"route":"/_server-islands/[name]","origin":"internal","_meta":{"trailingSlash":"ignore"}}},{"file":"index.html","links":[],"scripts":[],"styles":[],"routeData":{"route":"/","isIndex":true,"type":"page","pattern":"^\\/$","segments":[],"params":[],"component":"src/pages/index.astro","pathname":"/","prerender":true,"fallbackRoutes":[],"distURL":[],"origin":"project","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"type":"endpoint","isIndex":false,"route":"/_image","pattern":"^\\/_image\\/?$","segments":[[{"content":"_image","dynamic":false,"spread":false}]],"params":[],"component":"node_modules/astro/dist/assets/endpoint/node.js","pathname":"/_image","prerender":false,"fallbackRoutes":[],"origin":"internal","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"route":"/props","isIndex":false,"type":"endpoint","pattern":"^\\/props\\/?$","segments":[[{"content":"props","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/props.ts","pathname":"/props","prerender":false,"fallbackRoutes":[],"distURL":[],"origin":"project","_meta":{"trailingSlash":"ignore"}}}],"base":"/","trailingSlash":"ignore","compressHTML":true,"componentMetadata":[["/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/pages/index.astro",{"propagation":"in-tree","containsHead":true}],["\u0000astro:content",{"propagation":"in-tree","containsHead":false}],["/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/components/Navigation.astro",{"propagation":"in-tree","containsHead":false}],["/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/layouts/Main.astro",{"propagation":"in-tree","containsHead":false}],["/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/pages/[section]/[...page].astro",{"propagation":"in-tree","containsHead":true}],["\u0000@astro-page:src/pages/[section]/[...page]@_@astro",{"propagation":"in-tree","containsHead":false}],["\u0000@astrojs-ssr-virtual-entry",{"propagation":"in-tree","containsHead":false}],["/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/pages/[section]/[page]/[...tab].astro",{"propagation":"in-tree","containsHead":true}],["\u0000@astro-page:src/pages/[section]/[page]/[...tab]@_@astro",{"propagation":"in-tree","containsHead":false}],["\u0000@astro-page:src/pages/index@_@astro",{"propagation":"in-tree","containsHead":false}],["/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/components/Page.astro",{"propagation":"in-tree","containsHead":false}],["/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/components/Masthead.astro",{"propagation":"in-tree","containsHead":false}]],"renderers":[],"clientDirectives":[["idle","(()=>{var l=(n,t)=>{let i=async()=>{await(await n())()},e=typeof t.value==\"object\"?t.value:void 0,s={timeout:e==null?void 0:e.timeout};\"requestIdleCallback\"in window?window.requestIdleCallback(i,s):setTimeout(i,s.timeout||200)};(self.Astro||(self.Astro={})).idle=l;window.dispatchEvent(new Event(\"astro:idle\"));})();"],["load","(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).load=e;window.dispatchEvent(new Event(\"astro:load\"));})();"],["media","(()=>{var n=(a,t)=>{let i=async()=>{await(await a())()};if(t.value){let e=matchMedia(t.value);e.matches?i():e.addEventListener(\"change\",i,{once:!0})}};(self.Astro||(self.Astro={})).media=n;window.dispatchEvent(new Event(\"astro:media\"));})();"],["only","(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).only=e;window.dispatchEvent(new Event(\"astro:only\"));})();"],["visible","(()=>{var a=(s,i,o)=>{let r=async()=>{await(await s())()},t=typeof i.value==\"object\"?i.value:void 0,c={rootMargin:t==null?void 0:t.rootMargin},n=new IntersectionObserver(e=>{for(let l of e)if(l.isIntersecting){n.disconnect(),r();break}},c);for(let e of o.children)n.observe(e)};(self.Astro||(self.Astro={})).visible=a;window.dispatchEvent(new Event(\"astro:visible\"));})();"]],"entryModules":{"\u0000noop-middleware":"_noop-middleware.mjs","\u0000@astro-page:node_modules/astro/dist/assets/endpoint/node@_@js":"pages/_image.astro.mjs","\u0000@astro-page:src/pages/props@_@ts":"pages/props.astro.mjs","\u0000@astro-page:src/pages/[section]/[page]/[...tab]@_@astro":"pages/_section_/_page_/_---tab_.astro.mjs","\u0000@astro-page:src/pages/[section]/[...page]@_@astro":"pages/_section_/_---page_.astro.mjs","\u0000@astro-page:src/pages/index@_@astro":"pages/index.astro.mjs","\u0000@astrojs-ssr-virtual-entry":"entry.mjs","\u0000@astro-renderers":"renderers.mjs","\u0000@astrojs-ssr-adapter":"_@astrojs-ssr-adapter.mjs","\u0000@astrojs-manifest":"manifest_DxJLmW-j.mjs","/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/components/PropsTables.astro":"chunks/PropsTables_PVzRHJNB.mjs","/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/components/CSSTable.astro":"chunks/CSSTable_B8tlH3gz.mjs","/home/runner/work/patternfly-doc-core/patternfly-doc-core/node_modules/astro/dist/assets/services/sharp.js":"chunks/sharp_CbOL3WDk.mjs","/home/runner/work/patternfly-doc-core/patternfly-doc-core/.astro/content-assets.mjs":"chunks/content-assets_DleWbedO.mjs","/home/runner/work/patternfly-doc-core/patternfly-doc-core/.astro/content-modules.mjs":"chunks/content-modules_fX1c2JRG.mjs","\u0000astro:data-layer-content":"chunks/_astro_data-layer-content_D4Ib_RjR.mjs","/home/runner/work/patternfly-doc-core/patternfly-doc-core/textContent/AllComponents.mdx?astroPropagatedAssets":"chunks/AllComponents_CjOtwUH6.mjs","/home/runner/work/patternfly-doc-core/patternfly-doc-core/textContent/examples/Accordion/Accordion.mdx?astroPropagatedAssets":"chunks/Accordion_BJka4Qvb.mjs","/home/runner/work/patternfly-doc-core/patternfly-doc-core/textContent/AllComponents.mdx":"chunks/AllComponents_CRhgTsiT.mjs","/home/runner/work/patternfly-doc-core/patternfly-doc-core/textContent/examples/Accordion/Accordion.mdx":"chunks/Accordion_BQIphkaZ.mjs","/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/components/PageToggle":"_astro/PageToggle.CMZ3C1v1.js","/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/components/Toolbar.tsx":"_astro/Toolbar.CroDQcyv.js","/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/components/CSSTable":"_astro/CSSTable.DC79W1Ct.js","/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/components/section-gallery/SectionGallery":"_astro/SectionGallery.3ABpQwE4.js","/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/components/LiveExample":"_astro/LiveExample.DZkxbJA_.js","/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/components/Navigation.tsx":"_astro/Navigation.kbLxctIo.js","@astrojs/react/client.js":"_astro/client.zs76E0tG.js","/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/layouts/Main.astro?astro&type=script&index=0&lang.ts":"_astro/Main.astro_astro_type_script_index_0_lang.BguqvUxW.js","/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/layouts/Main.astro?astro&type=script&index=1&lang.ts":"_astro/Main.astro_astro_type_script_index_1_lang.BeSTw7zk.js","/home/runner/work/patternfly-doc-core/patternfly-doc-core/node_modules/astro/components/ClientRouter.astro?astro&type=script&index=0&lang.ts":"_astro/ClientRouter.astro_astro_type_script_index_0_lang.Cainpjm5.js","astro:scripts/before-hydration.js":""},"inlinedScripts":[["/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/layouts/Main.astro?astro&type=script&index=0&lang.ts","const n=e=>{requestAnimationFrame(()=>{document.documentElement.classList.toggle(\"pf-v6-theme-dark\",e===\"dark\")})};document.addEventListener(\"astro:before-swap\",()=>{const e=localStorage.getItem(\"theme-preference\");n(e||\"light\")});const o=e=>{const t=document.querySelector(e);t&&t.scrollIntoView({behavior:\"smooth\"})};document.addEventListener(\"DOMContentLoaded\",()=>{if(window.location.hash){const e=window.location.hash;history.replaceState(null,\"\",\" \"),setTimeout(()=>{o(e),history.replaceState(null,\"\",e)},500)}});window.addEventListener(\"hashchange\",()=>{window.location.hash&&o(window.location.hash)});"],["/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/layouts/Main.astro?astro&type=script&index=1&lang.ts","try{localStorage.getItem(\"theme-preference\")===\"dark\"&&document.documentElement.classList.add(\"pf-v6-theme-dark\")}catch(e){console.error(\"Failed to set initial theme:\",e)}"]],"assets":["/_astro/RedHatTextVF.wYvZ7prR.woff2","/_astro/RedHatTextVF-Italic.Dkj_WqbA.woff2","/_astro/RedHatDisplayVF.CYDHf1NI.woff2","/_astro/RedHatDisplayVF-Italic.CRpusWc8.woff2","/_astro/RedHatMonoVF.C4fMH6Vz.woff2","/_astro/RedHatMonoVF-Italic.DGQo2ogW.woff2","/_astro/fa-solid-900.DguXoeIz.woff2","/_astro/pf-v6-pficon.Dy6oiu9u.woff2","/_astro/_page_.CtheD08_.css","/_astro/_page_.D1z73Byz.css","/PF-HorizontalLogo-Color.svg","/PF-HorizontalLogo-Reverse.svg","/avatarImg.svg","/avatarImgDark.svg","/favicon.svg","/_astro/Button.BQCwQ5pE.js","/_astro/CSSTable.DC79W1Ct.js","/_astro/ClientRouter.astro_astro_type_script_index_0_lang.Cainpjm5.js","/_astro/Content.B4M2qzJY.js","/_astro/DropdownList.cxp03sS4.js","/_astro/LiveExample.CxJsMvEq.css","/_astro/LiveExample.DZkxbJA_.js","/_astro/Navigation.kbLxctIo.js","/_astro/PageContext.miTsIqVo.js","/_astro/PageSidebarBody.B0AJe8Hg.js","/_astro/PageToggle.CMZ3C1v1.js","/_astro/SearchInput.DhHo7yPx.js","/_astro/SectionGallery.3ABpQwE4.js","/_astro/Toolbar.CroDQcyv.js","/_astro/ToolbarContent.UH3ZRlHp.js","/_astro/_page_.Chv_bGyU.css","/_astro/_page_.DxJDkZPc.css","/_astro/angle-left-icon.teo8GC0v.js","/_astro/bars-icon.Dk6ua1rr.js","/_astro/client.zs76E0tG.js","/_astro/divider.tlrBPkzg.js","/_astro/github-icon.ByC5XEPt.js","/_astro/index.BQFV5hT1.js","/_astro/index.CAChmxYj.js","/_astro/index.DYVB4vTo.js","/_astro/index.eCxJ45ll.js","/_astro/link-icon.BNHnRn73.js","/_astro/page.BTC3Kf3x.js","/content/typography/line-height.png","/index.html"],"buildFormat":"directory","checkOrigin":true,"serverIslandNameMap":[["/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/components/PropsTables.astro","PropsTables"],["/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/components/CSSTable.astro","CSSTable"]],"key":"1lOkOlgtZurYQPNm3pjo+p5i+iiiDmwJ1pQMCcg5mQI="});
|
|
99
|
+
const manifest = deserializeManifest({"hrefRoot":"file:///home/runner/work/patternfly-doc-core/patternfly-doc-core/","cacheDir":"file:///home/runner/work/patternfly-doc-core/patternfly-doc-core/node_modules/.astro/","outDir":"file:///home/runner/work/patternfly-doc-core/patternfly-doc-core/dist/","srcDir":"file:///home/runner/work/patternfly-doc-core/patternfly-doc-core/src/","publicDir":"file:///home/runner/work/patternfly-doc-core/patternfly-doc-core/public/","buildClientDir":"file:///home/runner/work/patternfly-doc-core/patternfly-doc-core/dist/client/","buildServerDir":"file:///home/runner/work/patternfly-doc-core/patternfly-doc-core/dist/server/","adapterName":"@astrojs/node","routes":[{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"type":"page","component":"_server-islands.astro","params":["name"],"segments":[[{"content":"_server-islands","dynamic":false,"spread":false}],[{"content":"name","dynamic":true,"spread":false}]],"pattern":"^\\/_server-islands\\/([^/]+?)\\/?$","prerender":false,"isIndex":false,"fallbackRoutes":[],"route":"/_server-islands/[name]","origin":"internal","_meta":{"trailingSlash":"ignore"}}},{"file":"index.html","links":[],"scripts":[],"styles":[],"routeData":{"route":"/","isIndex":true,"type":"page","pattern":"^\\/$","segments":[],"params":[],"component":"src/pages/index.astro","pathname":"/","prerender":true,"fallbackRoutes":[],"distURL":[],"origin":"project","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"type":"endpoint","isIndex":false,"route":"/_image","pattern":"^\\/_image\\/?$","segments":[[{"content":"_image","dynamic":false,"spread":false}]],"params":[],"component":"node_modules/astro/dist/assets/endpoint/node.js","pathname":"/_image","prerender":false,"fallbackRoutes":[],"origin":"internal","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"route":"/props","isIndex":false,"type":"endpoint","pattern":"^\\/props\\/?$","segments":[[{"content":"props","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/props.ts","pathname":"/props","prerender":false,"fallbackRoutes":[],"distURL":[],"origin":"project","_meta":{"trailingSlash":"ignore"}}}],"base":"/","trailingSlash":"ignore","compressHTML":true,"componentMetadata":[["/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/pages/index.astro",{"propagation":"in-tree","containsHead":true}],["\u0000astro:content",{"propagation":"in-tree","containsHead":false}],["/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/components/Navigation.astro",{"propagation":"in-tree","containsHead":false}],["/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/layouts/Main.astro",{"propagation":"in-tree","containsHead":false}],["/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/pages/[section]/[...page].astro",{"propagation":"in-tree","containsHead":true}],["\u0000@astro-page:src/pages/[section]/[...page]@_@astro",{"propagation":"in-tree","containsHead":false}],["\u0000@astrojs-ssr-virtual-entry",{"propagation":"in-tree","containsHead":false}],["/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/pages/[section]/[page]/[...tab].astro",{"propagation":"in-tree","containsHead":true}],["\u0000@astro-page:src/pages/[section]/[page]/[...tab]@_@astro",{"propagation":"in-tree","containsHead":false}],["\u0000@astro-page:src/pages/index@_@astro",{"propagation":"in-tree","containsHead":false}],["/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/components/Page.astro",{"propagation":"in-tree","containsHead":false}],["/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/components/Masthead.astro",{"propagation":"in-tree","containsHead":false}]],"renderers":[],"clientDirectives":[["idle","(()=>{var l=(n,t)=>{let i=async()=>{await(await n())()},e=typeof t.value==\"object\"?t.value:void 0,s={timeout:e==null?void 0:e.timeout};\"requestIdleCallback\"in window?window.requestIdleCallback(i,s):setTimeout(i,s.timeout||200)};(self.Astro||(self.Astro={})).idle=l;window.dispatchEvent(new Event(\"astro:idle\"));})();"],["load","(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).load=e;window.dispatchEvent(new Event(\"astro:load\"));})();"],["media","(()=>{var n=(a,t)=>{let i=async()=>{await(await a())()};if(t.value){let e=matchMedia(t.value);e.matches?i():e.addEventListener(\"change\",i,{once:!0})}};(self.Astro||(self.Astro={})).media=n;window.dispatchEvent(new Event(\"astro:media\"));})();"],["only","(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).only=e;window.dispatchEvent(new Event(\"astro:only\"));})();"],["visible","(()=>{var a=(s,i,o)=>{let r=async()=>{await(await s())()},t=typeof i.value==\"object\"?i.value:void 0,c={rootMargin:t==null?void 0:t.rootMargin},n=new IntersectionObserver(e=>{for(let l of e)if(l.isIntersecting){n.disconnect(),r();break}},c);for(let e of o.children)n.observe(e)};(self.Astro||(self.Astro={})).visible=a;window.dispatchEvent(new Event(\"astro:visible\"));})();"]],"entryModules":{"\u0000noop-middleware":"_noop-middleware.mjs","\u0000@astro-page:node_modules/astro/dist/assets/endpoint/node@_@js":"pages/_image.astro.mjs","\u0000@astro-page:src/pages/props@_@ts":"pages/props.astro.mjs","\u0000@astro-page:src/pages/[section]/[page]/[...tab]@_@astro":"pages/_section_/_page_/_---tab_.astro.mjs","\u0000@astro-page:src/pages/[section]/[...page]@_@astro":"pages/_section_/_---page_.astro.mjs","\u0000@astro-page:src/pages/index@_@astro":"pages/index.astro.mjs","\u0000@astrojs-ssr-virtual-entry":"entry.mjs","\u0000@astro-renderers":"renderers.mjs","\u0000@astrojs-ssr-adapter":"_@astrojs-ssr-adapter.mjs","\u0000@astrojs-manifest":"manifest_DsbMfV1U.mjs","/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/components/PropsTables.astro":"chunks/PropsTables_PVzRHJNB.mjs","/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/components/CSSTable.astro":"chunks/CSSTable_B8tlH3gz.mjs","/home/runner/work/patternfly-doc-core/patternfly-doc-core/node_modules/astro/dist/assets/services/sharp.js":"chunks/sharp_CbOL3WDk.mjs","/home/runner/work/patternfly-doc-core/patternfly-doc-core/.astro/content-assets.mjs":"chunks/content-assets_DleWbedO.mjs","/home/runner/work/patternfly-doc-core/patternfly-doc-core/.astro/content-modules.mjs":"chunks/content-modules_fX1c2JRG.mjs","\u0000astro:data-layer-content":"chunks/_astro_data-layer-content_D4Ib_RjR.mjs","/home/runner/work/patternfly-doc-core/patternfly-doc-core/textContent/AllComponents.mdx?astroPropagatedAssets":"chunks/AllComponents_CjOtwUH6.mjs","/home/runner/work/patternfly-doc-core/patternfly-doc-core/textContent/examples/Accordion/Accordion.mdx?astroPropagatedAssets":"chunks/Accordion_BJka4Qvb.mjs","/home/runner/work/patternfly-doc-core/patternfly-doc-core/textContent/AllComponents.mdx":"chunks/AllComponents_CRhgTsiT.mjs","/home/runner/work/patternfly-doc-core/patternfly-doc-core/textContent/examples/Accordion/Accordion.mdx":"chunks/Accordion_BQIphkaZ.mjs","/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/components/PageToggle":"_astro/PageToggle.CMZ3C1v1.js","/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/components/Toolbar.tsx":"_astro/Toolbar.CroDQcyv.js","/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/components/CSSTable":"_astro/CSSTable.DC79W1Ct.js","/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/components/section-gallery/SectionGallery":"_astro/SectionGallery.3ABpQwE4.js","/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/components/LiveExample":"_astro/LiveExample.DjPiO80i.js","/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/components/Navigation.tsx":"_astro/Navigation.kbLxctIo.js","@astrojs/react/client.js":"_astro/client.zs76E0tG.js","/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/layouts/Main.astro?astro&type=script&index=0&lang.ts":"_astro/Main.astro_astro_type_script_index_0_lang.BguqvUxW.js","/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/layouts/Main.astro?astro&type=script&index=1&lang.ts":"_astro/Main.astro_astro_type_script_index_1_lang.BeSTw7zk.js","/home/runner/work/patternfly-doc-core/patternfly-doc-core/node_modules/astro/components/ClientRouter.astro?astro&type=script&index=0&lang.ts":"_astro/ClientRouter.astro_astro_type_script_index_0_lang.Cainpjm5.js","astro:scripts/before-hydration.js":""},"inlinedScripts":[["/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/layouts/Main.astro?astro&type=script&index=0&lang.ts","const n=e=>{requestAnimationFrame(()=>{document.documentElement.classList.toggle(\"pf-v6-theme-dark\",e===\"dark\")})};document.addEventListener(\"astro:before-swap\",()=>{const e=localStorage.getItem(\"theme-preference\");n(e||\"light\")});const o=e=>{const t=document.querySelector(e);t&&t.scrollIntoView({behavior:\"smooth\"})};document.addEventListener(\"DOMContentLoaded\",()=>{if(window.location.hash){const e=window.location.hash;history.replaceState(null,\"\",\" \"),setTimeout(()=>{o(e),history.replaceState(null,\"\",e)},500)}});window.addEventListener(\"hashchange\",()=>{window.location.hash&&o(window.location.hash)});"],["/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/layouts/Main.astro?astro&type=script&index=1&lang.ts","try{localStorage.getItem(\"theme-preference\")===\"dark\"&&document.documentElement.classList.add(\"pf-v6-theme-dark\")}catch(e){console.error(\"Failed to set initial theme:\",e)}"]],"assets":["/_astro/RedHatTextVF.wYvZ7prR.woff2","/_astro/RedHatTextVF-Italic.Dkj_WqbA.woff2","/_astro/RedHatDisplayVF.CYDHf1NI.woff2","/_astro/RedHatDisplayVF-Italic.CRpusWc8.woff2","/_astro/RedHatMonoVF.C4fMH6Vz.woff2","/_astro/RedHatMonoVF-Italic.DGQo2ogW.woff2","/_astro/fa-solid-900.DguXoeIz.woff2","/_astro/pf-v6-pficon.Dy6oiu9u.woff2","/_astro/_page_.CtheD08_.css","/_astro/_page_.D1z73Byz.css","/PF-HorizontalLogo-Color.svg","/PF-HorizontalLogo-Reverse.svg","/avatarImg.svg","/avatarImgDark.svg","/favicon.svg","/_astro/Button.BQCwQ5pE.js","/_astro/CSSTable.DC79W1Ct.js","/_astro/ClientRouter.astro_astro_type_script_index_0_lang.Cainpjm5.js","/_astro/Content.B4M2qzJY.js","/_astro/DropdownList.cxp03sS4.js","/_astro/LiveExample.CxJsMvEq.css","/_astro/LiveExample.DjPiO80i.js","/_astro/Navigation.kbLxctIo.js","/_astro/PageContext.miTsIqVo.js","/_astro/PageSidebarBody.B0AJe8Hg.js","/_astro/PageToggle.CMZ3C1v1.js","/_astro/SearchInput.DhHo7yPx.js","/_astro/SectionGallery.3ABpQwE4.js","/_astro/Toolbar.CroDQcyv.js","/_astro/ToolbarContent.UH3ZRlHp.js","/_astro/_page_.Chv_bGyU.css","/_astro/_page_.DxJDkZPc.css","/_astro/angle-left-icon.teo8GC0v.js","/_astro/bars-icon.Dk6ua1rr.js","/_astro/client.zs76E0tG.js","/_astro/divider.tlrBPkzg.js","/_astro/github-icon.ByC5XEPt.js","/_astro/index.BQFV5hT1.js","/_astro/index.CAChmxYj.js","/_astro/index.DYVB4vTo.js","/_astro/index.eCxJ45ll.js","/_astro/link-icon.BNHnRn73.js","/_astro/page.BTC3Kf3x.js","/content/typography/line-height.png","/index.html"],"buildFormat":"directory","checkOrigin":true,"serverIslandNameMap":[["/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/components/PropsTables.astro","PropsTables"],["/home/runner/work/patternfly-doc-core/patternfly-doc-core/src/components/CSSTable.astro","CSSTable"]],"key":"5qthN9NKgbe06igq35PQCVTlvbCYuIGikH4mitB5nCU="});
|
|
100
100
|
if (manifest.sessionConfig) manifest.sessionConfig.driverModule = null;
|
|
101
101
|
|
|
102
102
|
export { manifest };
|
package/package.json
CHANGED
|
@@ -1,13 +1,23 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, {
|
|
2
|
+
useState,
|
|
3
|
+
Fragment,
|
|
4
|
+
useRef,
|
|
5
|
+
useEffect,
|
|
6
|
+
createRef,
|
|
7
|
+
useReducer,
|
|
8
|
+
} from 'react'
|
|
2
9
|
import { convertToReactComponent } from '@patternfly/ast-helpers'
|
|
3
10
|
import { ErrorBoundary } from 'react-error-boundary'
|
|
4
11
|
import * as reactCoreModule from '@patternfly/react-core'
|
|
5
12
|
import * as reactIconsModule from '@patternfly/react-icons'
|
|
6
|
-
import styles from
|
|
7
|
-
import * as reactTokensModule from
|
|
13
|
+
import styles from '@patternfly/react-styles/css/components/_index'
|
|
14
|
+
import * as reactTokensModule from '@patternfly/react-tokens'
|
|
8
15
|
import { ExampleToolbar } from './ExampleToolbar'
|
|
16
|
+
|
|
9
17
|
interface LiveExampleProps {
|
|
10
|
-
src
|
|
18
|
+
src?: string
|
|
19
|
+
html?: string
|
|
20
|
+
isFullscreenPreview?: boolean
|
|
11
21
|
}
|
|
12
22
|
|
|
13
23
|
function fallbackRender({ error }: any) {
|
|
@@ -42,18 +52,37 @@ function getLivePreview(editorCode: string) {
|
|
|
42
52
|
return <PreviewComponent />
|
|
43
53
|
}
|
|
44
54
|
|
|
45
|
-
export const LiveExample = ({
|
|
46
|
-
|
|
47
|
-
|
|
55
|
+
export const LiveExample = ({
|
|
56
|
+
src,
|
|
57
|
+
html,
|
|
58
|
+
isFullscreenPreview,
|
|
59
|
+
}: LiveExampleProps) => {
|
|
60
|
+
const inputCode = src || html || ''
|
|
61
|
+
const [code, setCode] = useState(inputCode)
|
|
62
|
+
|
|
63
|
+
let livePreview = null
|
|
64
|
+
let lang = 'ts'
|
|
65
|
+
if (html) {
|
|
66
|
+
livePreview = (
|
|
67
|
+
<div
|
|
68
|
+
className={`ws-preview-html ${isFullscreenPreview && 'pf-v6-u-h-100'}`}
|
|
69
|
+
dangerouslySetInnerHTML={{ __html: code }}
|
|
70
|
+
/>
|
|
71
|
+
)
|
|
72
|
+
lang = 'html'
|
|
73
|
+
} else {
|
|
74
|
+
livePreview = getLivePreview(code)
|
|
75
|
+
lang = 'ts'
|
|
76
|
+
}
|
|
48
77
|
|
|
49
78
|
return (
|
|
50
79
|
<ErrorBoundary fallbackRender={fallbackRender}>
|
|
51
80
|
{livePreview}
|
|
52
81
|
<ExampleToolbar
|
|
53
|
-
originalCode={
|
|
82
|
+
originalCode={inputCode}
|
|
54
83
|
code={code}
|
|
55
84
|
setCode={setCode}
|
|
56
|
-
lang=
|
|
85
|
+
lang={lang}
|
|
57
86
|
isFullscreen={false}
|
|
58
87
|
/>
|
|
59
88
|
</ErrorBoundary>
|