diff --git a/docs/next.config.mjs b/docs/next.config.mjs index 0f63dcbdbc6..55eb09cc864 100644 --- a/docs/next.config.mjs +++ b/docs/next.config.mjs @@ -50,6 +50,10 @@ const nextConfig = { pageExtensions: ['mdx', 'tsx'], turbopack: { rules: { + './app/**/types.ts': { + as: '*.ts', + loaders: ['@mui/internal-docs-infra/pipeline/loadPrecomputedTypesMeta'], + }, './src/app/**/demos/*/index.ts': { as: '*.ts', loaders: ['@mui/internal-docs-infra/pipeline/loadPrecomputedCodeHighlighter'], @@ -62,6 +66,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/loadPrecomputedTypesMeta', + options: { performance: { logging: true } }, + }, + ], + }); config.module.rules.push({ test: /\/demos\/[^/]+\/index\.ts$/, use: [ diff --git a/docs/package.json b/docs/package.json index 48a0c159861..52bfd2d494b 100644 --- a/docs/package.json +++ b/docs/package.json @@ -21,7 +21,7 @@ "@emotion/styled": "^11.14.1", "@mdx-js/loader": "^3.1.1", "@mdx-js/react": "^3.1.1", - "@mui/internal-docs-infra": "^0.2.3-canary.10", + "@mui/internal-docs-infra": "https://pkg.pr.new/mui/mui-public/@mui/internal-docs-infra@e412f8d", "@next/mdx": "^15.5.6", "@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 2e4cd39b3c5..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": { - "style": { - "type": "CSSProperties | ((state: Accordion.Item.State) => CSSProperties | undefined)", - "detailedType": "| React.CSSProperties\n| ((\n state: Accordion.Item.State,\n ) => CSSProperties | undefined)\n| 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)" - }, - "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 5bf6dc5e0d3..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" - }, - "style": { - "type": "CSSProperties | ((state: Accordion.Item.State) => CSSProperties | undefined)", - "detailedType": "| React.CSSProperties\n| ((\n state: Accordion.Item.State,\n ) => CSSProperties | undefined)\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)" - }, - "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 24ee5bbbbdb..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" - }, - "style": { - "type": "CSSProperties | ((state: Accordion.Panel.State) => CSSProperties | undefined)", - "detailedType": "| React.CSSProperties\n| ((\n state: Accordion.Panel.State,\n ) => CSSProperties | undefined)\n| 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)" - }, - "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 fa60b62cebc..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" - }, - "multiple": { - "type": "boolean", - "default": "true", - "description": "Whether multiple items can be open at the same time.", - "detailedType": "boolean | undefined" - }, - "style": { - "type": "CSSProperties | ((state: Accordion.Root.State) => CSSProperties | undefined)", - "detailedType": "| React.CSSProperties\n| ((\n state: Accordion.Root.State,\n ) => CSSProperties | undefined)\n| undefined" - }, - "disabled": { - "type": "boolean", - "default": "false", - "description": "Whether the component should ignore user interaction.", - "detailedType": "boolean | undefined" - }, - "loop": { - "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" - }, - "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)" - }, - "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 cbe22facaec..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 `