Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
This package contains the documentation for the MUI Infra project, which is responsible for the infrastructure and tooling used in the various MUI documentation sites and libraries.

[Read in Markdown](<./app/(shared)/page.mdx>)
[Read in Browser](https://infra.mui.com)

[Read in Browser](https://mui-internal.netlify.app/)

For the most immersive experience, we recommend opening this documentation in VSCode, starting with this README and working deeper into the documentation by navigating through the links provided (ctrl + click). You should have [the MDX extension](https://marketplace.visualstudio.com/items?itemName=unifiedjs.vscode-mdx) installed to view the documentation properly.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,7 @@
padding: 6px;
overflow-x: auto;
}

.codeBlock:focus-visible {
outline: none;
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,7 @@
padding: 6px;
overflow-x: auto;
}

.codeBlock:focus-visible {
outline: none;
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ export default function App() {
'styles.css': {
source: `.container {
padding: 20px;
background: #f5f5f5;
background: #f2eff3;
border-radius: 8px;
}

h1 {
color: #333;
color: #84828e;
margin-bottom: 10px;
}

p {
color: #666;
color: #65636d;
font-size: 14px;
}`,
},
Expand Down
121 changes: 121 additions & 0 deletions docs/app/docs-infra/factories/page.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# Factories

[//]: # 'This file is autogenerated, but the following list can be modified.'

<PagesIndex>

- [Abstract Create Demo](#abstract-create-demo) - [Full Docs](./abstract-create-demo/page.mdx)
- [Create Sitemap](#create-sitemap) [New] - [Full Docs](./create-sitemap/page.mdx)
- [Abstract Create Demo Client](#abstract-create-demo-client) - [Full Docs](./abstract-create-demo-client/page.mdx)
- [Create Demo Data](#create-demo-data) - [Full Docs](./create-demo-data/page.mdx)

[//]: # 'This file is autogenerated, DO NOT EDIT AFTER THIS LINE, run: pnpm docs:validate docs-infra/factories'

## Abstract Create Demo

The `abstractCreateDemo` function helps you create structured demo factories that work seamlessly with the [`CodeHighlighter`](../../components/code-highlighter/page.mdx) component ecosystem. It provides a standardized way to create demos that combine component previews with code display, making it easier to build consistent documentation interfaces.

<details>

<summary>Outline</summary>

- Sections:
- Overview
- Factory Function Requirements
- Implementation
- Global Dependencies
- Loader Configuration
- Related

</details>

[Read more](./abstract-create-demo/page.mdx)

## Create Sitemap

The `createSitemap` factory function defines sitemap data for documentation sites. It works with the webpack loader for build-time precomputation in Next.js builds.

<details>

<summary>Outline</summary>

- Sections:
- Overview
- API Reference
- Parameters
- Returns
- Behavior
- Runtime Loading
- File Structure
- Type Definitions
- CreateSitemapMeta
- Sitemap
- SitemapSectionData
- SitemapPage
- Configuration
- Skip Precomputation
- Webpack Loader Setup
- Integration with Search
- Populating the Sitemap
- Related

</details>

[Read more](./create-sitemap/page.mdx)

## Abstract Create Demo Client

The `abstractCreateDemoClient` function helps you create client-side demo providers that manage external dependencies for live component demos. It creates provider components that supply externals context to child components, enabling dynamic code execution in the browser.

<details>

<summary>Outline</summary>

- Sections:
- Overview
- When to Use Demo Clients
- Factory Function Requirements
- Implementation
- Usage Pattern
- Client Provider Features
- Configuration Options
- AbstractCreateDemoClientOptions
- CreateDemoClientMeta
- Externals Context
- Best Practices
- Example: Complete Live Demo Setup
- Related

</details>

[Read more](./abstract-create-demo-client/page.mdx)

## Create Demo Data

The `createDemoData` utility creates structured demo metadata and component data for use with the [`CodeHighlighter`](../components/code-highlighter/page.mdx) system. It processes demo URLs, components, and metadata to create data objects that can be consumed by demo factories and code highlighting systems.

<details>

<summary>Outline</summary>

- Sections:
- Features
- Usage
- Global Demo Data Structure
- Global Variant Matching
- When to Use
- Related

</details>

[Read more](./create-demo-data/page.mdx)

</PagesIndex>

[//]: # 'This file is autogenerated, but the following metadata can be modified.'

export const metadata = {
robots: {
index: false,
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
display: flex;
gap: 0;
border-bottom: 1px solid #d0cdd7;
background-color: #f5f5f5;
background-color: #f2eff3;
}

.tab,
Expand Down
8 changes: 7 additions & 1 deletion docs/app/docs-infra/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Navigation } from '@/components/Navigation';
import styles from '../layout.module.css';
import { sitemap } from '../sitemap';
import { Search } from '../search';
import Notice from '../notice.mdx';

export const metadata: Metadata = {
title: 'MUI Docs Infra Documentation',
Expand All @@ -26,7 +27,12 @@ export default function RootLayout({
</div>
<div className={styles.contentWrapper}>
<Navigation sitemap={sitemap} />
<div className={styles.container}>{children}</div>
<div className={styles.container}>
<div className={styles.notice}>
<Notice />
</div>
<div className={styles.content}>{children}</div>
</div>
</div>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion docs/app/docs-infra/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ If you want to contribute to the MUI Docs Infra project, please read the [Contri

This project is licensed under the [MIT License](https://github.com/mui/mui-public/blob/master/LICENSE).

This is an internal project, and is not intended for public use. No support or stability guarantees are provided. Use at your own risk.
This is an internal project, and is not intended for public use. No support or stability guarantees are provided.
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
# Functions
# Pipeline

[//]: # 'This file is autogenerated, but the following list can be modified. Automatically sorted alphabetically.'

<PagesIndex>

- [Abstract Create Demo](#abstract-create-demo) - [Full Docs](./abstract-create-demo/page.mdx)
- [Abstract Create Demo Client](#abstract-create-demo-client) - [Full Docs](./abstract-create-demo-client/page.mdx)
- [Create Demo Data](#create-demo-data) - [Full Docs](./create-demo-data/page.mdx)
- [Create Sitemap](#create-sitemap) [New] - [Full Docs](./create-sitemap/page.mdx)
- [HAST Utilities](#hast-utilities) - [Full Docs](./hast-utils/page.mdx)
- [Load Code Variant](#load-code-variant) - [Full Docs](./load-code-variant/page.mdx)
- [Load Precomputed Code Highlighter](#load-precomputed-code-highlighter) - [Full Docs](./load-precomputed-code-highlighter/page.mdx)
Expand All @@ -29,106 +25,7 @@
- [Transform Typescript To Javascript](#transform-typescript-to-javascript) - [Full Docs](./transform-typescript-to-javascript/page.mdx)
- [With Docs Infra](#with-docs-infra) - [Full Docs](./with-docs-infra/page.mdx)

[//]: # 'This file is autogenerated, DO NOT EDIT AFTER THIS LINE, run: pnpm docs:validate docs-infra/functions'

## Abstract Create Demo

The `abstractCreateDemo` function helps you create structured demo factories that work seamlessly with the [`CodeHighlighter`](../../components/code-highlighter/page.mdx) component ecosystem. It provides a standardized way to create demos that combine component previews with code display, making it easier to build consistent documentation interfaces.

<details>

<summary>Outline</summary>

- Sections:
- Overview
- Factory Function Requirements
- Implementation
- Global Dependencies
- Loader Configuration
- Related

</details>

[Read more](./abstract-create-demo/page.mdx)

## Abstract Create Demo Client

The `abstractCreateDemoClient` function helps you create client-side demo providers that manage external dependencies for live component demos. It creates provider components that supply externals context to child components, enabling dynamic code execution in the browser.

<details>

<summary>Outline</summary>

- Sections:
- Overview
- When to Use Demo Clients
- Factory Function Requirements
- Implementation
- Usage Pattern
- Client Provider Features
- Configuration Options
- AbstractCreateDemoClientOptions
- CreateDemoClientMeta
- Externals Context
- Best Practices
- Example: Complete Live Demo Setup
- Related

</details>

[Read more](./abstract-create-demo-client/page.mdx)

## Create Demo Data

The `createDemoData` utility creates structured demo metadata and component data for use with the [`CodeHighlighter`](../components/code-highlighter/page.mdx) system. It processes demo URLs, components, and metadata to create data objects that can be consumed by demo factories and code highlighting systems.

<details>

<summary>Outline</summary>

- Sections:
- Features
- Usage
- Global Demo Data Structure
- Global Variant Matching
- When to Use
- Related

</details>

[Read more](./create-demo-data/page.mdx)

## Create Sitemap

The `createSitemap` factory function defines sitemap data for documentation sites. It works with the webpack loader for build-time precomputation in Next.js builds.

<details>

<summary>Outline</summary>

- Sections:
- Overview
- API Reference
- Parameters
- Returns
- Behavior
- Runtime Loading
- File Structure
- Type Definitions
- CreateSitemapMeta
- Sitemap
- SitemapSectionData
- SitemapPage
- Configuration
- Skip Precomputation
- Webpack Loader Setup
- Integration with Search
- Populating the Sitemap
- Related

</details>

[Read more](./create-sitemap/page.mdx)
[//]: # 'This file is autogenerated, DO NOT EDIT AFTER THIS LINE, run: pnpm docs:validate docs-infra/pipeline'

## HAST Utilities

Expand Down
18 changes: 18 additions & 0 deletions docs/app/global.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
html {
/* Stable scrollbar */
overflow-y: scroll;
word-break: break-word;
}

body {
font-synthesis: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

*,
::before,
::after {
box-sizing: border-box;
}

@supports (view-transition-name: none) {
::view-transition-old(main-content) {
animation-duration: 200ms;
Expand Down
Loading
Loading