diff --git a/.circleci/config.yml b/.circleci/config.yml index c165a9cbb65..554d8bcac56 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -90,12 +90,6 @@ jobs: - checkout - code-infra/install-deps - code-infra/check-static-changes - - run: - name: Generate the documentation - command: pnpm docs:api - - run: - name: '`pnpm docs:api` changes committed?' - command: git add -A && git diff --exit-code --staged - run: name: '`pnpm extract-error-codes` changes committed?' command: | diff --git a/docs/next.config.mjs b/docs/next.config.mjs index eb60c4c1dd1..f2b60c057aa 100644 --- a/docs/next.config.mjs +++ b/docs/next.config.mjs @@ -12,7 +12,6 @@ import remarkTypography from 'remark-typography'; import { rehypeQuickNav } from 'docs/src/components/QuickNav/rehypeQuickNav.mjs'; import { rehypeConcatHeadings } from 'docs/src/components/QuickNav/rehypeConcatHeadings.mjs'; import { rehypeKbd } from 'docs/src/components/Kbd/rehypeKbd.mjs'; -import { rehypeReference } from 'docs/src/components/ReferenceTable/rehypeReference.mjs'; import { rehypeSyntaxHighlighting } from 'docs/src/syntax-highlighting/index.mjs'; import { rehypeSlug } from 'docs/src/components/QuickNav/rehypeSlug.mjs'; import { rehypeSubtitle } from 'docs/src/components/Subtitle/rehypeSubtitle.mjs'; @@ -46,7 +45,6 @@ const withMdx = nextMdx({ transformMarkdownRelativePaths, ], rehypePlugins: [ - rehypeReference, ...rehypeSyntaxHighlighting, rehypeSlug, rehypeConcatHeadings, @@ -74,6 +72,10 @@ const nextConfig = { pageExtensions: ['mdx', 'tsx'], turbopack: { rules: { + './src/app/**/types.ts': { + as: '*.ts', + loaders: ['@mui/internal-docs-infra/pipeline/loadPrecomputedTypes'], + }, './src/app/sitemap/index.ts': { as: '*.ts', loaders: ['@mui/internal-docs-infra/pipeline/loadPrecomputedSitemap'], @@ -90,6 +92,16 @@ const nextConfig = { }, webpack: (config, { defaultLoaders }) => { // for production builds + config.module.rules.push({ + test: /[/\\\\]types\.ts$/, + use: [ + defaultLoaders.babel, + { + loader: '@mui/internal-docs-infra/pipeline/loadPrecomputedTypes', + options: { performance: { logging: true } }, + }, + ], + }); config.module.rules.push({ test: /[/\\\\]sitemap[/\\\\]index\.ts$/, use: [defaultLoaders.babel, '@mui/internal-docs-infra/pipeline/loadPrecomputedSitemap'], diff --git a/docs/package.json b/docs/package.json index cee5fc474ba..2db86053460 100644 --- a/docs/package.json +++ b/docs/package.json @@ -20,7 +20,7 @@ "@base-ui/utils": "workspace:*", "@mdx-js/loader": "^3.1.1", "@mdx-js/react": "^3.1.1", - "@mui/internal-docs-infra": "0.4.1-canary.7", + "@mui/internal-docs-infra": "https://pkg.pr.new/mui/mui-public/@mui/internal-docs-infra@dcc912a", "@next/mdx": "^16.1.5", "@react-spring/web": "^10.0.3", "@stefanprobst/rehype-extract-toc": "^3.0.0", diff --git a/docs/reference/generated/accordion-header.json b/docs/reference/generated/accordion-header.json deleted file mode 100644 index 1a823040ed9..00000000000 --- a/docs/reference/generated/accordion-header.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "AccordionHeader", - "description": "A heading that labels the corresponding panel.\nRenders an `

` element.", - "props": { - "className": { - "type": "string | ((state: Accordion.Item.State) => string | undefined)", - "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state.", - "detailedType": "| string\n| ((state: Accordion.Item.State) => string | undefined)" - }, - "style": { - "type": "CSSProperties | ((state: Accordion.Item.State) => CSSProperties | undefined)", - "detailedType": "| React.CSSProperties\n| ((\n state: Accordion.Item.State,\n ) => CSSProperties | undefined)\n| undefined" - }, - "render": { - "type": "ReactElement | ((props: HTMLProps, state: Accordion.Item.State) => ReactElement)", - "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render.", - "detailedType": "| ReactElement\n| ((\n props: HTMLProps,\n state: Accordion.Item.State,\n ) => ReactElement)" - } - }, - "dataAttributes": { - "data-open": { - "description": "Present when the accordion item is open." - }, - "data-disabled": { - "description": "Present when the accordion item is disabled." - }, - "data-index": { - "description": "Indicates the index of the accordion item.", - "type": "number" - } - }, - "cssVariables": {} -} diff --git a/docs/reference/generated/accordion-item.json b/docs/reference/generated/accordion-item.json deleted file mode 100644 index c30e461b54e..00000000000 --- a/docs/reference/generated/accordion-item.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "AccordionItem", - "description": "Groups an accordion header with the corresponding panel.\nRenders a `
` element.", - "props": { - "value": { - "type": "any", - "description": "A unique value that identifies this accordion item.\nIf no value is provided, a unique ID will be generated automatically.\nUse when controlling the accordion programmatically, or to set an initial\nopen state.", - "example": "```tsx\n\n // initially open\n // initially closed\n\n```" - }, - "onOpenChange": { - "type": "((open: boolean, eventDetails: Accordion.Item.ChangeEventDetails) => void)", - "description": "Event handler called when the panel is opened or closed.", - "detailedType": "| ((\n open: boolean,\n eventDetails: Accordion.Item.ChangeEventDetails,\n ) => void)\n| undefined" - }, - "disabled": { - "type": "boolean", - "default": "false", - "description": "Whether the component should ignore user interaction.", - "detailedType": "boolean | undefined" - }, - "className": { - "type": "string | ((state: Accordion.Item.State) => string | undefined)", - "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state.", - "detailedType": "| string\n| ((state: Accordion.Item.State) => string | undefined)" - }, - "style": { - "type": "CSSProperties | ((state: Accordion.Item.State) => CSSProperties | undefined)", - "detailedType": "| React.CSSProperties\n| ((\n state: Accordion.Item.State,\n ) => CSSProperties | undefined)\n| undefined" - }, - "render": { - "type": "ReactElement | ((props: HTMLProps, state: Accordion.Item.State) => ReactElement)", - "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render.", - "detailedType": "| ReactElement\n| ((\n props: HTMLProps,\n state: Accordion.Item.State,\n ) => ReactElement)" - } - }, - "dataAttributes": { - "data-open": { - "description": "Present when the accordion item is open." - }, - "data-disabled": { - "description": "Present when the accordion item is disabled." - }, - "data-index": { - "description": "Indicates the index of the accordion item.", - "type": "number" - } - }, - "cssVariables": {} -} diff --git a/docs/reference/generated/accordion-panel.json b/docs/reference/generated/accordion-panel.json deleted file mode 100644 index 0657a0ec0e4..00000000000 --- a/docs/reference/generated/accordion-panel.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "name": "AccordionPanel", - "description": "A collapsible panel with the accordion item contents.\nRenders a `
` element.", - "props": { - "hiddenUntilFound": { - "type": "boolean", - "default": "false", - "description": "Allows the browser’s built-in page search to find and expand the panel contents.\n\nOverrides the `keepMounted` prop and uses `hidden=\"until-found\"`\nto hide the element without removing it from the DOM.", - "detailedType": "boolean | undefined" - }, - "className": { - "type": "string | ((state: Accordion.Panel.State) => string | undefined)", - "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state.", - "detailedType": "| string\n| ((state: Accordion.Panel.State) => string | undefined)" - }, - "style": { - "type": "CSSProperties | ((state: Accordion.Panel.State) => CSSProperties | undefined)", - "detailedType": "| React.CSSProperties\n| ((\n state: Accordion.Panel.State,\n ) => CSSProperties | undefined)\n| undefined" - }, - "keepMounted": { - "type": "boolean", - "default": "false", - "description": "Whether to keep the element in the DOM while the panel is closed.\nThis prop is ignored when `hiddenUntilFound` is used.", - "detailedType": "boolean | undefined" - }, - "render": { - "type": "ReactElement | ((props: HTMLProps, state: Accordion.Panel.State) => ReactElement)", - "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render.", - "detailedType": "| ReactElement\n| ((\n props: HTMLProps,\n state: Accordion.Panel.State,\n ) => ReactElement)" - } - }, - "dataAttributes": { - "data-open": { - "description": "Present when the accordion panel is open." - }, - "data-orientation": { - "description": "Indicates the orientation of the accordion." - }, - "data-disabled": { - "description": "Present when the accordion item is disabled." - }, - "data-index": { - "description": "Indicates the index of the accordion item.", - "type": "number" - }, - "data-starting-style": { - "description": "Present when the panel is animating in." - }, - "data-ending-style": { - "description": "Present when the panel is animating out." - } - }, - "cssVariables": { - "--accordion-panel-height": { - "description": "The accordion panel's height.", - "type": "number" - }, - "--accordion-panel-width": { - "description": "The accordion panel's width.", - "type": "number" - } - } -} diff --git a/docs/reference/generated/accordion-root.json b/docs/reference/generated/accordion-root.json deleted file mode 100644 index 647038c9956..00000000000 --- a/docs/reference/generated/accordion-root.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "name": "AccordionRoot", - "description": "Groups all parts of the accordion.\nRenders a `
` element.", - "props": { - "defaultValue": { - "type": "any[]", - "description": "The uncontrolled value of the item(s) that should be initially expanded.\n\nTo render a controlled accordion, use the `value` prop instead.", - "detailedType": "any[] | undefined" - }, - "value": { - "type": "any[]", - "description": "The controlled value of the item(s) that should be expanded.\n\nTo render an uncontrolled accordion, use the `defaultValue` prop instead.", - "detailedType": "any[] | undefined" - }, - "onValueChange": { - "type": "((value: any[], eventDetails: Accordion.Root.ChangeEventDetails) => void)", - "description": "Event handler called when an accordion item is expanded or collapsed.\nProvides the new value as an argument.", - "detailedType": "| ((\n value: any[],\n eventDetails: Accordion.Root.ChangeEventDetails,\n ) => void)\n| undefined" - }, - "hiddenUntilFound": { - "type": "boolean", - "default": "false", - "description": "Allows the browser’s built-in page search to find and expand the panel contents.\n\nOverrides the `keepMounted` prop and uses `hidden=\"until-found\"`\nto hide the element without removing it from the DOM.", - "detailedType": "boolean | undefined" - }, - "loopFocus": { - "type": "boolean", - "default": "true", - "description": "Whether to loop keyboard focus back to the first item\nwhen the end of the list is reached while using the arrow keys.", - "detailedType": "boolean | undefined" - }, - "multiple": { - "type": "boolean", - "default": "false", - "description": "Whether multiple items can be open at the same time.", - "detailedType": "boolean | undefined" - }, - "disabled": { - "type": "boolean", - "default": "false", - "description": "Whether the component should ignore user interaction.", - "detailedType": "boolean | undefined" - }, - "orientation": { - "type": "Orientation", - "default": "'vertical'", - "description": "The visual orientation of the accordion.\nControls whether roving focus uses left/right or up/down arrow keys.", - "detailedType": "'horizontal' | 'vertical' | undefined" - }, - "className": { - "type": "string | ((state: Accordion.Root.State) => string | undefined)", - "description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state.", - "detailedType": "| string\n| ((state: Accordion.Root.State) => string | undefined)" - }, - "style": { - "type": "CSSProperties | ((state: Accordion.Root.State) => CSSProperties | undefined)", - "detailedType": "| React.CSSProperties\n| ((\n state: Accordion.Root.State,\n ) => CSSProperties | undefined)\n| undefined" - }, - "keepMounted": { - "type": "boolean", - "default": "false", - "description": "Whether to keep the element in the DOM while the panel is closed.\nThis prop is ignored when `hiddenUntilFound` is used.", - "detailedType": "boolean | undefined" - }, - "render": { - "type": "ReactElement | ((props: HTMLProps, state: Accordion.Root.State) => ReactElement)", - "description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render.", - "detailedType": "| ReactElement\n| ((\n props: HTMLProps,\n state: Accordion.Root.State,\n ) => ReactElement)" - } - }, - "dataAttributes": { - "data-orientation": { - "description": "Indicates the orientation of the accordion." - }, - "data-disabled": { - "description": "Present when the accordion is disabled." - } - }, - "cssVariables": {} -} diff --git a/docs/reference/generated/accordion-trigger.json b/docs/reference/generated/accordion-trigger.json deleted file mode 100644 index 54bfa35c78d..00000000000 --- a/docs/reference/generated/accordion-trigger.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "AccordionTrigger", - "description": "A button that opens and closes the corresponding panel.\nRenders a `